/* ==========================================================================
   PERFECT WORLD: ABYSSAL WAR — 3D Spatial Architecture & Gothic HUD Layer
   Next-Gen AAA MMORPG Visual Upgrade for Laravel 13
   ========================================================================== */

:root {
    --aw-obsidian: #06070C;
    --aw-obsidian-2: #0C0E16;
    --aw-obsidian-3: #121522;
    --aw-crimson: #9E1B32;
    --aw-crimson-bright: #D42C4A;
    --aw-gold: #D4AF6A;
    --aw-gold-bright: #F4DAA2;
    --aw-storm: #2E95FF;
    --aw-chamfer-sm: polygon(10px 0, calc(100% - 10px) 0, 100% 10px, 100% calc(100% - 10px), calc(100% - 10px) 100%, 10px 100%, 0 calc(100% - 10px), 0 10px);
    --aw-chamfer-md: polygon(16px 0, calc(100% - 16px) 0, 100% 16px, 100% calc(100% - 16px), calc(100% - 16px) 100%, 16px 100%, 0 calc(100% - 16px), 0 16px);
}

/* Deep Volcanic Obsidian + Subtle Crimson/Storm Volumetric Atmosphere */
body.zn-body.aw-body {
    background-color: #06070C !important;
    background-image:
        radial-gradient(ellipse 75% 45% at 50% -5%, rgba(46, 149, 255, 0.12), transparent 62%),
        radial-gradient(ellipse 60% 40% at 15% 42%, rgba(158, 27, 50, 0.1), transparent 64%),
        radial-gradient(ellipse 55% 40% at 88% 72%, rgba(56, 32, 78, 0.16), transparent 66%),
        linear-gradient(180deg, #06070C 0%, #0A0C14 50%, #05060A 100%) !important;
}

/* Fixed 3D Particle Atmosphere Layer */
#aw-3d-atmosphere {
    position: fixed;
    inset: 0;
    z-index: 1;
    pointer-events: none;
}
main, footer { position: relative; z-index: 2; }

/* ---------- OFFICIAL TRANSPARENT 3D LOGO ---------- */
.aw-logo-img {
    height: 54px;
    width: auto;
    display: block;
    object-fit: contain;
    filter: drop-shadow(0 6px 16px rgba(0, 0, 0, 0.85)) drop-shadow(0 0 14px rgba(46, 149, 255, 0.25));
    transition: transform 0.35s var(--aw-ease), filter 0.35s ease;
}
.aw-brand:hover .aw-logo-img {
    transform: scale(1.04) translateY(-1px);
    filter: drop-shadow(0 10px 22px rgba(0, 0, 0, 0.9)) drop-shadow(0 0 22px rgba(212, 175, 106, 0.45));
}
.zn-header.aw-header.is-scrolled .aw-logo-img { height: 48px; }
.aw-logo-img-footer { height: 74px; width: auto; }
.aw-logo-img-loader { height: 148px; width: auto; max-width: 82vw; }

/* ---------- FLOATING SIDE CHAPTER RUNE HUD RAIL ---------- */
.aw-chapter-rail {
    position: fixed;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 60;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 14px;
    pointer-events: none;
}
.aw-chapter-rail::before {
    content: "";
    position: absolute;
    right: 5px;
    top: 8px;
    bottom: 8px;
    width: 1px;
    background: linear-gradient(180deg, transparent, rgba(212, 175, 106, 0.35), rgba(46, 149, 255, 0.35), transparent);
}
.aw-rail-link {
    pointer-events: auto;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    text-decoration: none !important;
    color: rgba(216, 220, 231, 0.55);
    transition: color 0.25s ease;
}
.aw-rail-label {
    font-family: var(--aw-font-display);
    font-size: 9.5px;
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    opacity: 0;
    transform: translateX(8px);
    background: rgba(6, 7, 12, 0.88);
    border: 1px solid rgba(212, 175, 106, 0.32);
    padding: 3px 9px;
    color: var(--aw-gold-bright);
    transition: opacity 0.25s ease, transform 0.25s var(--aw-ease);
}
.aw-rail-diamond {
    width: 11px;
    height: 11px;
    transform: rotate(45deg);
    background: #0B0E17;
    border: 1.5px solid rgba(212, 175, 106, 0.45);
    transition: all 0.25s var(--aw-ease);
}
.aw-rail-link:hover .aw-rail-label,
.aw-rail-link.is-active .aw-rail-label {
    opacity: 1;
    transform: translateX(0);
}
.aw-rail-link.is-active .aw-rail-diamond {
    background: var(--aw-gold-bright);
    border-color: #FFF4D2;
    box-shadow: 0 0 14px rgba(212, 175, 106, 0.85), 0 0 24px rgba(46, 149, 255, 0.5);
    transform: rotate(45deg) scale(1.22);
}

