/* CSS VARIABLES */
:root {
    /* Font Families */
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, system-ui, sans-serif;
    --font-display: 'Plus Jakarta Sans', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, system-ui, sans-serif;
    --font-mono: 'JetBrains Mono', 'Fira Code', 'Cascadia Code', 'Consolas', 'Courier New', monospace;

    /* Font Size Scale */
    --text-xs: clamp(0.65rem, 0.7vw, 0.75rem);
    --text-sm: clamp(0.75rem, 0.85vw, 0.875rem);
    --text-base: clamp(0.9rem, 1.05vw, 1rem);
    --text-md: clamp(1rem, 1.2vw, 1.125rem);
    --text-lg: clamp(1.125rem, 1.5vw, 1.25rem);
    --text-xl: clamp(1.25rem, 2vw, 1.5rem);
    --text-2xl: clamp(1.5rem, 2.8vw, 2rem);
    --text-3xl: clamp(1.8rem, 3.8vw, 2.8rem);
    --text-4xl: clamp(2.2rem, 5vw, 3.6rem);
    --text-5xl: clamp(2.8rem, 6.5vw, 4.5rem);

    /* Line Heights */
    --leading-none: 1;
    --leading-tight: 1.1;
    --leading-snug: 1.2;
    --leading-normal: 1.5;
    --leading-relaxed: 1.65;
    --leading-loose: 1.85;

    /* Letter Spacing */
    --tracking-tighter: -0.04em;
    --tracking-tight: -0.025em;
    --tracking-normal: 0;
    --tracking-wide: 0.02em;
    --tracking-wider: 0.05em;
    --tracking-widest: 0.08em;

    /* Font Weights */
    --weight-light: 300;
    --weight-regular: 400;
    --weight-medium: 500;
    --weight-semibold: 600;
    --weight-bold: 700;
    --weight-extrabold: 800;
    --weight-black: 900;

    /* Color Palette */
    --navy: #020617;
    --navy-1: #0a1628;
    --navy-2: #0f1e35;
    --navy-3: #162033;
    --navy-4: #1e2d45;
    --slate: #94a3b8;
    --slate-dim: #4a5a72;
    --slate-bright: #cbd5e1;
    --blue: #3b82f6;
    --blue-dim: #1d4ed8;
    --blue-glow: rgba(59, 130, 246, 0.18);
    --blue-glow-sm: rgba(59, 130, 246, 0.08);
    --white: #f1f5f9;
    --white-dim: #e2e8f8;
    --del-bg: rgba(255, 238, 240, 0.12);
    --del-color: #f87171;
    --add-color: #4ade80;
    --radius: 12px;
    --radius-sm: 8px;
    --radius-full: 9999px;
    --transition: 0.35s cubic-bezier(0.22, 1, 0.36, 1);
    --shadow-card: 0 8px 40px rgba(0, 0, 0, 0.45);
    --shadow-sm: 0 2px 16px rgba(0, 0, 0, 0.25);
    --shadow-glow: 0 0 60px rgba(59, 130, 246, 0.06);
    --glass-bg: rgba(10, 22, 40, 0.55);
    --glass-border: rgba(148, 163, 184, 0.08);
    --glass-border-hover: rgba(148, 163, 184, 0.18);
    --glass-blur: 24px;
    --header-height: 68px;
}

/* RESET & BASE */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: var(--font-sans);
    font-weight: var(--weight-regular);
    font-size: var(--text-base);
    line-height: var(--leading-relaxed);
    letter-spacing: var(--tracking-normal);
    color: var(--white);
    background: var(--navy);
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    background-image:
        radial-gradient(ellipse 70% 40% at 50% 0%, rgba(59, 130, 246, 0.07) 0%, transparent 60%),
        radial-gradient(ellipse 50% 30% at 80% 100%, rgba(59, 130, 246, 0.04) 0%, transparent 50%),
        linear-gradient(rgba(148, 163, 184, 0.015) 1px, transparent 1px),
        linear-gradient(90deg, rgba(148, 163, 184, 0.015) 1px, transparent 1px);
    background-size: auto, auto, 48px 48px, 48px 48px;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 5px;
    height: 5px;
}
::-webkit-scrollbar-track {
    background: rgba(10, 22, 40, 0.6);
}
::-webkit-scrollbar-thumb {
    background: var(--slate-dim);
    border-radius: 3px;
    transition: background var(--transition);
}
::-webkit-scrollbar-thumb:hover {
    background: var(--slate);
}

/* Typography Utilities */
.sr-only {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    border: 0 !important;
}

h1, h2, h3, h4, h5, h6, .heading {
    font-family: var(--font-display);
    font-weight: var(--weight-bold);
    letter-spacing: var(--tracking-tight);
    line-height: var(--leading-tight);
    color: var(--white);
}

h1 {
    font-size: var(--text-5xl);
    font-weight: var(--weight-extrabold);
    letter-spacing: var(--tracking-tighter);
}
h2 {
    font-size: var(--text-4xl);
    font-weight: var(--weight-bold);
}
h3 {
    font-size: var(--text-3xl);
    font-weight: var(--weight-bold);
}
h4 {
    font-size: var(--text-2xl);
    font-weight: var(--weight-semibold);
}
h5 {
    font-size: var(--text-xl);
    font-weight: var(--weight-semibold);
}
h6 {
    font-size: var(--text-lg);
    font-weight: var(--weight-semibold);
}

