:root {
    --bg: #050a12;
    --bg-deep: #02050a;
    --bg-panel: #0d1725;
    --bg-panel-alt: #121f30;
    --border-frost: #23415a;
    --border-frost-bright: #3d6c8f;
    --ice: #7fd4ff;
    --ice-soft: #b7e6ff;
    --gold: #d9b06a;
    --gold-bright: #f3cd85;
    --text: #dfe9f2;
    --text-dim: #90a5b8;
    --error: #ff9393;
    --success: #8bffb0;
    --shadow: rgba(0, 0, 0, 0.45);
}

* {
    box-sizing: border-box;
}

html {
    background: var(--bg-deep);
}

body {
    margin: 0;
    position: relative;
    color: var(--text);
    font-family: "Open Sans", "Segoe UI", sans-serif;
    line-height: 1.65;
    background:
        radial-gradient(ellipse 900px 500px at 50% -8%, rgba(127, 212, 255, 0.14), transparent 60%),
        radial-gradient(ellipse 700px 500px at 90% 15%, rgba(63, 100, 130, 0.12), transparent 55%),
        radial-gradient(ellipse 700px 500px at 5% 30%, rgba(63, 100, 130, 0.10), transparent 55%),
        linear-gradient(180deg, var(--bg) 0%, #030710 60%, var(--bg-deep) 100%);
    background-attachment: fixed;
    overflow-x: hidden;
}

body::before {
    /* subtle grain, keeps flat gradients from looking sterile/digital */
    content: "";
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    opacity: 0.05;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='120' height='120'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
}

h1, h2, h3 {
    font-family: "Cinzel", "Georgia", serif;
    color: var(--gold-bright);
    letter-spacing: 0.02em;
    margin: 0 0 0.5em;
}

a {
    color: var(--ice);
    text-decoration: none;
}

code {
    font-family: "Consolas", "Menlo", monospace;
    background: #030609;
    color: var(--ice-soft);
    padding: 0.15em 0.5em;
    border-radius: 4px;
    border: 1px solid var(--border-frost);
}

.wrap {
    max-width: 960px;
    margin: 0 auto;
    padding: 0 1.5rem;
    position: relative;
    z-index: 1;
}

/* Snowfall */
.snowfall {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
}

.snowfall span {
    position: absolute;
    top: -5vh;
    width: 3px;
    height: 3px;
    border-radius: 50%;
    background: var(--ice-soft);
    opacity: 0.55;
    filter: drop-shadow(0 0 2px rgba(183, 230, 255, 0.6));
    animation: fall linear infinite;
}

.snowfall span:nth-child(3n) { width: 2px; height: 2px; opacity: 0.35; }
.snowfall span:nth-child(5n) { width: 4px; height: 4px; opacity: 0.4; }

@keyframes fall {
    from { transform: translateY(-5vh) translateX(0); }
    to { transform: translateY(105vh) translateX(var(--drift, 40px)); }
}

.snowfall span:nth-child(1)  { left: 3%;  animation-duration: 18s; animation-delay: -1s;  --drift: 30px; }
.snowfall span:nth-child(2)  { left: 9%;  animation-duration: 22s; animation-delay: -6s;  --drift: -20px; }
.snowfall span:nth-child(3)  { left: 14%; animation-duration: 15s; animation-delay: -3s;  --drift: 50px; }
.snowfall span:nth-child(4)  { left: 20%; animation-duration: 26s; animation-delay: -12s; --drift: -40px; }
.snowfall span:nth-child(5)  { left: 27%; animation-duration: 19s; animation-delay: -8s;  --drift: 20px; }
.snowfall span:nth-child(6)  { left: 33%; animation-duration: 24s; animation-delay: -2s;  --drift: -30px; }
.snowfall span:nth-child(7)  { left: 39%; animation-duration: 17s; animation-delay: -15s; --drift: 40px; }
.snowfall span:nth-child(8)  { left: 45%; animation-duration: 21s; animation-delay: -5s;  --drift: -15px; }
.snowfall span:nth-child(9)  { left: 51%; animation-duration: 16s; animation-delay: -9s;  --drift: 25px; }
.snowfall span:nth-child(10) { left: 57%; animation-duration: 23s; animation-delay: -18s; --drift: -35px; }
.snowfall span:nth-child(11) { left: 63%; animation-duration: 20s; animation-delay: -4s;  --drift: 15px; }
.snowfall span:nth-child(12) { left: 69%; animation-duration: 27s; animation-delay: -11s; --drift: -25px; }
.snowfall span:nth-child(13) { left: 75%; animation-duration: 18s; animation-delay: -7s;  --drift: 45px; }
.snowfall span:nth-child(14) { left: 81%; animation-duration: 25s; animation-delay: -14s; --drift: -20px; }
.snowfall span:nth-child(15) { left: 87%; animation-duration: 19s; animation-delay: -1s;  --drift: 30px; }
.snowfall span:nth-child(16) { left: 93%; animation-duration: 22s; animation-delay: -10s; --drift: -40px; }
.snowfall span:nth-child(17) { left: 6%;  animation-duration: 29s; animation-delay: -20s; --drift: 20px; }
.snowfall span:nth-child(18) { left: 17%; animation-duration: 16s; animation-delay: -13s; --drift: -30px; }
.snowfall span:nth-child(19) { left: 24%; animation-duration: 21s; animation-delay: -17s; --drift: 35px; }
.snowfall span:nth-child(20) { left: 36%; animation-duration: 28s; animation-delay: -6s;  --drift: -15px; }
.snowfall span:nth-child(21) { left: 48%; animation-duration: 17s; animation-delay: -19s; --drift: 25px; }
.snowfall span:nth-child(22) { left: 60%; animation-duration: 24s; animation-delay: -3s;  --drift: -45px; }
.snowfall span:nth-child(23) { left: 72%; animation-duration: 20s; animation-delay: -16s; --drift: 15px; }
.snowfall span:nth-child(24) { left: 90%; animation-duration: 26s; animation-delay: -9s;  --drift: -25px; }

@media (prefers-reduced-motion: reduce) {
    .snowfall { display: none; }
}

/* Header */
.site-header {
    position: relative;
    z-index: 2;
    border-bottom: 1px solid var(--border-frost);
    background: linear-gradient(180deg, rgba(5, 10, 18, 0.9) 0%, rgba(5, 10, 18, 0.55) 100%);
    backdrop-filter: blur(6px);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.5rem;
}

.brand {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    font-family: "Cinzel", serif;
    font-weight: 700;
    font-size: 1.2rem;
    color: var(--gold-bright);
}

.brand-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 1px solid var(--gold);
    box-shadow: 0 0 10px rgba(217, 176, 106, 0.35);
}

