/* ========== Anton Retro: Nintendo Modern Theme (Final Fix: Correct Dark/Light Wave Colors) ========== */

/* Pulse animation for loading states (moved from render_block.ejs to load once) */
@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }
}

.animate-pulse {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

:root {
    /* Navigation Height Variable (Smart Gap System) */
    --nav-height: 60px;

    /* Default: Dark Mode Overhauled */
    --ar-bg: #0a0a0b;
    /* Deeper black */
    --ar-text: #f0f0f5;
    /* Off-white for better readability */
    --ar-text-muted: #8e8e93;
    --ar-card-bg: #151517;
    --ar-border: rgba(255, 255, 255, 0.08);
    /* Sophisticated subtle border */
    --ar-accent: #ff0014;
    /* Vibrant Nintendo Red */
    --ar-nav-bg: rgba(0, 0, 0, 0.85);
    /* Semi-transparent for glass effect */
    --ar-shadow: rgba(0, 0, 0, 0.6);

    /* Glassmorphism 2.0 Variables */
    --ar-glass-bg: rgba(255, 255, 255, 0.03);
    --ar-glass-border: rgba(255, 255, 255, 0.1);
    --ar-glass-blur: 16px;

    /* FIX 1: Dark Mode Waves */
    --ar-wave-color: 10, 10, 11;
    --ar-font-head: 'Poppins', sans-serif;
    --ar-font-body: 'Poppins', sans-serif;

    /* Scrollbar Variables */
    --ar-scrollbar-bg: #0a0a0b;
    --ar-scrollbar-thumb: #333336;
}

/* Global Navbar Gap Fix - ensures content on NORMAL pages doesn't go behind the navbar */
body {
    padding-top: var(--nav-height);
}

/* Navbar height enforcement */
.ar-navbar {
    height: var(--nav-height);
}

/* Hero Section Special Handling - image goes BEHIND nav, but text stays safe */
/* Hero Section Special Handling - image goes BEHIND nav, but text stays safe */
.ar-article-hero {
    margin-top: calc(var(--nav-height) * -1);
    padding-top: calc(var(--nav-height) + 40px);

    min-height: 60vh;
    overflow: hidden;
    color: #ffffff !important;
    /* CRITICAL: Force white text always */
}

/* Force all children to respect the dark theme of the hero */
.ar-article-hero h1,
.ar-article-hero h2,
.ar-article-hero h3,
.ar-article-hero p,
.ar-article-hero span,
.ar-article-hero div,
.ar-article-hero small {
    color: #ffffff !important;
}

/* Force Links/Breadcrumbs to be White/Light */
.ar-article-hero a,
.ar-article-hero .ar-hero-breadcrumb a,
.ar-article-hero .nav-link {
    color: rgba(255, 255, 255, 0.9) !important;
}

.ar-article-hero a:hover,
.ar-article-hero .ar-hero-breadcrumb a:hover {
    color: #ffffff !important;
    text-decoration: underline;
}


.ar-hero-fog {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.3) 0%, rgba(18, 18, 18, 1) 100%);
    z-index: 2;
}

/* Share Button Styling from User Request */
.share-btn {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white !important;
    text-decoration: none !important;
    transition: all 0.2s ease;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.9rem;
    cursor: pointer;
}

.share-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

/* Brand Colors for Hover */
.share-x:hover {
    background: #000000 !important;
}

.share-fb:hover {
    background: #1877F2 !important;
}

.share-rd:hover {
    background: #FF4500 !important;
}

.share-wa:hover {
    background: #25D366 !important;
}

.share-ig:hover {
    background: #E1306C !important;
}

/* Instagram Pink */
.share-cp:hover {
    background: #6c757d !important;
}

/* Guide Specific Styles */
.step-number {
    display: inline-block;
    width: 32px;
    height: 32px;
    background: var(--ar-accent);
    color: white;
    border-radius: 50%;
    text-align: center;
    line-height: 32px;
    font-weight: bold;
    margin-right: 12px;
    box-shadow: 0 4px 10px rgba(230, 0, 18, 0.4);
}

.guide-toc {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--ar-border);
}

/* Discord Button Styling */
.btn-discord {
    background: #5865F2;
    color: #ffffff;
    border: none;
    transition: all 0.3s ease;
}

.btn-discord:hover {
    background: #4752C4;
    color: #ffffff;
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(88, 101, 242, 0.5);
}




/* =====================================
   CRITICAL NAVBAR GLASSMORPHISM (TOP LEVEL)
   ===================================== */
.ar-navbar,
nav.ar-navbar,
.navbar.ar-navbar {
    background: #000000 !important;
    backdrop-filter: blur(12px) saturate(180%) !important;
    -webkit-backdrop-filter: blur(12px) saturate(180%) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3) !important;
}



[data-theme="light"] .ar-navbar,
[data-theme="light"] nav.ar-navbar,
[data-theme="light"] .navbar.ar-navbar {
    background: #000000 !important;
    backdrop-filter: blur(12px) saturate(180%) !important;
    -webkit-backdrop-filter: blur(12px) saturate(180%) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
}

/* MOBILE MENU BRAND TEXT - ALWAYS WHITE */
#mobileMenuOverlay .navbar-brand,
#mobileMenuOverlay .navbar-brand span,
#mobileMenuOverlay #closeMobileMenu i,
#mobileMenuOverlay .ar-mobile-util-btn i,
.mobile-menu-header .navbar-brand,
.mobile-menu-header .navbar-brand span {
    color: #ffffff !important;
}

/* MOBILE MENU - Link styling with proper active state */
.mobile-link {
    display: flex;
    align-items: center;
    padding: 1.2rem 1.5rem;
    font-size: 1.5rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: #ffffff !important;
    text-decoration: none;
    position: relative;
    z-index: 1;
    transition: all 0.3s cubic-bezier(0.165, 0.84, 0.44, 1);
    border-left: 0 solid var(--ar-accent);
}

