/* devStudio — Professional Developer Toolbox UI */

:root {
    --primary: #6366f1;
    --primary-hover: #818cf8;
    --accent: #22d3ee;
    --success: #34d399;
    --error: #f87171;
    --info: #60a5fa;
    --warning: #fbbf24;
    --radius: 12px;
    --radius-sm: 8px;
    --font: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --mono: 'JetBrains Mono', 'Fira Code', monospace;
    --header-h: 64px;
    --transition: 0.2s ease;
}

/* Dark theme (default) */
:root,
[data-theme="dark"] {
    --bg: #0b0f19;
    --bg-elevated: #111827;
    --bg-card: #151d2e;
    --bg-input: #0d1321;
    --border: #1e293b;
    --border-hover: #334155;
    --text: #e2e8f0;
    --text-muted: #94a3b8;
    --text-dim: #64748b;
    --primary-glow: rgba(99, 102, 241, 0.25);
    --success-bg: rgba(52, 211, 153, 0.1);
    --error-bg: rgba(248, 113, 113, 0.1);
    --info-bg: rgba(96, 165, 250, 0.1);
    --shadow: 0 4px 24px rgba(0, 0, 0, 0.4);
    --header-bg: rgba(11, 15, 25, 0.88);
    --hero-gradient: linear-gradient(135deg, #fff 0%, var(--text-muted) 100%);
    --body-glow-1: rgba(99, 102, 241, 0.15);
    --body-glow-2: rgba(34, 211, 238, 0.08);
    --spinner-track: rgba(255, 255, 255, 0.3);
    --spinner-head: #fff;
    --theme-toggle-bg: var(--bg-card);
    --theme-toggle-border: var(--border);
    --nav-dropdown-hover-bg: rgba(99, 102, 241, 0.14);
    --nav-dropdown-hover-text: #e2e8f0;
    --nav-dropdown-active-bg: rgba(99, 102, 241, 0.22);
    --nav-dropdown-active-text: #c7d2fe;
}

/* Light theme */
[data-theme="light"] {
    --bg: #f1f5f9;
    --bg-elevated: #ffffff;
    --bg-card: #ffffff;
    --bg-input: #f8fafc;
    --border: #e2e8f0;
    --border-hover: #cbd5e1;
    --text: #0f172a;
    --text-muted: #475569;
    --text-dim: #64748b;
    --primary-glow: rgba(99, 102, 241, 0.18);
    --success-bg: rgba(52, 211, 153, 0.12);
    --error-bg: rgba(248, 113, 113, 0.1);
    --info-bg: rgba(96, 165, 250, 0.1);
    --shadow: 0 4px 24px rgba(15, 23, 42, 0.08);
    --header-bg: rgba(255, 255, 255, 0.92);
    --hero-gradient: linear-gradient(135deg, #0f172a 0%, #475569 100%);
    --body-glow-1: rgba(99, 102, 241, 0.08);
    --body-glow-2: rgba(34, 211, 238, 0.06);
    --spinner-track: rgba(15, 23, 42, 0.15);
    --spinner-head: var(--primary);
    --theme-toggle-bg: #f8fafc;
    --theme-toggle-border: #e2e8f0;
    --nav-dropdown-hover-bg: #eef2ff;
    --nav-dropdown-hover-text: #4338ca;
    --nav-dropdown-active-bg: #e0e7ff;
    --nav-dropdown-active-text: #3730a3;
}

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

html {
    scroll-behavior: smooth;
    color-scheme: dark;
}

[data-theme="light"] {
    color-scheme: light;
}

body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    -webkit-font-smoothing: antialiased;
    transition: background-color 0.25s ease, color 0.25s ease;
}

body::before {
    content: '';
    position: fixed;
    inset: 0;
    background:
        radial-gradient(ellipse 80% 50% at 50% -20%, var(--body-glow-1), transparent),
        radial-gradient(ellipse 60% 40% at 100% 0%, var(--body-glow-2), transparent);
    pointer-events: none;
    z-index: -1;
    transition: opacity 0.25s ease;
}

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

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.25rem;
}

.skip-link {
    position: absolute;
    top: -100px;
    left: 1rem;
    background: var(--primary);
    color: #fff;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-sm);
    z-index: 9999;
}
.skip-link:focus { top: 1rem; }

/* Header */
.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--header-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    height: var(--header-h);
    transition: background-color 0.25s ease, border-color 0.25s ease;
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: var(--header-h);
    gap: 1rem;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0;
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    margin-left: auto;
}

.theme-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.45rem 0.75rem;
    background: var(--theme-toggle-bg);
    border: 1px solid var(--theme-toggle-border);
    border-radius: 999px;
    color: var(--text);
    font-family: inherit;
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition);
    flex-shrink: 0;
}

.theme-toggle:hover {
    border-color: var(--border-hover);
    background: var(--bg-card);
    color: var(--primary-hover);
}

.theme-toggle:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

.theme-icon { flex-shrink: 0; }

[data-theme="dark"] .theme-icon-moon,
[data-theme="light"] .theme-icon-sun {
    display: none;
}

.theme-toggle-label {
    line-height: 1;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    color: var(--text);
    font-size: 1.25rem;
}
.logo:hover { color: var(--text); }
.logo-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    border-radius: var(--radius-sm);
    font-family: var(--mono);
    font-size: 0.85rem;
    font-weight: 700;
    color: #fff;
}
.logo-text { display: flex; align-items: center; gap: 0.5rem; }
.logo-badge {
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    background: var(--success-bg);
    color: var(--success);
    padding: 0.15rem 0.45rem;
    border-radius: 999px;
    border: 1px solid rgba(52, 211, 153, 0.3);
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.5rem 0.85rem;
    border-radius: var(--radius-sm);
    color: var(--text-muted);
    font-size: 0.9rem;
    font-weight: 500;
    background: none;
    border: none;
    cursor: pointer;
    font-family: inherit;
    transition: all var(--transition);
}
.nav-link:hover, .nav-link.active { color: var(--text); background: var(--bg-card); }