nav {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

nav a {
    color: var(--text-dim);
    font-weight: 600;
    transition: color 0.15s ease;
}

nav a:hover {
    color: var(--ice-soft);
}

nav a.cta {
    color: #08131f;
    background: linear-gradient(180deg, var(--gold-bright), var(--gold));
    padding: 0.55rem 1.15rem;
    border-radius: 6px;
    box-shadow: 0 2px 10px rgba(217, 176, 106, 0.25);
}

nav a.cta:hover {
    filter: brightness(1.08);
}

/* Hero */
.hero {
    position: relative;
    min-height: 620px;
    display: flex;
    align-items: center;
    overflow: hidden;
    border-bottom: 1px solid var(--border-frost);
    background-image: url("../img/hero-arthas.jpg");
    background-size: cover;
    background-position: 78% 30%;
}

.hero-fog {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(2, 5, 10, 0.94) 0%, rgba(2, 5, 10, 0.8) 32%, rgba(2, 5, 10, 0.35) 58%, rgba(2, 5, 10, 0.05) 78%),
        linear-gradient(180deg, rgba(2, 5, 10, 0.35) 0%, transparent 25%, transparent 70%, rgba(2, 5, 10, 0.75) 100%);
    pointer-events: none;
}

.hero-copy {
    position: relative;
    max-width: 560px;
    text-align: left;
    padding: 3rem 1.5rem;
    padding-left: clamp(1.5rem, 7vw, 6rem);
}

.eyebrow {
    text-transform: uppercase;
    letter-spacing: 0.28em;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--ice-soft);
    margin: 0 0 0.6rem;
}

.hero h1 {
    font-size: 3rem;
    text-shadow: 0 0 28px rgba(127, 212, 255, 0.35), 0 3px 16px rgba(0, 0, 0, 0.7);
}

