:root {
    color-scheme: dark;
    font-family: "Inter", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    --bg: #050816;
    --surface: #0f1629;
    --surface-elevated: #151f36;
    --surface-highlight: #1d2b4d;
    --border: rgba(148, 163, 184, 0.15);
    --text: #e2e8f0;
    --text-muted: #94a3b8;
    --primary: #3b82f6;
    --primary-strong: #2563eb;
    --danger: #ef4444;
    --danger-strong: #dc2626;
    --shadow: 0 30px 60px rgba(15, 23, 42, 0.35);
    --radius-lg: 18px;
    --radius-md: 12px;
    --radius-sm: 8px;
    --transition: 0.2s ease;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    background: radial-gradient(circle at top, rgba(59, 130, 246, 0.2), transparent 55%),
        radial-gradient(circle at 20% 80%, rgba(168, 85, 247, 0.18), transparent 60%),
        var(--bg);
    color: var(--text);
    padding: 0 0 2.5rem;
}

@media (min-width: 768px) {
    body {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 1.5rem;
    }
}

a {
    color: var(--primary);
}

a:hover {
    color: #60a5fa;
}

.app-shell {
    width: min(1200px, 94vw);
    display: flex;
    flex-direction: column;
    gap: 2rem;
    margin: 0 auto;
}

.nav-container {
    width: min(1280px, 94vw);
    position: relative;
    margin: 0 auto 1.5rem;
    padding: 0.6rem 0.85rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.9rem;
    background: linear-gradient(150deg, rgba(8, 13, 26, 0.94), rgba(16, 28, 52, 0.78));
    border: 1px solid rgba(59, 130, 246, 0.26);
    border-radius: 10px;
    box-shadow: 0 26px 56px rgba(5, 9, 22, 0.55);
    backdrop-filter: blur(16px);
    overflow: visible;
    z-index: 1000;
}

.nav-container::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at top left, rgba(59, 130, 246, 0.2), transparent 60%),
                radial-gradient(circle at bottom right, rgba(30, 64, 175, 0.18), transparent 55%);
    pointer-events: none;
    opacity: 0.9;
    border-radius: inherit;
}

.nav-bar {
    position: relative;
    z-index: 1;
    flex: 1 1 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}

.nav-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text);
    letter-spacing: 0.16em;
    text-transform: uppercase;
    white-space: nowrap;
}

.nav-toggle {
    position: relative;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.35rem;
    height: 2.35rem;
    border-radius: 999px;
    border: 1px solid rgba(59, 130, 246, 0.45);
    background: rgba(59, 130, 246, 0.2);
    color: var(--text);
    cursor: pointer;
    transition: background var(--transition), color var(--transition), transform var(--transition), box-shadow var(--transition);
    box-shadow: 0 14px 28px rgba(5, 9, 22, 0.35);
}

.nav-toggle:hover,
.nav-toggle:focus-visible {
    background: rgba(59, 130, 246, 0.3);
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 20px 36px rgba(5, 9, 22, 0.45);
    outline: none;
}

.nav-toggle .icon {
    pointer-events: none;
    font-size: 1.2rem;
}

.nav-toggle .icon-close {
    display: none;
}

.nav-toggle.open .icon-close {
    display: inline;
}

.nav-toggle.open .icon-hamburger {
    display: none;
}

.navigation {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.nav-drawer {
    position: fixed;
    inset: 0 auto 0 0;
    height: 100vh;
    width: min(280px, 82%);
    padding: 1.4rem 1.25rem;
    background: rgba(6, 12, 24, 0.96);
    border-right: 1px solid rgba(59, 130, 246, 0.24);
    box-shadow: 0 30px 60px rgba(4, 9, 22, 0.55);
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    z-index: 1001;
    overflow-y: auto;
    backdrop-filter: blur(16px);
}

.nav-drawer.open {
    transform: translateX(0);
}

.nav-link {
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 0.8rem 1.2rem;
    background: rgba(14, 22, 40, 0.78);
    border: 1px solid rgba(148, 163, 184, 0.24);
    border-radius: 1.3rem;
    color: rgba(226, 232, 240, 0.9);
    text-decoration: none;
    font-weight: 600;
    letter-spacing: 0.01em;
    transition: color var(--transition), border-color var(--transition), box-shadow var(--transition), transform var(--transition), background var(--transition);
    overflow: hidden;
}

.nav-link::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.24), rgba(99, 102, 241, 0.1));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.nav-link > * {
    position: relative;
    z-index: 1;
}