.mobile-link:hover,
.mobile-link:focus,
.mobile-link.active {
    color: var(--ar-accent, #e60012) !important;
    background: rgba(255, 255, 255, 0.05);
    padding-left: 2rem;
    border-left-width: 5px;
}

/* Mobile Menu Footer - Better button positioning */
.mobile-menu-footer {
    padding: 20px;
    padding-bottom: calc(20px + env(safe-area-inset-bottom, 20px));
}

.mobile-menu-footer .ar-mobile-util-btn {
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

/* BREADCRUMB - Clean styling, no bars */
.breadcrumb {
    background: transparent !important;
    padding: 0 !important;
    margin-bottom: 0.5rem !important;
}

/* BREADCRUMB - Clean styling, no bars */
.breadcrumb-item a {
    text-decoration: none !important;
    border-bottom: none !important;
}

.breadcrumb-item a:hover {
    text-decoration: none !important;
    opacity: 1 !important;
}

.breadcrumb-item+.breadcrumb-item::before {
    content: "/" !important;
    color: rgba(255, 255, 255, 0.5) !important;
    padding-right: 0.5rem;
}

/* Light Mode Breadcrumb Fix */
[data-theme="light"] .breadcrumb-item+.breadcrumb-item::before {
    color: rgba(0, 0, 0, 0.3) !important;
}

.breadcrumb-item.active {
    border-bottom: none !important;
    text-decoration: none !important;
}

/* ========== LIGHT MODE - CLEAN IMPLEMENTATION ========== */
/* Only override the CSS variables - let existing styles use them */
[data-theme="light"] {
    --ar-bg: #f8f9fa;
    --ar-text: #1c1c1e;
    --ar-text-muted: #636366;
    --ar-card-bg: #ffffff;
    --ar-border: rgba(0, 0, 0, 0.08);
    --ar-accent: #ff0014;
    --ar-nav-bg: rgba(0, 0, 0, 0.9);
    --ar-shadow: rgba(0, 0, 0, 0.05);
    --ar-wave-color: 255, 255, 255;

    --ar-glass-bg: rgba(0, 0, 0, 0.02);
    --ar-glass-border: rgba(0, 0, 0, 0.05);

    /* Light Mode Scrollbar (Subtle & Clean) */
    --ar-scrollbar-bg: #f8f9fa;
    --ar-scrollbar-thumb: #ccc;
}

/* ========== LIGHT MODE - WHITELIST APPROACH ========== */
/* Target ONLY specific areas that need dark text - no complex exclusions */

/* === AREAS THAT STAY WHITE (don't touch) === */
/* navbar, hero banners, verdict box, carousels, bg-dark areas, card overlays */

/* === HOME PAGE === */
/* Welcome section text */
/* Welcome section text */
[data-theme="light"] .ar-home-hero h1,
[data-theme="light"] .ar-home-hero h2,
[data-theme="light"] .ar-home-hero p {
    color: var(--ar-text) !important;
}

/* Section headers on home page (Latest Reviews, Featured, etc) */
[data-theme="light"] .container>.row>.col-12>h2.text-white,
[data-theme="light"] .container>.text-center>h2 {
    color: var(--ar-text) !important;
}

/* Browse Guides button */
[data-theme="light"] a.btn-outline-light[href="/guides"] {
    color: var(--ar-text) !important;
    border-color: var(--ar-text) !important;
}

[data-theme="light"] a.btn-outline-light[href="/guides"]:hover {
    background-color: var(--ar-text) !important;
    color: #fff !important;
}

/* === REVIEW ARTICLE PAGE === */
/* Main review body text */
[data-theme="light"] .review-content p,
[data-theme="light"] .review-content h2,
[data-theme="light"] .review-content h3,
[data-theme="light"] .review-content h4 {
    color: var(--ar-text);
}

/* More Reviews section title */
[data-theme="light"] .more-reviews h3,
[data-theme="light"] .more-reviews h4 {
    color: var(--ar-text) !important;
}

/* === REVIEWS LIST PAGE === */
/* Card descriptions */
[data-theme="light"] .ar-card .card-body p {
    color: var(--ar-text-muted) !important;
}

/* === GUIDE ARTICLE PAGE === */
/* Sidebar cards - Resources and What You'll Need content */
[data-theme="light"] .sidebar-card .card-body:not(.bg-dark) h5,
[data-theme="light"] .sidebar-card .card-body:not(.bg-dark) p,
[data-theme="light"] .sidebar-card .card-body:not(.bg-dark) li,
[data-theme="light"] .sidebar-card .card-body:not(.bg-dark) a:not(.btn),
[data-theme="light"] .sidebar-card .card-body:not(.bg-dark) span:not(.badge) {
    color: var(--ar-text) !important;
}

/* Keep checkmarks green */
[data-theme="light"] .sidebar-card .text-success {
    color: #198754 !important;
}

/* === GAMES PAGE === */
/* Section titles */
[data-theme="light"] .games-section h2,
[data-theme="light"] .games-section h3 {
    color: var(--ar-text) !important;
}

/* Prevent cards from turning black on hover */
[data-theme="light"] .ar-card:hover {
    background: var(--ar-card-bg) !important;
}

/* Badge styling - Theme Adaptive */
/* Dark Mode: Black bg + white text + dark grey border (default Bootstrap) */
/* Light Mode: Dark grey bg + white text + grey border */
/* Exclude difficulty badges, NEW (bg-warning), BLUE (bg-primary), CYAN (bg-info), SUCCESS, and DANGER badges */
[data-theme="light"] .badge.bg-dark:not(.border-success):not(.border-warning):not(.border-danger):not(.bg-warning):not(.bg-primary):not(.bg-info):not(.bg-success):not(.bg-danger),
[data-theme="light"] .badge.bg-dark:not(.border-success):not(.border-warning):not(.border-danger):not(.bg-warning):not(.bg-primary):not(.bg-info):not(.bg-success):not(.bg-danger) *,
[data-theme="light"] .ar-card .badge:not(.border-success):not(.border-warning):not(.border-danger):not(.bg-warning):not(.bg-primary):not(.bg-info):not(.bg-success):not(.bg-danger),
[data-theme="light"] .ar-card .badge:not(.border-success):not(.border-warning):not(.border-danger):not(.bg-warning):not(.bg-primary):not(.bg-info):not(.bg-success):not(.bg-danger) *,
[data-theme="light"] .review-card .badge:not(.border-success):not(.border-warning):not(.border-danger):not(.bg-warning):not(.bg-primary):not(.bg-info):not(.bg-success):not(.bg-danger),
[data-theme="light"] .review-card .badge:not(.border-success):not(.border-warning):not(.border-danger):not(.bg-warning):not(.bg-primary):not(.bg-info):not(.bg-success):not(.bg-danger) *,
[data-theme="light"] .badge.border-secondary:not(.bg-warning):not(.bg-primary):not(.bg-info):not(.bg-success):not(.bg-danger),
[data-theme="light"] .carousel-caption .badge.bg-dark:not(.border-success):not(.border-warning):not(.border-danger):not(.bg-warning):not(.bg-primary):not(.bg-info):not(.bg-success):not(.bg-danger) {
    background-color: #2a2a2a !important;
    color: #ffffff !important;
    border-color: #555 !important;
    -webkit-text-fill-color: #ffffff !important;
}

/* Difficulty badges keep colored borders but get dark background in light mode */
[data-theme="light"] .badge.border-success:not(.bg-warning):not(.bg-primary):not(.bg-info),
[data-theme="light"] .badge.border-warning:not(.bg-warning):not(.bg-primary):not(.bg-info),
[data-theme="light"] .badge.border-danger:not(.bg-warning):not(.bg-primary):not(.bg-info) {
    background-color: #2a2a2a !important;
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
}

/* NEW badge ALWAYS yellow with black text - highest specificity */
.badge.bg-warning,
.badge.bg-warning.text-dark,
[data-theme="light"] .badge.bg-warning,
[data-theme="light"] .ar-card .badge.bg-warning,
[data-theme="light"] .carousel-caption .badge.bg-warning {
    background-color: #ffc107 !important;
    color: #000000 !important;
    border-color: #ffc107 !important;
    -webkit-text-fill-color: #000000 !important;
}

/* BLUE badges (Guide, Overview) stay blue in both modes */
.badge.bg-primary,
.ar-card .badge.bg-primary,
.guide-card .badge.bg-primary,
.ar-article-hero .badge.bg-primary,
[data-theme="light"] .badge.bg-primary,
[data-theme="light"] .ar-card .badge.bg-primary,
[data-theme="light"] .carousel-caption .badge.bg-primary {
    background-color: #007bff !important;
    color: #ffffff !important;
    border-color: #0056b3 !important;
    -webkit-text-fill-color: #ffffff !important;
}

/* CYAN badges (Tutorial) stay light blue in both modes */
.badge.bg-info,
.ar-card .badge.bg-info,
.guide-card .badge.bg-info,
.ar-article-hero .badge.bg-info,
[data-theme="light"] .badge.bg-info,
[data-theme="light"] .ar-card .badge.bg-info,
[data-theme="light"] .carousel-caption .badge.bg-info {
    background-color: #17a2b8 !important;
    color: #ffffff !important;
    border-color: #117a8b !important;
    -webkit-text-fill-color: #ffffff !important;
}

/* === PORTAL PAGE === */
[data-theme="light"] .portal-card p,
[data-theme="light"] .portal-card h5,
[data-theme="light"] .portal-content p,
[data-theme="light"] .portal-content h1,
[data-theme="light"] .portal-content h2 {
    color: var(--ar-text);
}

/* === BLOCK CONTENT (GUIDES/REVIEWS) === */
[data-theme="light"] .block-wrapper h2,
[data-theme="light"] .block-wrapper h3,
[data-theme="light"] .block-wrapper h4,
[data-theme="light"] .block-wrapper p {
    color: var(--ar-text);
}

/* ========== LIGHT MODE - STRICT OVERRIDES ========== */
/* 0. PROTECTION RULES - Keep these areas WHITE */
/* These force Hero Banners to always look like Dark Mode */
/* MAX SPECIFICITY SELECTORS to beat generic overrides (0-3-1 vs 0-4-0) */
[data-theme="light"] .ar-article-hero h1,
[data-theme="light"] .ar-article-hero .text-white,
[data-theme="light"] .ar-article-hero .lead,
[data-theme="light"] .ar-article-hero .badge,
[data-theme="light"] .ar-article-hero .breadcrumb-item a,
[data-theme="light"] .ar-article-hero .breadcrumb-item.active,
[data-theme="light"] .ar-article-hero .opacity-75,
[data-theme="light"] .ar-article-hero .breadcrumb-item+.breadcrumb-item::before,
[data-theme="light"] .ar-article-hero .text-white-50,
[data-theme="light"] .ar-custom-header.ar-article-hero h1,
[data-theme="light"] .ar-custom-header.ar-article-hero .text-white,
[data-theme="light"] .bg-gradient-dark .text-white,
[data-theme="light"] .ar-card .position-absolute .text-white,
[data-theme="light"] .ar-card .bg-dark h5,
[data-theme="light"] .ar-card .bg-dark .text-white,
[data-theme="light"] .ar-card .bg-dark i,
[data-theme="light"] .ar-card .bg-dark .badge {
    color: #fff !important;
}

/* Force specific elements to be dark in light mode */

/* 1. Home & Generic Section Headers */
/* Targets "Featured Content", "Latest Reviews" titles on Home, and similar on other pages */
/* EXCLUDE: .bg-gradient-dark and .position-absolute to keep Dates on Cards white */
[data-theme="light"] main.container .text-white:not(.badge):not(.btn):not(.ar-navbar *):not(.bg-dark *):not(.verdict-box *):not(.ar-hero-banner *):not(.carousel-caption *):not(.bg-gradient-dark *):not(.position-absolute *) {
    color: var(--ar-text) !important;
}

/* 2. Review Article Specifics */
/* Main Title "Paper Mario..." - EXCLUDE HERO BANNERS */
[data-theme="light"] .review-header h1.text-white:not(.ar-article-hero *):not(.ar-hero-banner *):not(.ar-custom-header *),
[data-theme="light"] h1.display-3.text-white:not(.ar-article-hero *):not(.ar-hero-banner *):not(.ar-custom-header *),
[data-theme="light"] h1.display-4.text-white:not(.ar-article-hero *):not(.ar-hero-banner *):not(.ar-custom-header *) {
    color: var(--ar-text) !important;
}

/* Author/Date Meta */
[data-theme="light"] .d-flex.text-white-50 {
    color: var(--ar-text-muted) !important;
}

[data-theme="light"] .d-flex .text-white {
    color: var(--ar-text) !important;
}

/* "More Reviews" Title */
[data-theme="light"] h5.fw-bold.text-white.mb-3 {
    color: var(--ar-text) !important;
}

/* 3. Card Descriptions & Titles (News Grid, Games, etc) */
/* Ensures card text is black in light mode */
[data-theme="light"] .card-body h5.card-title,
[data-theme="light"] .card-body p.card-text,
[data-theme="light"] .view-grid h5.card-title,
[data-theme="light"] .view-grid p.card-text,
[data-theme="light"] .ar-card p.text-muted,
[data-theme="light"] .ar-card .text-muted,
[data-theme="light"] .ar-card .text-white-50 {
    color: var(--ar-text-muted) !important;
}

/* 4. Guide Article Sidebar Content */
/* Resources/What You Need lists - body only, keep headers dark */
[data-theme="light"] .sidebar-card .p-4:not(.bg-dark) {
    background-color: transparent !important;
}

[data-theme="light"] .sidebar-card .p-4:not(.bg-dark) li a,
[data-theme="light"] .sidebar-card .p-4:not(.bg-dark) li span:not(.badge),
[data-theme="light"] .sidebar-card .p-4:not(.bg-dark) .name-text {
    color: var(--ar-text) !important;
}

[data-theme="light"] .sidebar-card .p-4:not(.bg-dark) .text-white-50 {
    color: var(--ar-text-muted) !important;
}

/* EXCEPTION: Green checkmarks stay green */
[data-theme="light"] .sidebar-card .p-4:not(.bg-dark) .text-success {
    color: #198754 !important;
}

/* EXCEPTION: Icons in icon-box stay white (if they are on dark background?) 
   User said "don't touch the resources title and icon". The icon-box is usually colored/dark. 
   If icon-box has .text-white, let's keep it if it has a background.
   Assuming .icon-box has specific styling. */

/* 5. Footer & About */
/* Force footer text to be dark in light mode */
[data-theme="light"] footer.ar-footer {
    background: #f8f9fa !important;
    /* Force light background */
}

[data-theme="light"] footer.ar-footer h5.text-white,
[data-theme="light"] footer.ar-footer h6.text-white,
[data-theme="light"] footer.ar-footer p.text-white-50,
[data-theme="light"] footer.ar-footer .footer-links a,
[data-theme="light"] footer.ar-footer .small.text-white-50 {
    color: var(--ar-text) !important;
}

/* Subscriber counts in About/Home stats bar */
[data-theme="light"] .ar-stats-bar h2.text-accent {
    color: var(--ar-accent) !important;
}

[data-theme="light"] .ar-stats-bar span.text-muted {
    color: var(--ar-text-muted) !important;
}

/* 5b. About & Credits Card Hover Fixes */
[data-theme="light"] .ar-card:hover h1,
[data-theme="light"] .ar-card:hover h2,
[data-theme="light"] .ar-card:hover h3,
[data-theme="light"] .ar-card:hover h4,
[data-theme="light"] .ar-card:hover h5,
[data-theme="light"] .ar-card:hover .text-white:not(.bg-gradient-dark *):not(.position-absolute *),
[data-theme="light"] .ar-card:hover .text-white-50:not(.bg-gradient-dark *):not(.position-absolute *),
[data-theme="light"] .ar-card:hover .ar-text-body,
[data-theme="light"] .card.hover-lift:hover h1,
[data-theme="light"] .card.hover-lift:hover h2,
[data-theme="light"] .card.hover-lift:hover h3,
[data-theme="light"] .card.hover-lift:hover h4,
[data-theme="light"] .card.hover-lift:hover h5,
[data-theme="light"] .card.hover-lift:hover .text-white:not(.bg-gradient-dark *):not(.position-absolute *),
[data-theme="light"] .card.hover-lift:hover .text-white-50:not(.bg-gradient-dark *):not(.position-absolute *) {
    color: var(--ar-text) !important;
}

[data-theme="light"] .ar-card:hover .text-muted,
[data-theme="light"] .card.hover-lift:hover .text-muted {
    color: var(--ar-text-muted) !important;
}

/* 6. Portal Page */
/* Main headers and card text */
[data-theme="light"] .portal-main h1.text-white,
[data-theme="light"] .portal-main p.text-white-50,
[data-theme="light"] .glass-card:not(.current-site-card) h3,
[data-theme="light"] .glass-card:not(.current-site-card) p,
[data-theme="light"] .glass-card:not(.current-site-card) .btn-outline-light {
    color: var(--ar-text) !important;
    border-color: var(--ar-text) !important;
}

/* "Current Site" card stays as is (User req: "except current site... and login") */
/* Login button is separately styled often, but if it's outline-light, we might catch it above?
   User said "login... don't need to be touched". Login button is .btn-outline-secondary in code.
   The above rule targets .btn-outline-light.
*/

/* 7. Videos Page */
[data-theme="light"] .video-card h5 {
    color: var(--ar-text) !important;
}

/* ========== END OF THEME DEFINITIONS ========== */

/* DISCORD BUTTON - SAME IN BOTH THEMES (User Request: Dark Mode Style) */
.btn-discord {
    background-color: white !important;
    color: #5865F2 !important;
    border: none;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

/* Light mode - INVERTED (User Request) - Blue bg, white text */
[data-theme="light"] .btn-discord {
    background-color: #5865F2 !important;
    color: white !important;
}

/* SHINY EFFECT ON DISCORD BUTTON */
.btn-discord::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    transition: left 0.5s ease;
}

.btn-discord:hover::after {
    left: 100%;
}

.btn-discord:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(88, 101, 242, 0.4);
}

/* CRITICAL: Force WHITE text on "Join Community" Red Section */
.ar-cta-section h2,
.ar-cta-section p,
.ar-cta-section .text-white,
[data-theme="light"] .ar-cta-section h2,
[data-theme="light"] .ar-cta-section p,
[data-theme="light"] .ar-cta-section .text-white {
    color: #ffffff !important;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.ar-cta-section {
    background: linear-gradient(135deg, #e60012 0%, #ff4d5a 100%);
    /* Ensure red background */
}

/* QUICK GUIDE BUTTONS - ALL BLACK IN BOTH THEMES (User Request) */
.ar-guide-btn {
    display: block;
    padding: 1.5rem 1rem;
    background: #1a1a1a !important;
    color: #ffffff !important;
    border: 2px solid rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    text-decoration: none;
    font-weight: 700;
    transition: all 0.3s ease;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.ar-guide-btn:hover {
    background: var(--ar-accent) !important;
    /* RED on hover */
    color: #ffffff !important;
    border-color: var(--ar-accent);
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(230, 0, 18, 0.4);
}

.ar-guide-btn::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.ar-guide-btn:hover::after {
    left: 100%;
}

.ar-guide-btn i {
    color: #ffffff !important;
}

[data-theme="light"] .ar-guide-btn {
    background: #1a1a1a !important;
    color: #ffffff !important;
}

[data-theme="light"] .ar-guide-btn:hover {
    background: #e60012 !important;
    /* RED on hover in light mode too */
    color: #ffffff !important;
}

[data-theme="light"] .ar-guide-btn i {
    color: #ffffff !important;
}

/* HERO BANNER TITLES - ALWAYS WHITE (User Request) */
.ar-hero-banner h1,
.ar-hero-title-container h1,
[data-theme="light"] .ar-hero-banner h1,
[data-theme="light"] .ar-hero-title-container h1 {
    color: #ffffff !important;
}

/* SUBSCRIBE BUTTON - Shiny Grey Effect (User Request) */
.btn-light,
.newsletter-card .btn-light {
    position: relative;
    overflow: hidden;
    background: linear-gradient(145deg, #f8f9fa, #e0e0e0) !important;
    border: none;
}

.btn-light::after,
.newsletter-card .btn-light::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.6), transparent);
    transition: left 0.5s ease;
}

.btn-light:hover::after,
.newsletter-card .btn-light:hover::after {
    left: 100%;
}

.btn-light:hover,
.newsletter-card .btn-light:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

/* Navigation Refinements */
.ar-nav-link {
    position: relative;
    padding: 0.5rem 0.25rem !important;
    margin: 0 0.75rem !important;
}

.ar-nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--ar-accent);
    transition: width 0.3s ease;
}

