:root {
    --primary-color: #ffd700;
    /* Gold */
    --accent-color: #8a2be2;
    /* Violet */
    --bg-color: #050505;
    --text-color: #e0e0e0;
    --card-bg: #1a1a1a;
}

/* Mobile fixes */
@media (max-width: 768px) {
    /* Navbar scrolls with page on mobile instead of fixed */
    .navbar {
        position: relative;
    }

    .nav-links .btn-play {
        display: none;
    }

    /* Disable fog on mobile - too problematic */
    .fog-container {
        display: none;
    }

    .hero-section {
        padding-top: 20px; /* Less padding since navbar not fixed */
    }

    .hero-cards-container {
        transform: scale(0.6);
        transform-origin: center center;
        margin-top: -30px;
        margin-bottom: -30px;
    }

    /* Title and subtitle - constrain to viewport */
    .glitch-text {
        font-size: 1.6rem;
        text-align: center;
        width: 90%;
        max-width: 100vw;
        word-wrap: break-word;
    }

    .hero-subtitle {
        width: 90%;
        font-size: 0.9rem;
    }

    .chessboard {
        transform: scale(0.5) rotateX(60deg) rotateZ(45deg) translateZ(-60px);
    }

    /* Stack Discord vs Harmony vertically on mobile */
    .world-duality {
        flex-direction: column;
        gap: 20px;
    }

    .duality-item {
        width: 80%;
        max-width: 280px;
    }
}

@media (max-width: 480px) {
    .hero-cards-container {
        transform: scale(0.55);
        margin-top: -40px;
        margin-bottom: -40px;
    }

    .glitch-text {
        font-size: 1.4rem;
    }

    .hero-subtitle {
        font-size: 0.85rem;
    }
}

/* MODAL SYSTEM */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    z-index: 1000;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
    backdrop-filter: blur(5px);
}

.modal-overlay.visible {
    opacity: 1;
    pointer-events: auto;
}

.glass-panel {
    background: rgba(20, 20, 20, 0.9);
    border: 1px solid #444;
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.8);
    width: 400px;
    max-width: 90%;
    position: relative;
    color: #fff;
}

.close-btn {
    position: absolute;
    top: 10px;
    right: 15px;
    background: none;
    border: none;
    color: #aaa;
    font-size: 24px;
    cursor: pointer;
}

.close-btn:hover {
    color: #fff;
}

.input-group {
    margin-bottom: 20px;
    text-align: left;
}

.input-group label {
    display: block;
    color: var(--primary-color);
    font-size: 0.8rem;
    margin-bottom: 5px;
}

.input-group input {
    width: 100%;
    padding: 10px;
    background: #111;
    border: 1px solid #333;
    color: #fff;
    box-sizing: border-box;
    outline: none;
}

.input-group input:focus {
    border-color: var(--primary-color);
}

.full-width {
    width: 100%;
    margin-top: 20px;
}

.info-text {
    font-size: 0.7rem;
    color: #666;
}

.legal-check {
    font-size: 0.8rem;
    color: #aaa;
    text-align: left;
}

.legal-check a {
    color: var(--accent-color);
}

.tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    border-bottom: 1px solid #333;
}

.tab-btn {
    background: none;
    border: none;
    color: #666;
    padding: 10px;
    cursor: pointer;
}

