:root {
    --bg-dark: #0a0a0a;
    --panel-dark: #141414;
    --logo-red: #5c1313;
    --logo-red-glow: rgba(92, 19, 19, 0.6);
    --hud-red: #ff3b30;
    --hud-red-soft: rgba(255, 59, 48, 0.55);
    --text-light: #e5e5e5;
    --text-dim: #a0a0a0;
    --frost-blue: #e0f7fa;
    --frost-glow: rgba(0, 229, 255, 0.2);
}

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

body {
    background-color: var(--bg-dark);
    color: var(--text-light);
    font-family: 'Roboto', sans-serif;
    line-height: 1.6;
    overflow-x: hidden;
    background-image: radial-gradient(circle at 50% 20%, var(--logo-red-glow) 0%, transparent 50%);
}

h1, h2, h3, .nav-links {
    font-family: 'Orbitron', sans-serif;
    text-transform: uppercase;
    letter-spacing: 2px;
}

/* Global scanline overlay for CRT/HUD feel */
.scanlines {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 900;
    background: repeating-linear-gradient(
        to bottom,
        rgba(255, 255, 255, 0.025) 0px,
        rgba(255, 255, 255, 0.025) 1px,
        transparent 1px,
        transparent 3px
    );
    mix-blend-mode: overlay;
    opacity: 0.6;
}

/* Header & Navigation */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 50px;
    background: rgba(10, 10, 10, 0.9);
    backdrop-filter: blur(10px);
    border-bottom: 2px solid var(--logo-red);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 100;
}

.clan-brand {
    display: flex;
    align-items: center;
    gap: 15px;
}

.clan-logo-img {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 0 10px var(--logo-red-glow);
    object-fit: cover;
}

.clan-brand h1 {
    font-size: 1.5rem;
}

.logo-placeholder {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid var(--text-light);
    background: var(--logo-red);
    box-shadow: 0 0 10px var(--logo-red-glow);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Orbitron', sans-serif;
    font-weight: 900;
}

.nav-links {
    display: flex;
    align-items: center;
}

nav a {
    color: var(--text-light);
    text-decoration: none;
    margin-left: 24px;
    font-size: 0.85rem;
    position: relative;
    padding-bottom: 4px;
    transition: color 0.3s, text-shadow 0.3s;
}

nav a::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    width: 0;
    height: 2px;
    background: var(--hud-red);
    box-shadow: 0 0 8px var(--hud-red-soft);
    transition: width 0.3s ease;
}

nav a:hover,
nav a:focus-visible {
    color: #ff5c52;
    text-shadow: 0 0 8px rgba(255, 51, 51, 0.6);
    outline: none;
}

nav a:hover::after,
nav a:focus-visible::after {
    width: 100%;
}

/* Hero Section */
.hero {
    position: relative;
    height: 72vh;
    min-height: 460px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 0 20px;
    margin-top: 80px;
    overflow: hidden;
}

/* Perspective HUD grid floor behind the hero */
.hero-grid {
    position: absolute;
    inset: 0;
    pointer-events: none;
    background-image:
        linear-gradient(rgba(255, 59, 48, 0.12) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 59, 48, 0.12) 1px, transparent 1px);
    background-size: 46px 46px;
    mask-image: radial-gradient(ellipse 80% 60% at 50% 45%, #000 30%, transparent 75%);
    -webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 45%, #000 30%, transparent 75%);
    opacity: 0.7;
}

.hero-reticle {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 460px;
    height: 460px;
    transform: translate(-50%, -50%);
    color: var(--hud-red);
    opacity: 0.12;
    pointer-events: none;
}

.hero-reticle svg {
    width: 100%;
    height: 100%;
    animation: reticle-spin 40s linear infinite;
    filter: drop-shadow(0 0 12px var(--hud-red-soft));
}

@keyframes reticle-spin {
    to { transform: rotate(360deg); }
}

.hero-status {
    position: relative;
    z-index: 2;
    font-family: 'Share Tech Mono', monospace;
    letter-spacing: 3px;
    font-size: 0.8rem;
    color: var(--hud-red);
    margin-bottom: 22px;
    padding: 6px 16px;
    border: 1px solid rgba(255, 59, 48, 0.35);
    border-radius: 2px;
    background: rgba(255, 59, 48, 0.05);
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.hero-status .dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--hud-red);
    box-shadow: 0 0 10px var(--hud-red);
    animation: blink 1.6s steps(1) infinite;
}