.ar-nav-link:hover::after,
.ar-nav-link.active::after {
    width: 100%;
}

/* ========== END OF THEME DEFINITIONS ========== */




body {
    background-color: var(--ar-bg);
    color: var(--ar-text);
    font-family: var(--ar-font-body);
    /* SYNCHRONIZED FADE: Set to 0.3s for fast theme transition */
    transition: background-color 0.3s ease-in-out, color 0.3s ease-in-out;
    cursor: url('/assets/previewfile_3491605514.png') 10 2, auto;
    /* Custom Wii Cursor */
    overflow-x: hidden;
    width: 100%;
    max-width: 100vw;
}

/* iOS Safari overflow fix */
html {
    overflow-x: hidden;
    max-width: 100vw;
    background-color: var(--ar-bg);
    overscroll-behavior: none;
    -webkit-overflow-scrolling: touch;
}

h1,
h2,
h3,
h4,
h5 {
    font-family: var(--ar-font-head);
    font-weight: 700;
    letter-spacing: -0.5px;
}

/* Font Size Tweaks - Matched to AnthonyMicallef.ca */
h1 {
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: -0.03em;
    line-height: 1.1;
}

h2 {
    font-weight: 700;
    letter-spacing: -0.02em;
}

h3 {
    /* Revert to Bootstrap Default / Theme Default */
    font-weight: 700;
}

/* Content heading spacing - proper margin for readability */
/* Need !important to override Bootstrap mt-4 mb-0 classes */
article h2,
.block-wrapper h2,
.content h2,
.review-content h2 {
    margin-top: 2.5rem !important;
    margin-bottom: 1rem !important;
}

article h3,
.block-wrapper h3,
.content h3,
.review-content h3 {
    margin-top: 2rem !important;
    margin-bottom: 0.75rem !important;
}

article h4,
.block-wrapper h4,
.content h4,
.review-content h4 {
    margin-top: 1.5rem !important;
    margin-bottom: 0.5rem !important;
}

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: none;
    padding: 0.5rem 0;
    z-index: 2000;
    /* Ensure it stays above most content */
}

@media (max-width: 991.98px) {
    .ar-navbar {
        background: #000 !important;
        /* Force solid black on mobile */
    }
}

.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 (The Red Back Layer) */
.ar-hero-banner {
    width: 100%;
    height: 300px;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #e60012;
    /* Boosted Saturation: Nintendo Red */
    overflow: hidden;
    animation: heroFadeIn 1s ease-out forwards;
}

/* Article Hero Titles - Make them IMPRESSIVE */
.ar-hero-banner h1,
.ar-article-hero h1,
.ar-custom-header h1 {
    /* Inherit global H1 clamp size */
    font-weight: 800 !important;
    text-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    color: #ffffff !important;
    /* Force White Text always */
}

/* === CRITICAL VISIBILITY FIXES === */
/* Force white text in all Hero formatting contexts, regardless of Theme */
.ar-hero-banner,
.ar-article-hero,
.ar-custom-header {
    color: #ffffff !important;
}

.ar-hero-banner h1,
.ar-hero-banner h2,
.ar-hero-banner h3,
.ar-hero-banner p,
.ar-hero-banner span,
.ar-hero-banner div,
.ar-article-hero h1,
.ar-article-hero h2,
.ar-article-hero h3,
.ar-article-hero p,
.ar-article-hero span,
.ar-article-hero div,
.ar-article-hero .breadcrumb-item,
.ar-article-hero .breadcrumb-item a,
.ar-article-hero .badge {
    color: #ffffff !important;
}

.ar-article-hero .badge.bg-warning {
    color: #000000 !important;
    /* Keep warning badges (NEW/Review) dark text for contrast */
}

/* Fix Dark Cards in Light Mode */
[data-theme="light"] .bg-dark,
[data-theme="light"] .bg-black,
[data-theme="light"] .ar-card.bg-dark,
[data-theme="light"] .ar-card.bg-black {
    color: #ffffff !important;
}

[data-theme="light"] .bg-dark h1,
[data-theme="light"] .bg-dark h2,
[data-theme="light"] .bg-dark h3,
[data-theme="light"] .bg-dark h4,
[data-theme="light"] .bg-dark h5,
[data-theme="light"] .bg-dark p,
[data-theme="light"] .bg-dark a:not(.btn),
[data-theme="light"] .bg-dark i,
[data-theme="light"] .bg-dark .opacity-75 {
    color: #ffffff !important;
}


