:root {
    --primary: #FF6B00;
    --dark-bg: #121212;
    /* Lightened from #0a0a0a */
    --glass-bg: rgba(255, 255, 255, 0.08);
    /* Increased visibility */
    --glass-border: rgba(255, 255, 255, 0.15);
    --text-main: #ffffff;
    --text-muted: #cdcdcd;
    /* Lightened text */
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Outfit', sans-serif;
    -webkit-tap-highlight-color: transparent;
    /* Fix mobile tap 'black box' */
    scroll-behavior: smooth;
}

body {
    background-color: #000;
    background-image: url('assets/img/bg-pattern.svg');
    background-attachment: fixed;
    background-size: cover;
    background-repeat: no-repeat;
    color: var(--text-main);
    overflow-x: hidden;
    min-height: 100vh;
}

/* Modern Scrollbar */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--dark-bg);
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(var(--primary), #FF416C);
    border-radius: 5px;
    border: 2px solid var(--dark-bg);
}

::-webkit-scrollbar-thumb:hover {
    background: #FF416C;
}

/* Top Carousel */
#top-carousel {
    position: relative;
    width: 100%;
    height: 85vh;
    /* Significantly larger */
    overflow: hidden;
    margin-top: 120px;
    /* Increased to clear fixed nav */
    margin-bottom: 0;
    border-radius: 0;
    margin-left: 0;
    margin-right: 0;
    background: #000;
}

.carousel-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 1s ease-in-out;
    display: flex;
    align-items: center;
    justify-content: center;
}

.carousel-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    /* Fills width/height, crops edges if needed */
    object-position: center;
}

.carousel-slide.active {
    opacity: 1;
}

.carousel-indicators {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 10;
}

.indicator {
    width: 10px;
    height: 10px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    cursor: pointer;
    transition: 0.3s;
}

.indicator.active {
    background: white;
    transform: scale(1.2);
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

/* Background Vignette */
.vignette {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at center, transparent 20%, #000000 130%);
    /* Reduced intensity */
    opacity: 0.6;
    /* Significantly brighter */
    pointer-events: none;
    z-index: 1000;
}

/* Navigation */
.glass-nav {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    max-width: 1200px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    background: rgba(20, 20, 20, 0.6);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-radius: 20px;
    border: 1px solid var(--glass-border);
    z-index: 100;
    animation: fadeInDown 1s ease-out;
}

.logo {
    display: flex;
    align-items: center;
}

.logo img {
    height: 40px;
    /* Adjust height to fit nav */
    width: auto;
    object-fit: contain;
}

.nav-links {
    display: flex;
    gap: 2rem;
    list-style: none;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-muted);
    font-weight: 400;
    font-size: 0.95rem;
    transition: 0.3s;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--text-main);
}

.cta-button {
    background: var(--primary);
    color: white;
    padding: 0.6rem 1.5rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.cta-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(255, 107, 0, 0.4);
}

/* Community Section */
#community {
    padding: 4rem 5%;
    position: relative;
    z-index: 2;
}

.community-container {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
    align-items: center;
    justify-content: center;
}

.community-text {
    flex: 1 1 400px;
    max-width: 600px;
    padding: 2rem;
}

.community-text h2 {
    font-size: 3rem;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    font-weight: 800;
}

.community-text p {
    font-size: 1.1rem;
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 2rem;
}

.community-collage {
    flex: 1 1 500px;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    grid-gap: 1rem;
    padding: 1rem;
}

.collage-item {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    height: 250px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.5);
    transition: transform 0.3s ease;
}

.collage-item:hover {
    transform: scale(1.03);
    z-index: 2;
}

.collage-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.collage-item:nth-child(2) {
    transform: translateY(20px);
}

.collage-item:nth-child(3) {
    transform: translateY(-20px);
}

.collage-tag {
    position: absolute;
    bottom: 10px;
    left: 10px;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    color: var(--primary);
    font-weight: 600;
}

/* Hero Section */
#hero {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 10%;
    position: relative;
    overflow: hidden;
}

.hero-content {
    max-width: 50%;
    z-index: 2;
    animation: fadeInLeft 1s ease-out 0.5s backwards;
}

h1 {
    font-size: 5rem;
    line-height: 1;
    font-weight: 800;
    margin-bottom: 1.5rem;
}

.highlight {
    color: var(--primary);
    display: block;
}

