/* ===== Swarm EFI — Shared Theme ===== */

:root {
    --deep: #0b1026;
    --mid: #162044;
    --accent: #4ea8de;
    --accent2: #7dd3fc;
    --glow: rgba(78, 168, 222, 0.15);
    --text: #e2e8f0;
    --text-dim: #94a3b8;
    --nav-height: 3.25rem;
}

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

body {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    background: var(--deep);
    color: var(--text);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Subtle star-field background */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    background:
        radial-gradient(1px 1px at 10% 20%, rgba(255,255,255,0.5), transparent),
        radial-gradient(1px 1px at 30% 65%, rgba(255,255,255,0.4), transparent),
        radial-gradient(1px 1px at 55% 15%, rgba(255,255,255,0.3), transparent),
        radial-gradient(1px 1px at 70% 80%, rgba(255,255,255,0.5), transparent),
        radial-gradient(1px 1px at 85% 35%, rgba(255,255,255,0.4), transparent),
        radial-gradient(1px 1px at 20% 90%, rgba(255,255,255,0.3), transparent),
        radial-gradient(1px 1px at 45% 45%, rgba(255,255,255,0.2), transparent),
        radial-gradient(1px 1px at 92% 60%, rgba(255,255,255,0.4), transparent),
        radial-gradient(1.5px 1.5px at 60% 50%, rgba(255,255,255,0.6), transparent),
        radial-gradient(1.5px 1.5px at 5% 55%, rgba(255,255,255,0.5), transparent);
    pointer-events: none;
    z-index: 0;
}

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent2); text-decoration: underline; }

/* ===== Nav Bar ===== */
.site-nav {
    position: sticky;
    top: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: var(--nav-height);
    padding: 0 1.5rem;
    background: rgba(11, 16, 38, 0.92);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(78, 168, 222, 0.15);
}

.site-nav .nav-brand {
    font-weight: 700;
    font-size: 1rem;
    color: var(--text);
    text-decoration: none;
    letter-spacing: -0.01em;
}

.site-nav .nav-brand span { color: var(--accent); }

.nav-links {
    display: flex;
    list-style: none;
    gap: 1.75rem;
}

.nav-links a {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-dim);
    text-decoration: none;
    transition: color 0.15s;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--accent);
    text-decoration: none;
}

.nav-hamburger {
    display: none;
    background: none;
    border: none;
    color: var(--text);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.25rem;
}

/* ===== Header (landing page) ===== */
header {
    position: relative;
    z-index: 1;
    text-align: center;
    padding: 3rem 1.5rem 2rem;
    background: linear-gradient(180deg, var(--mid) 0%, transparent 100%);
}

header .orbit-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    border: 2px solid var(--accent);
    margin-bottom: 1.25rem;
    position: relative;
    box-shadow: 0 0 30px var(--glow);
}

header .orbit-icon svg {
    width: 40px;
    height: 40px;
}

header .orbit-icon::after {
    content: '';
    position: absolute;
    width: 8px;
    height: 8px;
    background: var(--accent2);
    border-radius: 50%;
    box-shadow: 0 0 6px var(--accent2);
    animation: orbit 4s linear infinite;
}

@keyframes orbit {
    from { transform: rotate(0deg) translateX(44px) rotate(0deg); }
    to   { transform: rotate(360deg) translateX(44px) rotate(-360deg); }
}

h1 {
    font-size: 2.25rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: 0.35rem;
}

h1 span { color: var(--accent); }

header p.subtitle {
    font-size: 1.1rem;
    color: var(--text-dim);
    max-width: 520px;
    margin: 0 auto;
}

/* ===== Main Content ===== */
main {
    position: relative;
    z-index: 1;
    flex: 1;
    max-width: 960px;
    width: 100%;
    margin: 0 auto;
    padding: 1rem 1.5rem 3rem;
}

/* ===== Content Panel (glass-morphism box) ===== */
.content-panel {
    background: linear-gradient(135deg, rgba(22,32,68,0.8), rgba(11,16,38,0.6));
    border: 1px solid rgba(78,168,222,0.2);
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 2rem;
    backdrop-filter: blur(8px);
}

.content-panel h2 {
    font-size: 1.25rem;
    color: var(--accent2);
    margin-bottom: 1rem;
}