@keyframes heroFadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* Fix navbar icon alignment and dividers */
.ar-navbar .nav-item.border-start {
    border-left: 1px solid rgba(255, 255, 255, 0.15) !important;
    height: 20px;
    margin-top: auto;
    margin-bottom: auto;
    display: flex;
    align-items: center;
    padding-left: 1rem !important;
    margin-left: 0.5rem;
}

.ar-navbar .navbar-nav {
    align-items: center;
}

.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 10px 10px 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(0 8px 8px rgba(0, 0, 0, 0.6));
    }
}

@keyframes float {
    0% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-15px);
    }

    100% {
        transform: translateY(0px);
    }
}

@keyframes bgScroll {
    0% {
        background-position: 0 0;
    }

    100% {
        background-position: 1200px 1200px;
        /* Match new background size */
    }
}

/* --- 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: 25px;
    /* More rounded to match height */
    padding: 4px 12px 4px 42px !important;
    color: white;
    width: 160px;
    height: 40px;
    /* Matched to theme toggle buttons */
    font-size: 0.9rem;
    transition: all 0.3s ease;
    line-height: normal;
}

.ar-search-input:focus {
    background: rgba(255, 255, 255, 0.2);
    width: 200px;
    outline: none;
    border-color: var(--ar-accent);
}

.ar-search-icon {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: rgba(255, 255, 255, 0.7);
    pointer-events: none;
}

/* JS Generated Bubble Class - ENHANCED */
#ar-global-bubbles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -1;
    /* Stay in background, behind all text/content */
}

.ar-bubble {
    position: absolute;
    bottom: -150px;
    z-index: 2000;
    background: radial-gradient(circle at 35% 35%,
            rgba(255, 255, 255, 0.4),
            rgba(200, 200, 255, 0.25) 40%,
            rgba(150, 150, 200, 0.15) 70%,
            transparent);
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.4);
    box-shadow:
        0 0 20px rgba(255, 255, 255, 0.3),
        0 0 40px rgba(150, 150, 255, 0.2),
        inset 0 0 20px rgba(255, 255, 255, 0.2);
    cursor: pointer;
    pointer-events: auto;
    transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    backdrop-filter: blur(2px);
    will-change: transform;
}

.ar-bubble::before {
    content: '';
    position: absolute;
    top: 15%;
    left: 20%;
    width: 40%;
    height: 40%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.8), transparent 70%);
    border-radius: 50%;
    filter: blur(8px);
}

.ar-bubble:hover {
    transform: scale(1.15);
    border-color: var(--ar-accent, #e60012);
    background: radial-gradient(circle at 35% 35%,
            rgba(230, 0, 18, 0.3),
            rgba(230, 0, 18, 0.15) 40%,
            rgba(230, 0, 18, 0.05) 70%,
            transparent);
    box-shadow:
        0 0 30px rgba(230, 0, 18, 0.4),
        0 0 60px rgba(230, 0, 18, 0.2),
        inset 0 0 25px rgba(255, 255, 255, 0.2);
}

.ar-bubble.popped {
    animation: popEnhanced 0.3s cubic-bezier(0.4, 0, 0.2, 1) forwards !important;
}

@keyframes popEnhanced {
    0% {
        transform: scale(1);
        opacity: 1;
    }

    50% {
        transform: scale(1.3);
        opacity: 0.5;
    }

    100% {
        transform: scale(0);
        opacity: 0;
    }
}

@keyframes rise-up {
    0% {
        transform: translateY(0) scale(1);
        opacity: 0;
    }

    10% {
        opacity: 0.8;
    }

    90% {
        opacity: 0.8;
    }

    100% {
        transform: translateY(-120vh) scale(1.1);
        opacity: 0;
    }
}

@keyframes pop {
    0% {
        transform: scale(1);
        opacity: 1;
        filter: blur(0);
    }

    100% {
        transform: scale(2.5);
        opacity: 0;
        filter: blur(10px);
    }
}

/* BOSS BUBBLE STYLES */
.boss-bubble {
    z-index: 2200 !important;
    background: radial-gradient(circle at 35% 35%,
            rgb(255, 0, 0, 0.4),
            rgb(150, 0, 0, 0.6) 60%,
            rgb(50, 0, 0, 0.8)) !important;
    border: 4px solid #fff !important;
    box-shadow: 0 0 50px rgba(255, 0, 0, 0.8), inset 0 0 30px rgba(0, 0, 0, 0.5) !important;
    animation: boss-floating 4s ease-in-out infinite !important;
}

@keyframes boss-floating {

    0%,
    100% {
        transform: translate(-50%, -50%) scale(1);
    }

    50% {
        transform: translate(-50%, -60%) scale(1.05);
    }
}

/* Mobile Menu Overlay Redesign */
#mobileMenuOverlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background-color: #000;
    z-index: 3000;
    /* High priority */
    display: flex;
    flex-direction: column;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    transform: translateY(-20px);
}

#mobileMenuOverlay.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.mobile-menu-header {
    height: 70px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.mobile-menu-body {
    flex-grow: 1;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 2rem 0;
}

.mobile-menu-footer {
    height: 100px;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2rem;
}

.mobile-links-container {
    display: flex;
    flex-direction: column;
    width: 100%;
}

.boss-health-container {
    position: fixed;
    top: 20%;
    left: 50%;
    transform: translateX(-50%);
    width: 300px;
    height: 30px;
    background: rgba(0, 0, 0, 0.7);
    border: 3px solid #fff;
    border-radius: 15px;
    padding: 3px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.5s;
    z-index: 2300;
}

.boss-health-container.show {
    opacity: 1;
    visibility: visible;
}

.boss-health-bar {
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, #ff0000, #ff5f6d);
    border-radius: 10px;
    transition: width 0.2s ease-out;
}

.boss-name {
    position: absolute;
    top: -30px;
    left: 50%;
    transform: translateX(-50%);
    color: #fff;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 2px;
    text-shadow: 0 0 10px #ff0000;
    width: 100%;
    text-align: center;
}

/* Dynamic Wave Separator */
.ar-waves {
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100%;
    height: 100px;
    overflow: hidden;
    line-height: 0;
    z-index: 10;
    /* Ensure waves are on top of background layers (ar-hero-bg=1, ar-animated-bg=2, ar-gradient-overlay=3) */
    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: Glassmorphism 2.0 Refinement */
.ar-card {
    background: var(--ar-card-bg);
    border: 1px solid var(--ar-border);
    border-radius: 12px;
    box-shadow: 0 10px 30px -5px rgba(0, 0, 0, 0.3), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    /* SYNC: Color transitions at 0.8s. */
    transition: background-color 0.8s, border-color 0.8s, transform 0.4s cubic-bezier(0.165, 0.84, 0.44, 1), box-shadow 0.4s ease;
    overflow: hidden;
    position: relative;
    z-index: 1;
}

.ar-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 100%;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0) 100%);
    opacity: 0;
    transition: opacity 0.4s ease;
    z-index: -1;
}

.ar-card:hover {
    transform: translateY(-8px) scale(1.02);
    border-color: var(--ar-accent);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.4), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.ar-card:hover::before {
    opacity: 1;
}

/* Card Thumbnail - 16:9 Aspect Ratio */
.ar-card-thumb {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    display: block;
}

/* 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;
    overflow: hidden;
}

.btn-ar-outline::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -60%;
    width: 20%;
    height: 200%;
    background: rgba(255, 255, 255, 0.25);
    transform: rotate(30deg);
    transition: all 0.6s ease;
    pointer-events: none;
}

.btn-ar-outline:hover {
    background: var(--ar-accent);
    color: white !important;
    box-shadow: 0 4px 15px rgba(230, 0, 18, 0.3);
    transform: translateY(-3px) scale(1.02);
    /* Dynamic lift */
}

.btn-ar-outline:hover::after {
    left: 120%;
}

/* 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;
}

/* Default state: Static image is hidden if animations are on */
.ar-hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: none;
    z-index: 1;
}

/* Dynamic layers configuration */
.ar-animated-bg {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 300%;
    height: 300%;
    background-image: url('/assets/images/Anton_Retro_Background_Graphics.webp');
    background-repeat: repeat;
    background-size: 1000px;
    animation: bgScroll 180s linear infinite;
    opacity: 0.35;
    /* 2. MIDDLE LAYER: THE PATTERN */
    z-index: 2;
    pointer-events: none;
    mix-blend-mode: normal;
    /* No blending to keep colors pure */
    filter: saturate(1.4) contrast(1.2);
    /* Boosted saturation and contrast for punchier detail */
    transform: translate(-50%, -50%) rotate(-30deg);
    will-change: transform;
    /* Hardware acceleration for no lag */
}

/* Lighting depth layer REMOVED per user request */

.ar-gradient-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('/assets/images/Anton-Retro-gradent.webp');
    background-size: 100% 100%;
    background-position: center;
    opacity: 0.10;
    /* 3. FRONTMOST LAYER: THE GRADIENT (HIDDEN) */
    z-index: 3;
    pointer-events: none;
}

/* 4. THE DARKENING OVERLAY (NEW FRONT LAYER) */
.ar-darken-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.2);
    /* Subtle darkening "a tad" */
    z-index: 5;
    pointer-events: none;
}

body.effects-off .ar-hero-bg {
    display: block !important;
    opacity: 1 !important;
}

.download-item-link:hover .fw-bold {
    color: var(--bs-success) !important;
    transition: color 0.3s ease;
}

body.effects-off .ar-animated-bg,
body.effects-off .ar-gradient-overlay,
body.effects-off .ar-darken-overlay {
    display: none !important;
}

body.effects-off .ar-wave-parallax>use {
    animation: none !important;
    transform: translate3d(0, 0, 0) !important;
    /* Snap to a clean, aligned wave shape */
}

body.effects-off .ar-hero-logo {
    animation: none !important;
}

body.effects-off * {
    transition: none !important;
}