@keyframes blink {
    50% { opacity: 0.25; }
}

.hero h1 {
    position: relative;
    z-index: 2;
    font-size: 4.5rem;
    font-weight: 900;
    margin-bottom: 15px;
    text-shadow: 0 0 25px var(--logo-red-glow);
    background: linear-gradient(to bottom, #ffffff, #999);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero p {
    position: relative;
    z-index: 2;
    font-size: 1.2rem;
    color: var(--text-dim);
    max-width: 700px;
    margin-bottom: 30px;
}

.hero-readout {
    position: relative;
    z-index: 2;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 14px;
    font-family: 'Share Tech Mono', monospace;
    font-size: 0.8rem;
    letter-spacing: 2px;
    color: var(--text-dim);
}

.hero-readout span {
    color: #ff8078;
    opacity: 0.85;
}

/* Main Layout Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 40px;
    align-items: start;
}

@media (max-width: 850px) {
    .grid {
        grid-template-columns: 1fr;
    }
    .hero h1 {
        font-size: 2.6rem;
    }
    header {
        padding: 16px 20px;
    }
    .clan-brand h1 {
        font-size: 1.15rem;
    }
    nav a {
        margin-left: 16px;
    }
}

@media (max-width: 480px) {
    header {
        flex-wrap: wrap;
        gap: 10px 0;
        justify-content: center;
        padding: 14px 16px;
    }
    .nav-links {
        width: 100%;
        justify-content: center;
    }
    nav a {
        margin: 0 10px;
        font-size: 0.78rem;
    }
    .hero {
        margin-top: 110px;
    }
}

/* Content Cards */
.card {
    position: relative;
    background: var(--panel-dark);
    border: 1px solid #222;
    border-left: 4px solid var(--logo-red);
    padding: 34px 30px 30px;
    margin-bottom: 30px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.5);
    /* Clipped HUD corner */
    clip-path: polygon(0 0, calc(100% - 18px) 0, 100% 18px, 100% 100%, 0 100%);
}

.card-tag {
    position: absolute;
    top: 12px;
    right: 20px;
    font-family: 'Share Tech Mono', monospace;
    font-size: 0.72rem;
    letter-spacing: 2px;
    color: var(--hud-red);
    opacity: 0.7;
}

.card h2 {
    margin-bottom: 20px;
    border-bottom: 1px solid #333;
    padding-bottom: 10px;
    color: #ffffff;
}

.roster-list {
    list-style: none;
    margin-top: 15px;
}

.roster-list li {
    padding: 12px 0;
    border-bottom: 1px solid #1f1f1f;
    color: #d1d1d1;
    font-family: 'Share Tech Mono', monospace;
    letter-spacing: 1px;
}

.roster-list li::before {
    content: "> ";
    color: var(--hud-red);
    opacity: 0.6;
}

