* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #667eea;
    --secondary-color: #764ba2;
    --accent-color: #f093fb;
    --success-color: #28a745;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --light-color: #f8f9fa;
    --dark-color: #343a40;
    --gray-color: #6c757d;
    --border-radius: 12px;
    --box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --gradient: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    --text-color: #333;
    --text-light: #666;
    --text-dark: #222;
    --sidebar-width: 280px;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: var(--gradient);
    min-height: 100vh;
    color: var(--text-color);
    line-height: 1.6;
    overflow-x: hidden;
}

.mobile-menu-btn {
    display: none;
    position: fixed;
    top: 15px;
    left: 15px;
    z-index: 1000;
    padding: 12px 20px;
    background: rgba(255, 255, 255, 0.95);
    border: none;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    color: var(--primary-color);
    align-items: center;
    gap: 8px;
    backdrop-filter: blur(10px);
}

.main-container {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: var(--sidebar-width);
    background: rgba(255, 255, 255, 0.95);
    padding: 20px;
    box-shadow: 4px 0 20px rgba(0, 0, 0, 0.15);
    backdrop-filter: blur(10px);
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
    z-index: 100;
}

.sidebar-header {
    text-align: center;
    padding: 20px 15px;
    background: var(--gradient);
    border-radius: var(--border-radius);
    margin-bottom: 20px;
    color: white;
}

.sidebar-header h1 {
    font-size: 1.8rem;
    margin-bottom: 5px;
    font-weight: 800;
}

.sidebar-header p {
    font-size: 0.9rem;
    opacity: 0.9;
}

.tools-nav {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.tool-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    background: white;
    border-radius: 10px;
    cursor: pointer;
    transition: var(--transition);
    border: 2px solid transparent;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.tool-item:hover {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1), rgba(118, 75, 162, 0.1));
    border-color: var(--primary-color);
    transform: translateX(5px);
}

.tool-item.active {
    background: var(--gradient);
    color: white;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.tool-item.active .tool-name {
    color: white;
}

.tool-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
}

.tool-name {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-dark);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.main-content {
    flex: 1;
    padding: 30px;
    overflow-y: auto;
}

.tool {
    display: none;
    background: rgba(255, 255, 255, 0.95);
    border-radius: var(--border-radius);
    padding: 30px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    backdrop-filter: blur(10px);
    min-height: calc(100vh - 60px);
    animation: fadeIn 0.4s ease-out;
}

.tool.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.tool-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid rgba(102, 126, 234, 0.2);
    flex-wrap: wrap;
    gap: 15px;
}

.tool-header h2 {
    font-size: 1.8rem;
    color: var(--text-dark);
    font-weight: 700;
    background: linear-gradient(135deg, var(--text-dark), var(--primary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.tool-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.action-btn {
    padding: 10px 18px;
    border: none;
    border-radius: 8px;
    background: var(--gradient);
    color: white;
    cursor: pointer;
    transition: var(--transition);
    font-size: 0.9rem;
    font-weight: 500;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.action-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(102, 126, 234, 0.6);
}

input[type="text"],
input[type="number"],
input[type="email"],
input[type="password"],
textarea,
select {
    padding: 12px 16px;
    border: 2px solid rgba(102, 126, 234, 0.2);
    border-radius: 8px;
    font-size: 1rem;
    transition: var(--transition);
    font-family: inherit;
    background: white;
    color: var(--text-color);
}

input[type="text"]:focus,
input[type="number"]:focus,
input[type="email"]:focus,
input[type="password"]:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

button {
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    font-family: inherit;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: var(--transition);
    z-index: -1;
}

button:hover::before {
    left: 100%;
}

::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: rgba(102, 126, 234, 0.1);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, var(--primary-color), var(--secondary-color));
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, var(--secondary-color), var(--primary-color));
}

.calculator-container {
    max-width: 400px;
    margin: 0 auto;
}

