/* ==========================================================
   DevToolsHub — style.css
   Dark SaaS-style design with CSS variables
   ========================================================== */

/* ── CSS Variables ────────────────────────────────────────── */
:root {
    --bg-primary:       #0d0f1a;
    --bg-secondary:     #111422;
    --bg-card:          #161929;
    --bg-card-hover:    #1c2038;
    --bg-elevated:      #1e2240;

    --accent-primary:   #7c6fef;
    --accent-secondary: #06b6d4;
    --accent-glow:      rgba(124, 111, 239, 0.25);
    --accent-gradient:  linear-gradient(135deg, #7c6fef, #06b6d4);

    --text-primary:     #e2e8f0;
    --text-secondary:   #94a3b8;
    --text-muted:       #4b5675;

    --border-color:     #1e2240;
    --border-bright:    #2d3460;
    --border-hover:     #7c6fef;

    --success:          #10b981;
    --warning:          #f59e0b;
    --danger:           #ef4444;
    --info:             #06b6d4;

    --radius-sm:        6px;
    --radius-md:        12px;
    --radius-lg:        18px;
    --radius-xl:        24px;

    --shadow-card:      0 4px 24px rgba(0, 0, 0, 0.35);
    --shadow-glow:      0 0 40px rgba(124, 111, 239, 0.15);
    --shadow-hover:     0 8px 40px rgba(124, 111, 239, 0.25);

    --transition-fast:  0.18s ease;
    --transition-med:   0.28s ease;

    --navbar-height:    64px;
    --font-sans:        'Segoe UI', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
    --font-mono:        'Cascadia Code', 'Fira Code', 'JetBrains Mono', monospace;
}

/* ── Base ─────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: calc(var(--navbar-height) + 20px); }

body {
    background-color: var(--bg-primary);
    color: var(--text-primary);
    font-family: var(--font-sans);
    font-size: 15px;
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

a { color: var(--accent-primary); text-decoration: none; transition: color var(--transition-fast); }
a:hover { color: var(--accent-secondary); }

img { max-width: 100%; }

/* ── Scrollbar ────────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg-secondary); }
::-webkit-scrollbar-thumb { background: var(--bg-elevated); border-radius: 99px; }
::-webkit-scrollbar-thumb:hover { background: var(--accent-primary); }

/* ── Selection ────────────────────────────────────────────── */
::selection { background: rgba(124, 111, 239, 0.3); color: var(--text-primary); }

/* ── Navbar ───────────────────────────────────────────────── */
.dth-navbar {
    background: rgba(13, 15, 26, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-color);
    height: var(--navbar-height);
    transition: background var(--transition-med), box-shadow var(--transition-med);
    z-index: 1050;
}

.dth-navbar.navbar-scrolled {
    background: rgba(13, 15, 26, 0.97);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.4);
}

/* Brand */
.dth-brand {
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
}

.dth-brand .brand-icon {
    width: 36px;
    height: 36px;
    background: var(--accent-gradient);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: #fff;
    flex-shrink: 0;
}

.dth-brand .brand-text {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.3px;
}

.dth-brand .brand-accent { color: var(--accent-primary); }

.dth-brand .brand-sub {
    font-size: 0.65rem;
    color: var(--text-muted);
    font-weight: 500;
    letter-spacing: 0.3px;
    align-self: flex-end;
    padding-bottom: 2px;
    display: none;
}

@media (min-width: 768px) { .dth-brand .brand-sub { display: block; } }

/* Nav Links */
.dth-nav-link {
    color: var(--text-secondary) !important;
    font-size: 0.88rem;
    font-weight: 500;
    padding: 6px 12px !important;
    border-radius: var(--radius-sm);
    transition: color var(--transition-fast), background var(--transition-fast);
}

.dth-nav-link:hover,
.dth-nav-link.active {
    color: var(--text-primary) !important;
    background: var(--bg-elevated);
}

/* Navbar Actions */
.navbar-actions { gap: 10px; }

.dth-search-btn,
.dth-github-btn {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    width: 36px;
    height: 36px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    cursor: pointer;
    transition: all var(--transition-fast);
    text-decoration: none;
}

.dth-search-btn:hover,
.dth-github-btn:hover {
    color: var(--text-primary);
    border-color: var(--border-hover);
    background: var(--bg-elevated);
}

