:root {
    --bg: #07111f;
    --bg-soft: #0d1b2e;
    --card: rgba(17, 32, 53, 0.88);
    --border: rgba(255, 255, 255, 0.1);
    --text: #f5f7fb;
    --muted: #9eabc0;
    --accent: #6ee7ff;
    --accent-2: #8b7cff;
    --danger: #ff6b7a;
    --shadow: 0 24px 70px rgba(0, 0, 0, 0.35);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background:
        radial-gradient(circle at 15% 10%, rgba(110, 231, 255, 0.12), transparent 30%),
        radial-gradient(circle at 85% 20%, rgba(139, 124, 255, 0.14), transparent 30%),
        var(--bg);
    color: var(--text);
    line-height: 1.6;
}

.container {
    width: min(1120px, calc(100% - 32px));
    margin: auto;
}

.narrow {
    max-width: 800px;
}

.site-header {
    border-bottom: 1px solid var(--border);
    background: rgba(7, 17, 31, 0.82);
    backdrop-filter: blur(18px);
    position: sticky;
    top: 0;
    z-index: 10;
}

.nav {
    min-height: 72px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.logo {
    color: var(--text);
    text-decoration: none;
    font-size: 22px;
    font-weight: 800;
    letter-spacing: -0.5px;
}

.logo span,
.hero h1 span {
    color: var(--accent);
}

nav {
    display: flex;
    gap: 12px;
    align-items: center;
    overflow-x: auto;
    white-space: nowrap;
    padding-bottom: 4px;
    max-width: 100%;
    -webkit-overflow-scrolling: touch;
}

nav::-webkit-scrollbar {
    height: 3px;
}

nav::-webkit-scrollbar-thumb {
    background: rgba(110, 231, 255, 0.25);
    border-radius: 4px;
}

nav a {
    color: var(--muted);
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    transition: all 0.2s ease;
    flex-shrink: 0;
    padding: 6px 10px;
    border-radius: 8px;
}

nav a:hover {
    color: var(--text);
    background: rgba(255, 255, 255, 0.05);
}

nav a.active {
    color: var(--accent);
    font-weight: 700;
    background: rgba(110, 231, 255, 0.1);
    box-shadow: 0 0 12px rgba(110, 231, 255, 0.15);
}

.hero {
    padding: 80px 0 70px;
}

.badge {
    display: inline-block;
    padding: 7px 12px;
    border: 1px solid rgba(110, 231, 255, 0.25);
    border-radius: 999px;
    color: var(--accent);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 1.2px;
    margin-bottom: 18px;
}

.hero h1 {
    margin: 0;
    font-size: clamp(42px, 7vw, 76px);
    line-height: 0.98;
    letter-spacing: -3px;
}

.hero-text {
    max-width: 650px;
    color: var(--muted);
    font-size: 18px;
    margin: 22px 0 42px;
}

.converter-card {
    padding: 24px;
    border: 1px solid var(--border);
    background: var(--card);
    border-radius: 24px;
    box-shadow: var(--shadow);
    backdrop-filter: blur(20px);
}

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

.tool-header p {
    margin: 5px 0 20px;
    color: var(--muted);
}

textarea {
    width: 100%;
    min-height: 280px;
    resize: vertical;
    padding: 20px;
    border-radius: 16px;
    border: 1px solid var(--border);
    outline: none;
    background: #06101d;
    color: var(--text);
    font: inherit;
    font-size: 16px;
    line-height: 1.7;
}

textarea:focus {
    border-color: rgba(110, 231, 255, 0.55);
    box-shadow: 0 0 0 3px rgba(110, 231, 255, 0.08);
}

.case-buttons,
.action-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 16px;
}

button {
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 11px 16px;
    background: #14253b;
    color: var(--text);
    cursor: pointer;
    font: inherit;
    font-size: 14px;
    font-weight: 700;
    transition: 0.2s ease;
}

button:hover {
    transform: translateY(-1px);
    border-color: rgba(110, 231, 255, 0.5);
    background: #1a304b;
}

button.primary {
    background: linear-gradient(135deg, var(--accent-2), var(--accent));
    color: #06101d;
    border: 0;
}

button.danger {
    color: #ffb0b8;
}

.stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-top: 20px;
}

.stat {
    padding: 16px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.035);
    border: 1px solid var(--border);
    text-align: center;
}

.stat strong {
    display: block;
    font-size: 24px;
}

.stat span {
    color: var(--muted);
    font-size: 12px;
}

.content-section,
.faq-section {
    padding: 70px 0;
}

.content-section {
    background: rgba(255, 255, 255, 0.02);
}

.content-section h2,
.faq-section h2 {
    margin-top: 0;
    margin-bottom: 12px;
}

