:root {
    --void-black: #020203;
    --deep-shadow: #07090d;
    --mist-layer: rgba(255,255,255,0.03);
    --arcane-purple: #7b2cff;
    --toxic-emerald: #00ffb3;
    --blood-rune-red: #ff2e63;
    --ethereal-blue: #3be0ff;
    
    --spell-gradient: linear-gradient(135deg, var(--arcane-purple), var(--toxic-emerald));
    --dark-aura: radial-gradient(circle at center, rgba(123,44,255,0.25), transparent 70%);
    
    --font-heading: 'Cinzel', serif;
    --font-body: 'Inter', sans-serif;
}

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

html {
    scroll-behavior: auto; /* Handled by smooth scroll setup if needed, but keeping native smooth feel via GSAP */
}

body {
    background-color: var(--void-black);
    color: #e2e2e2;
    font-family: var(--font-body);
    overflow-x: hidden;
    line-height: 1.6;
    cursor: none; /* Custom cursor */
}

/* --- CUSTOM CURSOR --- */
.cursor {
    width: 8px;
    height: 8px;
    background: var(--toxic-emerald);
    border-radius: 50%;
    position: fixed;
    top: 0;
    left: 0;
    pointer-events: none;
    z-index: 9999;
    box-shadow: 0 0 10px var(--toxic-emerald);
    transition: transform 0.1s ease;
}

.cursor-follower {
    width: 40px;
    height: 40px;
    border: 1px solid rgba(123,44,255,0.5);
    background: rgba(123,44,255,0.05);
    border-radius: 50%;
    position: fixed;
    top: 0;
    left: 0;
    pointer-events: none;
    z-index: 9998;
    transition: transform 0.3s ease, width 0.3s, height 0.3s, background 0.3s;
}

.cursor-follower.active {
    width: 60px;
    height: 60px;
    background: rgba(0,255,179,0.1);
    border-color: var(--toxic-emerald);
}

@media (pointer: coarse) {
    .cursor, .cursor-follower { display: none; }
    body { cursor: auto; }
}

/* --- OVERLAYS & NOISE --- */
.noise-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(images/%23noiseFilter)' opacity='0.05'/%3E%3C/svg%3E");
    pointer-events: none;
    z-index: 9000;
}

/* --- TYPOGRAPHY --- */
h1, h2, h3, h4, .logo {
    font-family: var(--font-heading);
    font-weight: 600;
    letter-spacing: 1px;
}

/* --- HEADER --- */
.arcane-nav {
    position: fixed;
    top: 0;
    width: 100%;
    padding: 20px 0;
    z-index: 1000;
    background: rgba(2, 2, 3, 0.5);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(123,44,255,0.2);
    opacity: 0; /* GSAP will reveal */
    transform: translateY(-20px);
}

.arcane-nav.visible {
    opacity: 1;
    transform: translateY(0);
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 24px;
    color: #fff;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 3px;
    text-shadow: 0 0 10px rgba(123,44,255,0.5);
}

.logo-dot {
    color: var(--toxic-emerald);
    animation: flicker 4s infinite alternate;
}

@keyframes flicker {
    0%, 100% { opacity: 1; text-shadow: 0 0 10px var(--toxic-emerald); }
    50% { opacity: 0.5; text-shadow: none; }
}

.nav-links {
    display: flex;
}

.nav-links a {
    color: #aaa;
    text-decoration: none;
    margin-left: 30px;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 2px;
    transition: color 0.3s, text-shadow 0.3s;
    position: relative;
}

.nav-links a:hover, .nav-links a.active {
    color: #fff;
    text-shadow: 0 0 8px var(--arcane-purple);
}

/* Mobile Menu Button */
.mobile-menu-btn {
    display: none;
    background: transparent;
    border: none;
    cursor: pointer;
    z-index: 1001;
    flex-direction: column;
    gap: 6px;
    padding: 10px;
}