.dth-cta-btn {
    background: var(--accent-gradient);
    color: #fff !important;
    font-size: 0.82rem;
    font-weight: 600;
    padding: 7px 16px;
    border-radius: var(--radius-sm);
    transition: opacity var(--transition-fast), transform var(--transition-fast);
    white-space: nowrap;
    text-decoration: none;
}

.dth-cta-btn:hover { opacity: 0.9; transform: translateY(-1px); }

/* Mobile toggler */
.dth-toggler {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    border-radius: var(--radius-sm);
    padding: 6px 10px;
    font-size: 22px;
    line-height: 1;
}
.dth-toggler:focus { box-shadow: none; }

/* ── Search Bar ───────────────────────────────────────────── */
.dth-search-bar {
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease;
    padding: 0;
}

.dth-search-bar.search-open {
    max-height: 80px;
    padding: 12px 0;
}

.search-inner {
    display: flex;
    align-items: center;
    background: var(--bg-card);
    border: 1px solid var(--border-bright);
    border-radius: var(--radius-md);
    padding: 10px 16px;
    gap: 10px;
    transition: border-color var(--transition-fast);
}

.search-inner:focus-within { border-color: var(--accent-primary); }

.search-icon { color: var(--text-muted); font-size: 16px; }

.search-input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    color: var(--text-primary);
    font-size: 0.9rem;
    font-family: var(--font-sans);
}

.search-input::placeholder { color: var(--text-muted); }

.search-kbd {
    background: var(--bg-elevated);
    border: 1px solid var(--border-bright);
    color: var(--text-muted);
    font-size: 0.7rem;
    padding: 2px 6px;
    border-radius: 4px;
}

/* ── Hero Section ─────────────────────────────────────────── */
.dth-hero {
    position: relative;
    padding: 90px 0 70px;
    background: var(--bg-primary);
    overflow: hidden;
    text-align: center;
}

.dth-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 80% 60% at 50% -10%, rgba(124, 111, 239, 0.18) 0%, transparent 65%),
        radial-gradient(ellipse 60% 40% at 80% 80%, rgba(6, 182, 212, 0.08) 0%, transparent 55%);
    pointer-events: none;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    background: rgba(124, 111, 239, 0.12);
    border: 1px solid rgba(124, 111, 239, 0.3);
    color: var(--accent-primary);
    font-size: 0.78rem;
    font-weight: 600;
    padding: 5px 14px;
    border-radius: 99px;
    margin-bottom: 28px;
    letter-spacing: 0.3px;
}

.hero-badge .badge-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--accent-primary);
    animation: pulse 1.8s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50%       { opacity: 0.4; transform: scale(0.7); }
}

.hero-title {
    font-size: clamp(2.4rem, 6vw, 4.2rem);
    font-weight: 800;
    letter-spacing: -1.5px;
    line-height: 1.1;
    color: var(--text-primary);
    margin-bottom: 22px;
}

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

.hero-subtitle {
    font-size: clamp(1rem, 2.5vw, 1.2rem);
    color: var(--text-secondary);
    max-width: 560px;
    margin: 0 auto 36px;
    line-height: 1.7;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    justify-content: center;
    margin-bottom: 56px;
}

.btn-hero-primary {
    background: var(--accent-gradient);
    color: #fff;
    font-weight: 600;
    font-size: 0.95rem;
    padding: 12px 28px;
    border-radius: var(--radius-md);
    border: none;
    cursor: pointer;
    transition: transform var(--transition-fast), box-shadow var(--transition-fast);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-hero-primary:hover {
    color: #fff;
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}

.btn-hero-secondary {
    background: var(--bg-card);
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 0.95rem;
    padding: 12px 28px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-bright);
    cursor: pointer;
    transition: all var(--transition-fast);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-hero-secondary:hover {
    color: var(--text-primary);
    border-color: var(--accent-primary);
    background: var(--bg-elevated);
}

/* Hero Stats */
.hero-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 0;
    justify-content: center;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    background: var(--bg-card);
    overflow: hidden;
    max-width: 520px;
    margin: 0 auto;
}

.stat-item {
    flex: 1;
    min-width: 120px;
    padding: 20px 24px;
    text-align: center;
    border-right: 1px solid var(--border-color);
    position: relative;
}

.stat-item:last-child { border-right: none; }

.stat-value {
    font-size: 1.8rem;
    font-weight: 800;
    letter-spacing: -1px;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1;
    margin-bottom: 4px;
}

.stat-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.8px;
}

/* ── Section Layout ───────────────────────────────────────── */
.dth-section {
    padding: 72px 0 48px;
    position: relative;
}