p {
    font-family: var(--font-sans);
    font-size: var(--text-base);
    line-height: var(--leading-relaxed);
    color: var(--slate);
    margin: 0 0 0.75em 0;
}
p:last-child {
    margin-bottom: 0;
}

.text-xs { font-size: var(--text-xs); line-height: var(--leading-normal); letter-spacing: var(--tracking-wide); }
.text-sm { font-size: var(--text-sm); line-height: var(--leading-normal); letter-spacing: var(--tracking-wide); }
.text-base { font-size: var(--text-base); line-height: var(--leading-relaxed); }
.text-lg { font-size: var(--text-lg); line-height: var(--leading-relaxed); }
.text-xl { font-size: var(--text-xl); line-height: var(--leading-snug); }
.text-2xl { font-size: var(--text-2xl); line-height: var(--leading-snug); }
.text-3xl { font-size: var(--text-3xl); line-height: var(--leading-tight); }
.text-4xl { font-size: var(--text-4xl); line-height: var(--leading-tight); }
.text-5xl { font-size: var(--text-5xl); line-height: var(--leading-tight); }

.caption {
    font-family: var(--font-sans);
    font-size: var(--text-xs);
    font-weight: var(--weight-medium);
    letter-spacing: var(--tracking-wider);
    text-transform: uppercase;
    color: var(--slate-dim);
}

code, pre, .mono {
    font-family: var(--font-mono);
    font-size: var(--text-sm);
    line-height: var(--leading-loose);
    letter-spacing: var(--tracking-normal);
    background: rgba(0, 0, 0, 0.3);
    border-radius: 4px;
    padding: 0.1em 0.4em;
    color: var(--slate-bright);
}
pre {
    padding: 1em 1.2em;
    overflow: auto;
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid rgba(148, 163, 184, 0.06);
    border-radius: var(--radius-sm);
    font-size: var(--text-sm);
    line-height: var(--leading-loose);
}
pre code {
    background: transparent;
    padding: 0;
    border-radius: 0;
    font-size: inherit;
}

/* GLASS CARDS */
.glass {
    background: var(--glass-bg);
    backdrop-filter: blur(var(--glass-blur)) saturate(1.3);
    -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(1.3);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-card), var(--shadow-glow);
    transition: all var(--transition);
}
.glass:hover {
    border-color: var(--glass-border-hover);
}

.glass-light {
    background: rgba(15, 30, 53, 0.45);
    backdrop-filter: blur(16px) saturate(1.2);
    -webkit-backdrop-filter: blur(16px) saturate(1.2);
    border: 1px solid rgba(148, 163, 184, 0.06);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    transition: all var(--transition);
}
.glass-light:hover {
    border-color: rgba(148, 163, 184, 0.14);
}

/* HEADER */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    height: var(--header-height);
    padding: 0 28px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(2, 6, 23, 0.5);
    backdrop-filter: blur(20px) saturate(1.4);
    -webkit-backdrop-filter: blur(20px) saturate(1.4);
    border-bottom: 1px solid rgba(148, 163, 184, 0.06);
    transition: all var(--transition);
}
.header.scrolled {
    background: rgba(2, 6, 23, 0.78);
    border-bottom-color: rgba(148, 163, 184, 0.1);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

.header-left {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

.header-logo {
    height: 38px;
    width: auto;
    object-fit: contain;
    filter: drop-shadow(0 0 16px rgba(59, 130, 246, 0.2));
    transition: transform var(--transition);
}
.header-logo:hover {
    transform: scale(1.05) rotate(-1deg);
}

.header-brand {
    font-family: var(--font-display);
    font-size: clamp(1.1rem, 1.8vw, 1.35rem);
    font-weight: var(--weight-bold);
    letter-spacing: var(--tracking-tight);
    color: var(--white);
    display: flex;
    align-items: center;
    gap: 2px;
    text-decoration: none;
    line-height: var(--leading-none);
}
.header-brand span { color: var(--blue); }

.header-badge {
    font-family: var(--font-sans);
    font-size: var(--text-xs);
    font-weight: var(--weight-semibold);
    letter-spacing: var(--tracking-wider);
    text-transform: uppercase;
    color: var(--blue);
    background: rgba(59, 130, 246, 0.12);
    border: 1px solid rgba(59, 130, 246, 0.2);
    border-radius: var(--radius-full);
    padding: 2px 14px;
    margin-left: 6px;
    transition: all var(--transition);
    white-space: nowrap;
    line-height: var(--leading-normal);
}
.header-badge:hover {
    background: rgba(59, 130, 246, 0.2);
    border-color: rgba(59, 130, 246, 0.4);
    box-shadow: 0 0 24px rgba(59, 130, 246, 0.12);
}

.header-nav {
    display: flex;
    align-items: center;
    gap: 6px;
}
.header-nav a {
    font-family: var(--font-sans);
    font-size: var(--text-sm);
    font-weight: var(--weight-medium);
    color: var(--slate);
    text-decoration: none;
    padding: 6px 14px;
    border-radius: var(--radius-sm);
    transition: all var(--transition);
    position: relative;
    letter-spacing: var(--tracking-normal);
    line-height: var(--leading-normal);
}
.header-nav a:hover {
    color: var(--white);
    background: rgba(148, 163, 184, 0.06);
}
.header-nav a.active {
    color: var(--white);
    background: rgba(59, 130, 246, 0.1);
}
.header-nav .nav-cta {
    background: var(--blue);
    color: #fff;
    padding: 6px 18px;
    border-radius: var(--radius-full);
    box-shadow: 0 2px 16px rgba(59, 130, 246, 0.25);
    font-weight: var(--weight-semibold);
}
.header-nav .nav-cta:hover {
    background: #5b9af8;
    transform: translateY(-2px);
    box-shadow: 0 4px 28px rgba(59, 130, 246, 0.35);
    color: #fff;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.header-stats {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-left: 8px;
}

.stat-pill {
    font-family: var(--font-mono);
    font-size: var(--text-xs);
    color: var(--slate);
    background: rgba(22, 32, 51, 0.6);
    border: 1px solid rgba(148, 163, 184, 0.08);
    border-radius: var(--radius-full);
    padding: 3px 16px;
    display: flex;
    align-items: center;
    gap: 7px;
    transition: all var(--transition);
    white-space: nowrap;
    line-height: var(--leading-normal);
}
.stat-pill:hover {
    border-color: rgba(148, 163, 184, 0.2);
    background: rgba(30, 45, 69, 0.6);
}
.stat-pill .dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--slate-dim);
    transition: all var(--transition);
    flex-shrink: 0;
}
.stat-pill .dot.del {
    background: var(--del-color);
    box-shadow: 0 0 10px rgba(248, 113, 113, 0.3);
}
.stat-pill .dot.add {
    background: var(--add-color);
    box-shadow: 0 0 10px rgba(74, 222, 128, 0.3);
}