.nav-dropdown { position: relative; }
.nav-dropdown-menu {
    position: absolute;
    top: calc(100% + 0.5rem);
    right: 0;
    width: min(780px, calc(100vw - 2rem));
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 0.75rem;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: all var(--transition);
    max-height: min(70vh, 520px);
    overflow-y: auto;
    overflow-x: hidden;
}
.nav-dropdown.open .nav-dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}
.nav-dropdown-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.65rem 1rem;
    align-items: start;
}
.nav-dropdown-group {
    min-width: 0;
}
.nav-dropdown-group-label {
    padding: 0.2rem 0.5rem 0.35rem;
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-dim);
}
.nav-dropdown-group-items {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
}
.nav-dropdown-item {
    display: block;
    padding: 0.45rem 0.5rem;
    border-radius: var(--radius-sm);
    color: var(--text-muted);
    font-size: 0.84rem;
    line-height: 1.35;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: background-color var(--transition), color var(--transition);
}
.nav-dropdown-item:hover,
.nav-dropdown-item:focus-visible {
    background: var(--nav-dropdown-hover-bg);
    color: var(--nav-dropdown-hover-text);
    outline: none;
}
.nav-dropdown-item.active {
    background: var(--nav-dropdown-active-bg);
    color: var(--nav-dropdown-active-text);
    font-weight: 600;
}

@media (max-width: 1024px) {
    .nav-dropdown-menu {
        width: min(560px, calc(100vw - 2rem));
    }
    .nav-dropdown-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 640px) {
    .nav-dropdown-menu {
        width: calc(100vw - 2rem);
        max-height: none;
    }
    .nav-dropdown-grid {
        grid-template-columns: 1fr;
    }
    .nav-dropdown-item {
        white-space: normal;
    }
}

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
}
.nav-toggle span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--text);
    border-radius: 2px;
    transition: var(--transition);
}

.main-content { flex: 1; }

/* Hero */
.hero {
    padding: 4rem 0 3rem;
    text-align: center;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.4rem 1rem;
    background: var(--success-bg);
    border: 1px solid rgba(52, 211, 153, 0.25);
    border-radius: 999px;
    color: var(--success);
    font-size: 0.85rem;
    font-weight: 500;
    margin-bottom: 1.5rem;
}

.hero h1 {
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.02em;
    margin-bottom: 1rem;
    background: var(--hero-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.1rem;
    color: var(--text-muted);
    max-width: 680px;
    margin: 0 auto 1.25rem;
    line-height: 1.65;
}

.hero-trust-list {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem 1.25rem;
    max-width: 720px;
    margin: 0 auto 1.75rem;
    padding: 0;
    font-size: 0.9rem;
    color: var(--text-muted);
}
.hero-trust-list li {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}
.hero-trust-list li::before {
    content: '✓';
    color: var(--success);
    font-weight: 700;
    font-size: 0.8rem;
}

.hero-search {
    position: relative;
    max-width: 480px;
    margin: 0 auto;
}
.hero-search svg {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-dim);
}
.hero-search input {
    width: 100%;
    padding: 0.85rem 1rem 0.85rem 2.75rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text);
    font-size: 1rem;
    font-family: inherit;
    transition: border-color var(--transition), box-shadow var(--transition);
}
.hero-search input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-glow);
}

/* Tools Grid */
.tools-section { padding: 2rem 0 4rem; }

.section-header {
    margin-bottom: 2rem;
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1rem;
}
.section-header h2 {
    font-size: 1.5rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.tool-count {
    font-size: 0.8rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    padding: 0.15rem 0.5rem;
    border-radius: 999px;
    color: var(--text-muted);
    font-weight: 500;
}
.section-header p { color: var(--text-muted); margin-top: 0.35rem; }

.tools-toolbar {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}
.tools-toolbar-label {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 500;
}
.sort-select {
    appearance: none;
    background: var(--bg-card) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E") no-repeat right 0.65rem center;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text);
    font-size: 0.85rem;
    font-weight: 500;
    padding: 0.45rem 2rem 0.45rem 0.75rem;
    cursor: pointer;
    transition: border-color var(--transition), background-color var(--transition);
}
.sort-select:hover,
.sort-select:focus {
    border-color: var(--border-hover);
    outline: none;
}

.tool-category-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}
.category-tag {
    border: 1px solid var(--border);
    background: var(--bg-card);
    color: var(--text-muted);
    font-family: inherit;
    font-size: 0.8rem;
    font-weight: 500;
    padding: 0.4rem 0.85rem;
    border-radius: 999px;
    cursor: pointer;
    transition: background-color var(--transition), border-color var(--transition), color var(--transition);
}
.category-tag:hover {
    border-color: var(--border-hover);
    color: var(--text);
    background: var(--bg-elevated);
}
.category-tag.is-active {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
}

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

.tool-card,
.feature-card,
.tool-workspace,
.result-card,
.input,
.select,
.textarea,
.code-block,
.ts-live-clock {
    transition: background-color 0.25s ease, border-color 0.25s ease, color 0.25s ease, box-shadow 0.25s ease;
}

.tool-card {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1.25rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text);
    transition: all var(--transition);
    position: relative;
    overflow: hidden;
}
.tool-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, var(--primary-glow), transparent);
    opacity: 0;
    transition: opacity var(--transition);
}
.tool-card:hover {
    border-color: var(--border-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}
.tool-card:hover::before { opacity: 1; }
.tool-card.hidden { display: none; }

.tool-card-external .tool-card-arrow {
    transform: none;
}
.tool-card-external:hover .tool-card-arrow {
    transform: translate(2px, -2px);
}

.tool-card-external-badge {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    z-index: 2;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    color: var(--primary-hover);
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: 999px;
    padding: 0.2rem 0.55rem;
}

.tool-card-brand {
    display: inline-block;
    margin-top: 0.5rem;
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--primary-hover);
}

