:root {
    --nx-gold: #c5a059;
    --nx-gold-light: #e6d3a0;
    --nx-gold-bright: #f3e5ab;
    --nx-gold-dark: #8e6d2d;
    --nx-ink: #07080d;
    --nx-panel: rgba(8, 10, 16, 0.78);
    --nx-panel-edge: rgba(197, 160, 89, 0.38);
}

* { box-sizing: border-box; }

html {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

body.opening-page {
    margin: 0;
    padding: 0;
    min-height: 100vh;
    color: #e8ecf4;
    font-family: 'Cinzel', 'Marcellus', serif;
    background: #050505;
    overflow-x: hidden;
}

.opening-bg {
    position: fixed;
    inset: 0;
    z-index: 0;
    overflow: hidden;
    pointer-events: none;
    background: #050505;
}

.opening-bg__video,
.opening-bg__fallback {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center center;
    image-rendering: -webkit-optimize-contrast;
}

.opening-bg__fallback {
    background:
        linear-gradient(rgba(5, 5, 5, 0.35), rgba(5, 5, 5, 0.72)),
        url('../img/l2nexum-bg-nexum.jpg') center / cover no-repeat;
}

.opening-bg__overlay {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 70% 55% at 50% 35%, rgba(197, 160, 89, 0.08), transparent 70%),
        linear-gradient(to bottom, rgba(0,0,0,0.28) 0%, rgba(0,0,0,0.42) 40%, rgba(0,0,0,0.82) 78%, rgba(0,0,0,0.96) 100%);
}

.opening-top {
    position: relative;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.9rem clamp(1rem, 2vw, 1.6rem);
    background: rgba(7, 8, 13, 0.88);
    border-bottom: 1px solid rgba(197, 160, 89, 0.2);
    backdrop-filter: blur(14px) saturate(1.15);
}

.opening-top__brand {
    font-family: 'Cinzel', serif;
    font-size: clamp(0.9rem, 1.5vw, 1.2rem);
    font-weight: 700;
    letter-spacing: 0.14em;
    text-decoration: none;
    background: linear-gradient(90deg, #9a7d45 0%, #e6d3a0 48%, #9a7d45 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.opening-top__brand span {
    -webkit-text-fill-color: #fff;
    color: #fff;
}

.opening-top__right {
    display: flex;
    align-items: center;
    gap: 0.9rem;
}

.opening-top__link {
    color: var(--nx-gold-light);
    text-decoration: none;
    font-family: 'Cinzel', serif;
    font-size: 0.7rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    border: 1px solid rgba(197, 160, 89, 0.4);
    padding: 0.48rem 0.95rem;
    border-radius: 999px;
    background: rgba(197, 160, 89, 0.08);
    transition: 0.25s ease;
}

.opening-top__link:hover {
    color: #fff;
    border-color: rgba(197, 160, 89, 0.75);
    box-shadow: 0 0 18px rgba(197, 160, 89, 0.25);
}

.opening-top .lang-switch {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border-left: 1px solid rgba(255, 255, 255, 0.12);
    padding-left: 10px;
}

.opening-top .lang-flag {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    overflow: hidden;
    display: inline-flex;
    border: 2px solid rgba(255, 255, 255, 0.18);
    opacity: 0.78;
}

.opening-top .lang-flag img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.opening-top .lang-flag.is-active {
    opacity: 1;
    border-color: rgba(197, 160, 89, 0.9);
    box-shadow: 0 0 0 2px rgba(197, 160, 89, 0.22);
}

.opening-main {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 1180px;
    margin: 0 auto;
    padding: clamp(1.5rem, 4vh, 3rem) 1rem 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: calc(100vh - 120px);
}

.opening-logo-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    animation: logo-pulse 4.5s ease-in-out infinite;
    margin-bottom: clamp(0.75rem, 2vh, 1.4rem);
}

.opening-logo {
    width: min(300px, 56vw);
    height: auto;
    filter: drop-shadow(0 8px 28px rgba(0, 0, 0, 0.55)) drop-shadow(0 0 26px rgba(197, 160, 89, 0.28));
}