.calculator-display {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    text-align: right;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

.display {
    font-size: 2rem;
    font-weight: bold;
    color: #333;
    min-height: 40px;
}

.calculator-buttons {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
}

.calc-btn {
    padding: 18px;
    border: none;
    border-radius: 8px;
    font-size: 1.2rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.calc-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.calc-btn.number {
    background: #f8f9fa;
    color: #333;
}

.calc-btn.operator {
    background: #ffc107;
    color: #333;
}

.calc-btn.equals {
    background: #28a745;
    color: white;
    grid-row: span 2;
}

.calc-btn.clear {
    background: #dc3545;
    color: white;
}

.calc-btn.backspace {
    background: #6c757d;
    color: white;
}

.calc-btn.zero {
    grid-column: span 2;
}

.notepad-container {
    width: 100%;
}

#note-content {
    width: 100%;
    height: 400px;
    padding: 20px;
    border: 2px solid #f0f0f0;
    border-radius: 8px;
    font-size: 1rem;
    font-family: inherit;
    resize: vertical;
    line-height: 1.6;
}

.todo-container {
    width: 100%;
}

.todo-input-area {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

#todo-input {
    flex: 1;
    padding: 12px;
    border: 2px solid #f0f0f0;
    border-radius: 8px;
}

.add-todo-btn {
    padding: 12px 24px;
    background: #667eea;
    color: white;
}

.add-todo-btn:hover {
    background: #5a6fd8;
}

.todo-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.todo-item {
    display: flex;
    align-items: center;
    padding: 12px;
    background: #f8f9fa;
    border-radius: 8px;
}

.todo-item input[type="checkbox"] {
    margin-right: 12px;
    transform: scale(1.2);
}

.todo-item span {
    flex: 1;
}

.todo-item.completed span {
    text-decoration: line-through;
    color: #6c757d;
}

.todo-item button {
    padding: 6px 12px;
    background: #dc3545;
    color: white;
    font-size: 0.8rem;
}

.timer-container {
    text-align: center;
    max-width: 500px;
    margin: 0 auto;
}

.timer-display {
    margin-bottom: 30px;
}

#timer-time {
    font-size: 4rem;
    font-weight: bold;
    color: #333;
    font-family: 'Courier New', monospace;
    background: #f8f9fa;
    padding: 20px;
    border-radius: 12px;
}

.timer-controls {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.timer-btn {
    padding: 15px 30px;
    font-size: 1.1rem;
    font-weight: bold;
}

.timer-btn:nth-child(1) {
    background: #28a745;
    color: white;
}

.timer-btn:nth-child(2) {
    background: #ffc107;
    color: #333;
}

.timer-btn:nth-child(3) {
    background: #dc3545;
    color: white;
}

.converter-container {
    max-width: 600px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 20px;
    align-items: center;
}

.converter-input,
.converter-output {
    display: flex;
    gap: 10px;
    width: 100%;
    max-width: 400px;
}

#convert-value,
#convert-result {
    flex: 1;
    padding: 12px;
}

.converter-arrow {
    font-size: 2rem;
    color: #667eea;
    font-weight: bold;
}

.convert-btn {
    padding: 12px 30px;
    background: #667eea;
    color: white;
    font-weight: bold;
}

.password-container {
    max-width: 500px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.password-output {
    display: flex;
    gap: 10px;
}

#password-result {
    flex: 1;
    font-family: 'Courier New', monospace;
    background: #f8f9fa;
}

.copy-btn {
    padding: 12px 20px;
    background: #667eea;
    color: white;
}

.password-options {
    display: flex;
    flex-direction: column;
    gap: 12px;
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
}

.password-options label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.password-options input[type="checkbox"] {
    transform: scale(1.2);
}

.password-length {
    margin-top: 10px;
    padding-top: 15px;
    border-top: 1px solid #e0e0e0;
}

.password-length label {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    font-weight: bold;
}

#password-length {
    width: 100%;
    cursor: pointer;
}

.generate-btn {
    padding: 15px;
    background: #667eea;
    color: white;
    font-size: 1.1rem;
    font-weight: bold;
}

.json-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.json-input,
.json-output {
    display: flex;
    flex-direction: column;
}

.json-input label,
.json-output label {
    font-weight: bold;
    margin-bottom: 10px;
    color: #333;
}

#json-input,
#json-output {
    width: 100%;
    height: 300px;
    font-family: 'Courier New', monospace;
    resize: vertical;
}