.nav-link-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.4rem;
    height: 2.4rem;
    border-radius: 999px;
    background: linear-gradient(150deg, rgba(59, 130, 246, 0.28), rgba(99, 102, 241, 0.16));
    border: 1px solid rgba(59, 130, 246, 0.42);
    color: rgba(224, 231, 255, 0.95);
    box-shadow: inset 0 0 0 1px rgba(6, 12, 24, 0.85);
    transition: background var(--transition), color var(--transition), box-shadow var(--transition);
    flex-shrink: 0;
}

.nav-link-icon i {
    font-size: 1.05rem;
}

.nav-link-text {
    font-size: 0.96rem;
}

.nav-link:hover {
    color: var(--text);
    border-color: rgba(59, 130, 246, 0.45);
    box-shadow: 0 20px 38px rgba(5, 9, 22, 0.45);
    transform: translateY(-1px);
}

.nav-link:hover::before {
    opacity: 1;
}

.nav-link:hover .nav-link-icon {
    background: linear-gradient(150deg, rgba(59, 130, 246, 0.42), rgba(99, 102, 241, 0.28));
    color: #fff;
    box-shadow: 0 14px 28px rgba(5, 9, 22, 0.5);
}

.nav-link.active {
    color: #0b1120;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.95), rgba(37, 99, 235, 0.9));
    border-color: rgba(59, 130, 246, 0.7);
    box-shadow: 0 24px 40px rgba(5, 9, 22, 0.5);
    transform: translateY(-1px);
}

.nav-link.active::before {
    opacity: 1;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.32), rgba(37, 99, 235, 0.18));
}

.nav-link.active .nav-link-icon {
    background: rgba(8, 15, 32, 0.35);
    border-color: rgba(255, 255, 255, 0.45);
    color: #fff;
    box-shadow: 0 16px 32px rgba(5, 9, 22, 0.5);
}

.nav-overlay {
    position: fixed;
    inset: 0;
    background: rgba(4, 7, 18, 0.55);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    z-index: 1000;
}

.nav-overlay.open {
    opacity: 1;
    pointer-events: auto;
}

@media (min-width: 768px) {
    .nav-container {
        width: min(1360px, 90vw);
        padding: 0.75rem 1.1rem;
        gap: 1.2rem;
    }

    .nav-bar {
        flex: 0 0 auto;
    }

    .nav-toggle {
        display: none;
    }

    .nav-overlay {
        display: none !important;
    }

    .nav-drawer {
        position: static;
        transform: none;
        height: auto;
        width: auto;
        padding: 0;
        background: transparent;
        border: none;
        box-shadow: none;
        overflow: visible;
    }

    .navigation {
        flex-direction: row;
        align-items: center;
        justify-content: flex-end;
        gap: 0.75rem;
        flex-wrap: nowrap;
    }

    .nav-link {
        padding: 0.65rem 1.3rem;
        border-radius: 10px;
        background: rgba(12, 20, 36, 0.58);
        border-color: rgba(59, 130, 246, 0.3);
        box-shadow: none;
    }

    .nav-link:hover {
        box-shadow: 0 18px 36px rgba(5, 9, 22, 0.45);
    }

    .nav-link.active {
        box-shadow: 0 22px 40px rgba(5, 9, 22, 0.5);
    }

    .nav-link-icon {
        width: 2.15rem;
        height: 2.15rem;
    }
}

.split-landing {
    display: flex;
    flex-direction: column;
    gap: 1.75rem;
}

.split-grid {
    display: grid;
    gap: 1.75rem;
    align-items: stretch;
}

@media (min-width: 1024px) {
    .split-grid {
        grid-template-columns: 1.05fr 1fr;
    }

    .split-grid.split-grid--results {
        grid-template-columns: 1fr;
    }
}

.split-card--results {
    width: 100%;
}

.split-intro {
    position: relative;
    padding: clamp(2rem, 4vw, 2.75rem);
    border-radius: var(--radius-lg);
    border: 1px solid rgba(59, 130, 246, 0.2);
    background: linear-gradient(145deg, rgba(11, 17, 34, 0.92), rgba(17, 29, 54, 0.78));
    box-shadow: 0 30px 60px rgba(5, 9, 22, 0.45);
    overflow: hidden;
}

