﻿/* Shared light/dark theme for all tools. */
body.theme-dark {
    --bg: #0f172a;
    --surface: #162033;
    --text: #e5edf8;
    --muted: #9fb0c8;
    --line: #2d3b54;
    --primary: #60a5fa;
    --primary-dark: #3b82f6;
    --success: #4ade80;
    --warning: #fbbf24;
    --danger: #fb7185;
    --shadow: 0 18px 42px rgba(0, 0, 0, 0.36);
}

body.theme-dark {
    background: radial-gradient(circle at top left, rgba(96, 165, 250, 0.14), transparent 34%), var(--bg);
}

body.theme-dark .topbar,
body.theme-dark .tool,
body.theme-dark .result-row,
body.theme-dark .result-box,
body.theme-dark .stat,
body.theme-dark .feedback-item {
    background: var(--surface);
    border-color: var(--line);
}

body.theme-dark input,
body.theme-dark textarea {
    background: #0b1220;
    color: var(--text);
    border-color: var(--line);
}

body.theme-dark textarea[readonly],
body.theme-dark .empty {
    background: #111b2d;
}

body.theme-dark .nav a:hover,
body.theme-dark .nav a.active {
    background: rgba(96, 165, 250, 0.16);
    color: var(--primary);
}

body.theme-dark .btn-light,
body.theme-dark button.theme-toggle {
    background: #22304a;
    color: var(--text);
}

body.theme-dark .btn-light:hover:not(:disabled),
body.theme-dark button.theme-toggle:hover {
    background: #2c3d5d;
}

body.theme-dark .share-box {
    background: rgba(21, 128, 61, 0.16);
    border-color: rgba(74, 222, 128, 0.42);
}

body.theme-dark .notice,
body.theme-dark .notice.error {
    background: rgba(251, 113, 133, 0.12);
    border-color: rgba(251, 113, 133, 0.42);
}

body.theme-dark .notice.success {
    background: rgba(74, 222, 128, 0.12);
    border-color: rgba(74, 222, 128, 0.38);
}

.theme-toggle {
    min-height: 38px;
    border: 0;
    border-radius: 8px;
    padding: 0 12px;
    cursor: pointer;
    color: var(--text);
    background: #eef2f7;
    font-size: 14px;
    font-weight: 700;
    white-space: nowrap;
}

.theme-toggle:hover {
    background: #e0e6ef;
}

@media (max-width: 720px) {
    .theme-toggle {
        min-height: 36px;
    }
}