/* Portal Card (Restored Styles) */
.portal-card {
    background: none;
    border: none;
    width: 100%;
    color: white;
    padding: 0;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.portal-card .icon-wrapper {
    width: 80px;
    height: 80px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    font-size: 2rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: transform 0.3s ease;
}

.portal-card:hover .icon-wrapper {
    transform: scale(1.1);
    background: rgba(255, 255, 255, 0.2);
}

.portal-card h3 {
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.portal-card p {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 1.5rem;
    line-height: 1.4;
}

.portal-card .action-btn {
    display: inline-block;
    padding: 10px 30px;
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: 50px;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 1px;
    transition: all 0.3s ease;
}

.portal-card:hover .action-btn {
    background: white;
    color: black;
    border-color: white;
}

.portal-card:hover {
    transform: translateY(-8px) scale(1.05);
    box-shadow: 0 20px 30px var(--ar-shadow);
    border-color: var(--ar-accent);
}

/* Theme Toggle - ALWAYS WHITE (stays in black navbar) */
.theme-toggle-btn {
    background: none;
    border: none;
    color: white !important;
    font-size: 1.2rem;
    cursor: pointer;
    transition: transform 0.3s;
}

.theme-toggle-btn:hover {
    transform: rotate(15deg);
    color: var(--ar-accent) !important;
}

/* Light mode - keep toggle white since navbar stays black */
[data-theme="light"] .theme-toggle-btn {
    color: white !important;
}

/* Utilities */
.text-accent {
    color: var(--ar-accent) !important;
}

.text-muted {
    color: var(--ar-text-muted) !important;
}

.bg-dark {
    background-color: #000 !important;
}

/* Fix for Light Mode: Ensure text inside bg-dark boxes (like Ethical Stance) is white */
[data-theme="light"] .bg-dark,
[data-theme="light"] .bg-dark p,
[data-theme="light"] .bg-dark strong,
[data-theme="light"] .bg-dark span:not(.badge) {
    color: #fff !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 */
}

/* Standardize Shiny Button Effect (Global) */
.btn-ar,
.btn-accent,
.btn-primary,
.btn-danger,
.btn-success,
.ar-shine,
.ar-guide-btn {
    position: relative;
    overflow: hidden;
}

.btn-ar::after,
.btn-accent::after,
.btn-primary::after,
.btn-danger::after,
.btn-success::after,
.ar-shine::after,
.ar-guide-btn::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -100%;
    width: 30%;
    height: 200%;
    background: linear-gradient(to right,
            rgba(255, 255, 255, 0) 0%,
            rgba(255, 255, 255, 0.3) 50%,
            rgba(255, 255, 255, 0) 100%);
    transform: rotate(30deg);
    transition: all 0.6s ease;
    pointer-events: none;
}

.btn-ar:hover::after,
.btn-accent:hover::after,
.btn-primary:hover::after,
.btn-danger:hover::after,
.btn-success:hover::after,
.ar-shine:hover::after,
.ar-guide-btn:hover::after {
    left: 150%;
}

.btn-ar,
.btn-accent,
.btn-primary,
.btn-danger,
.btn-success {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.6rem 1.5rem;
    border-radius: 50px !important;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    border: none;
    gap: 0.5rem;
}

.btn-ar:hover,
.btn-accent:hover,
.btn-primary:hover,
.btn-danger:hover,
.btn-success:hover {
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

/* Mobile Scrolling Tags Utility */
.mobile-scroll-tags {
    display: flex;
    overflow-x: auto;
    white-space: nowrap;
    gap: 0.5rem;
    padding-bottom: 5px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    /* Hide scrollbar Firefox */
}

.mobile-scroll-tags::-webkit-scrollbar {
    display: none;
    /* Hide scrollbar Chrome/Safari */
}

/* Badge Refinements */
.badge {
    font-weight: 700;
    letter-spacing: 0.5px;
    padding: 0.5em 0.8em;
    border-radius: 6px;
}

.badge.bg-secondary {
    background: rgba(255, 255, 255, 0.15) !important;
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(4px);
}

[data-theme="light"] .badge.bg-secondary {
    background: rgba(0, 0, 0, 0.05) !important;
    border: 1px solid rgba(0, 0, 0, 0.1);
    color: var(--ar-text) !important;
}

/* 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);
}

.social-icon:hover {
    background: var(--ar-accent) !important;
    color: white !important;
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(230, 0, 18, 0.4);
}

/* Dynamic Discord Button override - REMOVED PULSE per user request */
.social-icon[href*="discord"]:hover {
    background: #5865F2 !important;
    /* Keep Brand Color on Hover if desired, or switch to accent? User said 'white icon with red' */
    /* User specifically asked "shoudlnt they have then turn white wicon withteh red". 
       So I will override the brand color to use the generic AR Accent (Red) for consistency, 
       OR I will use the specific brand color but ensure the icon is white. 
       "shoudlnt they have then turn white wicon withteh red" implies RED background. 
       I will stick to the generic .social-icon:hover above which sets var(--ar-accent) (Red).
       So I will REMOVE this specific discord hover override if it sets it to Blurple.
       Wait, the user might want Brand colors? 
       "shoudlnt they have then turn white wicon withteh red" -> Red background, White Icon.
       So I should DELETE the specific Discord hover color and let the global one take over.
    */
    box-shadow: 0 5px 15px rgba(88, 101, 242, 0.4) !important;
    transform: translateY(-3px) scale(1.1);
}

/* Actually, best to just force the standard hover for consistency if that's what they asked for */
.social-icon[href*="discord"]:hover {
    /* Reverting to standard behavior or keeping branding? 
        User said: "turn white wicon withteh red". 
        So I will use var(--ar-accent) which is red.
     */
    background: var(--ar-accent) !important;
    color: white !important;
    box-shadow: 0 5px 15px rgba(230, 0, 18, 0.4) !important;
}

@keyframes discord-pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(88, 101, 242, 0.4);
    }

    70% {
        box-shadow: 0 0 0 10px rgba(88, 101, 242, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(88, 101, 242, 0);
    }
}

/* 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;
}

/* Responsive Header Typography: Fluid Clamp */
h1,
.display-1 {
    font-size: clamp(2.5rem, 5vw, 4.5rem) !important;
}

h2,
.display-2 {
    font-size: clamp(2rem, 4vw, 3rem) !important;
}

h3,
.display-3 {
    font-size: clamp(1.75rem, 3vw, 2.5rem) !important;
}


/* 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;
}

/* Smooth image transitions */
.hover-lift img,
.card img,
.news-card img,
.guide-card img,
.review-card img {
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.hover-lift:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

.hover-lift:hover img,
.card:hover img,
.news-card:hover img,
.guide-card:hover img,
.review-card: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;
    border-radius: 50px;
    /* Pill Shape */
    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(0 8px 8px rgba(0, 0, 0, 0.6));
    }
}

/* Bubble Mode Easter Egg Styles */
.bubble-mode-active {
    overflow: hidden !important;
}

.bubble-mode-active #arNavbarDesktop,
.bubble-mode-active .ar-hero-banner,
.bubble-mode-active main,
.bubble-mode-active .ar-footer {
    pointer-events: none !important;
    user-select: none !important;
}

/* BUT allow clicking inside the bubbles container */
#ar-global-bubbles.active-game {
    z-index: 10000 !important;
    pointer-events: auto !important;
    mask-image: none !important;
    -webkit-mask-image: none !important;
}

.bubble-score-overlay {
    position: fixed;
    top: 80px;
    /* Below navbar */
    right: 30px;
    z-index: 10001;
    text-align: right;
    pointer-events: auto;
    /* Enable for the X button */
    background: rgba(0, 0, 0, 0.85);
    padding: 1.5rem 2rem;
    border-radius: 15px;
    border: 2px solid var(--ar-accent);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    display: none;
    animation: arFadeInUp 0.5s cubic-bezier(0.165, 0.84, 0.44, 1) forwards;
    min-width: 200px;
}

.bubble-score-overlay.show {
    display: block;
}

.bubble-score-overlay h2 {
    color: white;
    font-size: 0.9rem;
    margin-bottom: 0.2rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    opacity: 0.8;
}

.bubble-score-overlay .score {
    color: var(--ar-accent);
    font-size: 3rem;
    font-weight: 900;
    line-height: 1;
    text-shadow: 0 0 15px rgba(230, 0, 18, 0.4);
}

.bubble-score-overlay .timer {
    color: white;
    font-size: 1rem;
    margin-top: 0.5rem;
    font-family: monospace;
    font-weight: bold;
}

.bubble-score-close {
    position: absolute;
    top: -10px;
    left: -10px;
    width: 30px;
    height: 30px;
    background: var(--ar-accent);
    color: white;
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    transition: transform 0.2s;
    z-index: 10002;
    pointer-events: auto;
}

.bubble-score-close:hover {
    transform: scale(1.1);
    background: #ff4d5a;
}

/* Back to Top Button */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: var(--ar-accent);
    color: #fff !important;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(230, 0, 18, 0.4);
    opacity: 0;
    visibility: hidden;
    transform: translateY(30px) scale(0.8);
    transition: opacity 0.4s ease, transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), visibility 0.4s;
    z-index: 9999;
    text-decoration: none;
    pointer-events: none;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}

.back-to-top:hover {
    background: white;
    color: var(--ar-accent) !important;
    transform: translateY(-5px);
    box-shadow: 0 6px 20px rgba(230, 0, 18, 0.4);
}

@keyframes bubble-rush {
    0% {
        transform: translateY(0) scale(1);
        opacity: 0;
    }

    5% {
        opacity: 0.8;
    }

    90% {
        opacity: 0.8;
    }

    100% {
        transform: translateY(-120vh) scale(1.2);
        opacity: 0;
    }
}

.ar-bubble.game-bubble {
    z-index: 10002;
    cursor: pointer;
}

.bubble-mode-btn {
    opacity: 0.6;
    transition: all 0.3s ease;
}

.bubble-mode-btn:hover {
    opacity: 1;
    color: var(--ar-accent);
    transform: scale(1.1);
}

/* Article Content Desktop Constraint */
@media (min-width: 992px) {
    .ar-article-content {
        max-width: 850px;
        margin-left: auto;
        margin-right: auto;
    }
}


/* Responsive Article Images */
.ar-responsive-image {
    width: 90%;
    max-width: 90%;
}