.roster-member {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.roster-member .callsign {
    font-family: 'Orbitron', sans-serif;
    letter-spacing: 2px;
    color: #ffffff;
    text-shadow: 0 0 10px var(--hud-red-soft);
}

.roster-member .member-tag {
    font-family: 'Share Tech Mono', monospace;
    font-size: 0.68rem;
    letter-spacing: 2px;
    color: var(--hud-red);
    border: 1px solid rgba(255, 59, 48, 0.4);
    padding: 2px 8px;
    border-radius: 2px;
}

.roster-member::before {
    content: "";
}

/* Memorial Section (now a link to the tribute page) */
.memorial-card {
    position: sticky;
    top: 120px;
    display: block;
    text-decoration: none;
    color: inherit;
    background:
        radial-gradient(ellipse 90% 55% at 50% 0%, rgba(0, 229, 255, 0.12) 0%, transparent 70%),
        linear-gradient(160deg, #12191b, #0d1416);
    border: 1px solid rgba(0, 229, 255, 0.22);
    border-top: 4px solid #00e5ff;
    padding: 34px 28px 30px;
    border-radius: 4px;
    text-align: center;
    box-shadow: 0 0 25px var(--frost-glow), inset 0 1px 0 rgba(0, 229, 255, 0.15);
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
    overflow: hidden;
}

.memorial-card:hover,
.memorial-card:focus-visible {
    transform: translateY(-4px);
    box-shadow: 0 0 45px rgba(0, 229, 255, 0.42), inset 0 1px 0 rgba(0, 229, 255, 0.25);
    border-color: rgba(0, 229, 255, 0.5);
    outline: none;
}

/* Drawn memorial insignia — reticle locked on a guiding star */
.memorial-insignia {
    display: block;
    width: 62px;
    height: 62px;
    margin: 4px auto 14px;
    color: #00e5ff;
    filter: drop-shadow(0 0 10px var(--frost-glow));
}

.memorial-insignia svg {
    width: 100%;
    height: 100%;
    animation: insignia-spin 48s linear infinite;
}

.memorial-insignia svg path:last-child {
    /* keep the guiding star upright while the reticle rotates */
    transform-box: fill-box;
    transform-origin: center;
    animation: insignia-spin 48s linear infinite reverse;
}

@keyframes insignia-spin {
    to { transform: rotate(360deg); }
}

.memorial-eyebrow {
    display: block;
    font-family: 'Share Tech Mono', monospace;
    font-size: 0.66rem;
    letter-spacing: 3px;
    color: #7fd7e0;
    opacity: 0.75;
    margin-bottom: 8px;
}

/* Thin divider with a centered diamond, under the callsign */
.memorial-divider {
    display: block;
    width: 70%;
    height: 1px;
    margin: 18px auto 22px;
    background: linear-gradient(90deg, transparent, rgba(0, 229, 255, 0.5), transparent);
    position: relative;
}

.memorial-divider::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 7px;
    height: 7px;
    transform: translate(-50%, -50%) rotate(45deg);
    background: #00e5ff;
    box-shadow: 0 0 8px var(--frost-glow);
}

/* Animated HUD corner brackets that light up on hover */
.memorial-corner {
    position: absolute;
    width: 18px;
    height: 18px;
    border: 2px solid #00e5ff;
    opacity: 0.5;
    transition: opacity 0.3s ease, width 0.3s ease, height 0.3s ease;
}
.memorial-corner.tl { top: 8px; left: 8px; border-right: none; border-bottom: none; }
.memorial-corner.tr { top: 8px; right: 8px; border-left: none; border-bottom: none; }
.memorial-corner.bl { bottom: 8px; left: 8px; border-right: none; border-top: none; }
.memorial-corner.br { bottom: 8px; right: 8px; border-left: none; border-top: none; }

.memorial-card:hover .memorial-corner,
.memorial-card:focus-visible .memorial-corner {
    opacity: 1;
    width: 24px;
    height: 24px;
}

.memorial-card h2 {
    color: var(--frost-blue);
    text-shadow: 0 0 10px rgba(0, 229, 255, 0.4);
    margin-bottom: 20px;
    font-size: 1.2rem;
    font-family: 'Orbitron', sans-serif;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.memorial-name {
    font-family: 'Orbitron', sans-serif;
    font-size: 2rem;
    font-weight: 900;
    letter-spacing: 2px;
    margin-bottom: 4px;
    background: linear-gradient(to bottom, #ffffff, #a9d9e0);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 0 22px rgba(0, 229, 255, 0.25);
}

.memorial-quote {
    color: #c0ccd1;
    font-style: italic;
    font-size: 1.05rem;
    line-height: 1.7;
}

.memorial-footer {
    font-size: 0.85rem;
    color: var(--text-dim);
}

/* Birthday remembrance line — revealed only on FROST's birthday */
.memorial-birthday {
    margin-top: 22px;
    padding: 12px 18px;
    font-family: 'Orbitron', sans-serif;
    font-size: 0.95rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--frost-blue);
    border: 1px solid rgba(0, 229, 255, 0.35);
    background: rgba(0, 229, 255, 0.06);
    text-shadow: 0 0 12px var(--frost-glow);
}

.memorial-birthday[hidden] { display: none; }

.memorial-birthday-age { font-weight: 900; }

.memorial-enter {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 26px;
    font-family: 'Share Tech Mono', monospace;
    font-size: 0.8rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: #00e5ff;
}

.memorial-enter svg {
    width: 16px;
    height: 16px;
    transition: transform 0.3s ease;
}

.memorial-card:hover .memorial-enter svg,
.memorial-card:focus-visible .memorial-enter svg {
    transform: translateX(5px);
}

/* Footer */
footer {
    text-align: center;
    padding: 50px 20px;
    color: var(--text-dim);
    border-top: 1px solid #1c1c1c;
    margin-top: 80px;
    font-size: 0.9rem;
    font-family: 'Orbitron', sans-serif;
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001ms !important;
    }
}