/* Hamburger */
.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px 4px;
    border-radius: var(--radius-sm);
    transition: all var(--transition);
}
.hamburger:hover {
    background: rgba(148, 163, 184, 0.06);
}
.hamburger span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--slate-bright);
    border-radius: 2px;
    transition: all var(--transition);
    transform-origin: center;
}
.hamburger.open span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}
.hamburger.open span:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}
.hamburger.open span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* Mobile Menu */
.mobile-menu {
    display: none;
    position: fixed;
    top: var(--header-height);
    left: 0;
    right: 0;
    background: rgba(2, 6, 23, 0.92);
    backdrop-filter: blur(28px) saturate(1.5);
    -webkit-backdrop-filter: blur(28px) saturate(1.5);
    border-bottom: 1px solid rgba(148, 163, 184, 0.06);
    padding: 20px 24px 28px;
    z-index: 999;
    flex-direction: column;
    gap: 6px;
    animation: slideDown 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}
.mobile-menu.open {
    display: flex;
}
.mobile-menu a {
    font-family: var(--font-sans);
    font-size: var(--text-base);
    font-weight: var(--weight-medium);
    color: var(--slate-bright);
    text-decoration: none;
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    transition: all var(--transition);
    line-height: var(--leading-normal);
}
.mobile-menu a:hover {
    background: rgba(148, 163, 184, 0.06);
    color: var(--white);
}
.mobile-menu a.active {
    color: var(--white);
    background: rgba(59, 130, 246, 0.1);
}
.mobile-menu .nav-cta {
    background: var(--blue);
    color: #fff;
    text-align: center;
    margin-top: 6px;
    font-weight: var(--weight-semibold);
}
.mobile-menu .nav-cta:hover {
    background: #5b9af8;
    color: #fff;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-12px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* HERO */
.hero {
    padding: calc(var(--header-height) + 40px) 24px 32px;
    text-align: center;
    max-width: 820px;
    margin: 0 auto;
    position: relative;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-sans);
    font-size: var(--text-xs);
    font-weight: var(--weight-semibold);
    letter-spacing: var(--tracking-wider);
    text-transform: uppercase;
    color: var(--blue);
    background: rgba(59, 130, 246, 0.08);
    border: 1px solid rgba(59, 130, 246, 0.15);
    border-radius: var(--radius-full);
    padding: 4px 18px 4px 14px;
    margin-bottom: 20px;
    transition: all var(--transition);
    line-height: var(--leading-normal);
}
.hero-badge:hover {
    background: rgba(59, 130, 246, 0.14);
    border-color: rgba(59, 130, 246, 0.3);
}
.hero-badge .dot-pulse {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--add-color);
    animation: pulse-dot 2s ease-in-out infinite;
}
@keyframes pulse-dot {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.4;
        transform: scale(0.7);
    }
}

.hero h1 {
    font-family: var(--font-display);
    font-size: var(--text-5xl);
    font-weight: var(--weight-extrabold);
    letter-spacing: var(--tracking-tighter);
    line-height: var(--leading-tight);
    color: var(--white);
    margin-bottom: 16px;
}
.hero h1 .highlight {
    background: linear-gradient(135deg, var(--blue), #60a5fa);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero p {
    font-family: var(--font-sans);
    font-size: var(--text-lg);
    font-weight: var(--weight-regular);
    color: var(--slate);
    max-width: 600px;
    margin: 0 auto 28px;
    line-height: var(--leading-relaxed);
    letter-spacing: var(--tracking-normal);
}

.hero-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
}

/* BUTTONS */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 24px;
    border-radius: var(--radius-sm);
    font-family: var(--font-sans);
    font-size: var(--text-sm);
    font-weight: var(--weight-semibold);
    cursor: pointer;
    border: none;
    transition: all var(--transition);
    white-space: nowrap;
    outline: none;
    text-decoration: none;
    position: relative;
    overflow: hidden;
    min-height: 44px;
    line-height: var(--leading-normal);
    letter-spacing: var(--tracking-normal);
}
.btn:focus-visible {
    box-shadow: 0 0 0 2px var(--blue), 0 0 0 5px rgba(59, 130, 246, 0.15);
}