.tagline {
    font-size: 1.15rem;
    color: var(--text-dim);
    max-width: 32em;
    margin: 0 0 2rem;
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.7);
}

.class-strip {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    margin-top: 2.5rem;
}

.class-strip img {
    width: 42px;
    height: 42px;
    border-radius: 8px;
    border: 1px solid var(--border-frost);
    opacity: 0.8;
    transition: transform 0.15s ease, opacity 0.15s ease, border-color 0.15s ease;
}

.class-strip img:hover {
    transform: translateY(-3px);
    opacity: 1;
    border-color: var(--gold);
}

/* Buttons */
.btn {
    display: inline-block;
    font-weight: 600;
    padding: 0.8rem 1.9rem;
    border-radius: 8px;
    border: 1px solid transparent;
    cursor: pointer;
    font-size: 1rem;
    transition: filter 0.15s ease, transform 0.15s ease, border-color 0.15s ease;
}

.btn-primary {
    color: #08131f;
    background: linear-gradient(180deg, var(--gold-bright), var(--gold));
    box-shadow: 0 4px 18px rgba(217, 176, 106, 0.25);
}

.btn-primary:hover {
    filter: brightness(1.08);
    transform: translateY(-1px);
}

.btn-secondary {
    color: var(--ice-soft);
    background: rgba(127, 212, 255, 0.04);
    border-color: var(--border-frost);
}

.btn-secondary:hover {
    border-color: var(--ice);
}

/* Steps */
.steps {
    padding: 4rem 1.5rem;
}

.steps h2 {
    text-align: center;
    font-size: 1.8rem;
    margin-bottom: 2.25rem;
}

.step-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.25rem;
}

.step-card {
    position: relative;
    background: linear-gradient(180deg, var(--bg-panel-alt), var(--bg-panel));
    border: 1px solid var(--border-frost);
    border-radius: 10px;
    padding: 1.6rem;
    box-shadow: 0 10px 30px var(--shadow);
    transition: border-color 0.15s ease, transform 0.15s ease;
}

.step-card:hover {
    border-color: var(--border-frost-bright);
    transform: translateY(-2px);
}

.step-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(127, 212, 255, 0.12);
    border: 1px solid var(--ice);
    color: var(--ice-soft);
    font-weight: 700;
    margin-bottom: 0.75rem;
}

.step-card p {
    color: var(--text-dim);
}

/* Forms */
.form-section {
    padding: 4rem 1.5rem;
    max-width: 480px;
}

.subtitle {
    color: var(--text-dim);
    margin-bottom: 2rem;
}

.account-form {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    background: linear-gradient(180deg, var(--bg-panel-alt), var(--bg-panel));
    border: 1px solid var(--border-frost);
    border-radius: 12px;
    padding: 2.25rem;
    box-shadow: 0 16px 40px var(--shadow);
}

.account-form label {
    font-weight: 600;
    color: var(--ice-soft);
    margin-top: 0.85rem;
}