.content-section p {
    color: var(--muted);
    margin-bottom: 35px;
}

details {
    border-bottom: 1px solid var(--border);
    padding: 18px 0;
}

summary {
    cursor: pointer;
    font-weight: 700;
}

details p {
    color: var(--muted);
    margin-bottom: 0;
}

footer {
    padding: 30px 0;
    border-top: 1px solid var(--border);
    color: var(--muted);
    text-align: center;
    font-size: 13px;
}

@media (max-width: 650px) {
    .container {
        width: min(100% - 20px, 1120px);
    }

    .nav {
        min-height: 64px;
    }

    nav {
        gap: 12px;
    }

    nav a {
        font-size: 12px;
    }

    .hero {
        padding: 55px 0 45px;
    }

    .hero h1 {
        font-size: 48px;
        letter-spacing: -2px;
    }

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

    .converter-card {
        padding: 16px;
        border-radius: 18px;
    }

    textarea {
        min-height: 240px;
    }

    .case-buttons button,
    .action-buttons button {
        flex: 1 1 calc(50% - 10px);
    }

    .stats {
        gap: 8px;
    }

    .stat {
        padding: 12px 6px;
    }
}

.hero h1 { text-shadow: 0 0 35px rgba(93,230,255,.15); }

.converter-card {
    box-shadow: 0 30px 90px rgba(0,0,0,.45), 0 0 50px rgba(79,124,255,.08);
    backdrop-filter: blur(24px);
}

button {
    transition: all .2s ease;
}

button:hover {
    transform: translateY(-2px);
}

textarea:focus {
    border-color: rgba(93,230,255,.55);
    box-shadow: 0 0 0 4px rgba(93,230,255,.07), 0 0 35px rgba(93,230,255,.08);
}