.mobile-menu-btn span {
    display: block;
    width: 30px;
    height: 2px;
    background-color: #fff;
    transition: all 0.3s ease;
    box-shadow: 0 0 5px var(--arcane-purple);
}

/* --- BUTTONS --- */
.magnetic-btn {
    background: transparent;
    border: 1px solid rgba(123,44,255,0.5);
    color: #fff;
    padding: 15px 40px;
    font-family: var(--font-heading);
    font-size: 16px;
    text-transform: uppercase;
    letter-spacing: 2px;
    border-radius: 30px;
    cursor: none;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    display: inline-block;
}

.magnetic-btn::before {
    content: '';
    position: absolute;
    top: 0; left: -100%;
    width: 100%; height: 100%;
    background: var(--spell-gradient);
    transition: all 0.4s ease;
    z-index: 1;
}

.magnetic-btn:hover::before {
    left: 0;
}

.magnetic-btn span {
    position: relative;
    z-index: 2;
}

.magnetic-btn:hover {
    box-shadow: 0 0 20px rgba(123,44,255,0.6);
    border-color: transparent;
}

/* --- HERO SECTION --- */
.hero-ritual {
    height: 100vh;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    top: -5%; left: -5%;
    width: 110%; height: 110%;
    background: url('images/dark-fantasy-hero-background.png') center/cover no-repeat;
    opacity: 0.3;
    z-index: 0;
    filter: contrast(1.2) sepia(0.3) hue-rotate(240deg);
}

.fog-container {
    position: absolute;
    width: 100%; height: 100%;
    z-index: 1;
    pointer-events: none;
}

.fog-layer {
    position: absolute;
    width: 200%; height: 100%;
    background-size: cover;
    opacity: 0.2;
}

.fog-layer-1 {
    background: url('images/spooky-fog-layer-one.png') repeat-x;
    background-size: cover;
    animation: fog-move 60s linear infinite;
}

.fog-layer-2 {
    background: url('images/spooky-fog-layer-two.png') repeat-x;
    background-size: cover;
    animation: fog-move 40s linear infinite reverse;
    opacity: 0.15;
}

@keyframes fog-move {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

.particles-container {
    position: absolute;
    width: 100%; height: 100%;
    z-index: 2;
}

.hero-content {
    position: relative;
    z-index: 10;
    text-align: center;
    margin-top: -50px;
}

.hero-headline {
    font-size: 5rem;
    color: #fff;
    text-transform: uppercase;
    text-shadow: 0 0 30px rgba(123,44,255,0.8);
    margin-bottom: 20px;
    clip-path: polygon(0 0, 100% 0, 100% 100%, 0% 100%);
}

.hero-subtext {
    font-size: 1.2rem;
    color: #aaa;
    margin-bottom: 40px;
    letter-spacing: 2px;
}

/* Floating Legal Box */
.hero-legal-box {
    position: absolute;
    bottom: 50px;
    right: 50px;
    background: rgba(255,255,255,0.03);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 15px;
    padding: 20px 30px;
    z-index: 10;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5), inset 0 0 20px rgba(123,44,255,0.1);
    animation: float 6s ease-in-out infinite;
}

.hero-legal-box ul {
    list-style: none;
}

.hero-legal-box li {
    font-size: 0.85rem;
    color: #bbb;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
}

.hero-legal-box li::before {
    content: '✦';
    color: var(--toxic-emerald);
    margin-right: 10px;
    font-size: 0.8rem;
    text-shadow: 0 0 5px var(--toxic-emerald);
}

.hero-legal-box li:last-child { margin-bottom: 0; }

@keyframes float {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-15px); }
    100% { transform: translateY(0px); }
}

/* --- WITCH WORLD REVEAL --- */
.witch-world-reveal {
    padding: 150px 0;
    position: relative;
    background: var(--dark-aura);
}

.split-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 40px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 80px;
}

.reveal-text {
    flex: 0 0 40%;
}