.tool-card-icon {
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-elevated);
    border-radius: var(--radius-sm);
    color: var(--primary-hover);
    position: relative;
    z-index: 1;
}
.tool-card-icon svg { width: 22px; height: 22px; }

.tool-card-body { flex: 1; position: relative; z-index: 1; }
.tool-card-category {
    display: inline-block;
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--primary-hover);
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: 999px;
    padding: 0.15rem 0.5rem;
    margin-bottom: 0.45rem;
}
.tool-card-body h3 { font-size: 1rem; font-weight: 600; margin-bottom: 0.35rem; }
.tool-card-body p { font-size: 0.85rem; color: var(--text-muted); line-height: 1.5; }

.tool-card-arrow {
    color: var(--text-dim);
    align-self: center;
    position: relative;
    z-index: 1;
    transition: transform var(--transition), color var(--transition);
}
.tool-card:hover .tool-card-arrow {
    transform: translateX(4px);
    color: var(--primary-hover);
}

.no-results {
    text-align: center;
    color: var(--text-muted);
    padding: 2rem;
}

/* Features */
    padding: 0;
}
.external-tool-hero {
    padding: 1.5rem;
    border-bottom: 1px solid var(--border);
    background: linear-gradient(180deg, var(--bg-elevated), transparent);
}
.external-tool-brand {
    display: inline-block;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--primary-hover);
    margin-bottom: 0.5rem;
}
.external-tool-hero h2 {
    font-size: 1.35rem;
    margin-bottom: 0.75rem;
}
.external-tool-intro {
    color: var(--text-muted);
    line-height: 1.7;
    max-width: 70ch;
}
.external-tool-note {
    font-size: 0.85rem;
    color: var(--text-dim);
}
.external-tool-section {
    padding: 1.5rem;
    border-bottom: 1px solid var(--border);
}
.external-tool-section h3 {
    font-size: 1rem;
    margin-bottom: 1rem;
}
.external-feature-list,
.external-steps {
    color: var(--text-muted);
    line-height: 1.7;
    padding-left: 1.25rem;
}
.external-feature-list li,
.external-steps li {
    margin-bottom: 0.5rem;
}
.faq-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}
.faq-item {
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--bg-elevated);
    padding: 0.75rem 1rem;
}
.faq-item summary {
    cursor: pointer;
    font-weight: 600;
}
.faq-item p {
    margin-top: 0.75rem;
    color: var(--text-muted);
    line-height: 1.6;
}
.external-tool-cta {
    padding: 1.5rem;
    text-align: center;
}
.external-tool-cta p {
    margin-bottom: 1rem;
    color: var(--text-muted);
}
.btn-launch-external {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

/* Features */
.features-section {
    padding: 3rem 0 5rem;
    border-top: 1px solid var(--border);
}
.features-intro {
    text-align: center;
    max-width: 720px;
    margin: 0 auto 2rem;
}
.features-intro h2 {
    font-size: clamp(1.35rem, 3vw, 1.75rem);
    font-weight: 700;
    margin-bottom: 0.65rem;
}
.features-intro p {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.65;
}
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 1.25rem;
}
.feature-card {
    padding: 1.5rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    text-align: center;
}
.feature-icon { font-size: 2rem; margin-bottom: 0.75rem; }
.feature-card h3 { font-size: 1rem; font-weight: 600; margin-bottom: 0.5rem; }
.feature-card p { font-size: 0.875rem; color: var(--text-muted); }

/* Tool Page */
.tool-page { padding: 2rem 0 4rem; }

.breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
}
.breadcrumb a { color: var(--text-muted); }
.breadcrumb a:hover { color: var(--primary-hover); }

.tool-header {
    display: flex;
    align-items: flex-start;
    gap: 1.25rem;
    margin-bottom: 2rem;
}
.tool-header-icon {
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary), #4f46e5);
    border-radius: var(--radius);
    color: #fff;
    flex-shrink: 0;
}
.tool-header-icon svg { width: 28px; height: 28px; }
.tool-header h1 { font-size: 1.75rem; font-weight: 700; margin-bottom: 0.35rem; }
.tool-header-desc { color: var(--text-muted); font-size: 1rem; }
.tool-header-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.75rem;
}
.tool-category-badge {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--primary-hover);
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    padding: 0.25rem 0.65rem;
    border-radius: 999px;
}
.free-badge {
    display: inline-block;
    margin-top: 0;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--success);
    background: var(--success-bg);
    border: 1px solid rgba(52, 211, 153, 0.3);
    padding: 0.25rem 0.65rem;
    border-radius: 999px;
}
.trust-badge {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--info);
    background: var(--info-bg);
    border: 1px solid rgba(96, 165, 250, 0.3);
    padding: 0.25rem 0.65rem;
    border-radius: 999px;
}
.tool-privacy-note {
    font-size: 0.88rem;
    color: var(--text-muted);
    line-height: 1.55;
    margin: -0.75rem 0 1.5rem;
    padding: 0.75rem 1rem;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
}

.tool-workspace {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem;
}

.tool-panel { display: flex; flex-direction: column; gap: 1.25rem; }
.tool-controls { display: flex; flex-direction: column; gap: 1rem; }

.control-group { display: flex; flex-direction: column; gap: 0.4rem; }
.control-group label {
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-muted);
}
.control-row {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}
.control-row .control-group { flex: 1; min-width: 180px; }
.flex-2 { flex: 2 !important; }

.input, .select, .textarea {
    width: 100%;
    padding: 0.7rem 0.85rem;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text);
    font-family: inherit;
    font-size: 0.95rem;
    transition: border-color var(--transition), box-shadow var(--transition);
}
.input:focus, .select:focus, .textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-glow);
}