body {
    background:
        radial-gradient(circle at 10% 10%, rgba(93,230,255,.14), transparent 28%),
        radial-gradient(circle at 90% 15%, rgba(139,92,246,.16), transparent 30%),
        linear-gradient(135deg,#03060d 0%,#071222 48%,#090d20 100%);
}

.site-header {
    background: rgba(3,7,17,.82);
    backdrop-filter: blur(20px);
}

.converter-card {
    border: 1px solid rgba(255,255,255,.12);
    background: linear-gradient(145deg,rgba(18,33,56,.96),rgba(7,15,29,.94));
    box-shadow: 0 30px 90px rgba(0,0,0,.45),0 0 70px rgba(79,124,255,.08);
    backdrop-filter: blur(24px);
}

textarea {
    border: 1px solid rgba(255,255,255,.11);
    background: linear-gradient(145deg,#020812,#050d1a);
    border-radius: 18px;
}

textarea:focus {
    border-color: rgba(93,230,255,.6);
    box-shadow: 0 0 0 4px rgba(93,230,255,.07),0 0 40px rgba(93,230,255,.08);
}

.case-buttons button {
    border: 1px solid rgba(255,255,255,.11);
    background: rgba(255,255,255,.045);
    transition: .2s ease;
}

.case-buttons button:hover {
    transform: translateY(-2px);
    border-color: rgba(93,230,255,.45);
    background: rgba(93,230,255,.09);
    box-shadow: 0 10px 28px rgba(0,0,0,.22);
}

.action-buttons .primary {
    background: linear-gradient(110deg,#8b5cf6,#4f7cff,#5de6ff);
    box-shadow: 0 10px 32px rgba(79,124,255,.25);
}

.action-buttons button:hover {
    transform: translateY(-2px);
}

.stat {
    border: 1px solid rgba(255,255,255,.10);
    background: linear-gradient(145deg,rgba(255,255,255,.055),rgba(255,255,255,.025));
    transition: .2s ease;
}

.stat:hover {
    transform: translateY(-2px);
    border-color: rgba(93,230,255,.3);
}

.hero h1 {
    text-shadow: 0 0 35px rgba(93,230,255,.10);
}

.hero h1 span {
    background: linear-gradient(100deg,#5de6ff,#8bdcff,#9b8cff);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

/* Nav Active & Responsive Styles */
nav a.active {
    color: var(--accent);
    font-weight: 700;
    position: relative;
}

nav a.active::after {
    content: "";
    position: absolute;
    bottom: -4px;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--accent);
    border-radius: 2px;
}

@media (max-width: 960px) {
    .nav {
        flex-direction: column;
        align-items: flex-start;
        padding: 12px 0;
        gap: 12px;
    }
    nav {
        width: 100%;
        overflow-x: auto;
        white-space: nowrap;
        padding-bottom: 6px;
        gap: 16px;
        -webkit-overflow-scrolling: touch;
    }
    nav::-webkit-scrollbar {
        height: 3px;
    }
    nav::-webkit-scrollbar-thumb {
        background: rgba(110, 231, 255, 0.2);
        border-radius: 4px;
    }
}

/* Form Controls & Tool Specific Styling */
.tool-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    align-items: center;
    margin-bottom: 20px;
    padding: 16px;
    background: rgba(255, 255, 255, 0.025);
    border: 1px solid var(--border);
    border-radius: 16px;
}

.control-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.control-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--muted);
}

.form-input, .form-select {
    background: linear-gradient(145deg, #020812, #050d1a);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 10px;
    padding: 10px 14px;
    color: var(--text);
    font: inherit;
    font-size: 14px;
    outline: none;
    transition: all 0.2s ease;
}

.form-input:focus, .form-select:focus {
    border-color: rgba(93, 230, 255, 0.55);
    box-shadow: 0 0 0 3px rgba(93, 230, 255, 0.08);
}

.form-select {
    cursor: pointer;
}

.pill-options {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.pill-btn {
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 20px;
    padding: 6px 14px;
    background: rgba(255, 255, 255, 0.04);
    color: var(--muted);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.pill-btn:hover {
    background: rgba(110, 231, 255, 0.1);
    color: var(--text);
    border-color: rgba(110, 231, 255, 0.3);
}

.pill-btn.active {
    background: rgba(110, 231, 255, 0.15);
    color: var(--accent);
    border-color: var(--accent);
    box-shadow: 0 0 15px rgba(110, 231, 255, 0.15);
}

/* Alert / Error Box */
.alert-box {
    display: none;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    border-radius: 12px;
    margin-top: 16px;
    font-size: 14px;
    font-weight: 500;
}

.alert-danger {
    background: rgba(255, 107, 122, 0.12);
    border: 1px solid rgba(255, 107, 122, 0.35);
    color: #ffb0b8;
}

.alert-box.show {
    display: flex;
}

/* Detailed Breakdowns & Frequency Tables */
.details-card {
    margin-top: 24px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border);
    border-radius: 16px;
}

.details-card h3 {
    margin-top: 0;
    margin-bottom: 16px;
    font-size: 18px;
    color: var(--text);
}

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

.freq-item {
    display: grid;
    grid-template-columns: 120px 1fr 60px;
    align-items: center;
    gap: 12px;
    font-size: 13px;
}

.freq-word {
    font-weight: 600;
    color: var(--accent);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.freq-bar-bg {
    height: 8px;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 4px;
    overflow: hidden;
}

.freq-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent-2), var(--accent));
    border-radius: 4px;
    transition: width 0.3s ease;
}

.freq-count {
    color: var(--muted);
    text-align: right;
}

/* Cross Tools Grid Section */
.tools-section {
    padding: 70px 0;
    background: rgba(0, 0, 0, 0.2);
}

.tools-section h2 {
    text-align: center;
    font-size: 32px;
    margin-top: 0;
    margin-bottom: 10px;
}

.tools-section p.subtitle {
    text-align: center;
    color: var(--muted);
    margin-bottom: 40px;
}

.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.tool-card-item {
    padding: 24px;
    border-radius: 18px;
    background: linear-gradient(145deg, rgba(18, 33, 56, 0.7), rgba(7, 15, 29, 0.8));
    border: 1px solid var(--border);
    text-decoration: none;
    color: var(--text);
    transition: all 0.25s ease;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.tool-card-item:hover {
    transform: translateY(-4px);
    border-color: rgba(110, 231, 255, 0.4);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.3), 0 0 30px rgba(110, 231, 255, 0.1);
}

.tool-card-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: rgba(110, 231, 255, 0.1);
    color: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    margin-bottom: 16px;
}

.tool-card-item h3 {
    margin: 0 0 8px 0;
    font-size: 18px;
}

.tool-card-item p {
    margin: 0;
    font-size: 13px;
    color: var(--muted);
    line-height: 1.5;
}

.tool-card-link {
    margin-top: 16px;
    font-size: 13px;
    font-weight: 700;
    color: var(--accent);
    display: flex;
    align-items: center;
    gap: 4px;
}

.tool-card-item:hover .tool-card-link {
    color: #9b8cff;
}

/* Checkbox & Radio Controls */
.checkbox-group {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin: 12px 0;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: var(--text);
    cursor: pointer;
    user-select: none;
}

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

.radio-group {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
}

.radio-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: var(--muted);
    cursor: pointer;
}

.radio-label input[type="radio"] {
    accent-color: var(--accent);
    cursor: pointer;
}

.radio-label:has(input:checked) {
    color: var(--accent);
    font-weight: 600;
}