.tab-btn.active {
    color: var(--primary-color);
    border-bottom: 2px solid var(--primary-color);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
    animation: fadeIn 0.3s;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.msg-box {
    margin-top: 15px;
    font-size: 0.9rem;
    min-height: 20px;
}

.msg-box.success {
    color: #0f0;
}

.msg-box.error {
    color: #f00;
}

.msg-box.warn {
    color: orange;
}

body {
    margin: 0;
    padding: 0;
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: 'Lato', sans-serif;
    overflow-x: hidden;
}

h1,
h2,
h3,
h4,
.logo {
    font-family: 'Cinzel', serif;
    text-transform: uppercase;
}


/* ==================================================================================
   FOG EFFECT - WARNING: EXTREMELY DIFFICULT TO DEBUG!
   ==================================================================================
   This creates TWO layered fog images with DIFFERENT OPACITIES (0.3 and 0.2) that
   start at DIFFERENT VERTICAL POSITIONS (0% and 30%). This creates a darker area
   at the top that looks like a mysterious overlay but is IMPOSSIBLE to inspect
   with browser dev tools because it's just overlapping semi-transparent backgrounds.
   
   If you see a dark overlay at the top, it's NOT a bug - it's the fog-img-first
   layer at 30% opacity combined with the fog background gradient.
   
   IMPORTANT: This container is position:absolute (not fixed!) so the fog scrolls
   with the page. If changed to position:fixed, it creates a creepy floating overlay
   effect when scrolling that will drive you insane trying to debug.
   ================================================================================== */
/* FOG EFFECT */
.fog-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    min-width: 100vw;
    right: 0; /* Extend to cover horizontal scroll */
    height: 100%;
    overflow: hidden;
    z-index: -1;
    pointer-events: none;
    background: linear-gradient(to bottom, #000 0%, #111 100%);
}

.fog-img {
    position: absolute;
    height: 100vh;
    width: 300vw;
    background: url('../assets/images/fog1.png') repeat-x;
    background-size: contain;
    animation: fog 60s linear infinite;
    opacity: 0.3;
}

.fog-img-second {
    background: url('../assets/images/fog2.png') repeat-x;
    background-size: contain;
    animation: fog 40s linear infinite;
    z-index: -1;
    top: 30%;
    opacity: 0.2;
}

@keyframes fog {
    0% {
        transform: translate3d(0, 0, 0);
    }

    100% {
        transform: translate3d(-200vw, 0, 0);
    }
}

/* NAVBAR */
/* NAVBAR */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 40px;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.8), rgba(0, 0, 0, 0));
    /* Fade out instead of blur block */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 100;
    box-sizing: border-box;
}

.logo {
    font-size: 24px;
    font-weight: 700;
    color: var(--primary-color);
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
}

.nav-links a {
    color: #fff;
    text-decoration: none;
    margin-left: 20px;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: color 0.3s;
}

.nav-links a:hover {
    color: var(--primary-color);
}

.nav-links .btn-play {
    border: 1px solid var(--primary-color);
    padding: 8px 16px;
    border-radius: 4px;
    background: transparent;
    color: var(--primary-color);
    transition: all 0.5s ease;
    box-shadow: 0 0 5px rgba(255, 215, 0, 0.1);
    text-shadow: none;
}

.nav-links .btn-play:hover {
    background: var(--primary-color);
    color: #000;
    box-shadow: 0 0 10px var(--primary-color);
    text-shadow: none;
}

/* HERO SECTION */
.hero-section {
    min-height: 100vh;
    /* Use min-height */
    height: auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    position: relative;
    padding-top: 100px;
    /* More padding to clear nav comfortably */
    padding-bottom: 100px;
    background: transparent;
    /* Subtle center glow */
}

.hero-subtitle {
    font-size: 1.2rem;
    color: #aaa;
    max-width: 600px;
    margin: 20px auto 120px auto;
    /* Even more space */
    position: relative;
    z-index: 2;
}

.glitch-text {
    font-size: 4rem;
    position: relative;
    color: #fff;
    text-shadow: 2px 2px var(--accent-color);
}

.cta-button {
    display: inline-block;
    margin-top: 80px;
    /* Increased top margin to clear cards */
    padding: 15px 40px;
    background: transparent;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    font-family: 'Cinzel', serif;
    font-size: 1.2rem;
    text-decoration: none;
    transition: all 0.3s ease;
    text-shadow: 0 0 5px var(--primary-color);
    box-shadow: 0 0 10px rgba(255, 215, 0, 0.2);
    position: relative;
    z-index: 10;
}

.cta-button:hover {
    background: var(--primary-color);
    color: #000;
    box-shadow: 0 0 20px var(--primary-color);
}

/* 3D CARDS CONTAINER & CHESSBOARD */
.hero-cards-container {
    height: 400px;
    /* Increased height */
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    perspective: 1200px;
    /* Deeper perspective */
    margin-top: 0;
    position: relative;
}