.opening-logo-text {
    font-family: 'Cinzel Decorative', serif;
    font-size: clamp(3rem, 10vw, 5.4rem);
    font-weight: 900;
    margin: 0;
    background: linear-gradient(to bottom, #f3e5ab 0%, #c5a059 45%, #8e6d2d 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: 0.14em;
}

.opening-logo-sub {
    display: none;
}

.opening-spacer {
    display: none;
}

.opening-window {
    position: relative;
    width: 100%;
    max-width: 980px;
    background:
        linear-gradient(180deg, rgba(18, 20, 28, 0.72) 0%, rgba(7, 8, 13, 0.88) 100%);
    border: 1px solid transparent;
    border-radius: 18px;
    padding: clamp(1.6rem, 3.5vw, 2.8rem) clamp(1.1rem, 3vw, 2.4rem);
    margin-bottom: 1.35rem;
    box-shadow:
        0 0 0 1px rgba(197, 160, 89, 0.22),
        0 24px 60px rgba(0, 0, 0, 0.55),
        inset 0 1px 0 rgba(255, 255, 255, 0.06);
    backdrop-filter: blur(16px) saturate(1.2);
    overflow: hidden;
}

.opening-window__beam {
    position: absolute;
    top: 0;
    left: 8%;
    right: 8%;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--nx-gold-bright), var(--nx-gold), var(--nx-gold-bright), transparent);
    box-shadow: 0 0 18px rgba(197, 160, 89, 0.65);
    animation: beam-sweep 5s ease-in-out infinite;
}

.opening-window__glow {
    position: absolute;
    inset: auto 15% -40% 15%;
    height: 55%;
    background: radial-gradient(ellipse at center, rgba(197, 160, 89, 0.14), transparent 70%);
    pointer-events: none;
}

.opening-kicker {
    margin: 0 0 0.55rem;
    font-family: 'Cinzel', serif;
    font-size: clamp(0.68rem, 1.1vw, 0.82rem);
    letter-spacing: 0.42em;
    text-transform: uppercase;
    color: var(--nx-gold);
    opacity: 0.9;
}

.opening-heading {
    font-family: 'Cinzel', serif;
    font-size: clamp(1.35rem, 3.2vw, 2.15rem);
    font-weight: 700;
    letter-spacing: 0.28em;
    text-transform: uppercase;
    color: #fff;
    margin: 0 0 0.45rem;
    text-shadow: 0 2px 18px rgba(0, 0, 0, 0.65);
}

.opening-subheading {
    margin: 0 0 1.55rem;
    color: rgba(230, 211, 160, 0.88);
    font-family: 'Cinzel', serif;
    letter-spacing: 0.1em;
    font-size: clamp(0.72rem, 1.25vw, 0.92rem);
    text-transform: uppercase;
}

.opening-timer {
    display: flex;
    align-items: stretch;
    justify-content: center;
    gap: clamp(0.35rem, 1.2vw, 0.7rem);
    flex-wrap: nowrap;
    padding: 0.35rem;
    border-radius: 14px;
    background: linear-gradient(180deg, rgba(255,255,255,0.03), rgba(0,0,0,0.22));
    border: 1px solid rgba(197, 160, 89, 0.16);
}

.nexum-cd-unit {
    flex: 1 1 0;
    min-width: 0;
    max-width: 160px;
    padding: clamp(0.9rem, 2vw, 1.35rem) 0.45rem;
    text-align: center;
    border-radius: 12px;
    background:
        radial-gradient(ellipse at 50% 0%, rgba(197, 160, 89, 0.14), transparent 60%),
        rgba(10, 12, 18, 0.92);
    border: 1px solid rgba(197, 160, 89, 0.22);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
    transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.nexum-cd-unit:hover {
    transform: translateY(-3px);
    border-color: rgba(197, 160, 89, 0.55);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.35), 0 0 20px rgba(197, 160, 89, 0.12);
}

.nexum-cd-unit--pulse {
    border-color: rgba(197, 160, 89, 0.45);
    box-shadow: 0 0 22px rgba(197, 160, 89, 0.12), inset 0 0 18px rgba(197, 160, 89, 0.06);
}

