 :root {
    --bg: #07111f;
    --bg-soft: rgba(9, 18, 35, 0.85);
    --panel: rgba(12, 22, 41, 0.88);
    --panel-strong: rgba(9, 17, 33, 0.96);
    --line: rgba(99, 218, 251, 0.26);
    --line-strong: rgba(255, 95, 162, 0.38);
    --text: #f8fafc;
    --muted: #cbd5e1;
    --pink: #ff4fa7;
    --cyan: #5ee7ff;
    --yellow: #ffd166;
    --lime: #9ef01a;
    --shadow: 0 16px 45px rgba(0, 0, 0, 0.34);
    --shadow-soft: 0 10px 25px rgba(6, 8, 18, 0.35);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    color: var(--text);
    font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background:
        radial-gradient(circle at top left, rgba(255, 79, 167, 0.18), transparent 30%),
        radial-gradient(circle at top right, rgba(94, 231, 255, 0.18), transparent 28%),
        linear-gradient(180deg, #0c1224 0%, #08111f 40%, #050b15 100%);
}

.site-noise {
    pointer-events: none;
    position: fixed;
    inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
    background-size: 28px 28px;
    opacity: 0.35;
    z-index: 0;
}

body::after {
    content: '';
    position: fixed;
    inset: 0;
    pointer-events: none;
    background: linear-gradient(to bottom, rgba(255,255,255,0.04), rgba(255,255,255,0.01) 3px, transparent 3px, transparent 6px);
    background-size: 100% 6px;
    opacity: 0.06;
    z-index: 0;
}

img {
    max-width: 100%;
    height: auto;
}

.retro-shell {
    position: relative;
    z-index: 1;
    width: min(100%, 88rem);
    margin: 0 auto;
}

.site-nav,
.site-main,
.site-footer {
    position: relative;
    z-index: 1;
}

.nav-panel,
.footer-panel,
.bg-white,
.bg-gray-50,
.bg-blue-50,
.bg-green-50,
.bg-yellow-50,
.bg-purple-50,
.bg-red-50,
.bg-slate-50,
.border,
.border-b,
.border-t,
.rounded,
.rounded-lg,
.rounded-xl,
.rounded-2xl,
.shadow,
.shadow-md,
.shadow-lg {
    border-color: var(--line) !important;
}

.nav-panel,
.footer-panel,
.bg-white,
.bg-gray-50,
.bg-blue-50,
.bg-green-50,
.bg-yellow-50,
.bg-purple-50,
.bg-red-50,
.bg-slate-50 {
    background: linear-gradient(180deg, rgba(14, 24, 44, 0.88), rgba(9, 17, 33, 0.92)) !important;
    backdrop-filter: blur(12px);
}

.bg-white,
.bg-gray-50,
.bg-blue-50,
.bg-green-50,
.bg-yellow-50,
.bg-purple-50,
.bg-red-50,
.bg-slate-50,
.nav-panel,
.footer-panel,
.border,
.border-b,
.border-t {
    box-shadow: var(--shadow-soft) !important;
}

.rounded,
.rounded-lg,
.rounded-xl,
.rounded-2xl {
    border-radius: 1.25rem !important;
}

.shadow,
.shadow-md,
.shadow-lg {
    box-shadow: var(--shadow) !important;
}

.text-gray-400,
.text-gray-500,
.text-gray-600,
.text-gray-700,
.text-slate-400,
.text-slate-500,
.text-slate-600 {
    color: var(--muted) !important;
}

.text-blue-600,
.text-blue-700,
.text-blue-800,
.text-cyan-600,
.text-cyan-700 {
    color: var(--cyan) !important;
}

.text-green-600,
.text-green-700 {
    color: #8cff98 !important;
}

.text-yellow-600,
.text-yellow-700,
.text-yellow-800 {
    color: var(--yellow) !important;
}

.text-red-600,
.text-red-700 {
    color: #ff799f !important;
}

.text-purple-600,
.text-purple-700 {
    color: #d6a5ff !important;
}

.bg-blue-600,
.bg-blue-700,
.bg-blue-800 {
    background: linear-gradient(135deg, #0891b2, #3b82f6) !important;
}

.bg-green-600,
.bg-green-700 {
    background: linear-gradient(135deg, #10b981, #22c55e) !important;
}

.bg-red-600,
.bg-red-700 {
    background: linear-gradient(135deg, #ef4444, #f97316) !important;
}

.bg-yellow-500,
.bg-yellow-600 {
    background: linear-gradient(135deg, #f59e0b, #facc15) !important;
    color: #0f172a !important;
}

.retro-ribbon {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    padding: 0.55rem 1rem;
    border: 1px solid rgba(94, 231, 255, 0.24);
    border-radius: 999px;
    background: rgba(11, 18, 35, 0.8);
    box-shadow: inset 0 0 20px rgba(94, 231, 255, 0.07);
}

.retro-ribbon span {
    font-size: 0.72rem;
    color: var(--muted);
    letter-spacing: 0.08em;
}

.retro-logo {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 3rem;
    height: 3rem;
    border-radius: 0.95rem;
    background: linear-gradient(135deg, rgba(94,231,255,0.2), rgba(255,79,167,0.18));
    border: 1px solid rgba(94, 231, 255, 0.35);
    font-family: 'Press Start 2P', cursive;
    font-size: 0.85rem;
    color: var(--text);
    box-shadow: 0 0 0 1px rgba(255,255,255,0.05) inset, 0 0 18px rgba(94,231,255,0.15);
}

.retro-brand,
.pixel-title {
    font-family: 'Press Start 2P', cursive;
    letter-spacing: 0.04em;
}

.retro-brand {
    font-size: 0.78rem;
    line-height: 1.6;
    color: white;
}

.section-kicker {
    margin-bottom: 0.65rem;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.22em;
    color: var(--cyan);
}

.nav-link,
.mobile-link,
.footer-link,
.btn-neo,
.btn-ghost,
button,
[role='button'] {
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease, background-color 0.2s ease;
}

.nav-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.72rem 1rem;
    border-radius: 999px;
    color: var(--muted);
    border: 1px solid transparent;
    text-decoration: none;
}

.nav-link:hover,
.nav-link:focus-visible,
.mobile-link:hover,
.mobile-link:focus-visible,
.footer-link:hover,
.footer-link:focus-visible,
.btn-neo:hover,
.btn-ghost:hover,
button:hover,
a[class*='bg-']:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.24);
}

.nav-link:hover,
.nav-link:focus-visible {
    color: white;
    border-color: rgba(94, 231, 255, 0.22);
    background: rgba(94, 231, 255, 0.08);
}

.retro-badge,
.btn-neo,
.btn-ghost,
.mobile-link,
.footer-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    padding: 0.78rem 1rem;
    border-radius: 999px;
    border: 1px solid rgba(94, 231, 255, 0.22);
    text-decoration: none;
}

.retro-badge {
    padding: 0.58rem 0.9rem;
    font-size: 0.72rem;
    letter-spacing: 0.14em;
    color: var(--yellow);
    background: rgba(255, 209, 102, 0.08);
}

.btn-neo {
    color: #07111f;
    background: linear-gradient(135deg, var(--cyan), #7dd3fc);
    font-weight: 700;
}

.btn-ghost,
.mobile-link,
.footer-link {
    color: var(--text);
    background: rgba(255, 255, 255, 0.04);
}

.mobile-link.success {
    background: rgba(16, 185, 129, 0.16);
}

.mobile-link.danger {
    background: rgba(239, 68, 68, 0.16);
}

.mobile-toggle {
    display: inline-flex;
    flex-direction: column;
    gap: 0.28rem;
    width: 2.8rem;
    height: 2.8rem;
    align-items: center;
    justify-content: center;
    border-radius: 0.95rem;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(94, 231, 255, 0.2);
}

.mobile-toggle span {
    display: block;
    width: 1.15rem;
    height: 2px;
    border-radius: 999px;
    background: white;
}

.mobile-drawer-panel {
    border: 1px solid rgba(94, 231, 255, 0.22);
    border-radius: 1.25rem;
    background: rgba(7, 15, 28, 0.92);
    box-shadow: var(--shadow);
}

.flash {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 1.1rem;
    border-radius: 1rem;
    border: 1px solid var(--line);
    background: rgba(13, 20, 37, 0.88);
}

.flash-success {
    border-color: rgba(34, 197, 94, 0.35);
}

.flash-error {
    border-color: rgba(248, 113, 113, 0.4);
}

.flash-close {
    border: 0;
    background: transparent;
    color: inherit;
    font-size: 1.4rem;
    line-height: 1;
    padding: 0;
    box-shadow: none !important;
}

.hero-card {
    position: relative;
    overflow: hidden;
    border-radius: 1.75rem;
    border: 1px solid rgba(94, 231, 255, 0.22);
    background: linear-gradient(180deg, rgba(9, 17, 33, 0.76), rgba(8, 15, 28, 0.9));
    box-shadow: var(--shadow);
}

.hero-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(110deg, rgba(94,231,255,0.08), transparent 35%, rgba(255,79,167,0.06));
    pointer-events: none;
}

.hero-overlay {
    background: linear-gradient(180deg, rgba(7,11,22,0.15), rgba(7,11,22,0.78));
}

input,
select,
textarea {
    width: 100%;
    background: rgba(255,255,255,0.045);
    color: var(--text);
    border: 1px solid rgba(94, 231, 255, 0.24) !important;
    border-radius: 0.95rem !important;
    padding: 0.8rem 0.95rem !important;
    outline: none;
}

input::placeholder,
textarea::placeholder {
    color: #94a3b8;
}

input:focus,
select:focus,
textarea:focus {
    border-color: rgba(255, 79, 167, 0.46) !important;
    box-shadow: 0 0 0 3px rgba(255, 79, 167, 0.12);
}

button,
a[class*='bg-'] {
    border-radius: 999px !important;
    font-weight: 700;
    border: 1px solid rgba(255,255,255,0.08);
}

table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    color: var(--text);
}