.split-intro::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at top right, rgba(59, 130, 246, 0.18), transparent 55%),
                radial-gradient(circle at bottom left, rgba(168, 85, 247, 0.15), transparent 60%);
    opacity: 0.8;
    pointer-events: none;
}

.split-intro > * {
    position: relative;
    z-index: 1;
}

.split-subtitle {
    margin: 0 0 0.5rem;
    font-size: 0.95rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: rgba(148, 163, 184, 0.85);
}

.split-intro h1 {
    margin: 0 0 0.75rem;
    font-size: clamp(2.1rem, 4vw, 2.8rem);
}

.split-description {
    margin: 0 0 1.5rem;
    font-size: 1.05rem;
    color: rgba(226, 232, 240, 0.85);
    max-width: 30ch;
}

.split-highlights {
    list-style: none;
    padding: 0;
    margin: 0 0 1.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.split-highlights li {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    font-size: 0.98rem;
    color: rgba(226, 232, 240, 0.9);
}

.split-highlight-icon {
    width: 2.2rem;
    height: 2.2rem;
    border-radius: 999px;
    background: rgba(59, 130, 246, 0.18);
    border: 1px solid rgba(59, 130, 246, 0.35);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #bfdbfe;
    box-shadow: inset 0 0 0 1px rgba(9, 13, 24, 0.65);
    flex-shrink: 0;
}

.split-footnote {
    margin: 1.75rem 0 0;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.split-success {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    padding: 1.1rem 1.3rem;
    border-radius: var(--radius-md);
    background: rgba(34, 197, 94, 0.12);
    border: 1px solid rgba(34, 197, 94, 0.35);
    color: #bbf7d0;
    margin-top: 1.5rem;
}

.split-success i {
    font-size: 1.4rem;
    color: #4ade80;
    margin-top: 0.15rem;
}

.split-success p {
    margin: 0.15rem 0 0;
    font-size: 0.95rem;
    color: rgba(226, 232, 240, 0.8);
}

.split-card {
    position: relative;
    padding: clamp(2rem, 4vw, 2.8rem);
    border-radius: var(--radius-lg);
    background: var(--surface);
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
    backdrop-filter: blur(12px);
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    overflow: hidden;
}

.split-card::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(168, 85, 247, 0.12), transparent 60%);
    pointer-events: none;
}

.split-card > * {
    position: relative;
    z-index: 1;
}

.split-card__title {
    margin: 0;
    font-size: clamp(1.6rem, 3vw, 1.9rem);
}

.split-card__subtitle {
    margin: -0.5rem 0 0;
    color: var(--text-muted);
    font-size: 0.98rem;
}

.alert {
    padding: 0.85rem 1rem;
    border-radius: var(--radius-md);
    border: 1px solid rgba(59, 130, 246, 0.35);
    background: rgba(59, 130, 246, 0.12);
    color: var(--text);
    font-size: 0.95rem;
}

.alert.error {
    border-color: rgba(248, 113, 113, 0.35);
    background: rgba(248, 113, 113, 0.12);
}

form[data-default-mode] {
    display: flex;
    flex-direction: column;
    gap: 1.75rem;
}

