:root {
    --bg: #02070c;
    --bg-soft: #07131d;
    --panel: rgba(6, 18, 28, .94);
    --panel-light: rgba(12, 36, 51, .93);
    --ice: #aee7ff;
    --ice-bright: #e8f9ff;
    --ice-blue: #58b9ed;
    --ice-dark: #245b78;
    --text: #c6d3dc;
    --muted: #6f8593;
    --line: rgba(126, 201, 239, .30);
    --danger: #ca858b;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
    min-height: 100vh;
    overflow-x: hidden;
    color: var(--text);
    background:
        radial-gradient(circle at 50% -20%, rgba(68, 174, 235, .16), transparent 34%),
        linear-gradient(180deg, #06111a 0%, #02070c 52%, #010305 100%);
    font-family: "Trebuchet MS", Arial, sans-serif;
}
a { color: inherit; }

/* Lightning flash controlled by main.js */
.storm-flash {
    position: fixed;
    z-index: 999;
    inset: 0;
    pointer-events: none;
    opacity: 0;
    background:
        linear-gradient(115deg, transparent 0 39%, rgba(224, 248, 255, .26) 40%, transparent 41%),
        radial-gradient(circle at 60% 10%, rgba(160, 224, 255, .20), transparent 35%);
    mix-blend-mode: screen;
}
.storm-flash.flash { animation: lightning-flash .48s ease-out; }
@keyframes lightning-flash {
    0% { opacity: 0; }
    12% { opacity: .9; }
    20% { opacity: .08; }
    32% { opacity: .58; }
    45% { opacity: 0; }
    100% { opacity: 0; }
}

/* Header */
.site-header {
    position: relative;
    z-index: 20;
    border-bottom: 1px solid rgba(130, 211, 255, .42);
    background: linear-gradient(180deg, rgba(10, 25, 36, .98), rgba(2, 8, 13, .98));
    box-shadow: 0 8px 34px rgba(0,0,0,.72), 0 1px 18px rgba(64,176,237,.18);
}
.header-inner {
    width: min(1500px, 94%);
    min-height: 92px;
    margin: auto;
    display: flex;
    align-items: center;
    gap: 34px;
}
.brand {
    min-width: 230px;
    text-align: center;
    text-decoration: none;
}
.brand-main {
    display: block;
    color: var(--ice-bright);
    font: 700 31px/1 Georgia, "Times New Roman", serif;
    letter-spacing: 7px;
    text-shadow: 0 2px 2px #000, 0 0 12px rgba(136, 216, 255, .55), 0 0 28px rgba(48, 157, 222, .22);
}
.brand-sub {
    display: block;
    margin-top: 5px;
    padding-left: 7px;
    color: #7695a8;
    font-size: 9px;
    letter-spacing: 8px;
}
.main-nav {
    flex: 1;
    display: flex;
    align-items: stretch;
    justify-content: center;
}
.main-nav a {
    position: relative;
    padding: 38px 18px 34px;
    color: #79909e;
    text-decoration: none;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 2px;
    transition: color .2s ease, text-shadow .2s ease;
}
.main-nav a:hover,
.main-nav a.active {
    color: #e7f8ff;
    text-shadow: 0 0 10px rgba(100,202,255,.55);
}
.main-nav a:hover::after,
.main-nav a.active::after {
    content: "";
    position: absolute;
    left: 18%; right: 18%; bottom: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--ice), transparent);
    box-shadow: 0 0 12px #58bfff;
}
.main-nav .locked { opacity: .62; }
.account-nav { display: flex; align-items: center; gap: 9px; }
.welcome { color: #8ca1ad; font-size: 11px; margin-right: 4px; }

/* Shared buttons: reusable on every PHP page */
.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #5686a2;
    color: #e8f8ff;
    background:
        linear-gradient(180deg, rgba(40, 91, 120, .96), rgba(8, 27, 40, .98));
    box-shadow:
        inset 0 0 16px rgba(151, 224, 255, .08),
        0 0 0 1px rgba(0,0,0,.35),
        0 5px 18px rgba(0,0,0,.35);
    text-decoration: none;
    font-weight: 700;
    letter-spacing: 1.5px;
    transition: transform .16s ease, border-color .16s ease, box-shadow .16s ease;
}
.button:hover {
    transform: translateY(-2px);
    border-color: #b9eaff;
    box-shadow: inset 0 0 18px rgba(151,224,255,.12), 0 0 18px rgba(70,182,242,.25);
}
.button-small { min-width: 108px; padding: 11px 14px; font-size: 10px; }
.button-dark {
    color: #b5c5ce;
    border-color: #3c5868;
    background: linear-gradient(180deg, rgba(17, 34, 44, .98), rgba(4, 12, 18, .98));
}