.btn-primary {
    background: var(--blue);
    color: #fff;
    box-shadow: 0 2px 20px rgba(59, 130, 246, 0.3);
}
.btn-primary:hover {
    background: #5b9af8;
    transform: translateY(-2px);
    box-shadow: 0 6px 32px rgba(59, 130, 246, 0.4);
}
.btn-primary:active {
    transform: scale(0.97) translateY(0);
}

.btn-ghost {
    background: rgba(22, 32, 51, 0.6);
    color: var(--slate-bright);
    border: 1px solid rgba(148, 163, 184, 0.1);
}
.btn-ghost:hover {
    background: rgba(30, 45, 69, 0.7);
    color: var(--white);
    border-color: rgba(148, 163, 184, 0.2);
    transform: translateY(-2px);
}

.btn-danger {
    background: transparent;
    color: var(--del-color);
    border: 1px solid rgba(248, 113, 113, 0.15);
}
.btn-danger:hover {
    background: rgba(248, 113, 113, 0.06);
    border-color: rgba(248, 113, 113, 0.3);
    transform: translateY(-2px);
}

.btn-sm {
    padding: 5px 14px;
    font-size: var(--text-xs);
    min-height: 32px;
    gap: 5px;
}

.btn svg {
    flex-shrink: 0;
    transition: transform var(--transition);
}
.btn:hover svg {
    transform: scale(1.08);
}

/* APP WRAPPER */
.app-wrapper {
    max-width: 1440px;
    margin: 0 auto;
    padding: 0 24px 48px;
    display: flex;
    flex-direction: column;
    gap: 18px;
}

/* TOOLBAR */
.toolbar {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px 14px;
    padding: 12px 20px;
    background: rgba(10, 22, 40, 0.5);
    backdrop-filter: blur(16px) saturate(1.2);
    -webkit-backdrop-filter: blur(16px) saturate(1.2);
    border: 1px solid rgba(148, 163, 184, 0.06);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm), var(--shadow-glow);
    transition: all var(--transition);
}
.toolbar:hover {
    border-color: rgba(148, 163, 184, 0.1);
}

.toolbar-section {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.toolbar-divider {
    width: 1px;
    height: 28px;
    background: rgba(148, 163, 184, 0.08);
    flex-shrink: 0;
}

.toolbar-label {
    font-family: var(--font-sans);
    font-size: var(--text-xs);
    font-weight: var(--weight-semibold);
    letter-spacing: var(--tracking-wider);
    text-transform: uppercase;
    color: var(--slate-dim);
    margin-right: 2px;
    line-height: var(--leading-normal);
}

/* Toggle Group */
.toggle-group {
    display: flex;
    background: rgba(2, 6, 23, 0.4);
    border: 1px solid rgba(148, 163, 184, 0.06);
    border-radius: var(--radius-sm);
    padding: 2px;
    gap: 2px;
}
.toggle-option {
    padding: 5px 14px;
    font-family: var(--font-sans);
    font-size: var(--text-xs);
    font-weight: var(--weight-medium);
    color: var(--slate);
    background: transparent;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: all var(--transition);
    white-space: nowrap;
    line-height: var(--leading-normal);
    letter-spacing: var(--tracking-normal);
}
.toggle-option.active {
    background: var(--blue);
    color: #fff;
    box-shadow: 0 2px 16px rgba(59, 130, 246, 0.25);
    font-weight: var(--weight-semibold);
}
.toggle-option:not(.active):hover {
    background: rgba(255, 255, 255, 0.04);
    color: var(--white);
}

/* Checkbox */
.checkbox-label {
    display: flex;
    align-items: center;
    gap: 7px;
    font-family: var(--font-sans);
    font-size: var(--text-xs);
    font-weight: var(--weight-medium);
    color: var(--slate);
    cursor: pointer;
    user-select: none;
    transition: color var(--transition);
    padding: 3px 6px;
    border-radius: 4px;
    line-height: var(--leading-normal);
}
.checkbox-label:hover {
    color: var(--white);
}
.checkbox-label input[type="checkbox"] {
    appearance: none;
    width: 17px;
    height: 17px;
    border: 1.5px solid var(--slate-dim);
    border-radius: 5px;
    background: rgba(2, 6, 23, 0.5);
    cursor: pointer;
    transition: all var(--transition);
    position: relative;
    flex-shrink: 0;
}
.checkbox-label input[type="checkbox"]:checked {
    background: var(--blue);
    border-color: var(--blue);
    box-shadow: 0 0 16px rgba(59, 130, 246, 0.25);
}
.checkbox-label input[type="checkbox"]:checked::after {
    content: '';
    position: absolute;
    left: 4px;
    top: 1px;
    width: 6px;
    height: 10px;
    border: 2px solid #fff;
    border-top: none;
    border-left: none;
    transform: rotate(45deg);
}
.checkbox-label input[type="checkbox"]:focus-visible {
    outline: 2px solid var(--blue);
    outline-offset: 2px;
}

/* INPUT PANES */
.input-area {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

.pane {
    background: rgba(10, 22, 40, 0.5);
    backdrop-filter: blur(12px) saturate(1.2);
    -webkit-backdrop-filter: blur(12px) saturate(1.2);
    border: 1px solid rgba(148, 163, 184, 0.06);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm), var(--shadow-glow);
    transition: all var(--transition);
    display: flex;
    flex-direction: column;
}
.pane:hover {
    border-color: rgba(148, 163, 184, 0.12);
}
.pane:focus-within {
    border-color: rgba(59, 130, 246, 0.25);
    box-shadow: 0 0 0 1px rgba(59, 130, 246, 0.06), var(--shadow-sm), var(--shadow-glow);
}

.pane-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 18px;
    background: rgba(15, 30, 53, 0.4);
    border-bottom: 1px solid rgba(148, 163, 184, 0.04);
    gap: 10px;
    flex-wrap: wrap;
}