/* ---------- 3D INTERACTIVE HERO DIORAMA ---------- */
.aw-hero-3d {
    min-height: 100vh;
    perspective: 1400px;
}
.aw-hero-3d .aw-hero-backdrop {
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    will-change: transform;
}
.aw-hero-3d .aw-hero-vignette {
    background:
        radial-gradient(ellipse 75% 65% at 50% 42%, transparent 25%, rgba(6, 7, 12, 0.82) 100%),
        linear-gradient(180deg, rgba(6, 7, 12, 0.78) 0%, rgba(6, 7, 12, 0.16) 24%, rgba(6, 7, 12, 0.34) 58%, rgba(6, 7, 12, 0.96) 90%, #06070C 100%);
}
.aw-hero-3d-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(300px, 0.85fr);
    gap: 36px;
    align-items: center;
    padding: 56px 0 38px;
}
.aw-hero-crest-stage {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transform-style: preserve-3d;
    will-change: transform;
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}
.aw-hero-crest-halo {
    position: absolute;
    width: 390px;
    height: 390px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(46, 149, 255, 0.26) 0%, rgba(158, 27, 50, 0.16) 44%, transparent 72%);
    filter: blur(18px);
    animation: awHaloBreath 5.5s ease-in-out infinite;
    pointer-events: none;
}
.aw-hero-crest-ring {
    position: absolute;
    width: 360px;
    height: 360px;
    border-radius: 50%;
    border: 1px solid rgba(212, 175, 106, 0.28);
    box-shadow: inset 0 0 40px rgba(46, 149, 255, 0.14);
    transform: translateZ(-20px) rotateX(68deg);
    animation: awRingOrbit 18s linear infinite;
    pointer-events: none;
}
@keyframes awHaloBreath {
    0%, 100% { transform: scale(0.95); opacity: 0.72; }
    50% { transform: scale(1.08); opacity: 1; }
}
@keyframes awRingOrbit {
    from { transform: translateZ(-20px) rotateX(68deg) rotateZ(0deg); }
    to { transform: translateZ(-20px) rotateX(68deg) rotateZ(360deg); }
}
.aw-hero-crest-logo {
    position: relative;
    z-index: 3;
    width: min(500px, 100%);
    height: auto;
    display: block;
    filter: drop-shadow(0 24px 44px rgba(0, 0, 0, 0.92)) drop-shadow(0 0 28px rgba(46, 149, 255, 0.32));
    animation: awFloat3D 6s ease-in-out infinite;
}
@keyframes awFloat3D {
    0%, 100% { transform: translateY(0px) translateZ(36px); }
    50% { transform: translateY(-10px) translateZ(48px); }
}

/* Sculpted Chamfered 3D Glass-Obsidian Plates & Cursor Specular Spotlight */
.aw-3d-plate {
    position: relative;
    background: linear-gradient(160deg, rgba(18, 21, 34, 0.92) 0%, rgba(8, 10, 17, 0.97) 100%);
    border: 1px solid rgba(212, 175, 106, 0.34);
    clip-path: var(--aw-chamfer-md);
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.76);
    transform-style: preserve-3d;
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.25s ease, box-shadow 0.3s ease;
    will-change: transform;
}
.aw-3d-plate::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: radial-gradient(320px circle at var(--mx, 50%) var(--my, 50%), rgba(244, 218, 162, 0.14), rgba(46, 149, 255, 0.06) 40%, transparent 72%);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 4;
}
.aw-3d-plate:hover::after { opacity: 1; }
.aw-3d-plate:hover {
    border-color: rgba(244, 218, 162, 0.68);
    box-shadow: 0 32px 80px rgba(0, 0, 0, 0.85), 0 0 32px rgba(212, 175, 106, 0.14);
}