/* Hero */
.hero {
    position: relative;
    min-height: 690px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    isolation: isolate;
    background-image:
        linear-gradient(180deg, rgba(1,10,18,.05) 0%, rgba(1,10,18,.28) 45%, rgba(1,7,12,.96) 100%),
        radial-gradient(circle at 50% 34%, rgba(81,183,239,.12), transparent 32%),
        url("../images/background.png");
    background-position: center 25%;
    background-repeat: no-repeat;
    background-size: cover;
}
.hero::before {
    content: "";
    position: absolute;
    z-index: -1;
    inset: 0;
    background:
        linear-gradient(112deg, transparent 0 24%, rgba(158,222,255,.035) 25%, transparent 26%),
        linear-gradient(68deg, transparent 0 73%, rgba(121,204,250,.04) 74%, transparent 75%),
        radial-gradient(circle at center, transparent 15%, rgba(0,8,14,.18) 55%, rgba(0,0,0,.82) 100%);
}
.hero-content {
    position: relative;
    z-index: 3;
    width: min(950px, 92%);
    text-align: center;
    transform: translateY(-8px);
}
.eyebrow {
    margin-bottom: 15px;
    color: #9db5c3;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 7px;
    text-shadow: 0 2px 4px #000;
}
.hero h1 {
    color: #eefbff;
    font: 700 clamp(58px, 8vw, 108px)/.95 Georgia, "Times New Roman", serif;
    letter-spacing: 15px;
    text-shadow: 0 4px 4px #000, 0 0 12px rgba(201,239,255,.68), 0 0 38px rgba(63,171,235,.38);
}
.hero-subtitle {
    margin-top: 12px;
    padding-left: 14px;
    color: #86a7b9;
    font-size: 15px;
    letter-spacing: 15px;
    text-shadow: 0 2px 3px #000;
}
.hero-copy {
    max-width: 690px;
    margin: 32px auto 0;
    color: #a9bac4;
    font-size: 14px;
    line-height: 1.85;
    text-shadow: 0 2px 4px #000;
}
.frost-divider {
    position: relative;
    width: min(560px, 72%);
    height: 18px;
    margin: 38px auto 0;
}
.frost-divider::before {
    content: "";
    position: absolute;
    left: 0; right: 0; top: 8px;
    height: 1px;
    background: linear-gradient(90deg, transparent, #65c5f7, #e8faff, #65c5f7, transparent);
    box-shadow: 0 0 10px rgba(88,193,248,.72);
}
.frost-divider span {
    position: absolute;
    left: 50%; top: 3px;
    width: 11px; height: 11px;
    transform: translateX(-50%) rotate(45deg);
    border: 1px solid #c9f1ff;
    background: #377fa7;
    box-shadow: 0 0 13px #6ed0ff;
}
.ice-mist {
    position: absolute;
    z-index: 1;
    width: 50vw;
    height: 220px;
    border-radius: 50%;
    background: rgba(102, 197, 246, .09);
    filter: blur(75px);
    pointer-events: none;
}
.ice-mist-one { left: -18%; bottom: 3%; transform: rotate(10deg); }
.ice-mist-two { right: -20%; top: 15%; transform: rotate(-15deg); opacity: .6; }
.hero-bottom-fade {
    position: absolute;
    left: 0; right: 0; bottom: 0;
    height: 140px;
    background: linear-gradient(transparent, #06111a);
}

/* Shared panels/forms can reuse .panel on login/create/account pages */
.content-section {
    position: relative;
    padding: 70px 0 85px;
    background:
        radial-gradient(circle at 50% 0%, rgba(46,130,178,.16), transparent 35%),
        linear-gradient(180deg, #06111a 0%, #030a0f 52%, #010406 100%);
}
.content-grid {
    width: min(1200px, 92%);
    margin: auto;
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(310px, 1fr);
    gap: 25px;
}
.panel {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(85, 150, 186, .48);
    background: linear-gradient(145deg, rgba(10,31,44,.96), rgba(3,11,17,.99));
    box-shadow: inset 0 0 38px rgba(77,171,222,.035), 0 12px 36px rgba(0,0,0,.44);
}
.panel::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    box-shadow: inset 0 0 30px rgba(105,198,247,.035);
}
.panel-heading {
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 17px 20px;
    border-bottom: 1px solid rgba(78,139,172,.36);
    background: linear-gradient(180deg, rgba(18,55,75,.95), rgba(5,20,29,.98));
}
.panel-heading::before {
    content: "";
    position: absolute;
    left: 0; top: 0; bottom: 0;
    width: 2px;
    background: #8bd8ff;
    box-shadow: 0 0 11px #56bdf5;
}
.panel-heading h2 {
    color: #cfe7f3;
    font-size: 11px;
    letter-spacing: 3px;
}
.panel-rune { color: #9bdbfb; text-shadow: 0 0 9px #58bfff; }
.news-item { padding: 28px; border-bottom: 1px solid rgba(73,112,133,.22); }
.news-item:last-child { border-bottom: 0; }
.news-item time, .news-label {
    display: block;
    margin-bottom: 8px;
    color: #6e9ab1;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 2px;
}
.news-item h3 {
    margin-bottom: 10px;
    color: #d9e9f1;
    font: 400 21px Georgia, "Times New Roman", serif;
}
.news-item p { color: #81949f; font-size: 13px; line-height: 1.75; }
.status-row {
    min-height: 88px;
    padding: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    border-bottom: 1px solid rgba(73,112,133,.22);
}
.status-row strong { display: block; margin-bottom: 5px; color: #cbdce5; font-size: 13px; }
.status-row div > span { color: #657d8b; font-size: 10px; }
.status-badge {
    padding: 6px 9px;
    border: 1px solid;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 1px;
}
.status-badge.offline { color: var(--danger); border-color: #70464b; background: rgba(115,44,51,.12); }
.status-badge.online { color: #a7dfbd; border-color: #4d7c61; background: rgba(48,121,77,.12); }
.player-count { color: #d9edf7 !important; font: 22px Georgia, serif !important; text-shadow: 0 0 10px rgba(104,201,249,.28); }
.status-note { padding: 18px 20px; color: #607784; font-size: 10px; line-height: 1.6; }

/* Community */
.community-section {
    padding: 64px 20px;
    text-align: center;
    border-top: 1px solid rgba(77,139,172,.24);
    background: radial-gradient(circle at center top, rgba(45,126,171,.11), transparent 45%), #020609;
}
.community-inner { width: min(700px, 92%); margin: auto; }
.ice-symbol { display: block; margin-bottom: 10px; color: #a9e7ff; font-size: 23px; text-shadow: 0 0 14px #56bdf5; }
.community-section h2 { color: #d3e7f1; font: 400 22px Georgia, serif; letter-spacing: 3px; }
.community-section p { margin: 12px 0 26px; color: #708693; font-size: 12px; }
.community-button { min-width: 225px; padding: 15px 25px; font-size: 11px; }

/* Footer */
.site-footer { padding: 32px 0; border-top: 1px solid rgba(72,120,145,.28); background: #010305; }
.footer-inner { width: min(1200px, 92%); margin: auto; display: flex; align-items: center; justify-content: space-between; gap: 25px; }
.footer-brand strong { display: block; color: #8da5b2; font-size: 12px; letter-spacing: 4px; }
.footer-brand span { display: block; margin-top: 3px; color: #4e6674; font-size: 8px; letter-spacing: 3px; }
.footer-links { display: flex; gap: 25px; }
.footer-links a { color: #637b88; text-decoration: none; font-size: 9px; font-weight: 700; letter-spacing: 1.5px; }
.footer-links a:hover { color: #c7edff; }
.copyright { color: #455b67; font-size: 9px; }

/* Reusable form styling for the PHP pages we create next */
.form-panel { width: min(560px, 92%); margin: 0 auto; }
.form-body { padding: 28px; }
.form-group { margin-bottom: 18px; }
.form-group label { display: block; margin-bottom: 7px; color: #a9c1ce; font-size: 10px; font-weight: 700; letter-spacing: 1.3px; }
.form-control {
    width: 100%;
    padding: 13px 14px;
    border: 1px solid #355b70;
    outline: none;
    color: #e8f7ff;
    background: rgba(2,10,16,.86);
    box-shadow: inset 0 0 14px rgba(65,157,208,.04);
}
.form-control:focus { border-color: #86d6ff; box-shadow: 0 0 13px rgba(72,181,240,.16); }
.form-submit { width: 100%; min-height: 48px; cursor: pointer; }

@media (max-width: 1120px) {
    .header-inner { padding: 20px 0; flex-direction: column; gap: 15px; }
    .main-nav { flex-wrap: wrap; }
    .main-nav a { padding: 10px 14px; }
    .account-nav { flex-wrap: wrap; justify-content: center; }
}
@media (max-width: 850px) {
    .content-grid { grid-template-columns: 1fr; }
}
@media (max-width: 650px) {
    .hero { min-height: 590px; }
    .hero h1 { font-size: 48px; letter-spacing: 7px; }
    .hero-subtitle { font-size: 11px; letter-spacing: 8px; }
    .eyebrow { letter-spacing: 4px; }
    .hero-copy { font-size: 13px; }
    .footer-inner { flex-direction: column; text-align: center; }
    .footer-links { flex-wrap: wrap; justify-content: center; }
}