.dth-section + .dth-section {
    border-top: 1px solid var(--border-color);
}

.section-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    margin-bottom: 36px;
    flex-wrap: wrap;
    gap: 12px;
}

.section-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--accent-primary);
    margin-bottom: 8px;
}

.section-title {
    font-size: clamp(1.4rem, 3vw, 1.9rem);
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.5px;
    margin: 0;
    line-height: 1.2;
}

.section-desc {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin: 0;
    margin-top: 4px;
}

.section-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--accent-primary);
    white-space: nowrap;
    padding: 7px 14px;
    border: 1px solid rgba(124, 111, 239, 0.3);
    border-radius: var(--radius-sm);
    transition: all var(--transition-fast);
}

.section-link:hover {
    background: rgba(124, 111, 239, 0.1);
    border-color: var(--accent-primary);
    color: var(--accent-primary);
}

/* ── Tool Card ────────────────────────────────────────────── */
.dth-card-col { display: flex; }

.dth-tool-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    width: 100%;
    cursor: pointer;
    transition:
        background var(--transition-med),
        border-color var(--transition-med),
        transform var(--transition-med),
        box-shadow var(--transition-med);
    position: relative;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
}

.dth-tool-card::before {
    content: '';
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity var(--transition-med);
    background: radial-gradient(ellipse at top left, var(--accent-glow), transparent 65%);
    pointer-events: none;
}

.dth-tool-card:hover {
    background: var(--bg-card-hover);
    border-color: var(--border-hover);
    transform: translateY(-4px);
    box-shadow: var(--shadow-hover);
    color: inherit;
    text-decoration: none;
}

.dth-tool-card:hover::before { opacity: 1; }

/* Card Icon */
.card-icon-wrap {
    width: 46px;
    height: 46px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    flex-shrink: 0;
    position: relative;
    z-index: 1;
}