.json-status {
    padding: 15px;
    border-radius: 8px;
    font-size: 0.95rem;
}

.json-status.success {
    background: #d4edda;
    color: #155724;
}

.json-status.error {
    background: #f8d7da;
    color: #721c24;
}

.base64-container {
    max-width: 800px;
    margin: 0 auto;
}

.base64-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.base64-tab {
    padding: 12px 24px;
    border: 2px solid #f0f0f0;
    border-radius: 8px;
    background: white;
    cursor: transition;
}

.base64-tab.active {
    background: #667eea;
    color: white;
    border-color: #667eea;
}

.base64-input textarea,
.base64-output textarea {
    width: 100%;
    height: 150px;
    font-family: 'Courier New', monospace;
    resize: vertical;
}

.base64-actions {
    display: flex;
    gap: 10px;
    margin: 15px 0;
}

.base64-btn {
    padding: 12px 24px;
    background: #667eea;
    color: white;
}

.base64-btn.clear {
    background: #6c757d;
}

.color-container {
    max-width: 600px;
    margin: 0 auto;
}

.color-preview {
    width: 100%;
    height: 100px;
    border-radius: 12px;
    margin-bottom: 25px;
    background: #FFFFFF;
    border: 2px solid #f0f0f0;
}

.color-input-group {
    margin-bottom: 20px;
}

.color-input-group label {
    display: block;
    font-weight: bold;
    margin-bottom: 10px;
    color: #333;
}

#color-hex {
    width: 100%;
    font-family: 'Courier New', monospace;
    text-transform: uppercase;
}

.rgb-inputs,
.hsl-inputs {
    display: flex;
    gap: 10px;
}

.rgb-inputs input,
.hsl-inputs input {
    flex: 1;
}

.color-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.color-btn {
    flex: 1;
    min-width: 120px;
    padding: 12px;
    background: #667eea;
    color: white;
}

.timestamp-container {
    max-width: 800px;
    margin: 0 auto;
}

.timestamp-section {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 20px;
}

.timestamp-section h3 {
    margin-bottom: 15px;
    color: #333;
}

.timestamp-input {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

#timestamp-input {
    flex: 1;
}

#date-input {
    flex: 1;
}

.timestamp-btn {
    padding: 12px 24px;
    background: #667eea;
    color: white;
    white-space: nowrap;
}

.timestamp-btn.refresh {
    background: #28a745;
}

.timestamp-result input {
    width: 100%;
    background: white;
}

.timestamp-current {
    background: #e8f4fd;
    padding: 20px;
    border-radius: 12px;
    border: 2px solid #b8daff;
}

.timestamp-current h3 {
    color: #004085;
}

.current-time {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 15px;
}

#current-timestamp,
#current-datetime {
    font-size: 1rem;
    color: #333;
    font-family: 'Courier New', monospace;
}