.account-form input {
    width: 100%;
    padding: 0.7rem 0.85rem;
    border-radius: 6px;
    border: 1px solid var(--border-frost);
    background: #030609;
    color: var(--text);
    font-size: 1rem;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.account-form input:focus {
    outline: none;
    border-color: var(--ice);
    box-shadow: 0 0 0 3px rgba(127, 212, 255, 0.12);
}

.account-form .btn {
    margin-top: 1.6rem;
}

.field-error {
    color: var(--error);
    font-size: 0.9rem;
    margin: 0.15rem 0 0;
}

/* Honeypot: off-screen rather than display:none, since some bots skip
   fields hidden that obviously */
.hp-field {
    position: absolute;
    left: -9999px;
    top: -9999px;
}

/* Flash messages */
.flash-wrap {
    padding-top: 1.5rem;
}

.flash {
    padding: 0.85rem 1.1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    font-weight: 600;
}

.flash-error {
    background: rgba(255, 147, 147, 0.1);
    border: 1px solid var(--error);
    color: var(--error);
}

.flash-success {
    background: rgba(139, 255, 176, 0.1);
    border: 1px solid var(--success);
    color: var(--success);
}

/* Success page */
.success {
    text-align: center;
    max-width: 560px;
}

.success-icon {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    border: 1px solid var(--gold);
    box-shadow: 0 0 24px rgba(127, 212, 255, 0.3);
    margin-bottom: 1rem;
}

.reminder-card {
    background: linear-gradient(180deg, var(--bg-panel-alt), var(--bg-panel));
    border: 1px solid var(--border-frost);
    border-radius: 10px;
    padding: 1.25rem;
    margin: 1.5rem 0 2rem;
    color: var(--text-dim);
}

/* Footer */
.site-footer {
    position: relative;
    z-index: 1;
    border-top: 1px solid var(--border-frost);
    padding: 2rem 0;
    margin-top: 2rem;
}

.site-footer p {
    color: var(--text-dim);
    font-size: 0.9rem;
    text-align: center;
}

/* Admin */
.admin-whoami {
    color: var(--text-dim);
    font-size: 0.85rem;
    letter-spacing: 0.04em;
}

.inline-form {
    display: inline;
}

.link-button {
    background: none;
    border: none;
    padding: 0;
    color: var(--text-dim);
    font-weight: 600;
    font-family: inherit;
    font-size: inherit;
    cursor: pointer;
}

.link-button:hover {
    color: var(--ice-soft);
}

.admin-section {
    padding: 3rem 1.5rem 4rem;
}

.admin-panel {
    background: linear-gradient(180deg, var(--bg-panel-alt), var(--bg-panel));
    border: 1px solid var(--border-frost);
    border-radius: 12px;
    padding: 1.75rem;
    margin-bottom: 1.5rem;
}

.admin-panel h2 {
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
}

.admin-panel .account-form {
    background: none;
    border: none;
    padding: 0;
    box-shadow: none;
    max-width: 420px;
}

.server-status {
    white-space: pre-wrap;
    font-family: "Consolas", "Menlo", monospace;
    color: var(--ice-soft);
    background: #030609;
    border: 1px solid var(--border-frost);
    border-radius: 8px;
    padding: 1rem;
    font-size: 0.9rem;
}

.search-form {
    display: flex;
    gap: 0.6rem;
    margin-bottom: 1.5rem;
    max-width: 420px;
}

.search-form input {
    flex: 1;
    padding: 0.6rem 0.75rem;
    border-radius: 6px;
    border: 1px solid var(--border-frost);
    background: #030609;
    color: var(--text);
}

.table-wrap {
    overflow-x: auto;
    border: 1px solid var(--border-frost);
    border-radius: 12px;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 720px;
}

.admin-table th,
.admin-table td {
    text-align: left;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--border-frost);
    font-size: 0.9rem;
    white-space: nowrap;
}

.admin-table th {
    color: var(--ice-soft);
    font-family: "Cinzel", serif;
    font-weight: 600;
    background: var(--bg-panel-alt);
}

.admin-table tbody tr:hover {
    background: rgba(127, 212, 255, 0.04);
}

.manage-account summary {
    cursor: pointer;
    color: var(--ice);
    font-weight: 600;
}

.manage-account[open] {
    padding-bottom: 0.5rem;
}

.manage-account .inline-form {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.6rem;
}

.manage-account input,
.manage-account select {
    padding: 0.4rem 0.6rem;
    border-radius: 6px;
    border: 1px solid var(--border-frost);
    background: #030609;
    color: var(--text);
    font-size: 0.85rem;
}

.btn-small {
    padding: 0.4rem 0.9rem;
    font-size: 0.85rem;
}

/* Responsive */
@media (max-width: 800px) {
    .hero {
        min-height: 520px;
        background-position: 88% 22%;
    }

    .hero-fog {
        background:
            linear-gradient(180deg, rgba(2, 5, 10, 0.5) 0%, rgba(2, 5, 10, 0.55) 55%, rgba(2, 5, 10, 0.92) 100%),
            linear-gradient(90deg, rgba(2, 5, 10, 0.6) 0%, rgba(2, 5, 10, 0.2) 60%, rgba(2, 5, 10, 0) 90%);
    }

    .hero-copy {
        max-width: none;
        text-align: center;
        margin: 0 auto;
        padding: 2rem 1.5rem;
    }

    .tagline {
        margin-left: auto;
        margin-right: auto;
    }

    .class-strip {
        justify-content: center;
    }
}