.icon-security    { background: rgba(239, 68, 68, 0.12);   color: #ef4444; }
.icon-formatting  { background: rgba(124, 111, 239, 0.12); color: #7c6fef; }
.icon-converters  { background: rgba(6, 182, 212, 0.12);   color: #06b6d4; }
.icon-text        { background: rgba(245, 158, 11, 0.12);  color: #f59e0b; }
.icon-devutils    { background: rgba(16, 185, 129, 0.12);  color: #10b981; }

/* Card Content */
.card-content { flex: 1; }

.card-name {
    font-size: 0.97rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 5px;
    line-height: 1.3;
}

.card-desc {
    font-size: 0.82rem;
    color: var(--text-secondary);
    line-height: 1.55;
    margin: 0;
}

/* Card Footer */
.card-footer-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: auto;
}

.card-tag {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    padding: 3px 10px;
    border-radius: 99px;
}

.tag-security   { background: rgba(239, 68, 68, 0.1);   color: #ef4444;  border: 1px solid rgba(239, 68, 68, 0.2); }
.tag-formatting { background: rgba(124, 111, 239, 0.1); color: #7c6fef;  border: 1px solid rgba(124, 111, 239, 0.2); }
.tag-converters { background: rgba(6, 182, 212, 0.1);   color: #06b6d4;  border: 1px solid rgba(6, 182, 212, 0.2); }
.tag-text       { background: rgba(245, 158, 11, 0.1);  color: #f59e0b;  border: 1px solid rgba(245, 158, 11, 0.2); }
.tag-devutils   { background: rgba(16, 185, 129, 0.1);  color: #10b981;  border: 1px solid rgba(16, 185, 129, 0.2); }

.card-arrow {
    color: var(--text-muted);
    font-size: 16px;
    transition: color var(--transition-fast), transform var(--transition-fast);
}

.dth-tool-card:hover .card-arrow {
    color: var(--accent-primary);
    transform: translateX(4px);
}

/* Status badge */
.card-status {
    position: absolute;
    top: 14px;
    right: 14px;
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    padding: 2px 8px;
    border-radius: 99px;
}

.status-soon {
    background: rgba(245, 158, 11, 0.12);
    color: #f59e0b;
    border: 1px solid rgba(245, 158, 11, 0.25);
}

.status-new {
    background: rgba(16, 185, 129, 0.12);
    color: #10b981;
    border: 1px solid rgba(16, 185, 129, 0.25);
}

/* ── Categories Grid ──────────────────────────────────────── */
.categories-grid {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 48px;
}

.cat-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    font-size: 0.83rem;
    font-weight: 500;
    padding: 8px 18px;
    border-radius: 99px;
    cursor: pointer;
    transition: all var(--transition-fast);
    text-decoration: none;
}

.cat-pill:hover,
.cat-pill.active {
    color: var(--text-primary);
    border-color: var(--accent-primary);
    background: var(--bg-elevated);
}

/* ── Toast ────────────────────────────────────────────────── */
.dth-toast {
    position: fixed;
    bottom: 28px;
    right: 28px;
    background: var(--bg-elevated);
    border: 1px solid var(--border-bright);
    color: var(--text-primary);
    border-radius: var(--radius-md);
    padding: 12px 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.87rem;
    font-weight: 500;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    z-index: 9999;
    transform: translateY(20px);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.3s ease;
}

.dth-toast.toast-show {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
}

/* ── Footer ───────────────────────────────────────────────── */
.dth-footer {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
    padding-top: 60px;
    margin-top: 80px;
}

.footer-top { padding-bottom: 48px; }

.footer-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 14px;
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-primary);
}

.footer-brand .brand-icon {
    width: 34px;
    height: 34px;
    background: var(--accent-gradient);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 17px;
    color: #fff;
}

.footer-tagline {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 20px;
    max-width: 300px;
}

.footer-social { display: flex; gap: 10px; }

.social-link {
    width: 34px;
    height: 34px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    transition: all var(--transition-fast);
}

.social-link:hover {
    color: var(--text-primary);
    border-color: var(--accent-primary);
    background: var(--bg-elevated);
}

.footer-heading {
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    color: var(--text-secondary);
    margin-bottom: 16px;
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.footer-links a {
    font-size: 0.85rem;
    color: var(--text-muted);
    transition: color var(--transition-fast);
}

.footer-links a:hover { color: var(--accent-primary); }

.footer-bottom {
    border-top: 1px solid var(--border-color);
    padding: 20px 0;
}

.footer-copy {
    font-size: 0.82rem;
    color: var(--text-muted);
    margin: 0;
}

.footer-meta {
    display: flex;
    gap: 10px;
    align-items: center;
    font-size: 0.82rem;
}

.footer-meta a { color: var(--text-muted); }
.footer-meta a:hover { color: var(--accent-primary); }
.footer-meta .sep { color: var(--border-bright); }

/* ── Tool Page Layout ─────────────────────────────────────── */
.tool-page { padding: 40px 0 80px; }

.tool-header {
    margin-bottom: 32px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--border-color);
}

.tool-breadcrumb {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.tool-breadcrumb a { color: var(--text-muted); }
.tool-breadcrumb a:hover { color: var(--accent-primary); }

.tool-title { font-size: 1.8rem; font-weight: 700; letter-spacing: -0.5px; margin-bottom: 6px; }
.tool-desc  { color: var(--text-secondary); font-size: 0.9rem; }

/* Tool Fields */
.dth-field {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    border-radius: var(--radius-md);
    padding: 14px 16px;
    font-family: var(--font-mono);
    font-size: 0.88rem;
    width: 100%;
    resize: vertical;
    transition: border-color var(--transition-fast);
    outline: none;
}

.dth-field:focus { border-color: var(--accent-primary); }
.dth-field::placeholder { color: var(--text-muted); }

/* Tool Buttons */
.dth-btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-size: 0.87rem;
    font-weight: 600;
    padding: 9px 18px;
    border-radius: var(--radius-sm);
    border: 1px solid transparent;
    cursor: pointer;
    transition: all var(--transition-fast);
    white-space: nowrap;
}

.dth-btn-primary {
    background: var(--accent-gradient);
    color: #fff;
    border-color: transparent;
}
.dth-btn-primary:hover { opacity: 0.88; transform: translateY(-1px); }

.dth-btn-secondary {
    background: var(--bg-card);
    color: var(--text-secondary);
    border-color: var(--border-color);
}
.dth-btn-secondary:hover { color: var(--text-primary); border-color: var(--border-bright); }

.dth-btn-ghost {
    background: transparent;
    color: var(--text-muted);
    border-color: transparent;
}
.dth-btn-ghost:hover { color: var(--text-primary); background: var(--bg-elevated); }

/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 767px) {
    .dth-hero { padding: 60px 0 48px; }
    .hero-stats { max-width: 100%; }
    .stat-item { min-width: 100px; }
    .section-header { flex-direction: column; align-items: flex-start; }
    .dth-footer { margin-top: 48px; }
}

@media (max-width: 480px) {
    .hero-actions { flex-direction: column; align-items: center; }
    .dth-toast { left: 16px; right: 16px; bottom: 16px; }
}

/* ── Tool Workspace (shared across all tool pages) ─────────── */
.tool-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 24px;
}

.tool-card + .tool-card { margin-top: 16px; }

.tool-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--border-color);
}

.tool-card-title {
    font-size: 0.82rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
}

.tool-options {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 18px;
    padding: 16px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
}

.option-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 120px;
}

.option-label {
    font-size: 0.73rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: var(--text-muted);
}

.dth-select {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    border-radius: var(--radius-sm);
    padding: 7px 12px;
    font-size: 0.87rem;
    outline: none;
    cursor: pointer;
    transition: border-color var(--transition-fast);
    min-width: 140px;
}

.dth-select:focus { border-color: var(--accent-primary); }
.dth-select option { background: var(--bg-card); }

.dth-range {
    -webkit-appearance: none;
    width: 100%;
    height: 4px;
    background: var(--bg-elevated);
    border-radius: 99px;
    outline: none;
    cursor: pointer;
    transition: background var(--transition-fast);
}

.dth-range::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--accent-primary);
    cursor: pointer;
    transition: box-shadow var(--transition-fast);
}