.random-container {
    max-width: 800px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.random-section {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 12px;
}

.random-section h3 {
    margin-bottom: 15px;
    color: #333;
}

.random-inputs {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.random-inputs input {
    width: 80px;
    text-align: center;
}

.random-btn {
    width: 100%;
    padding: 12px;
    background: #667eea;
    color: white;
    margin-bottom: 15px;
}

.random-result {
    display: flex;
    gap: 10px;
}

.random-result input {
    flex: 1;
    font-family: 'Courier New', monospace;
    background: white;
}

.regex-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.regex-input-row {
    display: flex;
    gap: 20px;
    align-items: center;
}

.regex-input {
    flex: 1;
    font-family: 'Courier New', monospace;
}

.regex-flags {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: bold;
}

.flags-input {
    width: 80px;
    text-align: center;
}

.regex-presets {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.regex-presets span {
    font-weight: bold;
    color: #666;
}

.regex-presets button {
    padding: 8px 16px;
    border: 1px solid #667eea;
    border-radius: 20px;
    background: white;
    color: #667eea;
}

.regex-test-text label {
    display: block;
    font-weight: bold;
    margin-bottom: 10px;
}

.regex-editor {
    min-height: 150px;
    padding: 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 0.95rem;
    line-height: 1.6;
    background: white;
    outline: none;
}

.regex-editor:focus {
    border-color: #667eea;
}

.regex-editor .highlight {
    background: #fff3cd;
    border-radius: 2px;
}

.regex-results {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
}

.match-count {
    font-weight: bold;
    margin-bottom: 15px;
    color: #28a745;
}

.match-groups {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.match-group-item {
    padding: 10px;
    background: white;
    border-radius: 6px;
    border-left: 4px solid #667eea;
}

.cssbox-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 25px;
}

.cssbox-preview {
    grid-column: 1 / -1;
    height: 150px;
    background: linear-gradient(135deg, #f5f5f5 25%, #e0e0e0 25%, #e0e0e0 50%, #f5f5f5 50%, #f5f5f5 75%, #e0e0e0 75%, #e0e0e0 100%);
    background-size: 20px 20px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cssbox-preview-element {
    width: 100px;
    height: 100px;
    background: white;
    border-radius: 8px;
}

.cssbox-controls {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.control-group {
    display: flex;
    align-items: center;
    gap: 15px;
}

.control-group label {
    width: 100px;
    font-weight: bold;
    flex-shrink: 0;
}

.control-group input[type="range"] {
    flex: 1;
    cursor: pointer;
}

.control-group input[type="color"] {
    width: 50px;
    height: 35px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
}

.control-group select {
    flex: 1;
    padding: 10px;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
}

.cssbox-output {
    grid-column: 1 / -1;
}

.cssbox-output label {
    display: block;
    font-weight: bold;
    margin-bottom: 10px;
}

#cssbox-code {
    width: 100%;
    height: 100px;
    font-family: 'Courier New', monospace;
    resize: vertical;
    background: #f8f9fa;
}

.copy-css-btn {
    margin-top: 10px;
    padding: 10px 20px;
    background: #667eea;
    color: white;
}

.image-container {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.image-upload {
    border: 2px dashed #667eea;
    border-radius: 12px;
    padding: 40px;
    text-align: center;
    cursor: pointer;
    position: relative;
}

.image-upload input {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

.image-settings {
    display: flex;
    flex-direction: column;
    gap: 15px;
    background: #f8f9fa;
    padding: 20px;
    border-radius: 12px;
}

.setting-row {
    display: flex;
    align-items: center;
    gap: 15px;
}

.setting-row label {
    width: 100px;
    font-weight: bold;
}

.setting-row select {
    flex: 1;
}

.setting-row input[type="range"] {
    flex: 1;
    cursor: pointer;
}

.compress-btn {
    padding: 15px 30px;
    background: #28a745;
    color: white;
    font-size: 1.1rem;
}

.image-preview {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.preview-original,
.preview-result {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 12px;
    text-align: center;
}

.preview-original h4,
.preview-result h4 {
    margin-bottom: 15px;
    color: #333;
}

.preview-original img,
.preview-result img {
    max-width: 100%;
    max-height: 300px;
    border-radius: 8px;
}

.download-image-btn {
    display: inline-block;
    margin-top: 15px;
    padding: 10px 20px;
    background: #667eea;
    color: white;
    text-decoration: none;
    border-radius: 6px;
}

.markdown-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    height: 500px;
}

.markdown-input {
    display: flex;
    flex-direction: column;
}

.markdown-input textarea {
    flex: 1;
    font-family: 'Courier New', monospace;
    resize: none;
}

.markdown-preview {
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    padding: 15px;
    overflow: auto;
    background: white;
}

.crypto-container {
    max-width: 800px;
    margin: 0 auto;
}

.crypto-input textarea {
    width: 100%;
    height: 100px;
    resize: vertical;
}

.crypto-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 20px 0;
}

.crypto-btn {
    padding: 10px 20px;
    background: #667eea;
    color: white;
}

.crypto-output label {
    display: block;
    font-weight: bold;
    margin-bottom: 10px;
}

.crypto-output textarea {
    width: 100%;
    height: 120px;
    font-family: 'Courier New', monospace;
    resize: vertical;
    background: #f8f9fa;
}

.copy-crypto-btn {
    margin-top: 10px;
    padding: 10px 20px;
    background: #28a745;
    color: white;
}

.ua-container {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.ua-original label {
    display: block;
    font-weight: bold;
    margin-bottom: 10px;
}

.ua-original textarea {
    width: 100%;
    height: 80px;
    font-family: 'Courier New', monospace;
    resize: none;
    background: #f8f9fa;
}

.ua-result {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

.ua-item {
    display: flex;
    justify-content: space-between;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #667eea;
}

.ua-label {
    font-weight: bold;
    color: #666;
}

.ua-value {
    color: #333;
    font-weight: 500;
}

.picker-container {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.picker-upload {
    border: 2px dashed #667eea;
    border-radius: 12px;
    padding: 30px;
    text-align: center;
    cursor: pointer;
    position: relative;
}

.picker-upload input {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

.picker-main {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 25px;
}

.picker-canvas-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

#picker-canvas {
    max-width: 100%;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.picker-palette {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.palette-color {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    cursor: pointer;
    transition: transform 0.2s ease;
    border: 2px solid transparent;
}

.palette-color:hover {
    transform: scale(1.1);
    border-color: #333;
}

.picker-info {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.color-info {
    display: flex;
    gap: 20px;
    align-items: center;
}

.selected-color {
    width: 80px;
    height: 80px;
    border-radius: 12px;
    border: 2px solid #e0e0e0;
}

.color-values {
    display: flex;
    flex-direction: column;
    gap: 5px;
    font-family: 'Courier New', monospace;
}

.palette-preview {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.preview-swatch {
    width: 50px;
    height: 50px;
    border-radius: 8px;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.preview-swatch:hover {
    transform: scale(1.1);
}

.urlparser-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.url-input {
    display: flex;
    gap: 10px;
}

.url-input input {
    flex: 1;
}

.parse-btn {
    padding: 12px 24px;
    background: #667eea;
    color: white;
}

.url-results {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.url-parts,
.url-params {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 12px;
}

.url-parts h3,
.url-params h3 {
    margin-bottom: 15px;
    color: #333;
}

.url-table {
    width: 100%;
    border-collapse: collapse;
}

.url-table tr {
    border-bottom: 1px solid #e0e0e0;
}

.url-table td {
    padding: 10px;
    text-align: left;
}

.url-table td:first-child {
    font-weight: bold;
    color: #667eea;
    width: 100px;
}

.wordcounter-container {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 20px;
}

.word-input textarea {
    width: 100%;
    height: 400px;
    resize: vertical;
}

.word-stats {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.stat-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    background: white;
    border-radius: 8px;
    border-left: 4px solid #667eea;
}

.stat-label {
    font-weight: bold;
    color: #666;
}

.stat-value {
    font-size: 1.5rem;
    font-weight: bold;
    color: #667eea;
}

.caseconverter-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.case-input textarea,
.case-output textarea {
    width: 100%;
    height: 150px;
    resize: vertical;
}

.case-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.case-btn {
    padding: 10px 20px;
    border: 2px solid #667eea;
    border-radius: 20px;
    background: white;
    color: #667eea;
}

.case-btn:hover {
    background: #667eea;
    color: white;
}

.case-output {
    position: relative;
}

.copy-case-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    padding: 8px 16px;
    background: #28a745;
    color: white;
    font-size: 0.9rem;
}

.lorem-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.lorem-options {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 12px;
    display: flex;
    gap: 20px;
    align-items: center;
    flex-wrap: wrap;
}

.option-group {
    display: flex;
    gap: 10px;
    align-items: center;
}

.option-group label {
    font-weight: bold;
    color: #333;
}

.option-group select {
    padding: 10px;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
}

.option-group input[type="range"] {
    width: 150px;
}

.generate-lorem-btn {
    padding: 12px 24px;
    background: #667eea;
    color: white;
}

.lorem-output {
    position: relative;
}

.lorem-output textarea {
    width: 100%;
    height: 200px;
    resize: vertical;
    font-family: 'Georgia', serif;
    line-height: 1.6;
}

.copy-lorem-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    padding: 8px 16px;
    background: #28a745;
    color: white;
    font-size: 0.9rem;
}

.charmap-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.charmap-search input {
    width: 100%;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
}

.charmap-groups {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.charmap-group h3 {
    margin-bottom: 15px;
    color: #333;
    border-bottom: 2px solid #f0f0f0;
    padding-bottom: 10px;
}

.charmap-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    gap: 10px;
}

.charmap-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 15px;
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.charmap-item:hover {
    border-color: #667eea;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.charmap-char {
    font-size: 2rem;
    margin-bottom: 5px;
}

.charmap-code {
    font-size: 0.8rem;
    color: #666;
    font-family: 'Courier New', monospace;
}

@media (max-width: 1024px) {
    .sidebar {
        width: 240px;
    }

    .main-content {
        padding: 20px;
    }
}

@media (max-width: 768px) {
    .mobile-menu-btn {
        display: flex;
    }

    .sidebar {
        position: fixed;
        left: -280px;
        top: 0;
        height: 100vh;
        width: 280px;
        transition: left 0.3s ease;
        z-index: 999;
        border-radius: 0;
        padding-top: 70px;
    }

    .sidebar.active {
        left: 0;
    }

    .main-content {
        padding: 80px 15px 15px;
        width: 100%;
    }

    .tool {
        padding: 20px;
        min-height: auto;
    }

    .tool-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }

    .tool-header h2 {
        font-size: 1.5rem;
    }

    .tool-actions {
        width: 100%;
        justify-content: flex-start;
    }

    .action-btn {
        flex: 1;
        min-width: 100px;
        padding: 10px 16px;
    }

    .json-container,
    .markdown-container,
    .url-results,
    .wordcounter-container,
    .cssbox-container,
    .image-preview,
    .random-container,
    .picker-main {
        grid-template-columns: 1fr;
        height: auto;
    }

    .json-input,
    .json-output {
        height: 200px;
    }

    .markdown-input textarea {
        height: 200px;
    }

    .markdown-preview {
        height: 200px;
    }

    .calculator-buttons {
        gap: 8px;
    }

    .calc-btn {
        padding: 15px;
        font-size: 1rem;
    }

    .todo-input-area {
        flex-direction: column;
    }

    #timer-time {
        font-size: 3rem;
    }

    .timer-controls {
        flex-direction: column;
        gap: 10px;
    }

    .timer-btn {
        width: 100%;
        max-width: 200px;
    }

    .converter-input,
    .converter-output {
        flex-direction: column;
    }

    .password-output {
        flex-direction: column;
    }

    .rgb-inputs,
    .hsl-inputs {
        flex-direction: column;
        gap: 10px;
    }

    .rgb-inputs input,
    .hsl-inputs input {
        flex: 1;
    }

    .color-btn {
        min-width: 100%;
    }

    .case-buttons {
        grid-template-columns: repeat(2, 1fr);
    }

    .case-btn {
        margin-bottom: 8px;
    }

    .lorem-options {
        flex-direction: column;
        align-items: flex-start;
    }

    .option-group {
        flex-direction: column;
        align-items: flex-start;
        width: 100%;
    }

    .option-group select {
        width: 100%;
    }

    .word-stats {
        gap: 10px;
        padding: 15px;
    }

    .stat-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
}

@media (max-width: 480px) {
    .main-container {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
        left: -100%;
        height: 100vh;
        position: fixed;
    }

    .sidebar.active {
        left: 0;
    }

    .main-content {
        padding: 70px 10px 10px;
    }

    .tool {
        padding: 15px;
    }

    .tool-header h2 {
        font-size: 1.3rem;
    }

    .calculator-display {
        padding: 15px;
    }

    .display {
        font-size: 1.5rem;
    }

    .calc-btn {
        padding: 12px;
        font-size: 0.9rem;
    }

    #timer-time {
        font-size: 2.5rem;
    }

    .word-input textarea {
        height: 200px;
    }

    .charmap-grid {
        grid-template-columns: repeat(auto-fill, minmax(60px, 1fr));
        gap: 8px;
    }

    .charmap-item {
        padding: 10px;
    }

    .charmap-char {
        font-size: 1.5rem;
    }

    .action-btn {
        min-width: 80px;
        padding: 8px 12px;
        font-size: 0.85rem;
    }

    input[type="text"],
    input[type="number"],
    textarea,
    select {
        padding: 10px 12px;
        font-size: 0.95rem;
    }

    button {
        padding: 10px 16px;
        font-size: 0.9rem;
    }
}