.input-valid,
.textarea.input-valid {
    border-color: var(--success) !important;
    box-shadow: 0 0 0 2px rgba(52, 211, 153, 0.15);
}

.input-invalid,
.textarea.input-invalid {
    border-color: var(--error) !important;
    box-shadow: 0 0 0 2px rgba(248, 113, 113, 0.15);
}

.field-feedback {
    display: block;
    font-size: 0.78rem;
    margin-top: 0.3rem;
    line-height: 1.4;
}

.field-feedback-error {
    color: var(--error);
}

.input-sm { max-width: 120px; }
.input-mono, .textarea-mono { font-family: var(--mono); font-size: 0.875rem; }
.textarea { resize: vertical; min-height: 120px; line-height: 1.6; }

.input-with-flag { display: flex; align-items: center; gap: 0; }
.regex-delimiter { color: var(--text-dim); font-family: var(--mono); padding: 0 0.25rem; }
.input-flags { max-width: 80px; border-radius: 0 var(--radius-sm) var(--radius-sm) 0 !important; }

.checkbox-group, .radio-group {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem 1.25rem;
}
.checkbox-label, .radio-label {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.9rem;
    color: var(--text);
    cursor: pointer;
    text-transform: none;
    letter-spacing: normal;
    font-weight: 400;
}
.checkbox-label input, .radio-label input { accent-color: var(--primary); }

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    padding: 0.65rem 1.15rem;
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 500;
    border: none;
    cursor: pointer;
    transition: all var(--transition);
    white-space: nowrap;
}
.btn-primary {
    background: var(--primary);
    color: #fff;
}
.btn-primary:hover { background: var(--primary-hover); box-shadow: 0 4px 16px var(--primary-glow); }
.btn-secondary {
    background: var(--bg-elevated);
    color: var(--text);
    border: 1px solid var(--border);
}
.btn-secondary:hover { border-color: var(--border-hover); background: var(--bg-card); }
.btn-ghost {
    background: transparent;
    color: var(--text-muted);
    border: 1px solid transparent;
}
.btn-ghost:hover { color: var(--text); background: var(--bg-elevated); }
.btn-sm { padding: 0.4rem 0.75rem; font-size: 0.8rem; }
.btn-group { display: flex; flex-wrap: wrap; gap: 0.5rem; }

.btn-group-toggle .btn-action.btn-selected {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
    box-shadow: 0 4px 14px var(--primary-glow);
}

.btn-group-toggle .btn-action.btn-selected:hover {
    background: var(--primary-hover);
    color: #fff;
}

.btn.is-loading {
    opacity: 0.85;
    pointer-events: none;
}

/* Global processing loader */
.ds-loader {
    position: fixed;
    inset: 0;
    z-index: 9998;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.22s ease, visibility 0.22s ease;
}

.ds-loader.is-visible {
    opacity: 1;
    visibility: visible;
}

.ds-loader-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(8, 12, 22, 0.55);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

[data-theme="light"] .ds-loader-backdrop {
    background: rgba(241, 245, 249, 0.72);
}

.ds-loader-card {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.85rem;
    padding: 1.75rem 2rem;
    min-width: 220px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.ds-loader-orbit {
    position: relative;
    width: 64px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ds-orbit-ring {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    border: 3px solid transparent;
    border-top-color: var(--primary);
    border-right-color: var(--accent);
    animation: ds-orbit-spin 0.9s linear infinite;
}

.ds-orbit-core {
    font-family: var(--mono);
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--primary-hover);
    animation: ds-orbit-pulse 1.2s ease-in-out infinite;
}

.ds-loader-text {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text);
}

.ds-loader-bar {
    width: 140px;
    height: 4px;
    background: var(--bg-input);
    border-radius: 999px;
    overflow: hidden;
}

.ds-loader-bar span {
    display: block;
    height: 100%;
    width: 40%;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    border-radius: 999px;
    animation: ds-loader-slide 1.1s ease-in-out infinite;
}

@keyframes ds-orbit-spin {
    to { transform: rotate(360deg); }
}

@keyframes ds-orbit-pulse {
    0%, 100% { opacity: 0.65; transform: scale(0.95); }
    50% { opacity: 1; transform: scale(1); }
}

@keyframes ds-loader-slide {
    0% { transform: translateX(-120%); }
    100% { transform: translateX(320%); }
}

.btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* Results */
.results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 0.75rem;
}
.result-card {
    position: relative;
    padding: 1rem;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
}
.result-card-wide { grid-column: 1 / -1; }
.result-label {
    display: block;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-dim);
    margin-bottom: 0.4rem;
}
.result-value {
    display: block;
    font-family: var(--mono);
    font-size: 0.85rem;
    word-break: break-all;
    color: var(--accent);
}
.copy-btn {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    padding: 0.25rem 0.5rem;
    font-size: 0.7rem;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: 4px;
    color: var(--text-muted);
    cursor: pointer;
    font-family: inherit;
}
.copy-btn:hover { color: var(--text); border-color: var(--border-hover); }

.output-area { display: flex; flex-direction: column; gap: 0.4rem; }
.output-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
}
.output-header h3 { font-size: 0.9rem; font-weight: 600; }
.output-header label { font-size: 0.8rem; font-weight: 600; color: var(--text-muted); }

.code-block {
    padding: 1rem;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-family: var(--mono);
    font-size: 0.85rem;
    line-height: 1.6;
    overflow-x: auto;
    white-space: pre-wrap;
    word-break: break-word;
}

/* JWT */
.jwt-panels { display: grid; gap: 1rem; }
.jwt-panel {
    padding: 1rem;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
}
.jwt-panel-muted { background: var(--bg-elevated); }
.signature-note { font-size: 0.85rem; color: var(--text-muted); margin-bottom: 0.5rem; }

/* Hash */
/* Hash generator grid */
.hash-input {
    font-family: var(--mono);
    font-size: 0.9rem;
}

.hash-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    width: 100%;
}

