/* ========== Anton Retro: Nintendo Modern Theme (Final Fix: Correct Dark/Light Wave Colors) ========== */

:root {
    /* Default: Dark Mode */
    --ar-bg: #121212;
    --ar-text: #ffffff;
    --ar-text-muted: #aaaaaa;
    --ar-card-bg: #1e1e1e;
    --ar-border: #333333;
    --ar-accent: #e60012;
    /* Nintendo Red */
    --ar-nav-bg: #000000;
    --ar-shadow: rgba(0, 0, 0, 0.5);

    /* FIX 1: Dark Mode Waves should be a specific dark grey (like card background) */
    --ar-wave-color: 30, 30, 30;
    /* A darker shade than the card background for contrast */

    --ar-font-head: 'Poppins', sans-serif;
    --ar-font-body: 'Poppins', sans-serif;
}

[data-theme="light"] {
    --ar-bg: #f4f4f4;
    --ar-text: #111111;
    --ar-text-muted: #666666;
    --ar-card-bg: #ffffff;
    --ar-border: #dddddd;
    --ar-accent: #e60012;
    --ar-nav-bg: #000000;
    --ar-shadow: rgba(0, 0, 0, 0.1);

    /* FIX 2: Light Mode Waves should be pure white foam */
    --ar-wave-color: 255, 255, 255;
}

/* Custom Selection Color */
::selection {
    background: var(--ar-accent);
    color: #fff;
}

::-moz-selection {
    background: var(--ar-accent);
    color: #fff;
}

/* Light Mode Overrides for Bootstrap Elements */
[data-theme="light"] .btn-outline-light {
    color: var(--bs-dark);
    border-color: var(--bs-dark);
}

[data-theme="light"] .btn-outline-light:hover {
    background-color: var(--bs-dark);
    color: #fff;
}

[data-theme="light"] .text-white-50 {
    color: rgba(0, 0, 0, 0.6) !important;
}

body {
    background-color: var(--ar-bg);
    color: var(--ar-text);
    font-family: var(--ar-font-body);
    /* SYNCHRONIZED FADE: Set to 1.0s for smooth theme transition */
    transition: background-color 1.0s ease-in-out, color 1.0s ease-in-out;
    cursor: url('/assets/previewfile_3491605514.png') 10 2, auto;
    /* Custom Wii Cursor */
}

h1,
h2,
h3,
h4,
h5 {
    font-family: var(--ar-font-head);
    font-weight: 700;
    letter-spacing: -0.5px;
}

a,
button,
.btn {
    text-decoration: none;
    transition: color 0.2s;
    cursor: url('/assets/previewfile_3491605514.png') 10 2, pointer;
}

/* Navbar (The "Black Bar") */
.ar-navbar {
    background: var(--ar-nav-bg);
    border-bottom: 3px solid var(--ar-accent);
    padding: 0.5rem 0;
}

.ar-nav-link {
    font-family: var(--ar-font-head);
    font-size: 0.9rem;
    font-weight: 600;
    color: #ffffff !important;
    text-transform: uppercase;
    margin-right: 1.5rem;
}

.ar-nav-link:hover,
.ar-nav-link.active {
    color: var(--ar-accent) !important;
}

/* Hero Banner container */
.ar-hero-banner {
    width: 100%;
    height: 300px;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10;
}

.ar-hero-banner.ar-hero-home {
    height: 500px;
}

.ar-hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
    overflow: hidden;
    border-radius: 0 0 8px 8px;
}


.ar-hero-logo {
    position: relative;
    z-index: 20;
    width: 50vw;
    max-width: 700px;
    height: auto;
    filter: drop-shadow(0 15px 30px rgba(0, 0, 0, 0.6));
    animation: float 6s ease-in-out infinite;
    margin-bottom: 30px;
}

/* ... existing code ... */

@media (max-width: 768px) {
    .ar-hero-logo {
        /* Responsive sizing for mobile without using scale() */
        width: 110vw;
        max-width: none;
        margin-left: -5vw;
        /* Center the oversized logo */
        filter: drop-shadow(0px 10px 20px rgba(0, 0, 0, 0.5));
    }
}

@keyframes float {
    0% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-15px);
    }

    100% {
        transform: translateY(0px);
    }
}

/* --- Global Background Bubbles --- */
#ar-global-bubbles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 0;
    /* Ensure visibility behind content but possibly in front of deep bg */
    overflow: hidden;
    pointer-events: none;
    /* Fade out at the top to prevent bubbles from appearing in the banner area */
    mask-image: linear-gradient(to bottom, transparent 0%, transparent 30%, black 50%, black 100%);
    -webkit-mask-image: linear-gradient(to bottom, transparent 0%, transparent 30%, black 50%, black 100%);
}

/* Search Form */
.ar-search-form {
    position: relative;
}