.section-title {
    font-size: 3.5rem;
    margin-bottom: 30px;
    line-height: 1.1;
    background: var(--spell-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.reveal-text p {
    font-size: 1.1rem;
    color: #aaa;
    line-height: 1.8;
}

.reveal-image-mask {
    flex: 0 0 55%;
    height: 600px;
    border-radius: 20px;
    overflow: hidden;
    position: relative;
    clip-path: polygon(10% 0, 100% 0, 90% 100%, 0 100%);
}

.reveal-image-mask img {
    width: 100%;
    height: 120%;
    object-fit: cover;
    transform: translateY(-10%);
}

/* --- GAME SHOWCASE (ALTAR) --- */
.game-showcase {
    padding: 150px 0;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
}

.altar-environment {
    position: relative;
    width: 100%;
    max-width: 1000px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.energy-ring {
    position: absolute;
    width: 120%;
    padding-bottom: 120%;
    border-radius: 50%;
    border: 2px dashed rgba(123,44,255,0.3);
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    animation: rotate-ring 40s linear infinite;
    pointer-events: none;
}

.energy-ring.reverse {
    width: 140%;
    padding-bottom: 140%;
    border: 1px solid rgba(0,255,179,0.1);
    animation: rotate-ring 60s linear infinite reverse;
}

@keyframes rotate-ring {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}

.game-core-container {
    width: 100%;
    background: rgba(7, 9, 13, 0.8);
    border: 1px solid rgba(123,44,255,0.4);
    border-radius: 20px;
    padding: 20px;
    position: relative;
    z-index: 10;
    box-shadow: 0 20px 50px rgba(0,0,0,0.8), 0 0 40px rgba(123,44,255,0.2);
    backdrop-filter: blur(20px);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.game-core-container:hover {
    box-shadow: 0 20px 50px rgba(0,0,0,0.8), 0 0 60px rgba(123,44,255,0.4);
}

.game-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding: 0 10px;
}

.game-header h2 {
    font-size: 1.5rem;
    color: #fff;
}

.live-indicator {
    font-size: 0.8rem;
    color: var(--toxic-emerald);
    display: flex;
    align-items: center;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.pulse-dot {
    width: 8px; height: 8px;
    background: var(--toxic-emerald);
    border-radius: 50%;
    margin-right: 8px;
    box-shadow: 0 0 10px var(--toxic-emerald);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(0, 255, 179, 0.7); }
    70% { transform: scale(1); box-shadow: 0 0 0 10px rgba(0, 255, 179, 0); }
    100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(0, 255, 179, 0); }
}

.iframe-wrapper {
    width: 100%;
    aspect-ratio: 16/9;
    border-radius: 10px;
    overflow: hidden;
    position: relative;
    background: #000;
}

.iframe-wrapper iframe {
    width: 100%;
    height: 100%;
    border: none;
}

/* --- SPELL ABILITIES (FEATURES) --- */
.spell-features {
    padding: 100px 0;
    position: relative;
    z-index: 10;
}

.cards-canvas {
    max-width: 1400px;
    margin: 0 auto;
    position: relative;
    padding: 60px 40px;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 30px;
}

.spell-card {
    width: 280px;
    padding: 40px 30px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.03); /* Var mist-layer */
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    /* Removed 'all' to prevent conflicts with GSAP opacity and transform animations */
    transition: border-color 0.4s ease, box-shadow 0.4s ease, background-color 0.4s ease;
    position: relative;
}

.spell-card:nth-child(even) {
    margin-top: 40px; /* Replaced transform with margin to avoid overriding GSAP positioning */
}

.spell-card:hover {
    border-color: rgba(123, 44, 255, 0.6);
    background-color: rgba(123, 44, 255, 0.05);
    box-shadow: 0 15px 30px rgba(0,0,0,0.5), inset 0 0 20px rgba(123,44,255,0.2);
    transform: translateY(-10px) rotate(2deg) !important;
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), border-color 0.4s ease, box-shadow 0.4s ease, background-color 0.4s ease;
}