.hero-content p {
    font-size: 1.2rem;
    color: var(--text-muted);
    margin-bottom: 2.5rem;
    max-width: 500px;
    line-height: 1.6;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    margin-bottom: 3rem;
}

.btn {
    padding: 1rem 2rem;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 600;
    transition: 0.3s;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.btn.primary {
    background: var(--primary);
    color: white;
}

.btn.primary:hover {
    box-shadow: 0 0 20px rgba(255, 107, 0, 0.3);
}

.btn.secondary {
    background: rgba(255, 255, 255, 0.05);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(5px);
}

.btn.secondary:hover {
    background: rgba(255, 255, 255, 0.1);
}

.stats-glass {
    display: flex;
    align-items: center;
    gap: 2rem;
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(10px);
    padding: 1rem 2rem;
    border-radius: 16px;
    border: 1px solid var(--glass-border);
    width: fit-content;
}

.stat h3 {
    font-size: 1.5rem;
    color: white;
}

.stat p {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin: 0;
}

.divider {
    width: 1px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
}

/* Hero Image & Glow */
.hero-image-container {
    position: relative;
    width: 45%;
    height: 100vh;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    z-index: 1;
}

.hero-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(255, 107, 0, 0.2) 0%, transparent 70%);
    filter: blur(50px);
    z-index: -1;
    animation: pulse 4s infinite alternate;
}

.hero-character {
    width: 100%;
    max-width: 600px;
    object-fit: contain;
    /* Hero entry animation */
    animation: floatUp 1.2s ease-out forwards;
    mask-image: linear-gradient(to bottom, black 80%, transparent 100%);
    -webkit-mask-image: linear-gradient(to bottom, black 80%, transparent 100%);
}

/* Features */
#features {
    padding: 5rem 10%;
    position: relative;
    z-index: 2;
}

.section-title {
    text-align: center;
    margin-bottom: 4rem;
}

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

.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.glass-card {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.01));
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 24px;
    padding: 2.5rem;
    transition: 0.3s;
}

.glass-card:hover {
    transform: translateY(-10px);
    border-color: rgba(255, 107, 0, 0.3);
    box-shadow: 0 10px 40px -10px rgba(0, 0, 0, 0.5);
}

.icon-box {
    width: 60px;
    height: 60px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
}

.icon-box.orange {
    background: rgba(255, 107, 0, 0.1);
    color: #FF6B00;
}

.icon-box.blue {
    background: rgba(33, 150, 243, 0.1);
    color: #2196F3;
}

.icon-box.green {
    background: rgba(76, 175, 80, 0.1);
    color: #4CAF50;
}

.glass-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.glass-card p {
    color: var(--text-muted);
    line-height: 1.6;
}

/* Animations */
@keyframes floatUp {
    from {
        opacity: 0;
        transform: translateY(100px);
    }

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

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translate(-50%, -50px);
    }

    to {
        opacity: 1;
        transform: translate(-50%, 0);
    }
}

@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }

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

@keyframes pulse {
    from {
        opacity: 0.5;
        transform: translate(-50%, -50%) scale(0.9);
    }

    to {
        opacity: 0.8;
        transform: translate(-50%, -50%) scale(1.1);
    }
}

/* Responsive */
@media (max-width: 1024px) {
    #hero {
        flex-direction: column;
        justify-content: center;
        text-align: center;
        padding-top: 100px;
    }

    .hero-content {
        max-width: 100%;
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .hero-image-container {
        width: 80%;
        height: 50vh;
        margin-top: 2rem;
    }

    .features-grid {
        grid-template-columns: repeat(2, 1fr);
        /* 2 cols on tablet */
    }
}

/* Legal Pages Styling (Global) */
.legal-content {
    padding: 120px 10% 4rem;
    max-width: 900px;
    margin: 0 auto;
}

.legal-content h1 {
    font-size: 3rem;
    margin-bottom: 0.5rem;
    color: var(--primary);
}

.last-updated {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 3rem;
    font-style: italic;
}

.legal-block {
    margin-bottom: 2rem;
    background: rgba(15, 15, 15, 0.9);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    padding: 2rem;
    border-radius: 16px;
    border: 1px solid var(--glass-border);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

.legal-block h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: white;
}

.legal-block p,
.legal-block ul {
    color: var(--text-muted);
    line-height: 1.6;
}