.ar-search-input {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    padding: 5px 15px 5px 35px;
    color: white;
    width: 200px;
    transition: all 0.3s ease;
}

.ar-search-input:focus {
    background: rgba(255, 255, 255, 0.2);
    width: 250px;
    outline: none;
    border-color: var(--ar-accent);
}

.ar-search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: rgba(255, 255, 255, 0.7);
    pointer-events: none;
}

/* JS Generated Bubble Class */
.ar-bubble {
    position: absolute;
    bottom: -100px;
    background: radial-gradient(circle at 30% 30%, rgba(100, 100, 100, 0.1), rgba(100, 100, 100, 0.05) 60%, rgba(100, 100, 100, 0));
    border-radius: 50%;
    border: 1px solid rgba(100, 100, 100, 0.15);
    box-shadow: 0 0 10px rgba(100, 100, 100, 0.05);
    cursor: pointer;
    pointer-events: auto;
    transition: transform 0.1s;
}

.ar-bubble:hover {
    border-color: var(--ar-accent);
    background: rgba(230, 0, 18, 0.1);
}

.ar-bubble.popped {
    animation: pop 0.2s ease-out forwards !important;
}

@keyframes rise-up {
    0% {
        transform: translateY(0) scale(1);
        opacity: 0;
    }

    5% {
        opacity: 0.6;
    }

    30% {
        opacity: 0.6;
    }

    50% {
        opacity: 0;
    }

    100% {
        transform: translateY(-120vh) scale(1.1);
        opacity: 0;
    }
}

@keyframes pop {
    0% {
        transform: scale(1);
        opacity: 1;
    }

    100% {
        transform: scale(2);
        opacity: 0;
    }
}

/* Dynamic Wave Separator */
.ar-waves {
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100%;
    height: 100px;
    overflow: hidden;
    line-height: 0;
    z-index: 2;
    pointer-events: none;
}

/* Wave fill transition synchronized at 0.8s */
.ar-wave-parallax>use {
    animation: move-forever 25s cubic-bezier(.55, .5, .45, .5) infinite;
    transition: fill 0.8s ease-in-out;
}

/* FIX 3: Increased opacity for visible layers in both modes */
.ar-wave-parallax>use:nth-child(1) {
    animation-delay: -2s;
    animation-duration: 7s;
    fill: rgba(var(--ar-wave-color), 0.9);
    /* Highest opacity */
}

.ar-wave-parallax>use:nth-child(2) {
    animation-delay: -3s;
    animation-duration: 10s;
    fill: rgba(var(--ar-wave-color), 0.7);
}

.ar-wave-parallax>use:nth-child(3) {
    animation-delay: -4s;
    animation-duration: 13s;
    fill: rgba(var(--ar-wave-color), 0.5);
    /* Lowest layer opacity */
}

.ar-wave-parallax>use:nth-child(4) {
    animation-delay: -5s;
    animation-duration: 20s;
    fill: var(--ar-bg);
    /* Match body background (The Shore) */
}