thead {
    background: rgba(255,255,255,0.04) !important;
}

th,
td {
    padding: 0.95rem 1rem;
    border-bottom: 1px solid rgba(94, 231, 255, 0.12);
}

tr:hover td {
    background: rgba(255, 255, 255, 0.02);
}

.prose,
.prose p,
.prose li,
.prose strong,
.prose blockquote {
    color: var(--text) !important;
}

.line-clamp-2,
.line-clamp-3 {
    display: -webkit-box;
    overflow: hidden;
    -webkit-box-orient: vertical;
}

.line-clamp-2 {
    -webkit-line-clamp: 2;
}

.line-clamp-3 {
    -webkit-line-clamp: 3;
}

.retro-stat {
    position: relative;
    overflow: hidden;
}

.retro-stat::after {
    content: '';
    position: absolute;
    inset: auto -20% -70% auto;
    width: 120px;
    height: 120px;
    border-radius: 999px;
    background: radial-gradient(circle, rgba(94,231,255,0.25), transparent 65%);
    pointer-events: none;
}

.footer-link {
    justify-content: flex-start;
}

@media (max-width: 1024px) {
    .retro-brand {
        font-size: 0.68rem;
    }
}

@media (max-width: 768px) {
    .retro-brand,
    .pixel-title {
        line-height: 1.7;
    }

    .retro-brand {
        font-size: 0.62rem;
    }

    th,
    td {
        white-space: nowrap;
    }

    .site-main {
        padding-top: 1rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    * {
        transition: none !important;
        animation: none !important;
    }
}
