/* ===== CSS Variables - Pro Plus Theme ===== */
:root {
    --bg-primary: #f8fafc;
    --bg-secondary: #ffffff;
    --bg-tertiary: #f1f5f9;
    --text-primary: #0f172a;
    --text-secondary: #64748b;
    --text-tertiary: #94a3b8;
    --accent-primary: #6366f1;
    --accent-secondary: #8b5cf6;
    --accent-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --accent-gradient-2: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --border: #e2e8f0;
    --border-light: #f1f5f9;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
}

[data-theme="dark"] {
    --bg-primary: #0f172a;
    --bg-secondary: #1e293b;
    --bg-tertiary: #334155;
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --text-tertiary: #64748b;
    --border: #334155;
    --border-light: #1e293b;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.4), 0 2px 4px -1px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.5), 0 4px 6px -2px rgba(0, 0, 0, 0.3);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.6), 0 10px 10px -5px rgba(0, 0, 0, 0.4);
}

/* ===== Reset & Base ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    line-height: 1.6;
    transition: background 0.3s ease, color 0.3s ease;
}

img.emoji {
    height: 1em;
    width: 1em;
    margin: 0 .05em 0 .1em;
    vertical-align: -0.1em;
}

/* ===== Navbar ===== */
.navbar {
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 1000;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 24px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
    text-decoration: none;
}

.logo-icon {
    font-size: 24px;
}

.pro-badge {
    background: var(--accent-gradient);
    color: white;
    padding: 2px 8px;
    border-radius: 6px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.search-box {
    position: relative;
    display: flex;
    align-items: center;
}

.search-icon {
    position: absolute;
    left: 12px;
    color: var(--text-tertiary);
    pointer-events: none;
}

.search-box input {
    padding: 8px 16px 8px 36px;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: var(--bg-tertiary);
    color: var(--text-primary);
    font-size: 14px;
    width: 280px;
    transition: all 0.2s;
}

.search-box input:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
    width: 320px;
}

.theme-btn {
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 8px 12px;
    cursor: pointer;
    font-size: 18px;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
}

.theme-btn:hover {
    transform: scale(1.05);
    border-color: var(--accent-primary);
}

/* ===== Main Container ===== */
.main-container {
    flex: 1;
    max-width: 1400px;
    margin: 0 auto;
    padding: 40px 24px;
    width: 100%;
}

.page {
    display: none;
    animation: fadeInUp 0.4s ease;
}

.page.active {
    display: block;
}

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

/* ===== Hero Section ===== */
.hero {
    text-align: center;
    padding: 60px 20px 80px;
    position: relative;
}

.hero-badge {
    display: inline-block;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1), rgba(118, 75, 162, 0.1));
    color: var(--accent-primary);
    padding: 8px 16px;
    border-radius: 100px;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 24px;
    border: 1px solid rgba(102, 126, 234, 0.2);
}

.hero h1 {
    font-size: 56px;
    font-weight: 800;
    margin-bottom: 20px;
    line-height: 1.2;
}

.gradient-text {
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-sub {
    font-size: 20px;
    color: var(--text-secondary);
    margin-bottom: 40px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: 60px;
}

.stat {
    text-align: center;
}

.stat-num {
    font-size: 36px;
    font-weight: 800;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-label {
    font-size: 14px;
    color: var(--text-secondary);
    font-weight: 500;
}

/* ===== Category Sections ===== */
.category-section {
    margin-bottom: 48px;
}

.category-title {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* ===== Tools Grid ===== */
.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 16px;
}

.tool-card-item {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 24px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
    color: var(--text-primary);
    position: relative;
    overflow: hidden;
}

.tool-card-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--accent-gradient);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.tool-card-item:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--accent-primary);
}

.tool-card-item:hover::before {
    transform: scaleX(1);
}

.tool-icon {
    font-size: 40px;
    margin-bottom: 16px;
    display: block;
}

.tool-name {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 6px;
}

.tool-desc {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.5;
}

/* ===== Back Button ===== */
.back-btn {
    background: none;
    border: none;
    color: var(--accent-primary);
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 24px;
    padding: 8px 0;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: gap 0.2s;
}

.back-btn:hover {
    gap: 10px;
}

/* ===== Tool Header ===== */
.tool-header {
    margin-bottom: 24px;
}

.tool-header h2 {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.tool-emoji {
    font-size: 36px;
}

.tool-desc {
    font-size: 16px;
    color: var(--text-secondary);
}

/* ===== Tool Card ===== */
.tool-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    padding: 32px;
    box-shadow: var(--shadow-md);
}