.pane-label {
    font-family: var(--font-sans);
    font-size: var(--text-xs);
    font-weight: var(--weight-semibold);
    letter-spacing: var(--tracking-wider);
    text-transform: uppercase;
    color: var(--slate);
    display: flex;
    align-items: center;
    gap: 7px;
    line-height: var(--leading-normal);
}
.pane-label.original { color: #f87171; }
.pane-label.changed { color: var(--add-color); }
.pane-label .badge-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
}
.pane-label .badge-dot.original { background: var(--del-color); }
.pane-label .badge-dot.changed { background: var(--add-color); }

.pane-actions {
    display: flex;
    align-items: center;
    gap: 6px;
}

.char-count {
    font-family: var(--font-mono);
    font-size: var(--text-xs);
    color: var(--slate-dim);
    padding: 2px 12px;
    background: rgba(0, 0, 0, 0.25);
    border-radius: var(--radius-full);
    white-space: nowrap;
    line-height: var(--leading-normal);
}

input[type="file"] { display: none; }

.upload-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 12px;
    font-family: var(--font-sans);
    font-size: var(--text-xs);
    font-weight: var(--weight-medium);
    color: var(--slate);
    background: rgba(22, 32, 51, 0.5);
    border: 1px dashed rgba(148, 163, 184, 0.15);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all var(--transition);
    white-space: nowrap;
    line-height: var(--leading-normal);
}
.upload-btn:hover {
    color: var(--blue);
    border-color: rgba(59, 130, 246, 0.3);
    background: rgba(59, 130, 246, 0.05);
    transform: translateY(-1px);
}

textarea {
    flex: 1;
    resize: none;
    background: transparent;
    border: none;
    outline: none;
    color: var(--white-dim);
    font-family: var(--font-mono);
    font-size: var(--text-sm);
    line-height: var(--leading-loose);
    padding: 16px 18px;
    min-height: 220px;
    caret-color: var(--blue);
    transition: all var(--transition);
    width: 100%;
    letter-spacing: var(--tracking-normal);
}
textarea:focus { color: var(--white); }
textarea::placeholder {
    color: rgba(148, 163, 184, 0.2);
    font-style: italic;
}

/* DIFF OUTPUT */
.diff-section {
    background: rgba(10, 22, 40, 0.5);
    backdrop-filter: blur(12px) saturate(1.2);
    -webkit-backdrop-filter: blur(12px) saturate(1.2);
    border: 1px solid rgba(148, 163, 184, 0.06);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm), var(--shadow-glow);
    transition: all var(--transition);
}
.diff-section:hover {
    border-color: rgba(148, 163, 184, 0.1);
}

.diff-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 20px;
    background: rgba(15, 30, 53, 0.35);
    border-bottom: 1px solid rgba(148, 163, 184, 0.04);
    gap: 12px;
    flex-wrap: wrap;
}

.diff-title {
    font-family: var(--font-sans);
    font-size: var(--text-xs);
    font-weight: var(--weight-semibold);
    letter-spacing: var(--tracking-wider);
    text-transform: uppercase;
    color: var(--slate);
    display: flex;
    align-items: center;
    gap: 8px;
    line-height: var(--leading-normal);
}
.diff-title svg { color: var(--blue); }

.diff-stats {
    display: flex;
    align-items: center;
    gap: 14px;
    font-family: var(--font-mono);
    font-size: var(--text-xs);
    line-height: var(--leading-normal);
}
.stat-del { color: var(--del-color); }
.stat-add { color: var(--add-color); }
.stat-neu { color: var(--slate); }

.diff-actions {
    display: flex;
    gap: 6px;
    align-items: center;
    flex-wrap: wrap;
}

.diff-output {
    min-height: 380px;
    overflow: auto;
    position: relative;
    transition: all var(--transition);
}

.diff-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 380px;
    gap: 18px;
    color: var(--slate-dim);
    font-family: var(--font-sans);
    font-size: var(--text-base);
    padding: 24px;
    text-align: center;
    line-height: var(--leading-relaxed);
}
.diff-placeholder svg {
    opacity: 0.25;
    color: var(--blue);
    transition: all var(--transition);
}
.diff-placeholder:hover svg {
    opacity: 0.45;
    transform: scale(1.04);
}
.diff-placeholder p strong {
    color: var(--blue);
    font-weight: var(--weight-semibold);
}

/* Unified View */
.unified-table {
    width: 100%;
    border-collapse: collapse;
    font-family: var(--font-mono);
    font-size: var(--text-sm);
    line-height: var(--leading-loose);
    letter-spacing: var(--tracking-normal);
}
.unified-table tr { transition: background var(--transition); }
.unified-table td {
    padding: 0;
    white-space: pre-wrap;
    word-break: break-all;
}