/* Chamfered Buttons with Royal Crimson & Forged Gold Identity */
.aw-btn { clip-path: var(--aw-chamfer-sm); border-radius: 0 !important; }
.aw-btn-primary {
    background: linear-gradient(180deg, #F0D49B 0%, #C79E54 52%, #8F682B 100%) !important;
    border-color: #F8E5BC !important;
    box-shadow: 0 10px 30px rgba(212, 175, 106, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.65) !important;
}
.aw-btn-crimson {
    background: linear-gradient(180deg, #C72643 0%, #8E152C 55%, #5D0C1C 100%) !important;
    color: #FFF4F6 !important;
    border: 1px solid rgba(255, 166, 184, 0.45) !important;
    box-shadow: 0 10px 30px rgba(158, 27, 50, 0.38) !important;
}
.aw-btn-crimson:hover {
    transform: translateY(-2px);
    filter: brightness(1.1);
    box-shadow: 0 16px 40px rgba(212, 44, 74, 0.5) !important;
}

/* Hero Telemetry Deck — Chamfered Obsidian Strip */
.aw-telemetry-bar {
    background: linear-gradient(180deg, rgba(12, 14, 22, 0.96) 0%, rgba(6, 7, 12, 0.99) 100%) !important;
    border-top: 1px solid rgba(212, 175, 106, 0.36) !important;
    border-bottom: 1px solid rgba(158, 27, 50, 0.35) !important;
    box-shadow: 0 -16px 48px rgba(0, 0, 0, 0.75);
}

/* ---------- 3D FEATURE MONOLITHS ---------- */
.aw-feature-card {
    clip-path: var(--aw-chamfer-md);
    border-radius: 0 !important;
    min-height: 310px !important;
    transform-style: preserve-3d;
    will-change: transform;
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.3s ease, box-shadow 0.3s ease !important;
}
.aw-feature-card::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 3;
    background: radial-gradient(340px circle at var(--mx, 50%) var(--my, 50%), rgba(244, 218, 162, 0.16), rgba(46, 149, 255, 0.08) 42%, transparent 72%);
    opacity: 0;
    transition: opacity 0.25s ease;
}
.aw-feature-card:hover::after { opacity: 1; }
.aw-feature-card .aw-feature-body { transform: translateZ(34px); }
.aw-feature-card .aw-feature-emblem {
    clip-path: var(--aw-chamfer-sm);
    border-radius: 0 !important;
    transform: translateZ(46px);
}
.aw-feature-card .aw-feature-num { transform: translateZ(24px); }

/* ---------- 3D CLASS PEDESTAL & ROTATING RUNE CIRCLE ---------- */
.aw-class-stage {
    clip-path: var(--aw-chamfer-md);
    border-radius: 0 !important;
    background: linear-gradient(180deg, rgba(14, 17, 28, 0.96) 0%, rgba(6, 7, 12, 0.99) 100%) !important;
}
.aw-class-pedestal-ring {
    position: absolute;
    left: 50%;
    bottom: 24px;
    width: 340px;
    height: 340px;
    margin-left: -170px;
    z-index: 2;
    pointer-events: none;
    transform: rotateX(74deg);
    opacity: 0.72;
}
.aw-class-pedestal-ring svg {
    width: 100%;
    height: 100%;
    animation: awPedestalSpin 22s linear infinite;
    color: var(--aw-gold);
}
.aw-class-stage.is-stormbringer .aw-class-pedestal-ring svg {
    color: var(--aw-storm);
    filter: drop-shadow(0 0 18px rgba(46, 149, 255, 0.75));
}
@keyframes awPedestalSpin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}
.aw-class-dossier {
    clip-path: var(--aw-chamfer-sm);
    border-radius: 0 !important;
}