.content-panel p {
    line-height: 1.7;
    color: var(--text-dim);
    margin-bottom: 0.75rem;
}

.content-panel p:last-child { margin-bottom: 0; }
.content-panel strong { color: var(--text); }

/* ===== Info (landing page about section) ===== */
.info {
    background: linear-gradient(135deg, rgba(22,32,68,0.8), rgba(11,16,38,0.6));
    border: 1px solid rgba(78,168,222,0.2);
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 2.5rem;
    backdrop-filter: blur(8px);
}

.info h2 {
    font-size: 1.25rem;
    color: var(--accent2);
    margin-bottom: 1rem;
}

.info p {
    line-height: 1.7;
    color: var(--text-dim);
    margin-bottom: 0.75rem;
}

.info p:last-child { margin-bottom: 0; }
.info strong { color: var(--text); }

/* Specs grid */
.specs {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
    margin-top: 1.5rem;
}

.spec-item {
    background: rgba(78,168,222,0.06);
    border: 1px solid rgba(78,168,222,0.12);
    border-radius: 8px;
    padding: 1rem;
    text-align: center;
}

.spec-item .value {
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--accent);
}

.spec-item .label {
    font-size: 0.8rem;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-top: 0.25rem;
}

/* ===== Cards (landing page) ===== */
.cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

.card {
    display: flex;
    flex-direction: column;
    background: linear-gradient(135deg, rgba(22,32,68,0.85), rgba(11,16,38,0.7));
    border: 1px solid rgba(78,168,222,0.2);
    border-radius: 12px;
    padding: 2rem;
    text-decoration: none;
    color: inherit;
    transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;
    backdrop-filter: blur(8px);
}

.card:hover {
    transform: translateY(-4px);
    border-color: var(--accent);
    box-shadow: 0 8px 32px var(--glow);
    text-decoration: none;
}

.card .card-icon {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    background: rgba(78,168,222,0.12);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.25rem;
}

.card .card-icon svg {
    width: 24px;
    height: 24px;
    stroke: var(--accent);
}

.card h3 {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
}

.card p {
    color: var(--text-dim);
    font-size: 0.95rem;
    line-height: 1.6;
    flex: 1;
}

.card .arrow {
    margin-top: 1.25rem;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--accent);
}

.card:hover .arrow { gap: 0.65rem; }
.arrow { transition: gap 0.2s; }

/* ===== Page Heading (inner pages) ===== */
.page-heading {
    position: relative;
    z-index: 1;
    text-align: center;
    padding: 2.5rem 1.5rem 1.5rem;
    background: linear-gradient(180deg, var(--mid) 0%, transparent 100%);
}

.page-heading h1 {
    font-size: 1.75rem;
    margin-bottom: 0.25rem;
}

.page-heading p {
    color: var(--text-dim);
    font-size: 0.95rem;
}

/* ===== Breadcrumb ===== */
.breadcrumb {
    font-size: 0.85rem;
    color: var(--text-dim);
    margin-bottom: 1.5rem;
}

.breadcrumb a { color: var(--accent); }
.breadcrumb span { margin: 0 0.4rem; opacity: 0.5; }

/* ===== Styled Lists (SwarmMovies) ===== */
.listing {
    list-style: none;
    padding: 0;
}

.listing li {
    padding: 0.55rem 0.75rem;
    border-bottom: 1px solid rgba(78, 168, 222, 0.08);
    transition: background 0.15s;
}

.listing li:hover {
    background: rgba(78, 168, 222, 0.06);
    border-radius: 6px;
}

.listing li a {
    color: var(--accent);
    text-decoration: none;
    font-weight: 500;
}

.listing li a:hover { color: var(--accent2); text-decoration: none; }

.listing .meta {
    font-size: 0.8rem;
    color: var(--text-dim);
    margin-left: 0.5rem;
}

/* Year group separators */
.year-heading {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--accent2);
    margin-top: 1.75rem;
    margin-bottom: 0.5rem;
    padding-bottom: 0.35rem;
    border-bottom: 1px solid rgba(78, 168, 222, 0.15);
}

.year-heading:first-child { margin-top: 0; }

/* Date group separator within video listing */
.date-heading {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text);
    margin-top: 1.25rem;
    margin-bottom: 0.35rem;
    padding-bottom: 0.25rem;
    border-bottom: 1px solid rgba(78, 168, 222, 0.08);
}