.dth-range::-webkit-slider-thumb:hover {
    box-shadow: 0 0 0 4px var(--accent-glow);
}

.dth-number {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    border-radius: var(--radius-sm);
    padding: 6px 10px;
    font-size: 0.9rem;
    outline: none;
    width: 72px;
    text-align: center;
    transition: border-color var(--transition-fast);
}

.dth-number:focus { border-color: var(--accent-primary); }

.dth-check-group {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.dth-check-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.84rem;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 6px 12px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    background: var(--bg-card);
    transition: all var(--transition-fast);
    user-select: none;
}

.dth-check-label:hover { border-color: var(--border-bright); color: var(--text-primary); }

.dth-check-label input[type="checkbox"] {
    accent-color: var(--accent-primary);
    width: 14px;
    height: 14px;
}

.dth-check-label:has(input:checked) {
    border-color: var(--accent-primary);
    background: rgba(124, 111, 239, 0.08);
    color: var(--text-primary);
}

.tool-btn-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 16px 0;
}

.tool-error {
    display: none;
    align-items: center;
    gap: 7px;
    color: var(--danger);
    font-size: 0.82rem;
    margin-top: 8px;
    padding: 8px 12px;
    background: rgba(239, 68, 68, 0.08);
    border: 1px solid rgba(239, 68, 68, 0.2);
    border-radius: var(--radius-sm);
}

.tool-error.show { display: flex; }

.mode-tabs {
    display: flex;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 4px;
    gap: 4px;
    width: fit-content;
}

.mode-tab {
    padding: 7px 20px;
    border-radius: calc(var(--radius-md) - 4px);
    font-size: 0.84rem;
    font-weight: 600;
    color: var(--text-muted);
    background: transparent;
    border: none;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.mode-tab.active {
    background: var(--accent-primary);
    color: #fff;
}

.mode-tab:not(.active):hover { color: var(--text-primary); }

/* JWT specific */
.jwt-panels {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 14px;
    margin-top: 16px;
}

.jwt-panel {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    overflow: hidden;
}

.jwt-panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    border-bottom: 1px solid var(--border-color);
}

.jwt-panel-label {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.label-header  { color: #f59e0b; }
.label-payload { color: #06b6d4; }
.label-sig     { color: #10b981; }

.jwt-panel pre {
    margin: 0;
    padding: 14px;
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--text-secondary);
    white-space: pre-wrap;
    word-break: break-all;
    line-height: 1.6;
    min-height: 80px;
    max-height: 280px;
    overflow-y: auto;
}

.strength-bar-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 10px;
}

.strength-bar {
    flex: 1;
    height: 4px;
    background: var(--bg-elevated);
    border-radius: 99px;
    overflow: hidden;
}

.strength-fill {
    height: 100%;
    border-radius: 99px;
    transition: width 0.3s ease, background 0.3s ease;
    width: 0%;
}

.strength-label {
    font-size: 0.75rem;
    font-weight: 600;
    min-width: 50px;
    text-align: right;
}

.output-mono {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    letter-spacing: 0.3px;
}

.range-row {
    display: flex;
    align-items: center;
    gap: 12px;
}