.hash-grid-card {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    padding: 0.75rem;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    min-width: 0;
}

.hash-grid-label {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--primary-hover);
    letter-spacing: 0.02em;
}

.hash-grid-value {
    width: 100%;
    padding: 0.5rem 0.6rem;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text);
    font-family: var(--mono);
    font-size: 0.72rem;
    line-height: 1.4;
    overflow-x: auto;
    white-space: nowrap;
}

.hash-grid-copy {
    align-self: flex-start;
    padding: 0.3rem 0.65rem;
    background: transparent;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-muted);
    font-family: inherit;
    font-size: 0.75rem;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition);
}

.hash-grid-copy:hover {
    color: var(--primary-hover);
    border-color: var(--primary-hover);
    background: var(--bg-card);
}

/* Legacy hash list (unused) */
.hash-results { display: flex; flex-direction: column; gap: 0.75rem; }
.hash-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.85rem 1rem;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
}
.hash-algo {
    flex-shrink: 0;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--primary-hover);
    min-width: 70px;
}
.hash-value {
    flex: 1;
    font-family: var(--mono);
    font-size: 0.8rem;
    word-break: break-all;
    color: var(--text);
}

/* Regex */
.regex-stats { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.stat-badge {
    font-size: 0.8rem;
    font-weight: 500;
    padding: 0.35rem 0.75rem;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: 999px;
    color: var(--text-muted);
}
.stat-valid { color: var(--success); border-color: rgba(52, 211, 153, 0.3); }
.regex-highlight .match {
    background: rgba(99, 102, 241, 0.35);
    border-radius: 2px;
    padding: 0 2px;
}

/* Stats bar */
.stats-bar {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
    padding: 0.75rem 1rem;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    color: var(--text-muted);
}
.stat-savings { color: var(--success); font-weight: 600; }

/* Live Unix clock — Timestamp Converter */
.ts-live-clock {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 2rem 1.5rem;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    gap: 0.35rem;
}

.ts-live-epoch {
    font-family: var(--mono);
    font-size: clamp(2rem, 6vw, 3rem);
    font-weight: 600;
    letter-spacing: -0.02em;
    color: var(--text);
    line-height: 1.1;
    font-variant-numeric: tabular-nums;
}

.ts-live-label {
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin: 0.25rem 0 0.5rem;
}

.ts-live-time {
    font-size: 1.1rem;
    font-weight: 500;
    color: var(--text);
    font-variant-numeric: tabular-nums;
    margin-bottom: 0.75rem;
}

.ts-live-clock .btn {
    min-width: 80px;
}

/* UUID version tabs */
.uuid-version-tabs {
    display: flex;
    flex-wrap: wrap;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    overflow: hidden;
}

.uuid-version-tab {
    flex: 1 1 auto;
    min-width: 0;
    padding: 0.75rem 1rem;
    background: transparent;
    border: none;
    border-right: 1px solid var(--border);
    color: var(--text-muted);
    font-family: inherit;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: background-color var(--transition), color var(--transition);
    white-space: nowrap;
}

.uuid-version-tab:last-child {
    border-right: none;
}

.uuid-version-tab:hover {
    background: var(--bg-card);
    color: var(--text);
}

.uuid-version-tab.active {
    background: var(--bg-elevated);
    color: var(--text);
    font-weight: 600;
    box-shadow: inset 0 -2px 0 var(--primary);
}

.uuid-version-desc {
    font-size: 0.875rem;
    color: var(--text-muted);
    line-height: 1.5;
    padding: 0 0.15rem;
    margin-bottom: 1.25rem;
}

/* Password generator */
.pw-panel { margin-top: 0; }
.pw-stats {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 0.75rem;
    margin-top: 1rem;
}
.pw-stat-card {
    padding: 1rem 1.15rem;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
}
.pw-stat-label {
    display: block;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-muted);
    margin-bottom: 0.35rem;
}
.pw-stat-value {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text);
    font-variant-numeric: tabular-nums;
}
.pw-stat-note {
    margin-top: 1rem;
    font-size: 0.8rem;
    color: var(--text-dim);
}
.pw-strength-result {
    margin-top: 1.25rem;
    padding: 1.25rem;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
}
.pw-strength-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 0.75rem;
}
.pw-strength-label {
    font-size: 1.1rem;
    font-weight: 700;
}
.pw-strength-score {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-variant-numeric: tabular-nums;
}
.pw-strength-bar {
    height: 8px;
    background: var(--bg-input);
    border-radius: 999px;
    overflow: hidden;
    margin-bottom: 1rem;
}
.pw-strength-fill {
    height: 100%;
    width: 0;
    border-radius: 999px;
    transition: width 0.25s ease, background-color 0.25s ease;
}
.pw-strength-very-weak { background: #ef4444; }
.pw-strength-weak { background: #f97316; }
.pw-strength-fair { background: #eab308; }
.pw-strength-strong { background: #22c55e; }
.pw-strength-very-strong { background: #10b981; }
.pw-strength-tips {
    margin: 0;
    padding-left: 1.15rem;
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.6;
}
.pw-strength-tips li { margin-bottom: 0.35rem; }
.control-group .control-label {
    display: block;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

/* Color tools */
.color-mode-tabs {
    overflow-x: auto;
    flex-wrap: nowrap;
}
.color-mode-tabs .uuid-version-tab {
    flex: 1 0 auto;
}
.color-panel { margin-top: 0; }
.color-convert-layout {
    display: flex;
    gap: 1.5rem;
    align-items: flex-start;
}
.color-preview-swatch {
    width: 120px;
    height: 120px;
    flex-shrink: 0;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
}
.color-convert-fields { flex: 1; min-width: 0; }
.color-input-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}
.color-native-input {
    width: 44px;
    height: 44px;
    padding: 0;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    cursor: pointer;
    background: transparent;
}
.color-picker-layout {
    display: flex;
    gap: 2rem;
    align-items: center;
    flex-wrap: wrap;
}
.color-picker-large {
    width: 160px;
    height: 160px;
    padding: 0;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    cursor: pointer;
    background: transparent;
}
.color-picker-values { flex: 1; min-width: 260px; }
.color-value-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.65rem 0;
    border-bottom: 1px solid var(--border);
}
.color-value-row:last-child { border-bottom: none; }
.color-value-label {
    width: 3rem;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-muted);
}
.color-value-code {
    flex: 1;
    font-family: var(--mono);
    font-size: 0.9rem;
}
.color-gradient-stops {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    margin-bottom: 1rem;
}
.color-gradient-stop {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}
.gradient-stop-color {
    width: 44px;
    height: 44px;
    padding: 0;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    cursor: pointer;
    background: transparent;
}
.gradient-stop-pos { width: 5rem; }
.gradient-stop-unit {
    font-size: 0.85rem;
    color: var(--text-muted);
}
.color-gradient-preview {
    height: 120px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    margin: 1rem 0;
}
.color-palette-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}
.color-palette-item {
    text-align: center;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 0.75rem;
}
.color-palette-swatch {
    height: 72px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    margin-bottom: 0.65rem;
}
.color-palette-hex {
    display: block;
    font-family: var(--mono);
    font-size: 0.85rem;
    margin-bottom: 0.5rem;
}
.color-contrast-preview {
    border-radius: var(--radius);
    border: 1px solid var(--border);
    padding: 2rem 1.5rem;
    margin: 1rem 0;
}
.color-contrast-sample {
    margin: 0 0 0.5rem;
    font-size: 1rem;
}
.color-contrast-sample-lg {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0;
}
.color-pass { color: var(--success); font-weight: 600; }
.color-fail { color: var(--error); font-weight: 600; }

/* Cron expression builder */
.cron-fields {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 0.75rem;
    margin-bottom: 1rem;
}
.cron-field label {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 0.35rem;
}
.cron-field-hint {
    display: block;
    font-size: 0.7rem;
    color: var(--text-dim);
    margin-top: 0.25rem;
}
.cron-expr-row {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}
.cron-expr-row .input { flex: 1; }
.cron-human-card {
    margin: 1.25rem 0;
    padding: 1rem 1.25rem;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-left: 3px solid var(--primary);
    border-radius: var(--radius-sm);
}
.cron-human-label {
    display: block;
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--primary-hover);
    margin-bottom: 0.35rem;
}
.cron-human-text {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 500;
    line-height: 1.5;
}
.cron-results-grid {
    display: grid;
    grid-template-columns: 1fr 1.4fr;
    gap: 1.5rem;
    margin-top: 1.5rem;
}
.cron-section-title {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
}
.cron-section-sub {
    font-size: 0.8rem;
    font-weight: 400;
    color: var(--text-muted);
}
.cron-run-list {
    list-style: none;
    margin: 0;
    padding: 0;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    overflow: hidden;
}
.cron-run-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.65rem 0.85rem;
    border-bottom: 1px solid var(--border);
    font-size: 0.9rem;
}
.cron-run-item:last-child { border-bottom: none; }
.cron-run-index {
    flex-shrink: 0;
    width: 1.5rem;
    height: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 600;
    background: var(--bg-elevated);
    border-radius: 999px;
    color: var(--text-muted);
}
.cron-run-time {
    font-family: var(--mono);
    font-size: 0.85rem;
}
.cron-run-empty {
    padding: 1rem;
    color: var(--text-muted);
    font-size: 0.9rem;
}
.cron-scheduler-scroll {
    overflow-x: auto;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
}
.cron-scheduler {
    min-width: 420px;
}
.cron-scheduler-row {
    display: grid;
    grid-template-columns: 3.5rem repeat(7, 1fr);
    gap: 2px;
    background: var(--border);
}
.cron-scheduler-header {
    background: var(--bg-elevated);
}
.cron-scheduler-corner,
.cron-scheduler-day,
.cron-scheduler-hour,
.cron-scheduler-cell {
    background: var(--bg-card);
    font-size: 0.7rem;
    text-align: center;
    padding: 0.35rem 0.15rem;
}
.cron-scheduler-day {
    font-weight: 600;
    color: var(--text-muted);
    padding: 0.5rem 0.15rem;
}
.cron-scheduler-hour {
    font-family: var(--mono);
    color: var(--text-dim);
    text-align: right;
    padding-right: 0.5rem;
}
.cron-scheduler-cell {
    aspect-ratio: 1.6;
    min-height: 14px;
    background: var(--bg-input);
}
.cron-scheduler-cell.is-active {
    background: var(--primary);
}
.cron-scheduler-legend {
    display: flex;
    gap: 1rem;
    margin-top: 0.5rem;
    font-size: 0.75rem;
    color: var(--text-muted);
}
.cron-legend-inactive::before,
.cron-legend-active::before {
    content: '';
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 2px;
    margin-right: 0.35rem;
    vertical-align: middle;
}
.cron-legend-inactive::before { background: var(--bg-input); border: 1px solid var(--border); }
.cron-legend-active::before { background: var(--primary); }