.nexum-cd-unit__value {
    display: block;
    font-family: 'Cinzel', serif;
    font-weight: 700;
    font-size: clamp(1.7rem, 4.2vw, 3.1rem);
    line-height: 1;
    letter-spacing: 0.04em;
    background: linear-gradient(180deg, #ffffff 18%, #f3e5ab 55%, #c5a059 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 2px 10px rgba(197, 160, 89, 0.28));
}

.nexum-cd-unit__label {
    display: block;
    margin-top: 0.55rem;
    font-family: 'Cinzel', serif;
    font-size: clamp(0.55rem, 0.95vw, 0.68rem);
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: rgba(197, 160, 89, 0.92);
}

.nexum-cd-sep {
    width: 1px;
    align-self: stretch;
    margin: 0.85rem 0;
    background: linear-gradient(180deg, transparent, rgba(197, 160, 89, 0.55), transparent);
    flex: 0 0 1px;
}

.opening-divider {
    height: 1px;
    margin: 1.7rem auto 1.35rem;
    width: min(420px, 70%);
    background: linear-gradient(90deg, transparent, rgba(197, 160, 89, 0.7), transparent);
    opacity: 0.7;
}

.opening-stats {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: clamp(1rem, 3.5vw, 2.4rem);
}

.opening-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.3rem;
    min-width: 110px;
}

.opening-stat__label {
    color: rgba(255, 255, 255, 0.4);
    font-size: 0.58rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    font-family: 'Cinzel', serif;
}

.opening-stat__value {
    color: var(--nx-gold-light);
    font-family: 'Cinzel', serif;
    font-weight: 700;
    font-size: clamp(0.82rem, 1.4vw, 1.02rem);
    letter-spacing: 0.06em;
}

.opening-actions {
    width: 100%;
    max-width: 980px;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.9rem;
    margin-bottom: 1.2rem;
}

.l2-btn-new {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.7rem;
    min-height: 60px;
    padding: 1rem 1.1rem;
    font-family: 'Cinzel', serif;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    font-weight: 700;
    font-size: 0.72rem;
    text-decoration: none;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid var(--nx-gold-dark);
    transition: all 0.32s ease;
}

.btn-register {
    background: linear-gradient(135deg, #e0c078 0%, #c5a059 45%, #8e6d2d 100%);
    color: #15100a;
    border-color: rgba(255, 255, 255, 0.55);
}
.btn-register:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 28px rgba(197, 160, 89, 0.35);
}

.btn-download {
    background: rgba(16, 18, 24, 0.92);
    color: var(--nx-gold-light);
    border-color: rgba(197, 160, 89, 0.4);
}
.btn-download:hover {
    border-color: var(--nx-gold-light);
    color: #fff;
    transform: translateY(-3px);
}

.btn-discord {
    background: linear-gradient(135deg, rgba(88, 101, 242, 0.28), rgba(88, 101, 242, 0.12));
    border-color: #5865F2;
    color: #fff;
}
.btn-discord:hover {
    background: rgba(88, 101, 242, 0.42);
    transform: translateY(-3px);
    box-shadow: 0 0 26px rgba(88, 101, 242, 0.35);
}

.btn-shine {
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.22), transparent);
    transition: 0.55s;
}
.l2-btn-new:hover .btn-shine { left: 100%; }

.opening-footer {
    position: relative;
    z-index: 2;
    text-align: center;
    padding: 0.25rem 1rem 1.8rem;
}

.opening-footer__line {
    font-family: 'Cinzel', serif;
    font-size: 0.62rem;
    letter-spacing: 0.32em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.34);
    margin-bottom: 0.55rem;
}

.opening-footer__enter {
    color: var(--nx-gold-light);
    text-decoration: none;
    font-family: 'Cinzel', serif;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    font-size: 0.7rem;
}

.opening-footer__enter:hover { color: #fff; }

@keyframes logo-pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.018); }
}

@keyframes beam-sweep {
    0%, 100% { opacity: 0.55; filter: brightness(1); }
    50% { opacity: 1; filter: brightness(1.35); }
}

@media (max-width: 900px) {
    .opening-actions { grid-template-columns: 1fr; }
    .nexum-cd-sep { display: none; }
    .opening-timer {
        display: grid;
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

@media (max-width: 640px) {
    .opening-timer { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.55rem; }
    .opening-top__link { display: none; }
    .nexum-cd-unit { max-width: none; }
}

@media (min-width: 1600px) {
    .opening-logo { width: min(340px, 28vw); }
    .opening-heading { font-size: 2.35rem; }
    .nexum-cd-unit__value { font-size: 3.35rem; }
    .opening-window { max-width: 1080px; padding: 3rem 2.8rem; }
}