/* ===== Form Elements ===== */
.form-group {
    margin-bottom: 24px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    font-size: 14px;
    color: var(--text-primary);
}

.form-group input[type="text"],
.form-group input[type="number"],
.form-group input[type="date"],
.form-group input[type="datetime-local"],
.form-group input[type="email"],
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: var(--bg-primary);
    color: var(--text-primary);
    font-size: 14px;
    font-family: inherit;
    transition: all 0.2s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 80px;
}

.form-group input[type="range"] {
    width: 100%;
    accent-color: var(--accent-primary);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

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

.input-group input {
    flex: 1;
}

/* ===== Buttons ===== */
.btn-primary,
.btn-secondary {
    padding: 12px 24px;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.2s;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-primary {
    background: var(--accent-gradient);
    color: white;
    box-shadow: 0 4px 14px 0 rgba(102, 126, 234, 0.4);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px 0 rgba(102, 126, 234, 0.5);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-secondary {
    background: var(--bg-tertiary);
    color: var(--text-primary);
    border: 1px solid var(--border);
}

.btn-secondary:hover {
    background: var(--border);
    transform: translateY(-2px);
}

.btn-group {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 24px;
}

/* ===== Result Box ===== */
.result-box {
    padding: 20px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    font-size: 14px;
    line-height: 1.6;
    word-break: break-all;
    min-height: 50px;
}

.divider {
    border: none;
    border-top: 1px solid var(--border);
    margin: 24px 0;
}

/* ===== Calculator ===== */
.calculator {
    max-width: 360px;
    margin: 0 auto;
    background: var(--bg-tertiary);
    border-radius: var(--radius-xl);
    padding: 24px;
    box-shadow: var(--shadow-lg);
}

.calc-display {
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    padding: 24px 20px;
    text-align: right;
    font-size: 42px;
    font-weight: 700;
    margin-bottom: 20px;
    min-height: 100px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    word-break: break-all;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.05);
}

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

.calc-btn {
    padding: 20px;
    border: none;
    border-radius: var(--radius-md);
    font-size: 20px;
    font-weight: 600;
    cursor: pointer;
    background: var(--bg-secondary);
    color: var(--text-primary);
    transition: all 0.15s;
    box-shadow: var(--shadow-sm);
}

.calc-btn:hover {
    transform: scale(0.95);
}

.calc-btn:active {
    transform: scale(0.9);
}

.calc-btn.func {
    background: #f59e0b;
    color: white;
}

.calc-btn.op {
    background: var(--accent-primary);
    color: white;
}

.calc-btn.equals {
    background: var(--accent-gradient);
    color: white;
}

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

/* ===== Stats Grid ===== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 16px;
    margin-top: 24px;
}

.stat-card {
    background: var(--bg-tertiary);
    border-radius: var(--radius-lg);
    padding: 20px;
    text-align: center;
    transition: transform 0.2s;
}

.stat-card:hover {
    transform: translateY(-2px);
}

.stat-icon {
    font-size: 28px;
    margin-bottom: 8px;
}

.stat-value {
    font-size: 28px;
    font-weight: 700;
    color: var(--accent-primary);
    margin-bottom: 4px;
}

.stat-label {
    font-size: 12px;
    color: var(--text-secondary);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ===== Case Converter ===== */
.case-results {
    display: grid;
    gap: 16px;
}

.case-item {
    background: var(--bg-tertiary);
    border-radius: var(--radius-md);
    padding: 16px;
}

.case-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

/* ===== Color Picker ===== */
.color-picker-wrap {
    display: flex;
    gap: 32px;
    align-items: flex-start;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

#colorPicker {
    width: 150px;
    height: 150px;
    border: none;
    border-radius: var(--radius-lg);
    cursor: pointer;
    background: none;
    box-shadow: var(--shadow-lg);
}

.color-info {
    flex: 1;
    min-width: 250px;
}

.color-preview {
    height: 120px;
    border-radius: var(--radius-lg);
    background: #667eea;
    transition: background 0.2s;
    box-shadow: var(--shadow-md);
}

/* ===== Gradient ===== */
.gradient-preview {
    height: 200px;
    border-radius: var(--radius-lg);
    margin-bottom: 24px;
    box-shadow: var(--shadow-lg);
}

.gradient-controls {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin-bottom: 24px;
}

.gradient-controls input[type="color"] {
    width: 100%;
    height: 50px;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    background: none;
}

/* ===== Palette ===== */
.palette-colors {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 16px;
    margin-top: 24px;
}

.palette-color {
    border-radius: var(--radius-lg);
    padding: 20px;
    text-align: center;
    cursor: pointer;
    transition: transform 0.2s;
    box-shadow: var(--shadow-md);
}

.palette-color:hover {
    transform: scale(1.05);
}

.palette-hex {
    font-size: 12px;
    font-weight: 600;
    background: rgba(255, 255, 255, 0.9);
    color: #333;
    padding: 4px 8px;
    border-radius: 4px;
    display: inline-block;
}

/* ===== Contrast Checker ===== */
.contrast-preview {
    padding: 60px;
    border-radius: var(--radius-lg);
    text-align: center;
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 24px;
    transition: all 0.3s;
}

.contrast-colors {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin-bottom: 24px;
}

.contrast-colors input[type="color"] {
    width: 100%;
    height: 50px;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
}

.contrast-result {
    text-align: center;
    padding: 24px;
    background: var(--bg-tertiary);
    border-radius: var(--radius-lg);
}

.contrast-ratio {
    font-size: 48px;
    font-weight: 800;
    margin-bottom: 8px;
}

.contrast-grade {
    display: inline-block;
    padding: 6px 16px;
    border-radius: 100px;
    font-weight: 700;
    font-size: 14px;
    margin: 4px;
}

.grade-pass {
    background: #10b981;
    color: white;
}

.grade-fail {
    background: #ef4444;
    color: white;
}

/* ===== Hash Results ===== */
.hash-results {
    display: grid;
    gap: 16px;
}

.hash-item {
    background: var(--bg-tertiary);
    border-radius: var(--radius-md);
    padding: 16px;
}

.hash-label {
    font-size: 12px;
    font-weight: 700;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

/* ===== Password Strength ===== */
.strength-meter {
    margin-top: 20px;
}

.strength-bar {
    height: 8px;
    border-radius: 4px;
    background: var(--bg-tertiary);
    margin-bottom: 8px;
    overflow: hidden;
}

.strength-bar::before {
    content: '';
    display: block;
    height: 100%;
    width: 0;
    border-radius: 4px;
    transition: all 0.3s;
}

.strength-label {
    font-size: 14px;
    font-weight: 600;
    text-align: center;
}

.pwd-result {
    font-family: 'SF Mono', Monaco, 'Cascadia Code', monospace;
    font-size: 20px;
    text-align: center;
    letter-spacing: 2px;
    font-weight: 600;
    color: var(--accent-primary);
    padding: 24px;
}

/* ===== QR Code ===== */
.qr-wrap {
    text-align: center;
    margin-top: 24px;
}

#qrImage {
    max-width: 300px;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 20px;
    background: white;
    display: none;
    box-shadow: var(--shadow-lg);
}

#qrImage[src] {
    display: inline-block;
}

/* ===== Random Number ===== */
.random-result {
    font-size: 48px;
    font-weight: 800;
    text-align: center;
    color: var(--accent-primary);
    padding: 40px;
}

/* ===== Coin Flip ===== */
.coin-card {
    text-align: center;
}

.coin {
    width: 150px;
    height: 150px;
    margin: 0 auto 24px;
    position: relative;
    transform-style: preserve-3d;
    transition: transform 1s ease-out;
}

.coin-face {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 60px;
    backface-visibility: hidden;
    box-shadow: var(--shadow-lg);
}

.coin-face.heads {
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
}

.coin-face.tails {
    background: linear-gradient(135deg, #94a3b8, #64748b);
    transform: rotateY(180deg);
}

.coin.flipping {
    animation: coinFlip 1s ease-out;
}

@keyframes coinFlip {
    0% { transform: rotateY(0); }
    100% { transform: rotateY(1800deg); }
}

.coin-result {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 16px;
}

.coin-stats {
    display: flex;
    justify-content: center;
    gap: 40px;
    margin-bottom: 24px;
    font-size: 16px;
    color: var(--text-secondary);
}

.coin-stats b {
    color: var(--text-primary);
    font-size: 20px;
}

/* ===== Dice ===== */
.dice-results {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    justify-content: center;
    margin-top: 24px;
}

.dice {
    width: 80px;
    height: 80px;
    background: var(--bg-secondary);
    border: 2px solid var(--border);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    font-weight: 700;
    box-shadow: var(--shadow-md);
    animation: diceRoll 0.5s ease;
}

@keyframes diceRoll {
    0% { transform: rotate(0deg) scale(1); }
    50% { transform: rotate(180deg) scale(1.2); }
    100% { transform: rotate(360deg) scale(1); }
}

.dice-total {
    width: 100%;
    text-align: center;
    font-size: 24px;
    font-weight: 700;
    margin-top: 16px;
    color: var(--accent-primary);
}

/* ===== Stopwatch ===== */
.stopwatch-card {
    text-align: center;
}

.stopwatch-display {
    font-size: 64px;
    font-weight: 800;
    font-family: 'SF Mono', Monaco, monospace;
    margin-bottom: 32px;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.laps-list {
    max-height: 200px;
    overflow-y: auto;
    margin-top: 24px;
    text-align: left;
}

.lap-item {
    display: flex;
    justify-content: space-between;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border);
    font-family: 'SF Mono', Monaco, monospace;
}

.lap-item:last-child {
    border-bottom: none;
}

/* ===== Timer ===== */
.timer-card {
    text-align: center;
}

.timer-inputs {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    max-width: 400px;
    margin: 0 auto 24px;
}

.timer-display {
    font-size: 72px;
    font-weight: 800;
    font-family: 'SF Mono', Monaco, monospace;
    margin-bottom: 32px;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ===== Checkbox Group ===== */
.checkbox-group {
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
    margin-bottom: 24px;
}

.checkbox-group label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-weight: 500;
    font-size: 14px;
}

.checkbox-group input[type="checkbox"] {
    width: 20px;
    height: 20px;
    accent-color: var(--accent-primary);
    cursor: pointer;
}

/* ===== 404 Page Pro Plus ===== */
.error-page {
    display: none;
    min-height: 70vh;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
}

.error-page.active {
    display: flex;
}

.error-content {
    text-align: center;
    max-width: 600px;
}

.error-code-pro {
    font-size: 140px;
    font-weight: 900;
    line-height: 1;
    margin-bottom: 16px;
    display: flex;
    justify-content: center;
    gap: 8px;
}

.error-code-pro .digit {
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: float 3s ease-in-out infinite;
}

.error-code-pro .digit.zero {
    background: var(--accent-gradient-2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation-delay: 0.5s;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-15px); }
}

.error-badge {
    display: inline-block;
    margin-bottom: 24px;
}

.error-title {
    font-size: 36px;
    font-weight: 700;
    margin-bottom: 12px;
}

.error-desc {
    font-size: 18px;
    color: var(--text-secondary);
    margin-bottom: 32px;
}

.error-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin-bottom: 48px;
}