.mode-switch {
    display: inline-flex;
    align-self: center;
    background: rgba(15, 23, 42, 0.75);
    border: 1px solid var(--border);
    padding: 0.4rem;
    border-radius: 999px;
    gap: 0.35rem;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.mode-button {
    background: transparent;
    color: var(--text-muted);
    padding: 0.55rem 1.4rem;
    border-radius: 999px;
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    border: none;
    cursor: pointer;
    transition: background var(--transition), color var(--transition), box-shadow var(--transition);
}

.mode-button:hover,
.mode-button:focus-visible {
    color: var(--text);
    outline: none;
}

.mode-button.active {
    background: linear-gradient(120deg, var(--primary), var(--primary-strong));
    color: #0b1120;
    box-shadow: 0 12px 24px rgba(37, 99, 235, 0.28);
}

.mode-panels {
    border: 1px solid var(--border);
    border-radius: 22px;
    background: rgba(15, 23, 42, 0.6);
    padding: clamp(1.75rem, 4vw, 2.5rem);
}

.mode-pane {
    display: none;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
    text-align: center;
}

.mode-pane.active {
    display: flex;
}

.dropzone {
    border: 2px dashed rgba(59, 130, 246, 0.4);
    border-radius: 16px;
    padding: clamp(2.5rem, 6vw, 3.5rem) 1.5rem;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.85rem;
    background: rgba(21, 33, 60, 0.55);
    transition: border-color 0.2s ease, background 0.2s ease;
    cursor: pointer;
    min-height: 220px;
}

.dropzone.dragover {
    border-color: var(--primary);
    background: rgba(59, 130, 246, 0.16);
}

.dropzone svg {
    width: 54px;
    height: 54px;
    fill: var(--primary);
}

.dropzone strong {
    font-size: 1.05rem;
}

.dropzone span {
    display: block;
    margin-top: 0.35rem;
    color: var(--text-muted);
    font-size: 0.92rem;
}

.mode-pane[data-mode="url"] {
    align-items: stretch;
}

.url-panel {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    border: 2px dashed rgba(59, 130, 246, 0.4);
    border-radius: 16px;
    padding: 1.5rem;
    background: rgba(21, 33, 60, 0.55);
}

.url-panel svg {
    width: 48px;
    height: 48px;
    fill: var(--primary);
    flex-shrink: 0;
}

.url-fields {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    flex: 1;
    text-align: left;
}

.url-fields strong {
    font-size: 1.05rem;
}

input[type="url"] {
    width: 100%;
    padding: 0.85rem 1rem;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: rgba(15, 23, 42, 0.65);
    color: var(--text);
    font-size: 1rem;
    transition: border 0.2s ease, transform 0.2s ease;
}

input[type="url"]:focus {
    outline: none;
    border-color: var(--primary);
    transform: translateY(-1px);
}

input::placeholder {
    color: rgba(148, 163, 184, 0.85);
}

button[type="submit"] {
    align-self: center;
    padding: 0.95rem 2.4rem;
    border-radius: 999px;
    background: linear-gradient(120deg, var(--primary), var(--primary-strong));
    color: #0b1120;
    border: none;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

button[type="submit"]:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 12px 24px rgba(37, 99, 235, 0.35);
}

button[type="submit"]:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    box-shadow: none;
}

.progress {
    display: none;
    height: 6px;
    background: rgba(148, 163, 184, 0.12);
    border-radius: 999px;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    width: 100%;
    background: linear-gradient(120deg, var(--primary), var(--primary-strong));
    animation: progress-stripes 1.4s linear infinite;
    background-size: 150% 100%;
}

@keyframes progress-stripes {
    0% {
        transform: translateX(-20%);
    }
    100% {
        transform: translateX(20%);
    }
}

.results {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.results p {
    margin: 0;
    color: var(--text-muted);
}

.results-all-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.65rem;
    align-self: stretch;
    padding: 0.9rem 1.4rem;
    border-radius: 12px;
    background: linear-gradient(120deg, var(--primary), var(--primary-strong));
    color: #0b1120;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    text-decoration: none;
    box-shadow: 0 16px 32px rgba(37, 99, 235, 0.28);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.results-all-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 20px 36px rgba(37, 99, 235, 0.4);
    text-decoration: none;
}

.results-all-link__icon {
    font-size: 1.25rem;
}

.results-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: 0.75rem;
}

.results-list li {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: baseline;
    padding: 0.9rem 1rem;
    border-radius: var(--radius-md);
    background: rgba(15, 23, 42, 0.55);
    border: 1px solid rgba(148, 163, 184, 0.18);
}

.results-list strong {
    color: #f8fafc;
}

.results-list a {
    color: var(--primary);
    font-weight: 600;
    text-decoration: none;
}

.results-list a:hover {
    text-decoration: underline;
}

.results-actions {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

.ghost-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.85rem 1.8rem;
    border-radius: 999px;
    border: 1px solid rgba(148, 163, 184, 0.35);
    background: transparent;
    color: var(--text);
    text-decoration: none;
    font-weight: 600;
    transition: background var(--transition), border-color var(--transition), color var(--transition);
}

.ghost-button:hover {
    background: rgba(15, 23, 42, 0.6);
    border-color: rgba(59, 130, 246, 0.45);
    color: #fff;
}

@media (max-width: 720px) {
    .split-grid {
        grid-template-columns: 1fr;
    }

    .split-intro {
        order: -1;
    }

    .mode-switch {
        width: 100%;
        justify-content: center;
    }

    .mode-button {
        flex: 1;
    }

    .url-panel {
        flex-direction: column;
        text-align: center;
    }

    .url-fields {
        text-align: center;
    }

    .results-actions {
        flex-direction: column;
        align-items: stretch;
    }
}