/* GraphQL Playground */
.gql-endpoint-bar {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 1rem;
    margin-bottom: 1.25rem;
}
.label-hint {
    font-weight: 400;
    color: var(--text-dim);
    font-size: 0.8em;
}
.gql-headers-input { min-height: 3.5rem; }
.gql-mode-tabs {
    overflow-x: auto;
    flex-wrap: nowrap;
}
.gql-mode-tabs .uuid-version-tab {
    flex: 1 0 auto;
    font-size: 0.8rem;
}
.gql-panel { margin-top: 0; }
.gql-editor-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr;
    gap: 1rem;
    margin-bottom: 1rem;
}
.gql-editor-col label,
.gql-op-name-label {
    display: block;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-muted);
    margin-bottom: 0.35rem;
}
.gql-op-name-label { margin-top: 0.75rem; }
.gql-query-input {
    min-height: 280px;
    font-size: 0.85rem;
    line-height: 1.5;
}
.gql-action-btns { margin-top: 0.75rem; }
.gql-response-area { margin-top: 0.5rem; }
.gql-response {
    max-height: 360px;
    overflow: auto;
    margin: 0;
}
.gql-response-meta {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-variant-numeric: tabular-nums;
}
.gql-schema-search {
    flex: 1;
    min-width: 200px;
}
.gql-schema-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: center;
}
.gql-schema-tree {
    margin-top: 1rem;
    max-height: 520px;
    overflow: auto;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 0.75rem 1rem;
    background: var(--bg-elevated);
}
.gql-schema-empty {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin: 0.5rem 0;
}
.gql-schema-root {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin: 0 0 0.75rem;
}
.gql-schema-type {
    border-bottom: 1px solid var(--border);
    padding: 0.5rem 0;
}
.gql-schema-type:last-child { border-bottom: none; }
.gql-schema-type summary {
    cursor: pointer;
    font-size: 0.9rem;
    padding: 0.25rem 0;
}
.gql-type-kind {
    font-size: 0.68rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--primary-hover);
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 0.1rem 0.35rem;
    margin-right: 0.35rem;
}
.gql-type-count {
    font-size: 0.75rem;
    color: var(--text-dim);
    font-weight: 400;
}
.gql-type-desc {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin: 0.35rem 0 0.5rem;
}
.gql-field-list {
    list-style: none;
    margin: 0.5rem 0 0;
    padding: 0;
}
.gql-field-item {
    margin-bottom: 0.35rem;
}
.gql-field-btn {
    display: block;
    width: 100%;
    text-align: left;
    border: none;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 0.4rem 0.6rem;
    font-family: var(--mono);
    font-size: 0.8rem;
    color: var(--text);
    cursor: pointer;
    transition: border-color var(--transition), background-color var(--transition);
}
.gql-field-btn:hover {
    border-color: var(--primary);
    background: var(--bg-elevated);
}
.gql-field-desc {
    display: block;
    font-size: 0.75rem;
    color: var(--text-dim);
    margin-top: 0.15rem;
    padding-left: 0.6rem;
}
.gql-field-deprecated {
    font-size: 0.7rem;
    color: var(--error);
    margin-left: 0.5rem;
}
.gql-export-block {
    max-height: 400px;
    overflow: auto;
    margin: 0;
    white-space: pre-wrap;
    word-break: break-all;
}
.gql-export-note {
    margin-top: 0.75rem;
    font-size: 0.8rem;
    color: var(--text-dim);
}