.card-icon {
    font-size: 2.5rem;
    margin-bottom: 20px;
    display: inline-block;
    filter: drop-shadow(0 0 10px var(--toxic-emerald));
}

.spell-card h3 {
    font-size: 1.2rem;
    margin-bottom: 15px;
    color: #fff;
}

.spell-card p {
    font-size: 0.9rem;
    color: #999;
}

/* --- PARALLAX REALM SHIFT --- */
.realm-shift {
    height: 80vh;
    position: relative;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
}

.realm-layer {
    position: absolute;
    top: -10%; left: -10%;
    width: 120%; height: 120%;
    background-size: cover;
    background-position: center;
}

.layer-back {
    background-image: url('images/dark-mystical-realm-background.png');
    opacity: 0.4;
    filter: blur(4px);
    z-index: 1;
}

.layer-mid {
    background-image: radial-gradient(circle, transparent 20%, var(--void-black) 100%);
    z-index: 2;
}

.realm-content {
    position: relative;
    z-index: 3;
    text-align: center;
}

.realm-content h2 {
    font-size: 5rem;
    color: #fff;
    text-shadow: 0 0 40px var(--arcane-purple);
    mix-blend-mode: overlay;
}

/* --- TRUST BARRIER --- */
.trust-barrier {
    padding: 120px 0;
    background: #000;
    text-align: center;
    border-top: 1px solid rgba(255,255,255,0.05);
}

.minimal-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 40px;
}

.minimal-title {
    font-family: var(--font-body);
    font-size: 2rem;
    font-weight: 300;
    color: #fff;
    margin-bottom: 60px;
    letter-spacing: 4px;
    text-transform: uppercase;
}

.minimal-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
    margin-bottom: 50px;
}

.minimal-item {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(255,255,255,0.02);
    border-radius: 10px;
}

.cross-icon {
    color: var(--blood-rune-red);
    font-size: 1.2rem;
    margin-right: 15px;
}

.minimal-item p {
    font-size: 1.1rem;
    color: #ccc;
    font-weight: 300;
}

.minimal-subtext {
    color: #666;
    font-size: 0.9rem;
    font-style: italic;
}

/* --- SUBPAGES (Lore, Terms, etc.) --- */
.subpage .page-content {
    padding: 180px 40px 100px;
    min-height: 80vh;
    display: flex;
    justify-content: center;
}

.text-ritual-container {
    max-width: 900px;
    width: 100%;
}