.date-heading:first-child { margin-top: 0; }

/* Section separator within listings */
.section-label {
    font-size: 1rem;
    font-weight: 600;
    color: var(--accent2);
    margin-top: 2rem;
    margin-bottom: 0.75rem;
}

/* ===== Collapsible Panel ===== */
details.help-panel {
    margin-bottom: 1.5rem;
}

details.help-panel summary {
    cursor: pointer;
    font-weight: 600;
    color: var(--accent);
    font-size: 0.95rem;
    padding: 0.5rem 0;
}

details.help-panel summary:hover { color: var(--accent2); }

details.help-panel .help-content {
    padding: 1rem 0 0.5rem;
    color: var(--text-dim);
    font-size: 0.9rem;
    line-height: 1.7;
}

details.help-panel .help-content p { margin-bottom: 0.5rem; }
details.help-panel .help-content kbd {
    display: inline-block;
    background: rgba(78, 168, 222, 0.1);
    border: 1px solid rgba(78, 168, 222, 0.2);
    border-radius: 4px;
    padding: 0.1rem 0.4rem;
    font-family: inherit;
    font-size: 0.85em;
    color: var(--accent2);
}

/* ===== Video Player ===== */
#video-container {
    margin-bottom: 1.5rem;
}

#video-container video {
    display: block;
    width: 100%;
    max-width: 1200px;
    border-radius: 8px;
    background: #000;
}

#video-controls {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    padding: 0.75rem 0;
    margin-top: 0.5rem;
}

#video-controls button {
    background: rgba(78, 168, 222, 0.12);
    border: 1px solid rgba(78, 168, 222, 0.25);
    color: var(--accent);
    font-size: 0.85rem;
    font-weight: 600;
    padding: 0.4rem 0.85rem;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s;
}

#video-controls button:hover {
    background: rgba(78, 168, 222, 0.22);
    border-color: var(--accent);
}

/* Seek bar */
#seek-bar {
    flex: 1;
    min-width: 120px;
    height: 6px;
    -webkit-appearance: none;
    appearance: none;
    background: rgba(78, 168, 222, 0.15);
    border-radius: 3px;
    outline: none;
    cursor: pointer;
}

#seek-bar::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--accent);
    border: 2px solid var(--accent2);
    cursor: pointer;
}

#seek-bar::-moz-range-thumb {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--accent);
    border: 2px solid var(--accent2);
    cursor: pointer;
}

/* ===== Form Controls ===== */
select, button.form-btn {
    background: rgba(22, 32, 68, 0.8);
    border: 1px solid rgba(78, 168, 222, 0.25);
    color: var(--text);
    font-size: 0.9rem;
    padding: 0.45rem 0.75rem;
    border-radius: 6px;
    cursor: pointer;
}

select:focus, button.form-btn:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 2px var(--glow);
}

/* ===== Footer ===== */
footer {
    position: relative;
    z-index: 1;
    text-align: center;
    padding: 1.5rem;
    color: var(--text-dim);
    font-size: 0.8rem;
    border-top: 1px solid rgba(78,168,222,0.1);
    margin-top: auto;
}

footer a { color: var(--accent); text-decoration: none; }
footer a:hover { text-decoration: underline; }

/* ===== Responsive ===== */
@media (max-width: 600px) {
    header { padding: 2rem 1rem 1.5rem; }
    .page-heading { padding: 2rem 1rem 1rem; }
    h1 { font-size: 1.6rem; }
    .page-heading h1 { font-size: 1.4rem; }
    .info, .content-panel { padding: 1.25rem; }
    main { padding: 1rem 1rem 2rem; }

    .nav-links {
        display: none;
        flex-direction: column;
        position: absolute;
        top: var(--nav-height);
        left: 0;
        right: 0;
        background: rgba(11, 16, 38, 0.97);
        border-bottom: 1px solid rgba(78, 168, 222, 0.15);
        padding: 1rem 1.5rem;
        gap: 0.75rem;
    }

    .nav-links.open { display: flex; }
    .nav-hamburger { display: block; }

    #video-controls { gap: 0.35rem; }
    #video-controls button { padding: 0.35rem 0.6rem; font-size: 0.8rem; }
}