@media (min-width: 992px) {
    .ar-responsive-image {
        width: 50%;
        max-width: 50%;
    }

    /* Breadcrumbs - UNIFIED FROSTED GLASS STYLE */
    .breadcrumb {
        background: rgba(255, 255, 255, 0.05);
    }

    /* Glassmorphism Navbar - STRONG FROSTED EFFECT */
    .ar-navbar {
        background: rgba(18, 18, 18, 0.85) !important;
        /* Dark glass default */
        backdrop-filter: blur(15px);
        /* Strong blur */
        -webkit-backdrop-filter: blur(15px);
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
        transition: all 0.3s ease;
    }

    [data-theme="light"] .ar-navbar {
        background: rgba(0, 0, 0, 0.85) !important;
        /* Forced dark glass for consistency */
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }

    .ar-navbar.scrolled {
        padding: 10px 0;
        background: rgba(18, 18, 18, 0.95) !important;
        /* Darker when scrolled */
        box-shadow: 0 5px 20px rgba(0, 0, 0, 0.5);
    }

    [data-theme="light"] .ar-navbar.scrolled {
        background: rgba(0, 0, 0, 0.95) !important;
    }

    .navbar-brand img {
        height: 35px;
        /* Fixed height for consistency */
        width: auto;
        transition: transform 0.3s ease;
    }

    .navbar-brand:hover img {
        transform: rotate(-10deg) scale(1.1);
    }

    .navbar-nav .nav-link {
        color: rgba(255, 255, 255, 0.8) !important;
        font-weight: 600;
        text-transform: uppercase;
        letter-spacing: 0.5px;
        padding: 8px 16px;
        border-radius: 6px;
        transition: all 0.2s ease;
        margin: 0 2px;
    }

    [data-theme="light"] .navbar-nav .nav-link {
        color: rgba(255, 255, 255, 0.8) !important;
    }

    /* Active State - JUST LINE, NO BOX (User Request) */
    .navbar-nav .nav-link.active {
        color: var(--ar-accent) !important;
        background: transparent !important;
        border-bottom: 2px solid var(--ar-accent) !important;
        font-weight: 700;
    }

    /* Force desktop utility icons to be white */
    .ar-navbar i,
    [data-theme="light"] .ar-navbar i {
        color: rgba(255, 255, 255, 0.8) !important;
    }

    [data-theme="light"] .ar-page-header h1,
    [data-theme="light"] .ar-page-header h2,
    [data-theme="light"] .ar-page-header .lead,
    [data-theme="light"] .ar-hero-banner h1 {
        color: #ffffff !important;
        text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    }

    .breadcrumb-item+.breadcrumb-item::before {
        color: rgba(255, 255, 255, 0.4) !important;
    }

    /* Force consistency in Light Mode - keeping the glass look */
    [data-theme="light"] .breadcrumb {
        background: rgba(0, 0, 0, 0.05) !important;
        /* Slightly darker glass for light mode visibility */
        border: 1px solid rgba(0, 0, 0, 0.05);
    }

    [data-theme="light"] .breadcrumb-item a {
        color: rgba(0, 0, 0, 0.6) !important;
    }

    [data-theme="light"] .breadcrumb-item a:hover {
        color: var(--ar-accent) !important;
    }

    [data-theme="light"] .breadcrumb-item.active {
        color: rgba(0, 0, 0, 0.9) !important;
    }

    [data-theme="light"] .newsletter-card input[type="email"] {
        color: #1a1a1a !important;
    }

    [data-theme="light"] .newsletter-card input[type="email"]::placeholder {
        color: rgba(0, 0, 0, 0.5) !important;
    }

    /* Force White Text on Red Card in Light Mode */
    [data-theme="light"] .newsletter-card h6,
    [data-theme="light"] .newsletter-card p,
    [data-theme="light"] .newsletter-card i {
        color: #ffffff !important;
    }

    [data-theme="light"] .breadcrumb-item+.breadcrumb-item::before {
        color: rgba(0, 0, 0, 0.3) !important;
    }

    /* CINEMATIC HERO REDESIGN - 2026-01-05 */
    .ar-article-hero {
        position: relative;
        width: 100%;
        min-height: 650px !important;
        display: flex !important;
        flex-direction: column !important;
        justify-content: flex-end !important;
        overflow: visible !important;
    }

    /* Massive top clearance for navbar */
    .ar-mobile-hero-padding {
        padding-top: 220px !important;
        padding-bottom: 80px !important;
    }

    /* Deep Gradient Fog for text legibility */
    .ar-hero-fog {
        position: absolute;
        bottom: 0;
        left: 0;
        width: 100%;
        height: 80%;
        background: linear-gradient(to top, rgba(0, 0, 0, 1.0) 0%, rgba(0, 0, 0, 0.5) 50%, transparent 100%);
        z-index: 1;
    }

    /* Cinematic Breadcrumbs (Custom, non-Bootstrap) */
    .ar-hero-breadcrumb {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        gap: 0;
        margin-bottom: 15px;
        font-size: 0.8rem;
        text-transform: uppercase;
        letter-spacing: 1px;
        font-weight: 700;
    }

    .ar-hero-breadcrumb a {
        color: rgba(255, 255, 255, 0.9) !important;
        text-decoration: none !important;
        transition: color 0.2s ease;
    }

    .ar-hero-breadcrumb a:hover {
        color: var(--ar-accent) !important;
    }

    .ar-hero-breadcrumb .sep {
        color: rgba(255, 255, 255, 0.4);
        margin: 0 12px;
        font-weight: 400;
    }

    .ar-hero-breadcrumb .active {
        color: #ffffff !important;
        opacity: 1;
    }

    /* Nintendo Life Style Breadcrumb Badges */
    .ar-hero-breadcrumb.nl-style {
        gap: 8px;
        margin-bottom: 25px;
    }

    .ar-hero-breadcrumb.nl-style a,
    .ar-hero-breadcrumb.nl-style .active-badge {
        background: var(--ar-accent) !important;
        color: white !important;
        padding: 5px 12px;
        border-radius: 4px;
        text-transform: uppercase;
        font-weight: 800;
        font-size: 0.7rem;
        letter-spacing: 0.5px;
        transition: all 0.2s ease;
    }

    .ar-hero-breadcrumb.nl-style a:hover {
        filter: brightness(1.2);
        transform: translateY(-1px);
    }

    .ar-hero-breadcrumb.nl-style .sep {
        color: rgba(255, 255, 255, 0.4);
        font-size: 0.8rem;
        margin: 0 2px;
        display: inline-block !important;
    }

    /* Title & Shadow Polish */
    .ar-article-hero h1 {
        font-size: 2.8rem;
        max-width: 1000px;
        line-height: 1.1 !important;
        letter-spacing: -0.5px;
        text-shadow: 0 10px 30px rgba(0, 0, 0, 0.9) !important;
        margin-bottom: 15px !important;
    }

    /* Responsive Tweaks */
    @media (max-width: 992px) {
        .ar-article-hero h1 {
            font-size: 2.5rem;
        }
    }

    @media (max-width: 768px) {
        .ar-article-hero {
            min-height: 500px !important;
        }

        .ar-article-hero h1 {
            font-size: 1.85rem !important;
            letter-spacing: 0;
        }

        .ar-mobile-hero-padding {
            padding-top: 160px !important;
            padding-bottom: 40px !important;
        }
    }

    /* Global Scrollbar - Consistent Design for All Themes */
    ::-webkit-scrollbar {
        width: 12px;
        background: var(--ar-scrollbar-bg);
    }

    ::-webkit-scrollbar-thumb {
        background: var(--ar-scrollbar-thumb);
        border-radius: 0;
        /* Consistent Square Design (Retro Theme) */
        border: 3px solid var(--ar-scrollbar-bg);
        transition: background 0.3s ease;
    }

    ::-webkit-scrollbar-thumb:hover {
        background: var(--ar-accent);
    }

    /* Light Mode Search Input */
    /* Light Mode Search Input */
    [data-theme="light"] .ar-search-input {
        background: rgba(255, 255, 255, 0.1) !important;
        border: 1px solid rgba(255, 255, 255, 0.2) !important;
        color: white !important;
    }

    [data-theme="light"] .ar-search-input:focus {
        background: rgba(255, 255, 255, 0.2) !important;
        border-color: var(--ar-accent) !important;
    }

    [data-theme="light"] .ar-search-icon,
    [data-theme="light"] .theme-toggle-btn i {
        color: rgba(255, 255, 255, 0.7) !important;
    }

    /* CRITICAL FIXES - 2026-01-02 */
    /* 1. Ensure light badges are visible in light mode (overriding Bootstrap/Theme conflicts) */
    [data-theme="light"] .badge.bg-light,
    .badge.bg-light {
        color: #000 !important;
        background-color: #f8f9fa !important;
    }

    /* 1b. Badge Polish - Drop Shadows & Depth (Tutorial/Overview cards fix) */
    .ar-card .badge,
    .ar-article-hero .badge,
    .sidebar-card .badge,
    .badge.shadow-sm {
        box-shadow: 0 4px 10px rgba(0, 0, 0, 0.4), 0 1px 2px rgba(0, 0, 0, 0.3) !important;
        border: 1px solid rgba(255, 255, 255, 0.15) !important;
        text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
        font-weight: 700 !important;
    }

    /* 2. SEARCH INPUT FIX (Prevent Icon Overlap) */
    .ar-search-input {
        padding-left: 40px !important;
        /* Increased from 32px to preven overlap */
        background: rgba(255, 255, 255, 0.1);
        border: 1px solid rgba(255, 255, 255, 0.2);
        color: white !important;
    }

    /* 3. NAVBAR BRAND COLOR (User: "Always White") */
    .navbar-brand,
    .ar-navbar .navbar-brand,
    [data-theme="light"] .navbar-brand,
    [data-theme="light"] .ar-navbar .navbar-brand {
        color: #ffffff !important;
    }

    /* 4. RED BOX TEXT FIX (Newsletter & CTA) */
    /* User: "content in this box bumust also always be white" */
    .newsletter-card h6,
    .newsletter-card p,
    .newsletter-card i,
    .newsletter-card label,
    .newsletter-card span,
    .ar-cta-section h2,
    .ar-cta-section p,
    [data-theme="light"] .newsletter-card h6,
    [data-theme="light"] .newsletter-card p,
    [data-theme="light"] .newsletter-card i,
    [data-theme="light"] .ar-cta-section h2,
    [data-theme="light"] .ar-cta-section p {
        color: #ffffff !important;
        text-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    }

    .newsletter-card {
        background: linear-gradient(135deg, #e60012 0%, #ff4d5a 100%) !important;
    }

    /* 5. QUICK GUIDE BUTTONS - ALL BLACK (User Request) */
    .ar-guide-btn {
        display: block;
        padding: 1.5rem 1rem;
        background: #1a1a1a !important;
        color: #ffffff !important;
        border: 2px solid rgba(255, 255, 255, 0.15);
        border-radius: 12px;
        text-decoration: none;
        font-weight: 700;
        transition: all 0.3s ease;
    }

    .ar-guide-btn:hover {
        background: #2a2a2a !important;
        color: #ffffff !important;
        border-color: var(--ar-accent);
        transform: translateY(-3px);
        box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
    }

    .ar-guide-btn i {
        color: #ffffff !important;
    }

    [data-theme="light"] .ar-guide-btn {
        background: #1a1a1a !important;
        color: #ffffff !important;
    }

    [data-theme="light"] .ar-guide-btn i {
        color: #ffffff !important;
    }

    /* 6. NAVBAR GLASSMORPHISM - Tinted Black Glass (User Request) */
    .ar-navbar {
        background: rgba(0, 0, 0, 0.75) !important;
        backdrop-filter: blur(12px) saturate(180%);
        -webkit-backdrop-filter: blur(12px) saturate(180%);
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    }

    [data-theme="light"] .ar-navbar {
        background: rgba(0, 0, 0, 0.8) !important;
        backdrop-filter: blur(12px) saturate(180%);
        -webkit-backdrop-filter: blur(12px) saturate(180%);
    }

    /* News Ticker */
    .news-ticker-container {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 4px;

        /* Reading Progress Bar */
        .reading-progress-container {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 4px;
            background: transparent;
            z-index: 10000;
            /* Above navbar */
        }

        .reading-progress-bar {
            height: 100%;
            background: var(--ar-accent);
            width: 0%;
            box-shadow: 0 0 10px var(--ar-accent);
            transition: width 0.1s ease;
        }

        /* Back to Top Button (Simplified & Fixed) */
        .back-to-top {
            position: fixed;
            bottom: 30px;
            right: 30px;
            width: 50px;
            height: 50px;
            background: var(--ar-accent);
            color: white;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            text-decoration: none;
            opacity: 0;
            visibility: hidden;
            transition: all 0.3s ease;
            z-index: 1050;
            box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
            border: 2px solid rgba(255, 255, 255, 0.2);
        }

        .back-to-top.visible {
            opacity: 1;
            visibility: visible;
            transform: translateY(0);
        }

        .back-to-top:hover {
            background: var(--ar-accent) !important;
            color: white !important;
            transform: translateY(-5px) scale(1.1);
            box-shadow: 0 10px 20px rgba(230, 0, 18, 0.4);
        }

        .back-to-top i {
            font-size: 1.2rem;
            /* Fixed icon size */
        }

        /* Removed disjointed icon hover effect */

        /* Table of Contents (ToC) Styles */
        .ar-toc {
            background: var(--ar-card-bg);
            border: 1px solid var(--ar-card-border);
            border-radius: 12px;
            padding: 1.5rem;
            position: sticky;
            top: 100px;
            max-height: calc(100vh - 150px);
            overflow-y: auto;
        }

        .ar-toc h6 {
            text-transform: uppercase;
            letter-spacing: 1px;
            font-size: 0.8rem;
            color: var(--ar-accent);
            margin-bottom: 1rem;
            border-bottom: 1px solid var(--ar-card-border);
            padding-bottom: 0.5rem;
        }

        .ar-toc ul {
            list-style: none;
            padding-left: 0;
            margin-bottom: 0;
        }

        .ar-toc li {
            margin-bottom: 0.75rem;
        }

        .ar-toc a {
            color: var(--ar-text);
            text-decoration: none;
            font-size: 0.9rem;
            opacity: 0.7;
            transition: all 0.2s ease;
            display: block;
            line-height: 1.3;
        }

        .ar-toc a:hover,
        .ar-toc a.active {
            opacity: 1;
            color: var(--ar-accent);
            padding-left: 8px;
            border-left: 2px solid var(--ar-accent);
        }

        .ar-toc-h3 {
            padding-left: 15px !important;
            font-size: 0.85rem !important;
        }

        /* Pagination Buttons */
        .ar-pagination .btn {
            width: 40px;
            height: 40px;
            border-radius: 8px;
            display: flex;
            align-items: center;
            justify-content: center;
            font-weight: 700;
            transition: all 0.2s ease;
            border: 1px solid var(--ar-card-border);
            position: relative;
            overflow: hidden;
        }

        .ar-pagination .btn:hover:not(.active) {
            transform: translateY(-2px);
            box-shadow: 0 4px 10px rgba(230, 0, 18, 0.3);
            border-color: var(--ar-accent);
            color: var(--ar-accent) !important;
        }

        .ar-pagination .btn.active {
            background-color: var(--ar-accent);
            color: white;
            border-color: var(--ar-accent);
            box-shadow: 0 0 15px rgba(230, 0, 18, 0.5);
        }

        /* Social Share Buttons */
        .social-share-btn {
            width: 40px;
            height: 40px;
            border-radius: 10px;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            color: white !important;
            text-decoration: none;
            transition: all 0.3s ease;
            background: rgba(255, 255, 255, 0.1);
            backdrop-filter: blur(5px);
            border: 1px solid rgba(255, 255, 255, 0.1);
        }

        .social-share-btn:hover {
            transform: translateY(-5px);
            background: var(--ar-accent);
            box-shadow: 0 5px 15px rgba(230, 0, 18, 0.4);
        }

        .share-x:hover {
            background: #000;
        }

        .share-fb:hover {
            background: #1877F2;
        }

        .share-rd:hover {
            background: #FF4500;
        }

        /* --- CRITICAL FIX: HERO TEXT ALWAYS WHITE --- */
        .ar-article-hero,
        .ar-article-hero h1,
        .ar-article-hero h2,
        .ar-article-hero p,
        .ar-article-hero a,
        .ar-article-hero span,
        .ar-article-hero i,
        .ar-article-hero .fa,
        .ar-article-hero .fab,
        .ar-article-hero .fas,
        .ar-article-hero .ar-hero-breadcrumb,
        .ar-article-hero .share-text {
            color: #ffffff !important;
            text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
            /* Ensure pop */
        }



        /* News Summary Fix */
        .ar-news-summary {
            color: rgba(255, 255, 255, 0.9) !important;
            text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8);
        }

        /* Ensure Breadcrumb Links specifically don't get themed */
        .ar-hero-breadcrumb a {
            color: rgba(255, 255, 255, 0.8) !important;
        }

        .ar-hero-breadcrumb a:hover {
            color: #ffffff !important;
        }


        /* Navbar Height Fix Reverted */




        /* ==========================================================================
   CINEMATIC HERO OVERLAY (V2 - THIN FIX)
   Enables Navbar overlap and high-fidelity share buttons
   ========================================================================== */

        :root {
            --nav-height: 60px;
            /* Reduced from 76px */
        }

        /* Global Body Offset for standard pages */
        body {
            padding-top: var(--nav-height) !important;
        }

        /* Enforce Thin Navbar */
        .navbar.fixed-top {
            height: var(--nav-height) !important;
            background: rgba(0, 0, 0, 0.8) !important;
            backdrop-filter: blur(10px);
            border-bottom: 1px solid rgba(255, 255, 255, 0.05);
            padding-top: 0 !important;
            padding-bottom: 0 !important;
        }

        .navbar-brand img {
            height: 28px !important;
            width: auto;
        }

        .navbar .nav-link {
            padding-top: 18px !important;
            /* Vertically center in 60px */
            padding-bottom: 18px !important;
        }

        /* Hardened Text Colors for Dark Containers (Fixes Light Mode Issues) */
        .text-white,
        .card.bg-dark h5,
        .card.bg-dark .card-body,
        .card.bg-dark li,
        .card.bg-dark span,
        .card.bg-dark .text-white-50,
        .ar-article-hero .text-uppercase,
        .ar-article-hero h1,
        .ar-article-hero .display-4,
        .ar-article-hero .share-label,
        .ar-article-hero span,
        .ar-footer h5,
        .ar-footer a,
        .ar-footer li,
        .ar-footer span {
            color: #fff !important;
        }

        .text-white-50 {
            color: rgba(255, 255, 255, 0.75) !important;
        }

        /* OVERLAP LOGIC: Pull Hero UP by Nav Height */
        .ar-article-hero {
            margin-top: calc(var(--nav-height) * -1) !important;
            padding-top: var(--nav-height) !important;
            /* Push content back down so it's not hidden */
        }
    }

    /* Cinematic Overlap Logic */
    .ar-article-hero {
        /* Pull the hero up so the image goes BEHIND the transparent nav */
        margin-top: calc(var(--nav-height) * -1) !important;
        /* Push the content down so it doesn't get covered by the nav text */
        padding-top: calc(var(--nav-height) + 60px) !important;
        min-height: 60vh;
        overflow: hidden;
        position: relative;
        display: flex;
        align-items: flex-end;
    }

    .ar-hero-fog {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: linear-gradient(to bottom,
                rgba(0, 0, 0, 0.2) 0%,
                rgba(10, 10, 11, 0.8) 85%,
                rgba(10, 10, 11, 1) 100%);
        z-index: 2;
        pointer-events: none;
    }

    /* High Fidelity Share Buttons */
    .share-btn {
        width: 38px;
        height: 38px;
        border-radius: 8px;
        display: flex;
        align-items: center;
        justify-content: center;
        color: white !important;
        text-decoration: none !important;
        transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
        background: rgba(255, 255, 255, 0.1);
        backdrop-filter: blur(5px);
        border: 1px solid rgba(255, 255, 255, 0.15);
        font-size: 0.95rem;
        cursor: pointer;
    }

    .share-btn:hover {
        transform: translateY(-4px) scale(1.05);
        box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
        border-color: rgba(255, 255, 255, 0.5);
        z-index: 10;
    }

    /* Brand Colors for Hover */
    .share-x:hover {
        background: #000000 !important;
    }

    .share-fb:hover {
        background: #1877F2 !important;
    }

    .share-rd:hover {
        background: #FF4500 !important;
    }

    .share-wa:hover {
        background: #25D366 !important;
    }

    .share-ig:hover {
        background: #E1306C !important;
    }

    .share-cp:hover {
        background: #6c757d !important;
    }

    /* Interactive Badge (Nintendo Life Style) - REMOVED for Clean Text Consistency */
    .hero-badge-wrap {
        display: flex;
        gap: 10px;
        align-items: center;
        margin-bottom: 1rem;
    }

    /* Enforce Clean Text Breadcrumbs (No "Red Buttons") */


    .ar-hero-breadcrumb .sep {
        margin: 0 8px;
        opacity: 0.5;
    }



    .animate-pulse {
        animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
    }

    @keyframes pulse {

        0%,
        100% {
            opacity: 1;
        }

        50% {
            opacity: 0.6;
        }
    }

    /* =========================================================
   BOOTSTRAP VARIABLE OVERRIDES FOR DARK/LIGHT THEME
   ========================================================= */

    /* Dark Mode (Default) */
    :root,
    [data-theme="dark"] {
        --bs-body-bg: #0a0a0b;
        --bs-body-color: #f0f0f5;
    }

    /* Light Mode */
    [data-theme="light"] {
        --bs-body-bg: #f8f9fa;
        --bs-body-color: #212529;
    }

    /* Hero sections ALWAYS white text */
    .ar-article-hero,
    .ar-article-hero * {
        color: #ffffff !important;
    }

    /* Footer always white text */
    .ar-footer,
    .ar-footer * {
        color: #ffffff !important;
    }

    /* Dark cards always white text */
    .card.bg-dark,
    .card.bg-dark *,
    .guide-toc,
    .guide-toc * {
        color: #ffffff !important;
    }
}