.sql-output {
    max-height: 400px;
    overflow: auto;
    margin: 0;
    white-space: pre-wrap;
}

/* URL Toolkit */
.url-mode-tabs {
    overflow-x: auto;
    flex-wrap: nowrap;
}
.url-mode-tabs .uuid-version-tab {
    flex: 1 0 auto;
    font-size: 0.78rem;
}
.url-panel { margin-top: 0; }
.url-parse-grid {
    margin-top: 1rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    overflow: hidden;
}
.url-parse-row {
    display: grid;
    grid-template-columns: 140px 1fr;
    gap: 0.75rem;
    padding: 0.55rem 0.85rem;
    border-bottom: 1px solid var(--border);
    font-size: 0.88rem;
}
.url-parse-row:last-child { border-bottom: none; }
.url-parse-key {
    font-weight: 600;
    color: var(--text-muted);
}
.url-parse-val {
    font-family: var(--mono);
    font-size: 0.82rem;
    word-break: break-all;
}
.url-parse-params-title {
    padding: 0.65rem 0.85rem 0.25rem;
    font-size: 0.85rem;
    margin: 0;
    background: var(--bg-elevated);
}
.url-chain-list { margin-top: 1rem; }
.url-chain-item {
    display: flex;
    gap: 0.75rem;
    align-items: flex-start;
    padding: 0.75rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    margin-bottom: 0.5rem;
    background: var(--bg-card);
}
.url-chain-item.is-final {
    border-color: var(--primary);
    background: var(--bg-elevated);
}
.url-chain-step {
    flex-shrink: 0;
    width: 1.6rem;
    height: 1.6rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: var(--bg-elevated);
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--primary-hover);
}
.url-chain-status {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}
.url-chain-url {
    display: block;
    font-family: var(--mono);
    font-size: 0.8rem;
    word-break: break-all;
}
.url-chain-summary {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin: 0.5rem 0 0;
}
.url-canonical-result {
    margin-top: 1rem;
    display: grid;
    gap: 0.75rem;
}
.url-canonical-value {
    font-family: var(--mono);
    font-size: 0.9rem;
    word-break: break-all;
}
.url-canonical-note {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin: 0;
}

/* Unit Converter */
.unit-mode-tabs {
    overflow-x: auto;
    flex-wrap: nowrap;
}
.unit-mode-tabs .uuid-version-tab {
    flex: 1 0 auto;
    font-size: 0.78rem;
}
.unit-panel { margin-top: 0; }
.unit-rate-note {
    font-size: 0.82rem;
    color: var(--text-muted);
    margin: 0 0 1rem;
}
.unit-convert-card {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 1rem;
    align-items: end;
}
.unit-convert-side {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    min-width: 0;
}
.unit-convert-side label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-muted);
}
.unit-value-input {
    font-size: 1.25rem;
    font-weight: 600;
    font-family: var(--mono);
}
.unit-unit-select { width: 100%; }
.unit-swap-btn {
    font-size: 1.25rem;
    padding: 0.5rem 0.75rem;
    margin-bottom: 0.25rem;
    align-self: end;
}
.unit-data-basis {
    margin-bottom: 1rem;
}
.unit-tz-results {
    margin-top: 1.25rem;
    display: grid;
    gap: 0.75rem;
}
@media (max-width: 720px) {
    .unit-convert-card {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }
    .unit-swap-btn {
        justify-self: center;
        transform: rotate(90deg);
    }
}