.chessboard {
    position: absolute;
    width: 600px;
    height: 600px;
    background:
        conic-gradient(#222 0.25turn, #111 0.25turn 0.5turn,
            #222 0.5turn 0.75turn, #111 0.75turn);
    background-size: 75px 75px;
    transform: rotateX(60deg) rotateZ(45deg) translateZ(-60px);
    border: 20px solid #333;
    box-shadow:
        0 0 50px rgba(0, 0, 0, 0.8),
        inset 0 0 100px rgba(0, 0, 0, 0.8);
    opacity: 0.6;
    pointer-events: none;
}

.chessboard::after {
    content: '';
    position: absolute;
    top: -20px;
    left: -20px;
    right: -20px;
    bottom: -20px;
    border: 2px solid var(--primary-color);
    box-shadow: 0 0 20px var(--primary-color);
    opacity: 0.3;
}

/* DYNAMIC CARD STYLES UPDATED */
.landing-card {
    width: 180px;
    height: 260px;
    position: absolute;
    transform-style: preserve-3d;
    /* Crucial for flip */
    transition: transform 0.5s ease;
    cursor: pointer;
}

.landing-card.flipped {
    /* JS will handle the rotate logic combined with position, 
       but we need a class to tracking state if needed. 
       Actually, specific rotation is handled in JS. 
       This class is primarily for z-index or effects. */
    z-index: 200 !important;
}

.landing-card-inner,
.landing-card-back {
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    backface-visibility: hidden;
    border: 2px solid #444;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.5);
}

.landing-card-inner {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background: linear-gradient(135deg, #333, #111);
    color: #fff;
    padding: 0;
    /* REMOVED PADDING to fix border issue */
    box-sizing: border-box;
    z-index: 2;
}

.landing-card-back {
    transform: rotateY(180deg);
    background: #000;
    display: flex;
    justify-content: center;
    align-items: center;
}

.landing-card-back video,
.landing-card-back img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.landing-card:hover {
    box-shadow: 0 0 15px var(--accent-color);
}

.landing-card-inner:hover {
    border-color: var(--accent-color);
}

/* FEATURES SECTION */
.feature-section,
.world-section,
.tech-section {
    padding: 80px 40px;
    position: relative;
    z-index: 1;
}

.section-title {
    text-align: center;
    margin-bottom: 60px;
}

.section-title h2 {
    font-size: 2.5rem;
    margin-bottom: 10px;
}

.divider {
    height: 2px;
    width: 100px;
    background: var(--primary-color);
    margin: 0 auto;
}

.grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 40px;
    max-width: 1200px;
    margin: 0 auto;
}

.feature-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 30px;
    transition: transform 0.3s, box-shadow 0.3s;
    backdrop-filter: blur(5px);
}

.feature-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    border-color: var(--accent-color);
}

.feature-card h3 {
    color: var(--primary-color);
    margin-top: 0;
}

/* WORLD SECTION */
.world-section {
    background: linear-gradient(180deg, transparent, #0f0f0f, transparent);
    text-align: center;
}

.world-duality {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 40px;
    margin: 40px 0;
}

.duality-item {
    border: 1px solid #333;
    padding: 20px;
    width: 250px;
}

.duality-item h4 {
    font-size: 1.5rem;
    color: var(--accent-color);
}

.duality-separator {
    font-weight: bold;
    color: #666;
}

.doom-text {
    font-style: italic;
    color: #ff4444;
    text-shadow: 0 0 5px #ff0000;
    margin-top: 30px;
}

.weave-cta-text {
    margin-top: 30px;
}

.weave-cta-link {
    display: inline-block;
    padding: 12px 30px;
    background: transparent;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    font-family: 'Cinzel', serif;
    font-size: 1rem;
    text-decoration: none;
    transition: all 0.3s ease;
    text-shadow: 0 0 5px var(--primary-color);
    box-shadow: 0 0 10px rgba(255, 215, 0, 0.2);
    border-radius: 4px;
}

.weave-cta-link:hover {
    background: var(--primary-color);
    color: #000;
    box-shadow: 0 0 20px var(--primary-color);
    text-shadow: none;
}

/* TECH SECTION */
.tech-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 30px;
    max-width: 1000px;
    margin: 0 auto;
}

.tech-item {
    flex: 1 1 300px;
    text-align: left;
    border-top: 2px solid var(--primary-color);
    padding-top: 20px;
}

.tech-item h3 {
    margin-top: 0;
}

.footer {
    text-align: center;
    padding: 40px;
    border-top: 1px solid #333;
    color: #666;
    font-size: 0.9rem;
}

/* AUTHOR PAGE STYLES */
.author-container {
    max-width: 900px;
    margin: 120px auto 40px;
    padding: 40px;
    background: rgba(20, 20, 20, 0.8);
    border: 1px solid #333;
    border-radius: 8px;
    backdrop-filter: blur(10px);
    box-shadow: 0 0 50px rgba(0, 0, 0, 0.5);
    color: #ccc;
    line-height: 1.8;
    font-size: 1.1rem;
    position: relative;
    z-index: 10;
}