.legal-block ul {
    list-style-position: inside;
    margin-left: 1rem;
}

.legal-block li {
    margin-bottom: 0.5rem;
}

/* Rules Grid special styling */
.rules-grid {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.glass-card.full-width {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 2rem;
    padding: 1.5rem 2rem;
}

.glass-card.full-width .icon-box {
    margin-bottom: 0;
    flex-shrink: 0;
}

.glass-card.full-width h3 {
    margin-bottom: 0;
    width: 200px;
    flex-shrink: 0;
}

.glass-card.full-width p {
    margin: 0;
}

/* Footer (Global) */
footer {
    background: #050505;
    border-top: 1px solid var(--glass-border);
    padding: 3rem 10% 1rem;
    margin-top: 4rem;
    position: relative;
    z-index: 10;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.footer-logo {
    font-weight: 800;
    font-size: 1.5rem;
    color: white;
}

.footer-links {
    display: flex;
    gap: 1.5rem;
    list-style: none;
}

.footer-links a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.9rem;
    transition: 0.3s;
}

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

.copyright {
    text-align: center;
    padding-top: 1rem;
    color: #555;
    font-size: 0.8rem;
}

@media (max-width: 768px) {

    /* Navigation - Horizontal Scoll on Mobile */
    .glass-nav {
        width: 95%;
        padding: 0.8rem 1rem;
        flex-direction: column;
        gap: 1rem;
        top: 10px;
        border-radius: 16px;
    }

    .nav-links {
        display: flex;
        gap: 1.5rem;
        overflow-x: auto;
        white-space: nowrap;
        width: 100%;
        padding-bottom: 5px;
        /* Space for scrollbar if any */
        justify-content: center;
    }

    .logo img {
        height: 30px;
    }

    .cta-button {
        display: none;
        /* Hide CTA in header on mobile to save space, relies on hero CTA */
    }

    /* Hero Mobile Fixes */
    #hero {
        padding-top: 2rem;
        padding-bottom: 2rem;
        height: auto;
        /* Allow growth */
        min-height: 100vh;
    }

    .hero-content {
        padding: 0 5%;
        /* Horizontal breathing room */
    }

    .hero-content h1 {
        font-size: 2.5rem;
        /* Ensure readable */
        line-height: 1.2;
    }

    .hero-buttons {
        justify-content: center;
        /* Center buttons */
        width: 100%;
        margin-top: 1.5rem;
    }

    .hero-image-container {
        width: 100%;
        height: auto;
        min-height: 300px;
        margin-top: 2rem;
    }

    .hero-character {
        width: 100%;
        height: auto;
        max-width: 350px;
        /* Prevent massive image on mobile */
        object-fit: contain;
    }

    /* Footer Fixes */
    .footer-links a {
        color: var(--text-muted) !important;
        /* Force color */
    }

    .footer-links a:hover {
        color: var(--primary) !important;
    }

    /* Carousel */
    #top-carousel {
        height: 60vh;
        margin-top: 120px;
        /* Space for double-row nav */
    }

    /* Community */
    .community-container {
        flex-direction: column-reverse;
        /* Text on top, or bottom? Text top is usually better but collage is visual. Let's keep normal order but stacked. */
        gap: 2rem;
    }

    .community-text {
        flex: 1 1 100%;
        padding: 0;
        text-align: center;
    }

    .community-text h2 {
        font-size: 2rem;
    }

    .community-collage {
        width: 100%;
        grid-template-columns: repeat(2, 1fr);
        /* Keep collage 2x2 */
        gap: 0.5rem;
    }

    .collage-item {
        height: 150px;
        /* Smaller height */
    }

    /* Features */
    .features-grid {
        grid-template-columns: 1fr;
        /* 1 col on mobile */
        gap: 1.5rem;
    }

    .section-title h2 {
        font-size: 2rem;
    }

    /* Legal & Safety Pages */
    .legal-content {
        padding: 140px 5% 3rem;
        /* More top padding for nav */
    }

    .legal-content h1 {
        font-size: 2rem;
    }

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

    /* Footer */
    .footer-content {
        flex-direction: column;
        text-align: center;
        gap: 1.5rem;
    }

    .footer-links {
        flex-direction: column;
        gap: 1rem;
    }

    /* General Typography */
    h1 {
        font-size: 2.5rem;
    }

    h2 {
        font-size: 2rem;
    }
}