/* =========================================================
   GLOBAL OVERRIDES (Mobile & Desktop)
   Moved out of media query to fix mobile styling
   ========================================================= */

/* --- TITLE CASE FIX (Not Uppercase) --- */
.navbar .nav-link,
.ar-hero-breadcrumb a,
.ar-hero-breadcrumb .active-badge {
    text-transform: none !important;
}

.navbar-brand {
    text-transform: none !important;
}

/* Enforce Clean Text Breadcrumbs (No "Red Buttons") */
.ar-hero-breadcrumb a,
.ar-hero-breadcrumb span {
    background: transparent !important;
    border: none !important;
    padding: 0 !important;
    box-shadow: none !important;
    font-weight: 600;
    text-transform: none !important;
    /* Ensure readable capitalization */
    color: rgba(255, 255, 255, 0.9) !important;
}

.ar-hero-breadcrumb a:hover {
    text-decoration: underline !important;
    color: #ffffff !important;
    transform: none !important;
}

.ar-hero-breadcrumb .sep {
    margin: 0 8px;
    opacity: 0.5;
}

.ar-hero-breadcrumb {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.6);
    letter-spacing: 0.5px;
}

/* =========================================
   QUICK GUIDE FIX: RED HOVER IN DARK MODE
   ========================================= */