.author-portrait {
    float: left;
    width: 300px;
    height: 300px;
    margin-right: 40px;
    margin-bottom: 20px;
    border-radius: 50%;
    shape-outside: circle(50%);
    object-fit: cover;
    border: 3px solid var(--primary-color);
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.3);
    background: #222;
    background-image: linear-gradient(135deg, #333 0%, #111 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.author-portrait span {
    font-family: 'Cinzel', serif;
    font-size: 5rem;
    color: #444;
}

.author-title {
    font-family: 'Cinzel', serif;
    color: var(--primary-color);
    font-size: 2.5rem;
    margin-bottom: 30px;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.3);
    border-bottom: 1px solid #444;
    padding-bottom: 10px;
}

.author-text {
    text-align: justify;
}

.author-text p {
    margin-bottom: 20px;
}

.signature {
    font-family: 'Cinzel', serif;
    font-size: 1.5rem;
    color: var(--primary-color);
    margin-top: 40px;
    text-align: right;
}

.clearfix::after {
    content: '';
    clear: both;
    display: table;
}

/* DEVELOPMENT ROADMAP SECTION */
.dev-progress-section {
    padding: 80px 40px;
    background: linear-gradient(180deg, #050505, #0f0f0f);
    position: relative;
    z-index: 1;
}

.progress-subtitle {
    font-family: 'Cinzel', serif;
    color: var(--primary-color);
    letter-spacing: 2px;
    margin-top: 10px;
}

.roadmap-container {
    max-width: 1000px;
    margin: 0 auto;
}

.progress-bar-container {
    width: 100%;
    height: 10px;
    background: #222;
    border: 1px solid #444;
    border-radius: 5px;
    margin-bottom: 50px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
}

.progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent-color), var(--primary-color));
    box-shadow: 0 0 10px var(--primary-color);
    transition: width 1s ease-in-out;
}

.roadmap-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 40px;
}

.roadmap-phase {
    background: rgba(20, 20, 20, 0.6);
    border: 1px solid #333;
    padding: 30px;
    border-radius: 8px;
    transition: transform 0.3s;
}

.roadmap-phase.active {
    border-color: var(--primary-color);
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.1);
}

.roadmap-phase.future {
    opacity: 0.7;
    border-color: #444;
}

.roadmap-phase h3 {
    color: #fff;
    border-bottom: 1px solid #444;
    padding-bottom: 15px;
    margin-top: 0;
}

.roadmap-phase.active h3 {
    color: var(--primary-color);
}

.roadmap-phase p {
    color: #aaa;
    font-size: 0.9rem;
    line-height: 1.6;
    margin-bottom: 20px;
}

.roadmap-list {
    list-style: none;
    padding: 0;
    margin: 0;
    text-align: left;
}

.roadmap-list li {
    padding: 8px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    font-family: 'Lato', sans-serif;
    display: flex;
    align-items: center;
}

.roadmap-list li.done {
    color: #4caf50;
    /* Success Green */
}

.roadmap-list li.todo {
    color: #666;
}

.roadmap-list li.in-progress {
    color: var(--primary-color);
}

.roadmap-list li span {
    margin-right: 10px;
    font-weight: bold;
}

/* CAROUSEL SLIDER STYLES */
.slider-container {
    position: relative;
    overflow: hidden;
    min-height: 400px;
    /* Ensure height consistency */
    display: flex;
    flex-direction: column;
    padding-right: 50px;
    /* Space for dots */
}

.slides-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
    flex: 1;
}

.slide {
    display: none;
    width: 100%;
    height: 100%;
    animation: fadeSlide 0.5s ease-in-out;
}

.slide.active {
    display: block;
}

@keyframes fadeSlide {
    from {
        opacity: 0;
        transform: translateX(20px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.slider-dots {
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 15px;
    z-index: 10;
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 2px solid #666;
    background: transparent;
    cursor: pointer;
    transition: all 0.3s ease;
}

.dot:hover {
    border-color: #aaa;
}

.dot.active {
    background: #fff;
    border-color: #fff;
    box-shadow:
        0 0 10px 2px rgba(255, 255, 255, 0.8),
        0 0 20px 5px rgba(255, 255, 255, 0.4);
}

.slide-image-container {
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 20px;
}

.slide-img {
    max-width: 100%;
    max-height: 300px;
    border: 2px solid #444;
    border-radius: 4px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
}