@keyframes move-forever {
    0% {
        transform: translate3d(-90px, 0, 0);
    }

    100% {
        transform: translate3d(85px, 0, 0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

main {
    animation: fadeInUp 0.8s ease-out;
    position: relative;
    z-index: 1;
}

.ar-hero-title-container {
    z-index: 20;
    text-align: center;
}

/* Cards */
.ar-card {
    background: var(--ar-card-bg);
    border: 1px solid var(--ar-border);
    border-radius: 8px;
    box-shadow: 0 4px 6px var(--ar-shadow);
    /* SYNC: Color transitions at 0.8s. */
    transition: background-color 0.8s, border-color 0.8s, transform 0.3s, box-shadow 0.3s;
    overflow: hidden;
    position: relative;
}

.ar-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 8px;
    box-shadow: 0 0 15px rgba(230, 0, 18, 0.4);
    opacity: 0;
    transition: opacity 0.3s;
    pointer-events: none;
}

.ar-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 25px var(--ar-shadow);
    border-color: var(--ar-accent);
}

.ar-card:hover::after {
    opacity: 1;
}

/* Buttons */
.btn-ar {
    background: var(--ar-accent);
    color: white;
    font-weight: 600;
    text-transform: uppercase;
    border: none;
    border-radius: 50px;
    /* Pill shape for modern look */
    padding: 12px 28px;
    letter-spacing: 0.5px;
    display: inline-flex;
    /* Fix alignment */
    align-items: center;
    justify-content: center;
    gap: 8px;
    /* Consistent spacing */
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    /* Bouncy dynamic feel */
    position: relative;
    z-index: 1;
}

.btn-ar:hover {
    background: #cc000e;
    color: white;
    box-shadow: 0 4px 15px rgba(230, 0, 18, 0.4);
    /* Enhanced glow */
    transform: translateY(-3px) scale(1.02);
    /* Dynamic lift */
}

.btn-ar-outline {
    background: transparent;
    border: 2px solid var(--ar-accent);
    color: var(--ar-accent);
    border-radius: 50px;
    /* Pill shape */
    padding: 10px 26px;
    /* Compensate for border */
    display: inline-flex;
    /* Fix alignment */
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    /* Bouncy dynamic feel */
    position: relative;
    z-index: 1;
}

.btn-ar-outline:hover {
    background: var(--ar-accent);
    color: white;
    box-shadow: 0 4px 15px rgba(230, 0, 18, 0.3);
    transform: translateY(-3px) scale(1.02);
    /* Dynamic lift */
}

/* Active filter button state */
.filter-btn.active,
.filter-btn.active.btn-ar {
    background: var(--ar-accent) !important;
    color: white !important;
    border-color: var(--ar-accent) !important;
}

/* Theme Toggle */
.theme-toggle-btn {
    background: none;
    border: none;
    color: white;
    font-size: 1.2rem;
    cursor: pointer;
    transition: transform 0.3s;
}

.theme-toggle-btn:hover {
    transform: rotate(15deg);
    color: var(--ar-accent);
}

/* Utilities */
.text-accent {
    color: var(--ar-accent) !important;
}

.text-muted {
    color: var(--ar-text-muted) !important;
}

.bg-dark {
    background-color: #000 !important;
}

/* Stats Bar */
.ar-stats-bar {
    background: var(--ar-card-bg);
    border: 1px solid var(--ar-border);
    border-radius: 8px;
    box-shadow: 0 4px 6px var(--ar-shadow);
    /* SYNC: Color transitions at 0.8s */
    transition: background-color 0.8s, border-color 0.8s, box-shadow 0.3s;
}

.ls-1 {
    letter-spacing: 1px;
}

/* News Carousel */
.ar-news-slide {
    height: 400px;
    background-size: cover;
    background-position: center;
    position: relative;
    display: flex;
    align-items: flex-end;
}

.carousel-caption {
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
    width: 100%;
    left: 0;
    bottom: 0;
    padding-bottom: 3rem !important;
    z-index: 10;
    /* Ensure content is above standard controls */
}

/* Fix Carousel Controls overlapping buttons */
.ar-news-carousel .carousel-control-prev,
.ar-news-carousel .carousel-control-next {
    width: 5%;
    /* Reduce from default 15% to prevent overlap */
    z-index: 20;
    /* Keep arrows above content but strictly to the side */
}

/* Ensure Read More button is definitely clickable */
.ar-news-slide .btn-ar {
    position: relative;
    z-index: 30;
    /* Higher than controls */
}

/* Quick Guide Buttons */
.ar-guide-btn {
    display: block;
    background: var(--ar-card-bg);
    border: 1px solid var(--ar-border);
    padding: 20px;
    border-radius: 8px;
    color: var(--ar-text);
    text-transform: uppercase;
    font-weight: bold;
    /* SYNC: Color transitions at 0.8s. */
    transition: transform 0.3s, box-shadow 0.3s, background-color 0.8s, border-color 0.8s, color 0.8s;
}

.ar-guide-btn:hover {
    background: var(--ar-accent);
    color: white;
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(230, 0, 18, 0.4);
    border-color: var(--ar-accent);
}

/* Community CTA */
/* Animations */
@keyframes arFadeInUp {
    from {
        opacity: 0;
        transform: translate3d(0, 30px, 0);
    }

    to {
        opacity: 1;
        transform: translate3d(0, 0, 0);
    }
}

.ar-fade-in-up {
    animation: arFadeInUp 0.6s cubic-bezier(0.165, 0.84, 0.44, 1) forwards;
    opacity: 0;
}

/* Card Utilities */
.bg-gradient-dark {
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
}

.hover-lift {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hover-lift:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.hover-lift:hover img {
    transform: scale(1.05);
}

.transition-transform {
    transition: transform 0.3s ease;
}

/* New Block Styles */
.glass-card {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.btn-gradient-primary {
    background: linear-gradient(135deg, var(--ar-accent) 0%, #ff4d5a 100%);
    color: white;
    border: none;
    transition: transform 0.2s, box-shadow 0.2s;
}

.btn-gradient-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(230, 0, 18, 0.4);
    color: white;
}

/* CSS Utility to fix Gradient Fade */
.bg-gradient-top {
    background: linear-gradient(to top, var(--ar-bg) 0%, var(--ar-bg) 5%, transparent 30%) !important;
}

@media (max-width: 768px) {
    .ar-hero-logo {
        /* Fit logo within screen */
        width: 90%;
        max-width: 100%;
        margin-left: auto;
        margin-right: auto;
        transform: none;
        display: block;
        filter: drop-shadow(0px 10px 20px rgba(0, 0, 0, 0.5));
    }
}