/* ---------- 3D CHAMPION PODIUM (HALL OF FAME) ---------- */
.aw-podium-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
    align-items: end;
    margin-bottom: 28px;
}
.aw-podium-card {
    position: relative;
    padding: 26px 22px 24px;
    text-align: center;
    background: linear-gradient(180deg, rgba(20, 23, 36, 0.94) 0%, rgba(8, 10, 17, 0.98) 100%);
    border: 1px solid rgba(212, 175, 106, 0.3);
    clip-path: var(--aw-chamfer-md);
    transform-style: preserve-3d;
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.25s ease;
    will-change: transform;
}
.aw-podium-card.is-first {
    order: 2;
    padding-top: 36px;
    padding-bottom: 32px;
    border-color: rgba(244, 218, 162, 0.72);
    background: linear-gradient(180deg, rgba(44, 34, 18, 0.72) 0%, rgba(12, 14, 22, 0.98) 100%);
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.75), 0 0 38px rgba(212, 175, 106, 0.18);
}
.aw-podium-card.is-second { order: 1; border-color: rgba(203, 213, 225, 0.45); }
.aw-podium-card.is-third { order: 3; border-color: rgba(196, 45, 75, 0.5); }
.aw-podium-crown {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    margin-bottom: 12px;
    clip-path: var(--aw-chamfer-sm);
    background: rgba(212, 175, 106, 0.16);
    border: 1px solid rgba(244, 218, 162, 0.5);
    color: var(--aw-gold-bright);
    transform: translateZ(26px);
}
.aw-podium-card.is-second .aw-podium-crown { color: #E2E8F0; border-color: rgba(203, 213, 225, 0.5); background: rgba(203, 213, 225, 0.1); }
.aw-podium-card.is-third .aw-podium-crown { color: #FDA4AF; border-color: rgba(212, 44, 74, 0.5); background: rgba(158, 27, 50, 0.2); }
.aw-podium-rank {
    display: block;
    font-family: var(--aw-font-display);
    font-size: 11px;
    letter-spacing: 0.22em;
    color: var(--aw-gold);
    margin-bottom: 4px;
}
.aw-podium-card h3 {
    margin: 0 0 4px;
    font-family: var(--aw-font-display) !important;
    font-size: 20px;
    color: var(--aw-white);
}
.aw-podium-card p { margin: 0; font-size: 12.5px; color: var(--aw-muted); }
.aw-podium-stat {
    margin-top: 14px;
    display: inline-flex;
    gap: 14px;
    padding: 6px 14px;
    background: rgba(6, 7, 12, 0.72);
    border: 1px solid rgba(212, 175, 106, 0.22);
    font-size: 12px;
    color: var(--aw-gold-bright);
    font-weight: 700;
}
.aw-hof-shell {
    clip-path: var(--aw-chamfer-md);
    border-radius: 0 !important;
}

/* ---------- 3D PERSPECTIVE COVERFLOW WORLD GALLERY ---------- */
.aw-coverflow-wrap {
    position: relative;
    padding: 20px 0 12px;
}
.aw-coverflow-stage {
    position: relative;
    height: 440px;
    perspective: 1450px;
    transform-style: preserve-3d;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}
.aw-cf-slide {
    position: absolute;
    width: min(680px, 84vw);
    aspect-ratio: 16 / 9;
    padding: 0;
    border: 1px solid rgba(212, 175, 106, 0.34);
    background: #080A12;
    clip-path: var(--aw-chamfer-md);
    overflow: hidden;
    cursor: pointer;
    box-shadow: 0 28px 80px rgba(0, 0, 0, 0.85);
    transition: transform 0.6s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.5s ease, border-color 0.3s ease;
    will-change: transform, opacity;
}
.aw-cf-slide.is-center {
    border-color: var(--aw-gold-bright);
    box-shadow: 0 36px 96px rgba(0, 0, 0, 0.92), 0 0 42px rgba(46, 149, 255, 0.22);
}
.aw-cf-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.aw-cf-slide.is-contain img {
    object-fit: contain;
    padding: 18px;
    background: radial-gradient(ellipse at center, rgba(46, 149, 255, 0.14), #070910 72%);
}
.aw-cf-controls {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin-top: 22px;
    padding: 16px 22px;
    background: linear-gradient(180deg, rgba(16, 19, 30, 0.92), rgba(8, 10, 17, 0.96));
    border: 1px solid rgba(212, 175, 106, 0.28);
    clip-path: var(--aw-chamfer-sm);
}
.aw-cf-caption small {
    display: block;
    font-family: var(--aw-font-display);
    font-size: 10.5px;
    letter-spacing: 0.2em;
    color: var(--aw-gold);
    text-transform: uppercase;
}
.aw-cf-caption strong {
    display: block;
    font-family: var(--aw-font-display);
    font-size: 18px;
    color: var(--aw-white);
    margin-top: 2px;
}
.aw-cf-nav {
    display: flex;
    align-items: center;
    gap: 10px;
}
.aw-cf-btn {
    width: 42px;
    height: 42px;
    background: rgba(8, 10, 17, 0.9);
    border: 1px solid rgba(212, 175, 106, 0.42);
    clip-path: var(--aw-chamfer-sm);
    color: var(--aw-gold-bright);
    font-size: 20px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}
.aw-cf-btn:hover { background: var(--aw-gold); color: #06070C; }
.aw-cf-dots { display: flex; gap: 8px; padding: 0 6px; }
.aw-cf-dot {
    width: 9px;
    height: 9px;
    transform: rotate(45deg);
    background: rgba(216, 220, 231, 0.22);
    border: 1px solid rgba(212, 175, 106, 0.4);
    cursor: pointer;
    padding: 0;
    transition: all 0.25s ease;
}
.aw-cf-dot.is-active {
    background: var(--aw-gold-bright);
    box-shadow: 0 0 12px rgba(212, 175, 106, 0.85);
    transform: rotate(45deg) scale(1.25);
}

/* News, Warfare, Community, Download, CTA Chamfered 3D Polish */
.aw-news-featured,
.aw-news-card,
.aw-warfare-banner,
.aw-gm-panel,
.aw-channel-card,
.aw-dl-card,
.aw-specs-box {
    clip-path: var(--aw-chamfer-md);
    border-radius: 0 !important;
}
.aw-final-cta-logo {
    width: min(360px, 78vw);
    height: auto;
    margin: 0 auto 14px;
    display: block;
    filter: drop-shadow(0 18px 36px rgba(0, 0, 0, 0.9)) drop-shadow(0 0 24px rgba(46, 149, 255, 0.3));
    animation: awFloat3D 6s ease-in-out infinite;
}

@media (max-width: 1200px) {
    .aw-chapter-rail { display: none; }
}
@media (max-width: 1024px) {
    .aw-hero-3d-grid { grid-template-columns: 1fr; text-align: center; }
    .aw-hero-badge-row, .aw-hero-cta { justify-content: center; }
    .aw-hero-lead { margin-left: auto; margin-right: auto; }
    .aw-podium-grid { grid-template-columns: 1fr; }
    .aw-podium-card.is-first, .aw-podium-card.is-second, .aw-podium-card.is-third { order: initial; }
    .aw-coverflow-stage { height: 320px; }
}
@media (max-width: 767px) {
    .aw-coverflow-stage { height: 240px; }
    .aw-logo-img { height: 42px; }
    .aw-hero-crest-logo { width: min(320px, 86vw); }
}
@media (prefers-reduced-motion: reduce) {
    .aw-hero-crest-logo, .aw-hero-crest-halo, .aw-hero-crest-ring, .aw-class-pedestal-ring svg, .aw-final-cta-logo {
        animation: none !important;
    }
}
