:root {
    --bg: #050b12;
    --bg2: #08131f;
    --panel: rgba(11, 27, 42, .82);
    --panel2: rgba(15, 36, 55, .86);
    --line: rgba(74, 199, 255, .18);
    --line-strong: rgba(74, 199, 255, .42);
    --text: #edf8ff;
    --muted: #8faabd;
    --blue: #4ac7ff;
    --blue2: #0b8fd1;
    --cyan: #7ce9ff;
    --green: #4fe39a;
    --amber: #ffc766;
    --red: #ff6f7d;
    --purple: #b89cff;
    --shadow: 0 28px 80px rgba(0, 0, 0, .34);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    min-height: 100vh;
    background:
        radial-gradient(circle at 80% 15%, rgba(0, 153, 255, .10), transparent 31rem),
        radial-gradient(circle at 10% 40%, rgba(67, 221, 255, .06), transparent 34rem),
        linear-gradient(180deg, #050b12 0%, #07111b 52%, #050b12 100%);
    color: var(--text);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; }
button { cursor: pointer; }
p { line-height: 1.72; color: var(--muted); }
h1, h2, h3, p { margin-top: 0; }
h1 { font-size: clamp(2.8rem, 7vw, 6.6rem); line-height: .92; letter-spacing: -.055em; }
h2 { font-size: clamp(1.7rem, 4vw, 3rem); letter-spacing: -.035em; }
h3 { font-size: 1.25rem; letter-spacing: -.015em; }

.grid-bg {
    position: fixed;
    inset: 0;
    pointer-events: none;
    opacity: .26;
    background-image:
        linear-gradient(rgba(82, 203, 255, .045) 1px, transparent 1px),
        linear-gradient(90deg, rgba(82, 203, 255, .045) 1px, transparent 1px);
    background-size: 46px 46px;
    mask-image: linear-gradient(to bottom, #000, transparent 85%);
}

.shell { width: min(1180px, calc(100% - 40px)); margin: 0 auto; }
.section { padding: 64px 0; }

.announcement {
    position: relative;
    z-index: 20;
    padding: 9px 20px;
    border-bottom: 1px solid var(--line);
    background: rgba(7, 19, 31, .94);
    text-align: center;
    color: #c8efff;
    font-size: .82rem;
    letter-spacing: .035em;
}
.pulse-dot {
    display: inline-block;
    width: 7px; height: 7px;
    margin-right: 8px;
    background: var(--green);
    border-radius: 50%;
    box-shadow: 0 0 16px var(--green);
}

.topbar {
    position: sticky;
    top: 0;
    z-index: 15;
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: min(1280px, calc(100% - 24px));
    margin: 12px auto 0;
    padding: 12px 16px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: rgba(6, 16, 26, .78);
    backdrop-filter: blur(18px);
    box-shadow: 0 10px 40px rgba(0,0,0,.25);
}
.brand { display: inline-flex; align-items: center; gap: 10px; }
.brand-mark {
    display: grid;
    place-items: center;
    width: 42px; height: 42px;
    border: 1px solid var(--line-strong);
    border-radius: 11px;
    background: linear-gradient(145deg, rgba(74, 199, 255, .14), rgba(74, 199, 255, .02));
    color: var(--cyan);
    font-weight: 900;
    letter-spacing: -.04em;
    box-shadow: inset 0 0 25px rgba(74, 199, 255, .08), 0 0 20px rgba(74,199,255,.06);
}
.brand-text { display: flex; flex-direction: column; line-height: .95; letter-spacing: .15em; }
.brand-text strong { font-size: .9rem; }
.brand-text small { margin-top: 5px; color: var(--blue); font-size: .61rem; letter-spacing: .28em; }
.nav { display: flex; align-items: center; gap: 4px; }
.nav a {
    padding: 10px 13px;
    border-radius: 10px;
    color: #a9c0d0;
    font-size: .91rem;
}
.nav a:hover { background: rgba(74,199,255,.08); color: #fff; }
.nav-toggle { display: none; background: none; border: 0; color: #fff; font-size: 1.5rem; }

.hero {
    min-height: 690px;
    display: grid;
    grid-template-columns: 1.05fr .95fr;
    gap: 50px;
    align-items: center;
    padding: 70px 0 50px;
}
.hero-copy { position: relative; z-index: 1; }
.eyebrow {
    color: var(--blue);
    font-size: .77rem;
    letter-spacing: .22em;
    font-weight: 800;
}
.hero h1 {
    max-width: 760px;
    margin: 20px 0 26px;
    background: linear-gradient(180deg, #fff 0%, #b7d8e9 85%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
.hero-text { max-width: 680px; font-size: 1.08rem; }
.system-label {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    padding: 7px 10px;
    margin-bottom: 24px;
    border: 1px solid rgba(79,227,154,.22);
    border-radius: 999px;
    color: #bff9da;
    background: rgba(79,227,154,.05);
    font-size: .69rem;
    font-weight: 800;
    letter-spacing: .11em;
}
.system-label span { width: 7px; height: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 15px var(--green); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 11px 18px;
    border: 1px solid transparent;
    border-radius: 10px;
    font-weight: 750;
    font-size: .9rem;
}
.button.primary { background: linear-gradient(135deg, #42c3ff, #187fbd); color: #03101a; box-shadow: 0 10px 28px rgba(74,199,255,.15); }
.button.primary:hover { filter: brightness(1.08); transform: translateY(-1px); }
.button.ghost { border-color: var(--line); background: rgba(255,255,255,.02); color: #d9ecf6; }
.button.disabled { border-color: rgba(255,255,255,.07); background: rgba(255,255,255,.025); color: #687f8e; cursor: default; }
.button.danger { border-color: rgba(255,111,125,.24); color: #ffc4ca; background: rgba(255,111,125,.08); }
.button.full { width: 100%; }
.text-link, .card-link { color: var(--cyan); font-weight: 700; }
.text-link:hover, .card-link:hover { color: #fff; }

.forge-core {
    position: relative;
    width: min(460px, 90vw);
    aspect-ratio: 1;
    margin: auto;
    display: grid;
    place-items: center;
}
.forge-core::before {
    content: "";
    position: absolute;
    inset: 10%;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(74,199,255,.17), transparent 68%);
    filter: blur(9px);
}
.ring { position: absolute; border-radius: 50%; border: 1px solid var(--line-strong); }
.ring-a { inset: 8%; box-shadow: inset 0 0 40px rgba(74,199,255,.04); }
.ring-b { inset: 21%; border-style: dashed; opacity: .6; }
.core {
    position: relative;
    z-index: 2;
    display: grid;
    place-items: center;
    width: 138px;
    aspect-ratio: 1;
    border: 1px solid rgba(124,233,255,.72);
    border-radius: 36%;
    transform: rotate(45deg);
    background: linear-gradient(145deg, rgba(74,199,255,.28), rgba(2,23,36,.78));
    box-shadow: 0 0 65px rgba(74,199,255,.23), inset 0 0 45px rgba(74,199,255,.12);
}
.core span { transform: rotate(-45deg); font-size: 2.5rem; font-weight: 950; letter-spacing: -.08em; color: white; }
.core-caption { position: absolute; bottom: 8%; color: #5c8196; font-size: .68rem; letter-spacing: .18em; }

.section-head { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: 28px; }
.section-head h2 { margin: 5px 0 0; }

.project-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.project-card, .panel, .admin-panel {
    border: 1px solid var(--line);
    background: linear-gradient(145deg, rgba(12,29,45,.82), rgba(7,18,29,.84));
    box-shadow: var(--shadow);
}
.project-card {
    position: relative;
    min-height: 330px;
    padding: 24px;
    border-radius: 18px;
    transition: .2s ease;
    overflow: hidden;
}
.project-card::after {
    content: "";
    position: absolute;
    inset: auto -30% -55% 30%;
    height: 220px;
    background: radial-gradient(circle, rgba(74,199,255,.12), transparent 65%);
    pointer-events: none;
}
.project-card:hover { transform: translateY(-4px); border-color: rgba(74,199,255,.33); }
.card-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 28px; }
.project-index { font: 700 .74rem ui-monospace, SFMono-Regular, Menlo, monospace; color: #46677a; }
.project-card h3 { margin-bottom: 8px; font-size: 1.35rem; }
.project-card .tagline { color: #c2dbe9; margin-bottom: 14px; }
.project-card > p:not(.tagline) { font-size: .91rem; }
.meta { display: flex; flex-wrap: wrap; gap: 8px; margin: 24px 0 18px; }
.meta span { padding: 5px 8px; border: 1px solid rgba(255,255,255,.07); border-radius: 7px; color: #7897aa; font-size: .7rem; }

.status {
    display: inline-flex;
    padding: 6px 9px;
    border: 1px solid;
    border-radius: 999px;
    font-size: .69rem;
    line-height: 1;
    font-weight: 800;
    letter-spacing: .035em;
    white-space: nowrap;
}
.status.large { padding: 9px 12px; font-size: .75rem; }
.status.live { color: #bff7d7; border-color: rgba(79,227,154,.28); background: rgba(79,227,154,.08); }
.status.beta { color: #bdeeff; border-color: rgba(74,199,255,.3); background: rgba(74,199,255,.09); }
.status.dev { color: #cbd5ff; border-color: rgba(116,140,255,.29); background: rgba(116,140,255,.09); }
.status.prototype { color: #e2d2ff; border-color: rgba(184,156,255,.28); background: rgba(184,156,255,.08); }
.status.planning { color: #ffe5aa; border-color: rgba(255,199,102,.26); background: rgba(255,199,102,.08); }
.status.offline { color: #ffc1c8; border-color: rgba(255,111,125,.26); background: rgba(255,111,125,.08); }

.philosophy, .detail-layout { display: grid; grid-template-columns: 1.1fr .9fr; gap: 16px; padding-bottom: 90px; }
.panel { border-radius: 18px; padding: 30px; }
.stat-panel { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; align-content: center; }
.stat-panel div { padding: 18px; border-left: 1px solid var(--line); }
.stat-panel strong { display: block; color: var(--cyan); font-size: 1.8rem; }
.stat-panel span { color: var(--muted); font-size: .75rem; }

.page-head { padding: 100px 0 40px; }
.page-head h1 { margin: 10px 0 20px; font-size: clamp(2.8rem, 6vw, 5.8rem); }
.page-head > p:not(.eyebrow), .lead { max-width: 780px; font-size: 1.08rem; }
.product-hero { display: flex; align-items: end; justify-content: space-between; gap: 30px; }
.detail-copy p { font-size: 1rem; }
.facts { display: grid; gap: 4px; }
.facts div { padding: 15px 0; border-bottom: 1px solid var(--line); }
.facts span { display: block; margin-bottom: 5px; color: #648397; font-size: .73rem; text-transform: uppercase; letter-spacing: .1em; }
.facts strong, .facts a { color: #dff4ff; }
.download-list, .status-board { display: grid; gap: 12px; }
.download-row, .status-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    padding: 22px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: rgba(10,25,39,.72);
}
.download-row h3, .status-row h3 { margin: 10px 0 4px; }
.download-row p, .status-row p { margin: 0; font-size: .84rem; }
.error-page { min-height: 70vh; display: flex; flex-direction: column; justify-content: center; align-items: flex-start; }

.footer {
    display: flex;
    justify-content: space-between;
    align-items: end;
    gap: 24px;
    padding: 40px 0;
    border-top: 1px solid var(--line);
}
.footer p { margin: 6px 0 0; font-size: .82rem; }
.footer-right { display: flex; flex-direction: column; align-items: end; gap: 5px; color: #577489; font-size: .75rem; }
.dev-link { margin-top: 7px; color: #7ba0b6; }

/* Admin */
.admin-body { background: #050b12; }
.admin-shell { min-height: 100vh; display: grid; grid-template-columns: 260px minmax(0, 1fr); }
.admin-sidebar {
    position: sticky;
    top: 0;
    height: 100vh;
    padding: 22px;
    border-right: 1px solid var(--line);
    background: rgba(5,14,23,.97);
    display: flex;
    flex-direction: column;
}
.admin-brand { margin-bottom: 28px; }
.admin-nav { display: grid; gap: 6px; flex: 1; }
.admin-nav a {
    padding: 12px;
    border: 1px solid transparent;
    border-radius: 10px;
    color: #89a6b8;
}
.admin-nav a:hover { border-color: var(--line); color: #fff; background: rgba(74,199,255,.06); }
.admin-main { min-width: 0; padding: 38px; }
.admin-mobile-head { display: none; }
.admin-head { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: 28px; }
.admin-head h1 { margin: 5px 0 10px; font-size: clamp(2rem, 4vw, 3.8rem); }
.admin-head p { margin-bottom: 0; }
.admin-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 18px; }
.admin-stats > div {
    padding: 22px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: rgba(11,28,43,.78);
}
.admin-stats strong { display: block; font-size: 2rem; color: var(--cyan); }
.admin-stats span { color: var(--muted); font-size: .77rem; }
.admin-panel { padding: 24px; border-radius: 16px; margin-bottom: 16px; }
.admin-panel h2 { margin-bottom: 22px; font-size: 1.25rem; }
.admin-table-wrap { overflow-x: auto; }
.admin-table { width: 100%; border-collapse: collapse; min-width: 720px; }
.admin-table th, .admin-table td { padding: 14px 10px; text-align: left; border-bottom: 1px solid rgba(74,199,255,.1); }
.admin-table th { color: #648397; font-size: .68rem; text-transform: uppercase; letter-spacing: .08em; }
.admin-table td { color: #cbdde8; font-size: .86rem; }
.admin-table td strong, .admin-table td small { display: block; }
.admin-table td small { margin-top: 3px; color: #5f7d90; }
.admin-table a { color: var(--cyan); font-weight: 700; }

.admin-form { display: grid; gap: 16px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.form-grid label, .admin-form > label, .narrow-form label, .form-stack label {
    display: grid;
    gap: 7px;
    color: #a9c2d1;
    font-size: .78rem;
    font-weight: 700;
}
.full-span { grid-column: 1 / -1; }
input, textarea, select {
    width: 100%;
    border: 1px solid rgba(103,183,222,.18);
    border-radius: 9px;
    outline: none;
    padding: 11px 12px;
    background: #07131f;
    color: #eefaff;
}
textarea { resize: vertical; min-height: 90px; }
input:focus, textarea:focus, select:focus { border-color: rgba(74,199,255,.52); box-shadow: 0 0 0 3px rgba(74,199,255,.07); }
.check-label { display: flex !important; align-items: center; gap: 9px !important; }
.check-label input { width: auto; }
.form-actions { display: flex; gap: 10px; }
.danger-zone { margin-top: 28px; padding-top: 18px; border-top: 1px solid rgba(255,111,125,.15); }
.narrow-form { max-width: 620px; }
.upload-form { display: flex; gap: 10px; align-items: center; }
.help-text { margin: 10px 0 0; font-size: .78rem; }
.file-list { display: grid; }
.file-row { display: flex; justify-content: space-between; gap: 20px; padding: 14px 0; border-bottom: 1px solid rgba(74,199,255,.1); }
.file-row small { display: block; margin-top: 4px; color: #628196; }
.file-actions { display: flex; align-items: center; gap: 14px; }
.file-actions a, .file-actions button { color: var(--cyan); background: none; border: 0; padding: 0; }
.file-actions button { color: #ff9ba5; }

.auth-body { display: grid; place-items: center; min-height: 100vh; padding: 24px; }
.auth-card {
    width: min(480px, 100%);
    padding: 30px;
    border: 1px solid var(--line);
    border-radius: 20px;
    background: rgba(7,20,32,.92);
    box-shadow: var(--shadow);
}
.auth-card h1 { margin: 12px 0 10px; font-size: 2.2rem; }
.auth-brand { margin-bottom: 30px; }
.form-stack { display: grid; gap: 16px; margin-top: 24px; }
.auth-back { display: inline-block; margin-top: 20px; font-size: .8rem; }

.flash-stack { display: grid; gap: 8px; margin-bottom: 16px; }
.flash { padding: 11px 13px; border-radius: 9px; border: 1px solid; font-size: .82rem; }
.flash.success { color: #bff7d7; border-color: rgba(79,227,154,.2); background: rgba(79,227,154,.07); }
.flash.error { color: #ffc3ca; border-color: rgba(255,111,125,.22); background: rgba(255,111,125,.08); }

@media (max-width: 980px) {
    .hero { grid-template-columns: 1fr; min-height: auto; padding-top: 100px; }
    .forge-core { width: min(380px, 88vw); }
    .project-grid { grid-template-columns: 1fr 1fr; }
    .philosophy, .detail-layout { grid-template-columns: 1fr; }
    .admin-stats { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 760px) {
    .shell { width: min(100% - 26px, 1180px); }
    .topbar { width: calc(100% - 16px); }
    .nav-toggle { display: block; }
    .nav {
        display: none;
        position: absolute;
        top: calc(100% + 8px);
        left: 0; right: 0;
        padding: 10px;
        border: 1px solid var(--line);
        border-radius: 14px;
        background: #07131f;
        flex-direction: column;
        align-items: stretch;
    }
    .nav.open { display: flex; }
    .project-grid { grid-template-columns: 1fr; }
    .section-head, .product-hero, .footer, .download-row, .status-row { align-items: flex-start; flex-direction: column; }
    .footer-right { align-items: flex-start; }
    .stat-panel { grid-template-columns: 1fr; }
    .stat-panel div { border-left: 0; border-top: 1px solid var(--line); }
    .page-head { padding-top: 74px; }

    .admin-shell { display: block; }
    .admin-sidebar { display: none; }
    .admin-main { padding: 18px; }
    .admin-mobile-head {
        display: flex;
        justify-content: space-between;
        margin-bottom: 24px;
        padding-bottom: 12px;
        border-bottom: 1px solid var(--line);
    }
    .admin-mobile-head a { color: var(--cyan); }
    .admin-head { align-items: flex-start; flex-direction: column; }
    .admin-stats { grid-template-columns: 1fr 1fr; }
    .form-grid { grid-template-columns: 1fr; }
    .full-span { grid-column: auto; }
    .upload-form { align-items: stretch; flex-direction: column; }
}