.line-num {
    font-family: var(--font-mono);
    font-size: var(--text-xs);
    color: var(--slate-dim);
    text-align: right;
    padding: 1px 12px 1px 16px;
    user-select: none;
    min-width: 44px;
    border-right: 1px solid rgba(148, 163, 184, 0.04);
    vertical-align: top;
    line-height: var(--leading-loose);
}

.sign-col {
    font-family: var(--font-mono);
    font-size: var(--text-sm);
    padding: 1px 10px;
    font-weight: var(--weight-bold);
    min-width: 20px;
    user-select: none;
    vertical-align: top;
    line-height: var(--leading-loose);
}

.line-content {
    font-family: var(--font-mono);
    font-size: var(--text-sm);
    padding: 1px 16px 1px 4px;
    width: 100%;
    vertical-align: top;
    line-height: var(--leading-loose);
    letter-spacing: var(--tracking-normal);
}

.row-del { background: rgba(239, 68, 68, 0.05); }
.row-del .line-num {
    background: rgba(239, 68, 68, 0.06);
    border-right-color: rgba(239, 68, 68, 0.12);
}
.row-del .sign-col { color: var(--del-color); }
.row-del .line-content { color: #fca5a5; }

.row-add { background: rgba(74, 222, 128, 0.04); }
.row-add .line-num {
    background: rgba(74, 222, 128, 0.05);
    border-right-color: rgba(74, 222, 128, 0.12);
}
.row-add .sign-col { color: var(--add-color); }
.row-add .line-content { color: #86efac; }

.row-neu .sign-col { color: var(--slate-dim); }
.row-neu .line-content { color: var(--slate-bright); }

.gutter {
    width: 3px;
    padding: 0;
    min-width: 3px;
}

.word-del {
    background: rgba(239, 68, 68, 0.2);
    color: #fca5a5;
    border-radius: 3px;
    padding: 0 3px;
    font-family: var(--font-mono);
    font-size: var(--text-sm);
    line-height: var(--leading-loose);
}
.word-add {
    background: rgba(74, 222, 128, 0.18);
    color: #86efac;
    border-radius: 3px;
    padding: 0 3px;
    font-family: var(--font-mono);
    font-size: var(--text-sm);
    line-height: var(--leading-loose);
}

.unified-table tr:hover .line-content { filter: brightness(1.06); }

/* Split View */
.split-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    min-height: 380px;
}
.split-col { overflow: auto; }
.split-col:first-child { border-right: 1px solid rgba(148, 163, 184, 0.04); }

.split-col-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 7px 18px;
    background: rgba(15, 30, 53, 0.3);
    border-bottom: 1px solid rgba(148, 163, 184, 0.04);
    font-family: var(--font-sans);
    font-size: var(--text-xs);
    font-weight: var(--weight-semibold);
    letter-spacing: var(--tracking-wider);
    text-transform: uppercase;
    position: sticky;
    top: 0;
    z-index: 2;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    line-height: var(--leading-normal);
}
.split-col-header.left { color: #f87171; }
.split-col-header.right { color: var(--add-color); }

.split-table {
    width: 100%;
    border-collapse: collapse;
    font-family: var(--font-mono);
    font-size: var(--text-sm);
    line-height: var(--leading-loose);
    letter-spacing: var(--tracking-normal);
}
.split-table td {
    padding: 0;
    white-space: pre-wrap;
    word-break: break-all;
    vertical-align: top;
}

.empty-row { background: rgba(148, 163, 184, 0.015); }
.empty-row td {
    color: transparent;
    user-select: none;
}

.split-table tr:hover .line-content { filter: brightness(1.05); }

.sync-badge {
    font-family: var(--font-sans);
    font-size: var(--text-xs);
    font-weight: var(--weight-semibold);
    letter-spacing: var(--tracking-wider);
    text-transform: uppercase;
    color: var(--blue);
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.15);
    border-radius: var(--radius-full);
    padding: 1px 10px;
    margin-left: auto;
    line-height: var(--leading-normal);
}

/* FOOTER */
.footer {
    margin-top: 48px;
    padding: 48px 24px 32px;
    text-align: center;
    background: rgba(2, 6, 23, 0.6);
    backdrop-filter: blur(12px) saturate(1.2);
    -webkit-backdrop-filter: blur(12px) saturate(1.2);
    border-top: 1px solid rgba(59, 130, 246, 0.08);
    position: relative;
    overflow: hidden;
}
.footer::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse 80% 60% at 50% 100%, rgba(59, 130, 246, 0.04) 0%, transparent 60%);
    pointer-events: none;
}

.footer-logo {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: contain;
    border: 2px solid rgba(59, 130, 246, 0.2);
    padding: 5px;
    background: rgba(255, 255, 255, 0.03);
    margin-bottom: 16px;
    position: relative;
    z-index: 1;
    transition: all var(--transition);
}
.footer-logo:hover {
    transform: scale(1.05) rotate(-3deg);
    border-color: rgba(59, 130, 246, 0.5);
    box-shadow: 0 0 40px rgba(59, 130, 246, 0.1);
}

.footer-name {
    font-family: var(--font-display);
    font-size: var(--text-2xl);
    font-weight: var(--weight-bold);
    letter-spacing: var(--tracking-tight);
    color: #fff;
    margin-bottom: 4px;
    position: relative;
    z-index: 1;
    line-height: var(--leading-tight);
}
.footer-name span { color: var(--blue); }