.page-title {
    font-size: 3rem;
    margin-bottom: 40px;
    text-align: center;
    background: var(--spell-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.glass-article {
    background: rgba(255,255,255,0.02);
    backdrop-filter: blur(15px);
    border: 1px solid rgba(123,44,255,0.2);
    border-radius: 20px;
    padding: 50px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.5);
    margin-bottom: 40px;
}

.glass-article h2 {
    font-size: 1.8rem;
    color: #fff;
    margin-top: 30px;
    margin-bottom: 15px;
    border-bottom: 1px solid rgba(123,44,255,0.2);
    padding-bottom: 10px;
}

.glass-article h2:first-child { margin-top: 0; }

.glass-article p {
    color: #bbb;
    margin-bottom: 20px;
    font-size: 1.05rem;
    line-height: 1.7;
}

.glass-article ul {
    margin-bottom: 20px;
    padding-left: 20px;
    color: #bbb;
}

.glass-article li { margin-bottom: 10px; }

.inline-cinematic-img {
    width: 100%;
    height: 300px;
    object-fit: cover;
    border-radius: 10px;
    margin: 30px 0;
    border: 1px solid rgba(123,44,255,0.3);
}

/* Form Styles */
.contact-split {
    display: grid;
    grid-template-columns: 3fr 2fr;
    gap: 40px;
}

.form-group {
    margin-bottom: 25px;
}

.form-group label {
    display: block;
    margin-bottom: 10px;
    color: #ddd;
    font-family: var(--font-heading);
    letter-spacing: 1px;
}

.glass-input {
    width: 100%;
    background: rgba(0,0,0,0.3);
    border: 1px solid rgba(123,44,255,0.3);
    border-radius: 8px;
    padding: 15px;
    color: #fff;
    font-family: var(--font-body);
    transition: all 0.3s;
}

.glass-input:focus {
    outline: none;
    border-color: var(--toxic-emerald);
    box-shadow: 0 0 15px rgba(0,255,179,0.2);
}

.hq-address {
    font-style: normal;
    color: #aaa;
    line-height: 1.8;
    margin-bottom: 20px;
    padding: 20px;
    background: rgba(0,0,0,0.4);
    border-radius: 8px;
}

.support-email a {
    color: var(--toxic-emerald);
    text-decoration: none;
    font-size: 1.1rem;
}

/* --- FOOTER --- */
.global-footer {
    background: #010101;
    border-top: 1px solid rgba(123,44,255,0.2);
    padding: 80px 40px 40px;
}

.footer-grid {
    max-width: 1400px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    margin-bottom: 60px;
}

.footer-brand h3 {
    font-size: 2rem;
    color: #fff;
    margin-bottom: 20px;
}

.footer-address {
    font-style: normal;
    color: #666;
    font-size: 0.9rem;
    line-height: 1.8;
}

.footer-links h4 {
    color: #fff;
    margin-bottom: 20px;
    font-size: 1.2rem;
}

.footer-links a {
    display: block;
    color: #888;
    text-decoration: none;
    margin-bottom: 10px;
    transition: color 0.3s;
}

.footer-links a:hover {
    color: var(--toxic-emerald);
}

.footer-legal {
    max-width: 1400px;
    margin: 0 auto;
    border-top: 1px solid rgba(255,255,255,0.05);
    padding-top: 30px;
    text-align: center;
}

.footer-legal p {
    color: #555;
    font-size: 0.8rem;
    line-height: 1.6;
    margin-bottom: 15px;
}

.footer-legal strong {
    color: #777;
}

.copyright {
    color: #444 !important;
}

/* --- RESPONSIVE --- */
@media (max-width: 992px) {
    .split-container, .contact-split {
        flex-direction: column;
        grid-template-columns: 1fr;
    }
    .reveal-image-mask {
        width: 100%;
        height: 400px;
    }
    .hero-headline {
        font-size: 3.5rem;
    }
    .hero-legal-box {
        position: relative;
        bottom: 0; right: 0;
        margin-top: 40px;
        display: inline-block;
    }
}

@media (max-width: 768px) {
    .mobile-menu-btn {
        display: flex;
    }

    .nav-links {
        display: flex;
        flex-direction: column;
        position: fixed;
        top: 0;
        right: -100%;
        width: 100%;
        height: 100vh;
        background: rgba(2, 2, 3, 0.98);
        backdrop-filter: blur(20px);
        justify-content: center;
        align-items: center;
        transition: right 0.4s cubic-bezier(0.77, 0, 0.175, 1);
        z-index: 1000;
        gap: 40px;
    }

    .nav-links.active {
        right: 0;
    }

    .nav-links a {
        margin: 0;
        font-size: 24px;
        letter-spacing: 4px;
    }

    .witch-world-reveal, .game-showcase, .spell-features, .trust-barrier {
        padding: 60px 0;
    }

    .hero-headline {
        font-size: 2.5rem;
    }

    .minimal-grid {
        grid-template-columns: 1fr;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 40px;
        margin-bottom: 40px;
    }

    .global-footer {
        padding: 60px 20px 30px;
    }

    .glass-article {
        padding: 30px 20px;
    }

    .cards-canvas {
        padding: 20px;
        gap: 20px;
    }

    .spell-card {
        width: 100%;
        max-width: 320px;
    }

    .spell-card:nth-child(even) {
        margin-top: 0;
    }

    .subpage .page-content {
        padding: 120px 20px 60px;
    }
}