/* Alerts */
.alert {
    padding: 0.85rem 1rem;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
}
.alert-error { background: var(--error-bg); border: 1px solid rgba(248, 113, 113, 0.3); color: var(--error); }
.alert-success { background: var(--success-bg); border: 1px solid rgba(52, 211, 153, 0.3); color: var(--success); }
.alert-info { background: var(--info-bg); border: 1px solid rgba(96, 165, 250, 0.3); color: var(--info); }

/* Error page */
.error-page {
    text-align: center;
    padding: 6rem 1rem;
}
.error-code {
    font-size: 6rem;
    font-weight: 800;
    line-height: 1;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 1rem;
}
.error-page h1 { font-size: 1.75rem; margin-bottom: 0.75rem; }
.error-page p { color: var(--text-muted); margin-bottom: 2rem; }

/* Footer */
.site-footer {
    background: var(--bg-elevated);
    border-top: 1px solid var(--border);
    padding: 2.5rem 0 1.5rem;
    margin-top: auto;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.6fr 1fr 1fr;
    gap: 2rem;
    margin-bottom: 2rem;
    align-items: start;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.15rem;
    margin-bottom: 0.75rem;
    color: var(--text);
}
.footer-tagline {
    font-size: 0.88rem;
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 0.85rem;
    max-width: 36rem;
}
.footer-trust {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-bottom: 1rem;
}
.footer-trust-item {
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    color: var(--text-muted);
    padding: 0.3rem 0.6rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 999px;
    white-space: nowrap;
}
.footer-made-in {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text);
    padding: 0.4rem 0.85rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 999px;
}
.flag-india { font-size: 1.1rem; }

.footer-links h3, .footer-contact h3 {
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    margin-bottom: 1rem;
}
.footer-links ul, .contact-list { list-style: none; }
.footer-links li { margin-bottom: 0.5rem; }
.footer-links a { color: var(--text-muted); font-size: 0.9rem; }
.footer-links a:hover { color: var(--text); }

.author-name { font-size: 1rem; font-weight: 600; margin-bottom: 0.75rem; }
.contact-list li { margin-bottom: 0.5rem; }
.contact-list a {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    color: var(--text-muted);
    font-size: 0.875rem;
}
.contact-list a:hover { color: var(--primary-hover); }

.footer-bottom {
    padding-top: 1.25rem;
    border-top: 1px solid var(--border);
    text-align: center;
}
.footer-bottom p {
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.55;
    max-width: 52rem;
    margin-left: auto;
    margin-right: auto;
}
.footer-note { margin-top: 0.35rem; font-size: 0.8rem !important; color: var(--text-dim) !important; }

/* Loading */
.loading { opacity: 0.6; pointer-events: none; }
.spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid var(--spinner-track);
    border-top-color: var(--spinner-head);
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Responsive */
@media (max-width: 900px) {
    .footer-grid { grid-template-columns: 1fr 1fr; }
    .footer-brand { grid-column: 1 / -1; }
}

@media (min-width: 1200px) {
    .hash-grid { grid-template-columns: repeat(4, 1fr); }
}

@media (max-width: 900px) {
    .hash-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
    .hero { padding: 2.5rem 0 2rem; }
    .hero-trust-list {
        flex-direction: column;
        align-items: center;
        gap: 0.45rem;
    }
    .nav-toggle { display: flex; }
    .theme-toggle-label { display: none; }
    .main-nav {
        margin-left: 0;
        position: fixed;
        top: var(--header-h);
        left: 0;
        right: 0;
        background: var(--bg-elevated);
        border-bottom: 1px solid var(--border);
        flex-direction: column;
        padding: 1rem;
        transform: translateY(-120%);
        opacity: 0;
        transition: all var(--transition);
    }
    .main-nav.open {
        transform: translateY(0);
        opacity: 1;
    }
    .nav-dropdown-menu {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        border: none;
        background: transparent;
        padding: 0.25rem 0 0 0.5rem;
        display: none;
        width: 100%;
        max-height: none;
        overflow: visible;
    }
    .nav-dropdown.open .nav-dropdown-menu { display: block; }
    .nav-dropdown-grid {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }
    .tools-grid { grid-template-columns: 1fr; }
    .section-header { align-items: flex-start; }
    .tools-toolbar { width: 100%; justify-content: space-between; }
    .tool-category-tags {
        overflow-x: auto;
        flex-wrap: nowrap;
        padding-bottom: 0.25rem;
        -webkit-overflow-scrolling: touch;
    }
    .category-tag { flex-shrink: 0; }
    .footer-grid { grid-template-columns: 1fr; }
    .footer-trust { gap: 0.35rem; }
    .tool-header { flex-direction: column; }
    .tool-privacy-note { margin-top: 0; font-size: 0.82rem; }
    .control-row { flex-direction: column; }
    .control-row .control-group { min-width: 0; }
    .uuid-version-tab {
        flex: 1 1 50%;
        font-size: 0.8rem;
        padding: 0.65rem 0.5rem;
        white-space: normal;
        text-align: center;
    }
    .uuid-version-tab:nth-child(2n) { border-right: none; }
    .uuid-version-tab:nth-child(-n+2) { border-bottom: 1px solid var(--border); }
    .hash-grid { grid-template-columns: 1fr; }
    .color-convert-layout { flex-direction: column; }
    .color-preview-swatch { width: 100%; height: 80px; }
    .color-picker-large { width: 100%; height: 120px; }
    .cron-fields { grid-template-columns: repeat(2, 1fr); }
    .cron-results-grid { grid-template-columns: 1fr; }
    .gql-endpoint-bar { grid-template-columns: 1fr; }
    .gql-editor-grid { grid-template-columns: 1fr; }
    .gql-query-input { min-height: 200px; }
}