.footer-tagline {
    font-family: var(--font-sans);
    font-size: var(--text-sm);
    color: rgba(255, 255, 255, 0.35);
    margin-bottom: 24px;
    letter-spacing: var(--tracking-wide);
    position: relative;
    z-index: 1;
    font-weight: var(--weight-regular);
    line-height: var(--leading-normal);
}

.footer-divider {
    width: 48px;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--blue), transparent);
    margin: 0 auto 20px;
    position: relative;
    z-index: 1;
    border-radius: 2px;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-bottom: 24px;
    flex-wrap: wrap;
    position: relative;
    z-index: 1;
}

.footer-link {
    font-family: var(--font-sans);
    font-size: var(--text-sm);
    font-weight: var(--weight-medium);
    color: rgba(255, 255, 255, 0.6);
    text-decoration: none;
    padding: 6px 18px;
    border-radius: var(--radius-full);
    border: 1px solid rgba(255, 255, 255, 0.06);
    transition: all var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    line-height: var(--leading-normal);
}
.footer-link:hover {
    background: rgba(59, 130, 246, 0.08);
    border-color: rgba(59, 130, 246, 0.25);
    color: var(--blue);
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(59, 130, 246, 0.06);
}

.copyright {
    font-family: var(--font-sans);
    font-size: var(--text-xs);
    color: rgba(255, 255, 255, 0.2);
    letter-spacing: var(--tracking-wide);
    position: relative;
    z-index: 1;
    line-height: var(--leading-normal);
}

/* TOAST */
.toast {
    position: fixed;
    bottom: 32px;
    right: 32px;
    background: rgba(10, 22, 40, 0.92);
    backdrop-filter: blur(20px) saturate(1.4);
    -webkit-backdrop-filter: blur(20px) saturate(1.4);
    border: 1px solid rgba(59, 130, 246, 0.2);
    color: var(--white);
    padding: 12px 24px;
    border-radius: var(--radius-sm);
    font-family: var(--font-sans);
    font-size: var(--text-sm);
    font-weight: var(--weight-medium);
    box-shadow: 0 8px 48px rgba(0, 0, 0, 0.5);
    z-index: 9999;
    transform: translateY(0) scale(1);
    opacity: 1;
    transition: all 0.4s cubic-bezier(0.22, 1, 0.36, 1);
    display: flex;
    align-items: center;
    gap: 10px;
    pointer-events: auto;
    line-height: var(--leading-normal);
    letter-spacing: var(--tracking-normal);
}
.toast.hidden {
    opacity: 0;
    transform: translateY(16px) scale(0.95);
    pointer-events: none;
}

/* COOKIE BANNER */
#cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(2, 6, 23, 0.92);
    backdrop-filter: blur(24px) saturate(1.4);
    -webkit-backdrop-filter: blur(24px) saturate(1.4);
    border-top: 1px solid rgba(59, 130, 246, 0.1);
    padding: 16px 24px;
    z-index: 10000;
    transform: translateY(0);
    transition: all 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}
#cookie-banner.hidden {
    transform: translateY(100%);
}
.cookie-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}
.cookie-text {
    display: flex;
    align-items: center;
    gap: 12px;
    font-family: var(--font-sans);
    font-size: var(--text-sm);
    color: var(--slate-bright);
    line-height: var(--leading-normal);
}
.cookie-text i {
    color: var(--blue);
    font-size: 1.2rem;
}
.cookie-text a {
    color: var(--blue);
    text-decoration: none;
    border-bottom: 1px dotted rgba(59, 130, 246, 0.2);
    transition: border-color var(--transition);
    font-weight: var(--weight-medium);
}
.cookie-text a:hover {
    border-bottom-color: var(--blue);
}

.cookie-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.btn-cookie {
    padding: 8px 22px;
    border-radius: var(--radius-sm);
    border: none;
    font-family: var(--font-sans);
    font-size: var(--text-sm);
    font-weight: var(--weight-medium);
    cursor: pointer;
    transition: all var(--transition);
    line-height: var(--leading-normal);
}
.btn-cookie-accept {
    background: var(--blue);
    color: #fff;
    box-shadow: 0 2px 20px rgba(59, 130, 246, 0.25);
}
.btn-cookie-accept:hover {
    background: #5b9af8;
    transform: translateY(-2px);
    box-shadow: 0 4px 28px rgba(59, 130, 246, 0.35);
}
.btn-cookie-decline {
    background: rgba(255, 255, 255, 0.04);
    color: var(--slate);
    border: 1px solid rgba(148, 163, 184, 0.08);
}
.btn-cookie-decline:hover {
    background: rgba(255, 255, 255, 0.08);
    color: var(--white);
}

/* RESPONSIVE MEDIA QUERIES */
@media (max-width: 1024px) {
    .header { padding: 0 20px; }
    .app-wrapper { padding: 0 16px 32px; }
    .hero { padding: calc(var(--header-height) + 28px) 16px 28px; }
}

@media (max-width: 820px) {
    .split-wrapper { grid-template-columns: 1fr; }
    .split-col:first-child {
        border-right: none;
        border-bottom: 1px solid rgba(148, 163, 184, 0.04);
    }
    .header-stats .stat-pill:not(:first-child) { display: none; }
}