.error-tools {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    padding: 32px;
    box-shadow: var(--shadow-lg);
}

.error-tools p {
    color: var(--text-secondary);
    margin-bottom: 20px;
    font-size: 14px;
}

.error-tools-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.error-tool {
    padding: 16px;
    background: var(--bg-tertiary);
    border-radius: var(--radius-md);
    text-decoration: none;
    color: var(--text-primary);
    font-weight: 500;
    transition: all 0.2s;
}

.error-tool:hover {
    background: var(--accent-primary);
    color: white;
    transform: translateY(-2px);
}

/* ===== Footer ===== */
.footer {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border);
    padding: 24px 0;
    margin-top: auto;
}

.footer-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-left {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
}

.footer-right {
    font-size: 14px;
    color: var(--text-secondary);
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
    .nav-container {
        padding: 0 16px;
    }

    .search-box input {
        width: 180px;
    }

    .search-box input:focus {
        width: 200px;
    }

    .main-container {
        padding: 24px 16px;
    }

    .hero {
        padding: 40px 10px 60px;
    }

    .hero h1 {
        font-size: 36px;
    }

    .hero-sub {
        font-size: 16px;
    }

    .hero-stats {
        gap: 30px;
    }

    .stat-num {
        font-size: 28px;
    }

    .tools-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .tool-card-item {
        padding: 20px 16px;
    }

    .tool-icon {
        font-size: 32px;
    }

    .tool-card {
        padding: 20px;
    }

    .tool-header h2 {
        font-size: 24px;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .gradient-controls {
        grid-template-columns: 1fr;
    }

    .palette-colors {
        grid-template-columns: repeat(3, 1fr);
    }

    .contrast-colors {
        grid-template-columns: 1fr;
    }

    .error-code-pro {
        font-size: 80px;
    }

    .error-title {
        font-size: 28px;
    }

    .footer-container {
        flex-direction: column;
        gap: 12px;
        text-align: center;
    }

    .stopwatch-display,
    .timer-display {
        font-size: 42px;
    }

    .timer-inputs {
        grid-template-columns: repeat(3, 1fr);
        gap: 8px;
    }
}

@media (max-width: 480px) {
    .tools-grid {
        grid-template-columns: 1fr;
    }

    .hero-stats {
        flex-direction: column;
        gap: 20px;
    }

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

    .error-tools-grid {
        grid-template-columns: 1fr;
    }

    .checkbox-group {
        flex-direction: column;
        gap: 12px;
    }
}