.ar-guide-btn {
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.05);
    color: white;
    display: block;
    padding: 1.5rem;
    border-radius: 12px;
    text-decoration: none;
}

.ar-guide-btn:hover {
    background: var(--ar-accent) !important;
    border-color: var(--ar-accent) !important;
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(230, 0, 18, 0.4);
}

/* =========================================
   FOOTER LOGO VISIBILITY FIX (LIGHT MODE)
   ========================================= */
.footer-credit-link {
    color: rgba(255, 255, 255, 0.5) !important;
    text-decoration: none;
    transition: color 0.2s ease;
}

.footer-credit-link:hover {
    color: white !important;
}

/* Light Mode Overrides */
[data-theme='light'] .footer-credit-link {
    color: rgba(0, 0, 0, 0.6) !important;
}

[data-theme='light'] .footer-credit-link:hover {
    color: black !important;
}

/* Invert White Logos to Black in Light Mode */
[data-theme='light'] .footer-logo {
    filter: invert(1) !important;
}

/* --- SCROLL OFFSET FIX (ANCHOR LINKS) --- */
/* Ensures headings aren't hidden behind fixed navbar when clicked */
.ar-article-content h1,
.ar-article-content h2,
.ar-article-content h3,
.ar-article-content h4,
.ar-article-content h5,
.ar-article-content h6 {
    scroll-margin-top: 100px;
    /* Nav height (60px) + Buffer (40px) */
}

/* --- FORCED DARK MODE FOR CODE & ALERTS (REQUESTED) --- */
/* Ensure code blocks are ALWAYS black with blue text, even in light mode */
pre,
code,
.block-wrapper pre {
    background-color: #000000 !important;
    color: #0dcaf0 !important;
    /* Bootstrap text-info (Blue) */
    border: 1px solid rgba(255, 255, 255, 0.15) !important;
}

/* Ensure Alerts are ALWAYS dark style */
.alert {
    background-color: #0a0a0b !important;
    /* Dark BG */
    color: #fff !important;
    border: 1px solid currentColor !important;
}

.alert-info {
    color: #0dcaf0 !important;
    border-color: #0dcaf0 !important;
}

.alert-warning {
    color: #ffc107 !important;
    border-color: #ffc107 !important;
}

.alert-danger {
    color: #dc3545 !important;
    border-color: #dc3545 !important;
}

.alert-success {
    color: #198754 !important;
    border-color: #198754 !important;
}

.alert-primary {
    color: #0d6efd !important;
    border-color: #0d6efd !important;
}

/* Ensure the Red Line accent on H2s AND H3s persists using the original pseudo-element design */
.ar-article-content h2,
.ar-article-content h3 {
    position: relative !important;
    padding-left: 15px !important;
    border: none !important;
    /* Remove any conflicting borders */
}

.ar-article-content h2::before,
.ar-article-content h3::before {
    content: '';
    position: absolute;
    left: 0;
    top: 5px;
    bottom: 5px;
    width: 4px;
    background-color: var(--ar-accent);
    border-radius: 2px;
}


/* =========================================
   FOOTER ICON VISIBILITY FIX (LIGHT MODE)
   ========================================= */
/* Default (Dark Mode) - Icons are white/gray by default inheritance */

/* Light Mode Overrides */
[data-theme='light'] .footer-links li a i {
    color: rgba(0, 0, 0, 0.7) !important;
}

[data-theme='light'] .footer-links li a:hover i {
    color: var(--ar-accent) !important;
}

[data-theme='light'] .social-icon {
    color: rgba(0, 0, 0, 0.7) !important;
    background: rgba(0, 0, 0, 0.05);
    /* Slight background for visibility */
}

[data-theme='light'] .social-icon:hover {
    color: white !important;
    background: var(--ar-accent) !important;
}


/* =========================================
   FOOTER TEXT & LOGO VISIBILITY FIX (LIGHT MODE)
   ========================================= */

[data-theme='light'] .footer-credit-link,
[data-theme='light'] .footer-credit-link strong,
[data-theme='light'] footer small,
[data-theme='light'] .text-white-50 {
    color: rgba(0, 0, 0, 0.8) !important;
}

/* Fix DigitalOcean & Strapi Logos in Light Mode */
/* Using brightness(0) forces them to Black, avoiding the orange inversion issue */
[data-theme='light'] .footer-logo,
[data-theme='light'] .strapi-icon {
    filter: brightness(0) !important;
}

.strapi-icon {
    height: 12px;
    margin-right: 4px;
    vertical-align: middle;
    transition: filter 0.2s ease;
}


/* =========================================
   HEADER BUTTONS (CIRCLE STYLE) - REQUESTED
   ========================================= */
.theme-toggle-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    /* Perfect Circle */
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.05);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 4px;
    transition: all 0.3s ease;
}

.theme-toggle-btn:hover {
    background: var(--ar-accent);
    border-color: var(--ar-accent);
    transform: rotate(15deg);
    /* Playful interaction */
    color: white;
}


/* =========================================
   FOOTER BRAND COLOR RESTORATION (LIGHT MODE) - FINAL FIX
   ========================================= */

/* Strapi: Remove filter to show original Purple */
[data-theme='light'] .strapi-icon {
    filter: none !important;
}

/* DigitalOcean: Smart Invert
   1. invert(1): White Text -> Black, Blue Icon -> Orange
   2. hue-rotate(180deg): Orange Icon -> Blue (Restores Brand Color)
   Result: Readable Black Text + Original Blue Icon */
[data-theme='light'] .footer-logo {
    filter: invert(1) hue-rotate(180deg) !important;
}


/* =========================================
   HEADER BUTTONS REFINEMENT (MATCHING SEARCH)
   ========================================= */
.theme-toggle-btn {
    /* Increased opacity to match search bar pill */
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    background: rgba(255, 255, 255, 0.1) !important;
}

/* --- SIDEBAR / INFO CARD FIXES (REQUESTED) --- */
/* 1. Disable expansion/hover effect on specific cards */
.ar-card.no-hover:hover,
.ar-card.no-hover:focus,
.ar-card.no-hover:active {
    transform: none !important;
    box-shadow: none !important;
}

/* 2. Fix Header Text Color in Light Mode (Was turning grey/black on hover) */
/* Force white text on dark headers inside cards, even in light mode and on hover */
[data-theme="light"] .ar-card .bg-dark .text-white,
[data-theme="light"] .ar-card .bg-dark h5,
[data-theme="light"] .ar-card:hover .bg-dark .text-white,
[data-theme="light"] .ar-card:hover .bg-dark h5 {
    color: #ffffff !important;
}

/* --- FINAL VISIBILITY FORCE FIXES --- */
/* These rules effectively 'nuke' any theme leakage for these specific elements */

/* 1. Sidebar Headers: Always White text on Dark Backgrounds */
.ar-card .bg-dark h5,
.ar-card .bg-dark .text-white,
.ar-card .bg-dark i,
.ar-card:hover .bg-dark h5,
.ar-card:hover .bg-dark .text-white,
.ar-card:hover .bg-dark i {
    color: #ffffff !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
}

/* EXPLICT LIGHT MODE OVERRIDE FOR SIDEBAR HEADERS */
[data-theme="light"] .ar-card .bg-dark h5,
[data-theme="light"] .ar-card .bg-dark .text-white,
[data-theme="light"] .ar-card .bg-dark i {
    color: #ffffff !important;
}

/* 2. Back to Top: Always Red Background, White Icon on Hover */
.back-to-top:hover,
.back-to-top:focus {
    background-color: var(--ar-accent) !important;
    color: #ffffff !important;
    transform: translateY(-5px) scale(1.1) !important;
    box-shadow: 0 10px 20px rgba(230, 0, 18, 0.4) !important;
    opacity: 1 !important;
}

/* 3. Dividers: Light Grey in Light Mode */
[data-theme="light"] .border-secondary,
[data-theme="light"] .border-top,
[data-theme="light"] .border-bottom,
[data-theme="light"] hr {
    border-color: rgba(0, 0, 0, 0.1) !important;
}

/* 4. Quick Info Text: Always White */
.ar-card .bg-dark li,
.ar-card .bg-dark span {
    color: rgba(255, 255, 255, 0.9) !important;
}