@media (max-width: 768px) {
    :root { --header-height: 60px; }
    .header { padding: 0 16px; }
    .header-nav { display: none; }
    .hamburger { display: flex; }
    .header-stats .stat-pill {
        padding: 2px 12px;
        font-size: var(--text-xs);
    }
    .header-stats .stat-pill .dot {
        width: 5px;
        height: 5px;
    }
    .input-area {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    .hero h1 { font-size: var(--text-4xl); }
    .hero p { font-size: var(--text-base); }
    .toolbar {
        padding: 10px 14px;
        gap: 6px 10px;
    }
    .toolbar-label { display: none; }
    .toolbar-divider { height: 22px; }
    .diff-header { padding: 10px 14px; }
    .diff-stats {
        font-size: var(--text-xs);
        gap: 8px;
    }
    .diff-actions .btn-sm {
        font-size: var(--text-xs);
        padding: 4px 10px;
    }
    textarea {
        min-height: 150px;
        font-size: var(--text-sm);
        padding: 12px 14px;
    }
    .pane-header { padding: 8px 14px; }
    .toast {
        bottom: 20px;
        right: 20px;
        left: 20px;
        padding: 10px 18px;
        font-size: var(--text-sm);
    }
    .footer { padding: 32px 16px 24px; }
}

@media (max-width: 640px) {
    .hero { padding: calc(var(--header-height) + 20px) 12px 20px; }
    .hero-actions {
        flex-direction: column;
        width: 100%;
    }
    .hero-actions .btn {
        width: 100%;
        justify-content: center;
    }
    .header-brand { font-size: var(--text-base); }
    .header-badge {
        font-size: var(--text-xs);
        padding: 1px 10px;
    }
    .header-logo { height: 30px; }
    .app-wrapper {
        padding: 0 10px 24px;
        gap: 12px;
    }
    .toolbar {
        padding: 8px 10px;
        gap: 4px 8px;
        border-radius: var(--radius-sm);
    }
    .toolbar-section { gap: 4px; }
    .btn {
        font-size: var(--text-sm);
        padding: 6px 14px;
        min-height: 36px;
    }
    .btn-sm {
        font-size: var(--text-xs);
        padding: 3px 10px;
        min-height: 28px;
    }
    .toggle-option {
        font-size: var(--text-xs);
        padding: 4px 10px;
    }
    .checkbox-label { font-size: var(--text-xs); }
    .checkbox-label input[type="checkbox"] {
        width: 15px;
        height: 15px;
    }
    .diff-output { min-height: 260px; }
    .diff-placeholder {
        min-height: 260px;
        font-size: var(--text-sm);
        padding: 16px;
    }
    .unified-table, .split-table { font-size: var(--text-xs); }
    .line-num {
        font-size: var(--text-xs);
        min-width: 32px;
        padding: 1px 6px 1px 10px;
    }
    .sign-col {
        padding: 1px 6px;
        min-width: 16px;
    }
    .line-content {
        padding: 1px 10px 1px 2px;
        font-size: var(--text-xs);
    }
    .split-col-header {
        font-size: var(--text-xs);
        padding: 5px 12px;
    }
    .cookie-content {
        flex-direction: column;
        text-align: center;
    }
    .cookie-text {
        flex-direction: column;
        gap: 4px;
    }
    .cookie-actions {
        justify-content: center;
        width: 100%;
    }
    .cookie-actions .btn-cookie {
        flex: 1;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .header { padding: 0 12px; }
    .header-brand { font-size: var(--text-sm); }
    .header-badge { display: none; }
    .header-stats .stat-pill {
        font-size: var(--text-xs);
        padding: 1px 8px;
    }
    .header-stats .stat-pill span:not(.dot) { display: none; }
    .hero h1 { font-size: var(--text-3xl); }
    .hero p { font-size: var(--text-sm); }
    textarea {
        min-height: 120px;
        font-size: var(--text-xs);
        padding: 10px 12px;
    }
    .btn {
        font-size: var(--text-xs);
        padding: 5px 12px;
        min-height: 32px;
        gap: 4px;
    }
    .btn-sm {
        font-size: var(--text-xs);
        padding: 3px 8px;
        min-height: 24px;
    }
    .pane-header { padding: 6px 10px; }
    .pane-label { font-size: var(--text-xs); }
    .char-count {
        font-size: var(--text-xs);
        padding: 1px 8px;
    }
    .upload-btn {
        font-size: var(--text-xs);
        padding: 2px 8px;
    }
    .diff-header { padding: 8px 10px; }
    .diff-title { font-size: var(--text-xs); }
    .diff-stats {
        font-size: var(--text-xs);
        gap: 4px;
    }
    .footer-name { font-size: var(--text-xl); }
    .footer-link {
        font-size: var(--text-xs);
        padding: 4px 12px;
    }
    .toast {
        bottom: 16px;
        right: 16px;
        left: 16px;
        padding: 8px 14px;
        font-size: var(--text-xs);
        border-radius: var(--radius-sm);
    }
}

@media (max-width: 390px) {
    .header-brand { font-size: var(--text-xs); }
    .header-logo { height: 26px; }
    .hero h1 { font-size: var(--text-2xl); }
    .toolbar .btn {
        font-size: var(--text-xs);
        padding: 4px 10px;
        min-height: 28px;
    }
    .toggle-option {
        font-size: var(--text-xs);
        padding: 3px 8px;
    }
    .checkbox-label { font-size: var(--text-xs); }
    .checkbox-label input[type="checkbox"] {
        width: 13px;
        height: 13px;
    }
}

@media (max-width: 320px) {
    .header { padding: 0 8px; }
    .header-brand { font-size: var(--text-xs); }
    .header-logo { height: 22px; }
    .hero h1 { font-size: var(--text-xl); }
}
