/**
 * Styles - Mobile-First Light Theme
 * CLS-safe, accessible, Core Web Vitals optimized
 */

/* ===== CSS Variables (LIGHT THEME) ===== */
:root {
    /* Light Theme Colors */
    --bg: #f7f8fa;
    --bg-elev: #ffffff;
    --text: #1a1f2b;
    --text-dim: #4b5563;
    --primary: #27469c;
    --primary-ink: #1a2f5c;
    --secondary: #edc646;
    --secondary-ink: #b8941a;
    --border: #e5e7eb;
    --shadow: 0 1px 2px rgba(16,24,40,.06), 0 4px 12px rgba(16,24,40,.06);
    --header-h: 64px;
    
    /* Game site color palette */
    --mint-50: #ecfdf5;
    --mint-100: #d1fae5;
    --mint-200: #a7f3d0;
    --mint-500: #10b981;
    --mint-700: #047857;
    --sky-50: #f0f9ff;
    --sky-100: #e0f2fe;
    --sky-200: #bae6fd;
    --sky-500: #0ea5e9;
    --sky-700: #0369a1;
    --coral-50: #fff1f2;
    --coral-100: #ffe4e6;
    --coral-200: #fecdd3;
    --coral-500: #f43f5e;
    --coral-700: #be123c;
    --gold-50: #fffbeb;
    --gold-100: #fef3c7;
    --gold-200: #fde68a;
    --gold-500: #f59e0b;
    --gold-700: #b45309;
    --sand: #faf7f2; /* warm off-white backdrop for some bands */
    
    /* Aqua accent colors */
    --aqua-500: #00c2d3;
    --aqua-600: #00aab9;
    --aqua-50: #e6fbfd;
    
    /* Legacy var aliases for compatibility */
    --bg-color: var(--bg);
    --bg-secondary: var(--bg-elev);
    --bg-tertiary: var(--bg);
    --text-color: var(--text);
    --text-secondary: var(--text-dim);
    --accent-color: var(--primary);
    --accent-hover: var(--primary-ink);
    --border-color: var(--border);
    --error-color: #dc2626;
    --success-color: var(--primary);
    
    /* Spacing */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 1.5rem;
    --spacing-lg: 2rem;
    --spacing-xl: 3rem;
    
    /* Typography */
    --font-base: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    --font-mono: 'Courier New', Courier, monospace;
    
    /* Layout */
    --container-width: 1200px;
    --border-radius: 12px;
    --transition: 0.2s ease;
}

/* ===== Reset & Base ===== */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
    width: 100%;
    overflow-x: hidden;
}

body {
    width: 100%;
    min-height: 100vh;
    overflow-x: hidden;
    font-family: var(--font-base);
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    max-width: 100vw;
    box-sizing: border-box;
}

img, svg, video {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    color: var(--primary-ink);
    text-decoration: none;
    transition: color var(--transition);
}

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

a:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

/* ===== Layout Utilities ===== */
.container {
    width: 100%;
    max-width: min(100%, var(--container-width));
    margin-inline: auto;
    padding-inline: var(--spacing-md);
    box-sizing: border-box;
}

.site-main {
    flex: 1;
}

.grid {
    display: grid;
    gap: var(--spacing-md);
}

/* ===== Header ===== */
.site-header {
    background: var(--bg-elev);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 100;
    height: var(--header-h);
    display: flex;
    align-items: center;
}

.header-content {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.header-main {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    flex-wrap: wrap;
    width: 100%;
    padding: var(--spacing-sm) 0;
}

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

.logo a {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--text);
}

.logo-text {
    font-size: 1.25rem;
    font-weight: 400;
    color: var(--text);
}

.logo-text strong {
    font-weight: 700;
    color: var(--primary);
}

.main-nav {
    display: flex;
    margin-left: auto;
}

.main-nav ul {
    display: flex;
    list-style: none;
    gap: var(--spacing-md);
}

.main-nav a {
    font-weight: 500;
    padding: var(--spacing-xs) 0;
    position: relative;
    color: var(--text);
}

.main-nav a:hover,
.main-nav a[aria-current="page"] {
    color: var(--primary);
}

.main-nav a[aria-current="page"] {
    font-weight: 700;
}

.main-nav a[aria-current="page"]::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--primary);
}

.social-icons {
    display: flex;
    gap: var(--spacing-sm);
}

.social-icons.mobile-social {
    display: none;
}

.social-icons.desktop-social {
    display: flex;
}

.social-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    color: var(--text-dim);
    transition: color var(--transition);
}

.social-icon:hover {
    color: var(--primary);
}

.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 4px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 8px;
    margin-left: auto;
}

.menu-toggle span {
    width: 24px;
    height: 2px;
    background: var(--text);
    transition: var(--transition);
}

/* ===== Hero ATF Section ===== */
.hero.atf {
    position: relative;
    display: grid;
    align-items: start;
    gap: 20px;
    padding: clamp(16px, 5vw, 40px);
    min-height: calc(100vh - var(--header-h));
    /* Soft light gradient background */
    background:
        radial-gradient(1200px 600px at 20% -10%, rgba(22,163,74,.12), transparent 60%),
        radial-gradient(800px 400px at 80% 10%, rgba(37,99,235,.10), transparent 60%),
        linear-gradient(180deg, #ffffff 0%, #f7f8fa 100%);
    border-bottom: 1px solid var(--border);
}

/* Hero with decorative background image */
.hero--royale-bg {
    position: relative;
    background: #ffffff url("/assets/img/hero-royale.png") no-repeat center center / cover !important;
    border-bottom: 1px solid var(--border);
}

/* Readability overlay - keeps center clean for copy and near-CTA ad */
.hero--royale-bg::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    /* Bright center for text, gentle edge vignette to showcase decorations */
    background: radial-gradient(
        ellipse at center,
        rgba(255, 255, 255, 0.92) 0%,
        rgba(255, 255, 255, 0.85) 35%,
        rgba(255, 255, 255, 0.70) 55%,
        rgba(255, 255, 255, 0.40) 75%,
        rgba(255, 255, 255, 0.00) 100%
    );
    z-index: 1;
}

.hero .content {
    max-width: 980px;
    margin-inline: auto;
    text-align: center;
    position: relative;
    z-index: 2;
    padding-top: clamp(8px, 3vh, 24px);
}

.hero h1 {
    font-size: clamp(2rem, 6vw, 3.2rem);
    line-height: 1.1;
    margin: 0 0 12px 0;
    color: var(--text);
}

.hero p {
    font-size: clamp(1rem, 2.5vw, 1.175rem);
    color: var(--text-dim);
    margin: 12px 0 24px;
}

.hero .cta {
    display: inline-flex;
    gap: 12px;
    justify-content: center;
}

.hero .ad-slot.ad-near-cta {
    margin: 24px auto 0;
    max-width: 980px;
    width: 100%;
    position: relative;
    z-index: 2;
}

/* ===== Buttons ===== */
.btn {
    background: var(--primary);
    color: #fff;
    border-radius: var(--border-radius);
    padding: 0.9rem 1.2rem;
    font-weight: 700;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: transform .15s ease, box-shadow .2s ease;
    text-decoration: none;
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s ease;
}

.btn:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.3);
}

.btn:hover::before {
    left: 100%;
}

.btn:active {
    transform: translateY(0);
}

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

.btn-secondary {
    background: transparent;
    color: var(--primary-ink);
    border: 2px solid var(--border);
}

.btn-secondary:hover {
    border-color: var(--primary);
    background: rgba(22,163,74,.05);
}

.btn-cta-primary {
    font-size: 1.125rem;
    padding: 1rem 2rem;
    background: var(--primary);
    color: #fff;
    border-radius: var(--border-radius);
    font-weight: 700;
    transition: transform .15s ease, box-shadow .2s ease;
}

.btn-cta-primary:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.3);
}

.btn-cta-secondary {
    font-size: 1.125rem;
    padding: 1rem 2rem;
    background: transparent;
    color: var(--primary-ink);
    border: 2px solid var(--border);
    border-radius: var(--border-radius);
    font-weight: 700;
    transition: all var(--transition);
}

.btn-cta-secondary:hover {
    border-color: var(--primary);
    background: rgba(22,163,74,.05);
}

/* Trust Chips */
.trust-chip {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: var(--bg-elev);
    border: 1px solid var(--border);
    border-radius: 999px;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text);
}

/* Chips */
.chip {
    background: rgba(39, 70, 156, 0.1);
    color: var(--primary-ink);
    border: 1px solid rgba(39, 70, 156, 0.2);
    padding: 0.35rem 0.75rem;
    border-radius: 999px;
    font-size: 0.875rem;
    font-weight: 500;
    display: inline-block;
}

/* Trust Chips - Green with Check Icon */
.trust-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    margin: 12px 0 4px;
}

.chip--ok {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 800;
    color: var(--primary-ink);
    background: rgba(39, 70, 156, 0.1);
    border: 1px solid rgba(39, 70, 156, 0.2);
    padding: 8px 12px;
    border-radius: 999px;
}

.chip--ok .icon {
    width: 16px;
    height: 16px;
    display: inline-block;
    border-radius: 50%;
    background: conic-gradient(from 0deg, #22c55e, #16a34a);
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='%23000000' viewBox='0 0 24 24'%3E%3Cpath d='M9 16.17 4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z'/%3E%3C/svg%3E") center/contain no-repeat;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='%23000000' viewBox='0 0 24 24'%3E%3Cpath d='M9 16.17 4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z'/%3E%3C/svg%3E") center/contain no-repeat;
    background-color: #16a34a;
}

/* Social Buttons */
.btn-social {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.875rem 1.5rem;
    background: var(--bg-elev);
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: var(--border-radius);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
}

.btn-social::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s ease;
}

.btn-social:hover {
    background: var(--bg);
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.3);
}

.btn-social:hover::before {
    left: 100%;
}

.btn-social-discord {
    border-color: #5865F2;
}

.btn-social-discord:hover {
    background: rgba(88, 101, 242, 0.1);
    border-color: #5865F2;
}

.btn-social-telegram {
    border-color: #0088cc;
}

.btn-social-telegram:hover {
    background: rgba(0, 136, 204, 0.1);
    border-color: #0088cc;
}

.btn-social-tiktok {
    border-color: #ff0050;
}

.btn-social-tiktok:hover {
    background: rgba(255, 0, 80, 0.1);
    border-color: #ff0050;
}

/* ===== Cards ===== */
.card {
    background: var(--bg-elev);
    border: 1px solid var(--border);
    border-radius: var(--border-radius);
    padding: var(--spacing-md);
    box-shadow: var(--shadow);
    transition: all .2s ease;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 32px rgba(16,24,40,.08);
}

.card-highlight {
    border: 2px solid var(--primary);
}

/* Comparison Table */
.comparison-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--bg-elev);
    border-radius: var(--border-radius);
    overflow: hidden;
}

.comparison-table th,
.comparison-table td {
    padding: var(--spacing-sm);
    text-align: left;
    border-bottom: 1px solid var(--border);
}

.comparison-table th {
    background: var(--bg);
    font-weight: 700;
    color: var(--text);
}

.comparison-table tr:last-child td {
    border-bottom: none;
}

/* ===== Ad Slots (CLS-Safe & Performance Optimized) ===== */
.ad-slot {
    display: block;
    position: relative;
    width: 100%;
    max-width: 100%;
    margin: 16px auto;
    text-align: center;
    /* must not clip responsive iframes */
    overflow: visible;
    /* keep CLS reserve only, never cap */
    min-height: 250px;
    /* no max-height on responsive */
    line-height: 0;
    /* avoid inline whitespace gaps */
    padding: 0;
    /* remove inner padding that can look like cropping */
    border: 0;
    background: none;
}

/* Ad slot loading states */
.ad-slot.loading {
    background: linear-gradient(90deg, #f3f4f6 25%, #e5e7eb 50%, #f3f4f6 75%);
    background-size: 200% 100%;
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

/* Ad slot error state */
.ad-slot.error {
    background: #fef2f2;
    border-color: #fca5a5;
    color: #dc2626;
    text-align: center;
    padding: 20px;
}

/* Ad slot success state */
.ad-slot.loaded {
    background: #f0fdf4;
    border-color: #86efac;
    animation: fadeIn 0.3s ease-in;
}



@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Ad label removed - ads are now direct containers */

.ad-slot:empty {
    display: flex;
    min-height: inherit;
}

.ad-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    color: var(--text-dim);
    text-align: center;
    padding: 1rem;
}

/* Ad Variant Heights (CLS Prevention) */
.ad-header {
    min-height: 90px;
}

.ad-in-article {
    min-height: 280px;
}

.ad-near-cta {
    min-height: 250px;
}

.ad-sidebar {
    min-height: 600px;
}

.ad-sticky-footer {
    min-height: 60px;
}

/* First ATF ad has no outer margin */
.ad-slot.ad-header {
    margin: 0;
}


.ad-in-article {
    margin: var(--spacing-lg) 0;
}

.ad-sidebar {
    display: none; /* Hidden on mobile */
    margin: 0 0 var(--spacing-md) 0;
    position: sticky;
    top: calc(var(--spacing-md) + var(--header-h));
}

.ad-sticky-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    margin: 0;
    z-index: 90;
    border-radius: 0;
    background: var(--bg-elev);
    border: none;
    border-top: 1px solid var(--border);
}

.ad-near-cta {
    margin-top: 1.5rem; /* 24px gap from CTA */
    margin-bottom: var(--spacing-lg);
}

/* Hide near-CTA ads on very small screens */
@media (max-width: 359px) {
    .ad-slot.ad-near-cta {
        display: none;
    }
}

/* Ad ready state (after lazy-init) */
.ad-slot.ad-ready {
    opacity: 1;
}

/* ===== Footer ===== */
.site-footer {
    background: var(--bg-elev);
    border-top: 1px solid var(--border);
    padding: var(--spacing-xl) 0 var(--spacing-md);
    margin-top: var(--spacing-xl);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--spacing-lg);
    margin-bottom: var(--spacing-lg);
}

.footer-column h3 {
    margin-bottom: var(--spacing-sm);
    color: var(--text);
}

.footer-column ul {
    list-style: none;
}

.footer-column li {
    margin-bottom: var(--spacing-xs);
}

.footer-column a {
    color: var(--text-dim);
    transition: color var(--transition);
}

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

.footer-legal {
    border-top: 1px solid var(--border);
    padding-top: var(--spacing-md);
    margin-bottom: var(--spacing-md);
}

.disclaimer {
    color: var(--text-dim);
    font-size: 0.875rem;
}

.footer-bottom {
    text-align: center;
    color: var(--text-dim);
    font-size: 0.875rem;
}

/* Newsletter Form */
.newsletter-form {
    margin-top: var(--spacing-sm);
}

.input-group {
    display: flex;
    gap: 0.5rem;
}

.input-group input[type="email"] {
    flex: 1;
    padding: 0.75rem;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--border-radius);
    color: var(--text);
    font-size: 0.875rem;
}

.input-group input[type="email"]:focus {
    outline: 2px solid var(--primary);
    outline-offset: 0;
}

.form-note {
    display: block;
    margin-top: 0.5rem;
    color: var(--text-dim);
    font-size: 0.75rem;
}

/* ===== Toast Notifications ===== */
.toast {
    position: fixed;
    bottom: -100px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--bg-elev);
    color: var(--text);
    padding: 1rem 1.5rem;
    border-radius: var(--border-radius);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1), 0 0 0 1px var(--border);
    z-index: 9999;
    min-width: 300px;
    max-width: 500px;
    text-align: center;
    font-size: 0.875rem;
    font-weight: 500;
    transition: bottom 0.3s ease, opacity 0.3s ease;
    opacity: 0;
    cursor: pointer;
}

.toast-show {
    bottom: 2rem;
    opacity: 1;
}

.toast-success {
    border-left: 4px solid var(--success-color);
    background: rgba(22, 163, 74, 0.1);
}

.toast-error {
    border-left: 4px solid var(--error-color);
    background: rgba(220, 38, 38, 0.1);
}

.toast-info {
    border-left: 4px solid var(--primary);
}

@media (max-width: 767px) {
    .toast {
        min-width: calc(100% - 2rem);
        left: 1rem;
        right: 1rem;
        transform: none;
    }
}

/* ===== Section Utilities ===== */
.section {
    padding: clamp(24px, 5vw, 56px) 0;
}

.section h2 {
    margin: 0 0 8px;
    font-size: clamp(1.4rem, 3vw, 2rem);
}

.section .kicker {
    color: var(--text-dim);
    font-weight: 600;
    margin-bottom: 16px;
}

/* Two-Column Intro with Character */
.intro-grid {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 32px;
    align-items: center;
}

@media (max-width: 900px) {
    .intro-grid {
        grid-template-columns: 1fr;
    }
}

/* Fix intro section mobile padding - override container rules */
@media (max-width: 768px) {
    .intro-grid {
        padding-right: 1rem !important;
        margin-right: 0 !important;
    }
    
    .intro-grid * {
        padding-right: 0 !important;
        margin-right: 0 !important;
    }
}

/* Fix feature grid mobile padding - same as intro grid */
@media (max-width: 768px) {
    .feature-grid {
        padding-right: 1rem !important;
        margin-right: 0 !important;
    }
    
    .feature-grid * {
        padding-right: 0 !important;
        margin-right: 0 !important;
    }
}

/* Fix features section mobile padding - only fix right padding */
@media (max-width: 768px) {
    #features {
        padding-right: 1rem !important;
    }
}

.character-card {
    background: transparent;
    aspect-ratio: 4/5;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    overflow: hidden;
}

.character-card img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* Feature Cards with Subtext */
.feature-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}

@media (max-width: 900px) {
    .feature-grid {
        grid-template-columns: 1fr;
    }
}

.feature-card {
    padding: 16px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: var(--bg-elev);
    box-shadow: var(--shadow);
}

.feature-card h3 {
    margin: 0 0 6px;
    font-size: 1.05rem;
}

.feature-card p {
    margin: 0;
    color: var(--text-dim);
    font-size: 0.875rem;
}

/* TikTok Reels Grid (9:16) */
.reels-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

@media (max-width: 900px) {
    .reels-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 520px) {
    .reels-grid {
        grid-template-columns: 1fr;
    }
}

.reel {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    background: #000;
    aspect-ratio: 9/16;
    display: block;
    transition: transform 0.2s ease;
}

.reel:hover {
    transform: scale(1.02);
}

.reel img,
.reel video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.reel .badge {
    position: absolute;
    left: 8px;
    top: 8px;
    background: rgba(0, 0, 0, 0.6);
    color: #fff;
    font-size: 12px;
    padding: 4px 6px;
    border-radius: 8px;
}

/* Playful Community Cards */
.community-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

@media (max-width: 900px) {
    .community-cards {
        grid-template-columns: 1fr;
    }
}

.community-card {
    padding: 18px;
    border: 1px solid var(--border);
    border-radius: 16px;
    background: var(--bg-elev);
    box-shadow: var(--shadow);
    text-align: center;
}

.community-card h3 {
    margin: 0 0 8px;
}

.community-card p {
    color: var(--text-dim);
    margin: 0 0 12px;
    font-size: 0.875rem;
}

.community-card .cta-row {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-top: 10px;
}

.btn-ghost {
    background: rgba(39, 70, 156, 0.1);
    color: var(--primary-ink);
    border: 1px solid rgba(39, 70, 156, 0.2);
    padding: 0.75rem 1rem;
    border-radius: var(--border-radius);
    font-weight: 600;
    transition: all 0.2s ease;
    text-decoration: none;
    display: inline-block;
}

.btn-ghost:hover {
    background: rgba(39, 70, 156, 0.15);
    border-color: var(--primary);
}

/* Safety Friendly Tone Box */
.note {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 14px;
    color: #334155;
    margin-bottom: 16px;
}

.note p {
    margin: 0;
}

/* ===== Animation Utilities (Performance Optimized) ===== */
.reveal {
    opacity: 0;
    transform: translateY(18px);
    will-change: opacity, transform;
}

.reveal-visible {
    opacity: 1;
    transform: translateY(0);
    transition: opacity .4s ease-out, transform .4s ease-out;
}

/* Performance-optimized animations with GPU acceleration */
@media (prefers-reduced-motion: no-preference) {
    .btn,
    .btn-social,
    .card {
        will-change: transform;
        transition: transform .2s ease-out, box-shadow .2s ease-out;
    }
    
    .btn:hover,
    .btn-social:hover,
    .card:hover {
        transform: translateY(-3px) scale(1.05);
    }
}

@media (prefers-reduced-motion: reduce) {
    .btn,
    .btn-social,
    .card,
    .reveal,
    .reveal-visible,
    .floating-circle,
    .feature-item {
        transition: none !important;
        transform: none !important;
        animation: none !important;
    }
}

/* ===== Accessibility ===== */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Focus styles for keyboard navigation */
*:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

/* Ensure buttons and links have visible focus */
button:focus-visible,
a:focus-visible,
.btn:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

.show-focus *:focus {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

/* ===== Responsive - Mobile First ===== */

/* Background composition per viewport */

/* Desktop+: keep the edge ornaments visible on left/right; center remains clean */
@media (min-width: 1024px) {
    .hero--royale-bg {
        background-position: 50% 50%;
    }
}

/* Tablet: nudge up slightly to keep crowns/gems peeking without crowding the CTA */
@media (min-width: 640px) and (max-width: 1023.98px) {
    .hero--royale-bg {
        background-position: 50% 48%;
    }
}

/* Mobile: center higher so edges stay visible and text isn't on top of ornaments */
@media (max-width: 639.98px) {
    .hero--royale-bg {
        background-position: 50% 42%;
    }
    
    /* Small viewport height support */
    @supports (height: 1svh) {
        .hero.atf {
            min-height: calc(100svh - var(--header-h));
        }
    }
}

/* Hide sticky footer ad on desktop */
@media (min-width: 768px) {
    .ad-sticky-footer {
        display: none;
    }
    
    .ad-sidebar {
        display: flex;
    }
    
    .footer-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .header-main {
        flex-wrap: nowrap;
    }
}

/* Show sidebar on large screens */
@media (min-width: 1024px) {
    .sidebar {
        display: block !important;
    }
}

@media (max-width: 768px) {
    .header-main {
        flex-wrap: nowrap;
        justify-content: space-between;
    }
    
    .main-nav {
        position: fixed;
        top: var(--header-h);
        left: 0;
        right: 0;
        background: var(--bg-elev);
        box-shadow: var(--shadow);
        transform: translateY(-100%);
        opacity: 0;
        visibility: hidden;
        transition: all var(--transition);
        z-index: 99;
        margin-left: 0;
        width: 100%;
    }
    
    .main-nav.active {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }
    
    .main-nav ul {
        flex-direction: column;
        padding: var(--spacing-md);
        gap: 0;
    }
    
    .main-nav li {
        border-bottom: 1px solid var(--border);
    }
    
    .main-nav li:last-child {
        border-bottom: none;
    }
    
    .main-nav a {
        display: block;
        padding: var(--spacing-sm) 0;
        font-weight: 500;
    }
    
    .menu-toggle {
        display: flex;
    }
    
    .social-icons.desktop-social {
        display: none;
    }
    
    .social-icons.mobile-social {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: var(--spacing-sm);
        padding: var(--spacing-md) 0;
        border-top: 1px solid var(--border);
        margin-top: var(--spacing-sm);
    }
    
    .social-text {
        font-size: 0.875rem;
        color: var(--text-dim);
        font-weight: 500;
        margin-bottom: 0.5rem;
    }
    
    .social-icons.mobile-social .social-icons {
        display: flex;
        gap: var(--spacing-md);
        justify-content: center;
    }
}

/* ===== Game Site Styling ===== */

/* Section variants */
.section { 
    padding: clamp(28px, 5vw, 64px) 0; 
    position: relative; 
}

.section--sand { 
    background: var(--sand); 
}

.section--mint { 
    background: linear-gradient(180deg, var(--mint-50), #ffffff); 
}

.section--sky { 
    background: linear-gradient(180deg, var(--sky-50), #ffffff); 
}

/* Optional subtle pattern overlays (kept very light) */
.pattern-dots::before,
.pattern-grid::before,
.pattern-tiles::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    opacity: .35;
    mix-blend-mode: multiply;
}

.pattern-dots::before {
    background-image: radial-gradient(#e5e7eb 1px, transparent 1.5px);
    background-size: 14px 14px;
}

.pattern-grid::before {
    background-image: linear-gradient(#eef2f7 1px, transparent 1px), linear-gradient(90deg, #eef2f7 1px, transparent 1px);
    background-size: 24px 24px;
}

.pattern-tiles::before {
    background-image:
        linear-gradient(45deg, #f3f4f6 25%, transparent 25%), 
        linear-gradient(-45deg, #f3f4f6 25%, transparent 25%), 
        linear-gradient(45deg, transparent 75%, #f3f4f6 75%), 
        linear-gradient(-45deg, transparent 75%, #f3f4f6 75%);
    background-size: 20px 20px;
    background-position: 0 0, 0 10px, 10px -10px, -10px 0px;
}

/* Decorative corner "stickers" (tiny inline SVGs) */
.sticker-crowns::after, 
.sticker-gems::before {
    content: "";
    position: absolute;
    width: 220px;
    height: 220px;
    pointer-events: none;
    opacity: .35;
    filter: drop-shadow(0 6px 12px rgba(0,0,0,.08));
}

.sticker-crowns::after {
    right: -20px;
    top: -20px;
    background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='220' height='220' viewBox='0 0 220 220'><g fill='%23f59e0b'><path d='M40 150h140a10 10 0 0 1 10 10v20a10 10 0 0 1-10 10H40a10 10 0 0 1-10-10v-20a10 10 0 0 1 10-10z'/><path d='M62 120l18-30 18 22 18-30 18 30 18-22 18 30z' /></g></svg>") center/contain no-repeat;
}

.sticker-gems::before {
    left: -20px;
    bottom: -20px;
    background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='220' height='220' viewBox='0 0 220 220'><g fill='%230ea5e9'><path d='M110 25l50 45-50 105-50-105 50-45z'/></g><g fill='%2310b981' opacity='.9'><circle cx='45' cy='175' r='16'/><circle cx='180' cy='60' r='10'/></g></svg>") center/contain no-repeat;
}

/* Headings with playful underline */
.section h2 {
    display: inline-block;
    position: relative;
    padding-bottom: 6px;
}

.section h2::after {
    content: "";
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    bottom: -4px;
    width: 120px;
    height: 6px;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--mint-500), var(--sky-500));
}

/* Gradient border utility (for important cards) */
.gradient-frame {
    background: linear-gradient(#fff, #fff) padding-box, linear-gradient(90deg, var(--mint-500), var(--sky-500)) border-box;
    border: 2px solid transparent;
    border-radius: 16px;
}

/* Buttons: extra playful variants */
.btn-blue { 
    background: var(--sky-500); 
    color: #fff; 
}

.btn-coral { 
    background: var(--coral-500); 
    color: #fff; 
}

.btn-gold { 
    background: var(--gold-500); 
    color: #fff; 
}

.btn-ghost-royal { 
    background: #fff; 
    color: var(--primary-ink); 
    border: 1px solid #e2e8f0; 
}

/* Cards: add accent top border */
.card-accent { 
    border-top: 4px solid var(--mint-500); 
}

.card-accent.sky { 
    border-top-color: var(--sky-500); 
}

.card-accent.coral { 
    border-top-color: var(--coral-500); 
}

/* Ads remain neutral but framed a bit on colored sections */
.section--mint .ad-slot, 
.section--sky .ad-slot, 
.section--sand .ad-slot {
    background: #fff;
    border-color: #e5e7eb;
}

/* TikTok reels: add gentle gradient overlay for thumb legibility */
.reel::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0,0,0,.15), rgba(0,0,0,0) 35%, rgba(0,0,0,.35) 100%);
}

@media (prefers-reduced-motion: no-preference) {
    .feature-card, 
    .community-card { 
        transition: transform .2s ease, box-shadow .2s ease; 
    }
    
    .feature-card:hover, 
    .community-card:hover { 
        transform: translateY(-3px); 
        box-shadow: 0 18px 36px rgba(16,24,40,.12); 
    }
}

/* SOLID AQUA BAND with subtle geometry */
.band-aqua{
  position: relative;
  background: var(--aqua-500);
  /* give the band a comfy vertical rhythm */
  padding: clamp(28px, 5vw, 64px) 0;
  overflow: visible; /* allow the ad to grow */
}

/* Very subtle geometry layer (no motion, low visual noise) */
.band-aqua::before{
  content:"";
  position:absolute; 
  top: 0; left: 0; right: 0; bottom: 0;
  pointer-events:none; 
  opacity: 0.3;
  /* Build faint shapes using layered gradients */
  background-image:
    /* big soft circles */
    radial-gradient(200px 150px at 20% 20%, rgba(255,255,255,0.4), transparent 60%),
    radial-gradient(180px 120px at 80% 30%, rgba(255,255,255,0.3), transparent 65%),
    radial-gradient(160px 100px at 70% 80%, rgba(255,255,255,0.25), transparent 70%),
    /* geometric shapes */
    radial-gradient(60px 60px at 15% 60%, rgba(255,255,255,0.2), transparent 50%),
    radial-gradient(80px 80px at 85% 70%, rgba(255,255,255,0.15), transparent 50%),
    radial-gradient(40px 40px at 50% 15%, rgba(255,255,255,0.2), transparent 50%);
  background-size: 100% 100%, 100% 100%, 100% 100%, 100% 100%, 100% 100%, 100% 100%;
  background-repeat: no-repeat;
}

/* Make sure content inside aqua band stays readable if any text lands outside cards */
.band-aqua, .band-aqua h2, .band-aqua .kicker { color: #ffffff; }
.band-aqua h2::after{ background: linear-gradient(90deg, #ffffff, #d9f9ff); } /* keep the underline visible on aqua */

/* Keep white cards popping on aqua */
.band-aqua .cta-royal{ background: #fff; }
.band-aqua .gradient-frame{ 
  background: linear-gradient(#fff,#fff) padding-box,
              linear-gradient(90deg, #16a34a, #0ea5e9) border-box; 
}

/* If the ad is directly under the card, frame it lightly so it sits well on aqua */
.band-aqua .ad-slot{
  background:#ffffff;
  border:1px solid rgba(255,255,255,.6);
  overflow: visible; /* belt-and-suspenders */
}

/* Allow ads to grow in all band containers */
.band-aqua,
.graphic-slab,
.chooser-cta,
.hero--royale-bg { overflow: visible; }

.band-aqua .ad-slot,
.graphic-slab .ad-slot,
.chooser-cta .ad-slot,
.hero--royale-bg .ad-slot { overflow: visible; }

@media (prefers-reduced-motion: reduce){
  .band-aqua::before{ filter:none; }
}

/* --- Ready section: full-bleed solid aqua --- */
:root { --aqua-500:#00c2d3; --gold-500:#f59e0b; }

#ready.band-game{
  background: var(--aqua-500);       /* pure solid */
  padding: clamp(28px,5vw,56px) 0;   /* a touch tighter */
}

/* remove previous ::before overlay entirely for a flat look */
#ready.band-game::before{ content:none !important; }

/* full-bleed band, centered inner content */
#ready .ready-wrap{
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 clamp(16px, 3vw, 24px);
}

/* white CTA card stays premium */
#ready .cta-royal{
  background:#fff;
  border-radius:18px;
  box-shadow: 0 8px 20px rgba(16,24,40,.12);
}

/* higher contrast CTA on aqua */
#ready .btn.btn-blue{ 
  background: var(--gold-500); 
  color:#1f2937;
}
#ready .btn.btn-blue:hover{ filter: brightness(1.05); }

/* mini trust row under CTA */
#ready .mini-trust{ margin-top:14px; }
#ready .mini-trust li{ color:#14532d; }

/* dock the ad container visually under the band */
#ready .ad-slot.ad-near-cta{
  margin-top: 14px;
  border-radius: 12px;
  border: 1px solid #e5e7eb;
  box-shadow: 0 6px 14px rgba(16,24,40,.08);
}
/* remove huge top rounding if present from previous styles */
#ready .ad-slot.ad-near-cta{ border-top-left-radius: 12px; border-top-right-radius: 12px; }

/* ensure the band spans edge-to-edge (no page gutters showing) */
.section.band-game{ margin-left: 0; margin-right: 0; }

/* headline readable on aqua */
#ready h2, #ready .kicker { color:#ffffff; }

/* optional: thin white divider at band bottom to separate from next section */
#ready.band-game{ box-shadow: inset 0 -1px 0 rgba(255,255,255,.55); }

/* ===== Utility Classes ===== */
.section { 
    padding: clamp(28px, 5vw, 64px) 0; 
    position: relative; 
}


.table { 
    width: 100%; 
    border-collapse: collapse; 
}

.table th, 
.table td { 
    padding: 14px 12px; 
    border-top: 1px solid #e5e7eb; 
    vertical-align: top; 
    text-align: left; 
}

.table th { 
    width: 220px; 
    font-weight: 700; 
    color: #111827; 
}

.kicker { 
    color: #6b7280; 
    margin-bottom: 12px; 
    font-weight: 600; 
}

.grid-2 { 
    display: grid; 
    grid-template-columns: 1fr 1fr; 
    gap: 16px; 
}

@media (max-width: 900px) { 
    .grid-2 { 
        grid-template-columns: 1fr; 
    } 
}

.card { 
    background: #fff; 
    border: 1px solid #e5e7eb; 
    border-radius: 14px; 
    box-shadow: 0 2px 8px rgba(16, 24, 40, .06); 
    padding: 16px; 
}

.card h3 { 
    margin: 0 0 6px; 
}

.btn { 
    display: inline-flex; 
    align-items: center; 
    justify-content: center; 
    padding: .9rem 1.2rem; 
    border-radius: 12px; 
    background: #16a34a; 
    color: #fff; 
    font-weight: 800; 
    text-decoration: none;
}

.btn-link { 
    color: #0ea5e9; 
    font-weight: 700; 
    text-decoration: none; 
}

.badge { 
    display: inline-block; 
    padding: 4px 8px; 
    border-radius: 999px; 
    font-size: 12px; 
    background: #ecfdf5; 
    color: #065f46; 
    border: 1px solid #bbf7d0; 
}

.sidebar { 
    position: sticky; 
    top: 84px; 
}

/* Hide sidebar on mobile devices */
@media (max-width: 1023px) {
    .sidebar {
        display: none !important;
    }
    
    /* Make main content full width when sidebar is hidden */
    .grid[style*="grid-template-columns: 2fr 1fr"] {
        grid-template-columns: 1fr !important;
    }
}

/* Fix mobile horizontal scroll issues */
@media (max-width: 768px) {
    
    /* Fix grid layouts that might cause overflow */
    .grid[style*="minmax(250px, 1fr)"] {
        grid-template-columns: 1fr !important;
        gap: 1rem !important;
    }
    
    
    /* Fix any elements with fixed widths */
    .card {
        max-width: 100% !important;
        box-sizing: border-box;
    }
    
    /* Fix hero icon on mobile */
    .hero__icon {
        width: 60px !important;
        height: 60px !important;
    }
    
    /* Fix stat items on mobile */
    .stat-item {
        padding: 0.75rem !important;
    }
    
    /* Fix FAQ details padding */
    details {
        padding-left: 0 !important;
        padding-right: 0 !important;
    }
    
    /* Fix any elements with large margins - but preserve right margin for content grids */
    .grid:not(.intro-grid):not(.feature-grid):not(.community-cards):not(.reels-grid) {
        margin-left: 0 !important;
        margin-right: 0 !important;
    }
    
    /* Fix feature items and feature sections mobile padding */
    .feature-item, .feature-card, .feature-grid {
        padding-right: 1rem !important;
        margin-right: 0 !important;
    }
    
    /* Fix specific grid layouts in server pages */
    .grid[style*="grid-template-columns: repeat(auto-fit, minmax(250px, 1fr))"] {
        grid-template-columns: 1fr !important;
    }
    
    /* Fix any inline styles that might cause overflow */
    [style*="minmax(250px"] {
        grid-template-columns: 1fr !important;
    }
    
    
    /* Mobile TL;DR enhancements */
    .card.tldr {
        padding: 1.5rem;
        margin-bottom: 1rem;
    }
    
    
    
    .card.tldr .head h3 {
        font-size: 1.5rem;
    }
    
    .card.tldr .lead {
        font-size: 1rem;
    }
    
    .card.tldr .benefit {
        padding: 0.75rem;
        font-size: 0.875rem;
    }
    
    .card.tldr .btn {
        padding: 0.875rem;
        font-size: 1rem;
    }
    
    /* Mobile floating circles - reduce size */
    .floating-circle {
        opacity: 0.3 !important;
    }
    
    .servers-circle-1 {
        width: 150px !important;
        height: 150px !important;
        top: -75px !important;
        right: -75px !important;
    }
    
    .servers-circle-2 {
        width: 120px !important;
        height: 120px !important;
        bottom: -60px !important;
        left: -60px !important;
    }
    
    .servers-circle-3 {
        width: 100px !important;
        height: 100px !important;
    }
    
    .servers-circle-4,
    .servers-circle-5 {
        width: 60px !important;
        height: 60px !important;
    }
    
}

.ad-rail { 
    display: none; 
}

@media (min-width: 1100px) { 
    .ad-rail { 
        display: block; 
        width: 320px; 
    } 
    .with-rail { 
        display: grid; 
        grid-template-columns: 1fr 340px; 
        gap: 16px; 
    } 
}

.faq dl { 
    margin: 0; 
}

.faq dt { 
    font-weight: 700; 
    margin-top: 14px; 
}

.faq dd { 
    margin: 6px 0 12px; 
    color: #4b5563; 
}

/* ===== Enhanced Server Chooser Styles ===== */

/* --- Spacing + containers --- */
.section { padding: clamp(28px, 5vw, 64px) 0; }
.stack-16 > * + * { margin-top: 16px; }
.stack-24 > * + * { margin-top: 24px; }
.center { text-align: center; }

/* --- Hero band (subtle) --- */
.chooser-hero {
  background: linear-gradient(180deg, #ffffff 0%, #f7fafc 100%);
  border-bottom: 1px solid #e5e7eb;
}
.chooser-hero h1 { margin: 0; }
.chooser-hero .kicker { color: #4b5563; margin: 6px 0 14px; }

/* --- Buttons --- */
.btn { display:inline-flex; justify-content:center; align-items:center; padding:.9rem 1.2rem; border-radius:12px; background:var(--primary); color:#fff; font-weight:800; text-decoration:none; }
.btn.blue { background:var(--secondary); color:var(--secondary-ink); }
.btn.ghost { background:#fff; color:var(--primary); border:1px solid rgba(39, 70, 156, 0.2); }

/* --- TL;DR cards with icons --- */
.card { background:#fff; border:1px solid #e5e7eb; border-radius:14px; box-shadow:0 2px 8px rgba(16,24,40,.06); padding:16px; }
.card h3 { margin: 0 0 6px; }
.card .lead { color:#4b5563; margin: 0 0 10px; }
.icon {
  width:22px; height:22px; display:inline-block; vertical-align:-4px; margin-right:8px;
  background-color:var(--primary);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M19 3H5a2 2 0 0 0-2 2v14l4-4h12a2 2 0 0 0 2-2V5a2 2 0 0 0-2-2z'/%3E%3C/svg%3E") center/contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M19 3H5a2 2 0 0 0-2 2v14l4-4h12a2 2 0 0 0 2-2V5a2 2 0 0 0-2-2z'/%3E%3C/svg%3E") center/contain no-repeat;
}
.badge { display:inline-block; padding:4px 8px; border-radius:999px; font-size:12px; background:rgba(39, 70, 156, 0.1); color:var(--primary-ink); border:1px solid rgba(39, 70, 156, 0.2); }

/* --- Grid helpers --- */
.grid-2 { display:grid; grid-template-columns: 1fr 1fr; gap:16px; }
.grid-3 { display:grid; grid-template-columns: repeat(3,1fr); gap:16px; }
@media (max-width: 900px){ .grid-2, .grid-3 { grid-template-columns: 1fr; } }

/* --- Comparison table --- */
.table { width:100%; border-collapse: collapse; }
.table th, .table td { padding:14px 12px; border-top:1px solid #e5e7eb; text-align:left; vertical-align:top; }
.table th { width:220px; font-weight:700; color:#111827; }
.table tr:nth-child(odd) td { background:#fafafa; }

/* --- Personas tiles --- */
.tile { background:#fff; border:1px solid #e5e7eb; border-radius:12px; padding:16px; }
.tile h4 { margin:0 0 6px; }
.tile p { margin:0 0 10px; color:#4b5563; }

/* --- Highlights --- */
.highlight { background:#fff; border:1px solid #e5e7eb; border-radius:12px; padding:14px; }
.highlight h4 { margin:0 0 4px; }
.highlight p { margin:0; color:#4b5563; }

/* --- Switch steps --- */
.steps { background:#fff; border:1px solid #e5e7eb; border-radius:14px; padding:16px; }
.steps ol { margin:0 0 12px 18px; }
.steps li + li { margin-top: 6px; }

/* --- Safety box --- */
.notice { background:#f8fafc; border:1px solid #e2e8f0; border-radius:12px; padding:14px; }
.notice strong { color:#111827; }

/* --- FAQ accordion (no framework) --- */
.faq dl { margin:0; }
.faq details { border:1px solid #e5e7eb; border-radius:12px; padding:12px; background:#fff; }
.faq details + details { margin-top: 10px; }
.faq summary { cursor:pointer; font-weight:700; list-style:none; }
.faq summary::-webkit-details-marker { display:none; }
.faq p { margin:8px 0 0; color:#4b5563; }

/* --- Ads spacing/presentation --- */
/* Ad styling moved to main ad-slot rule above */
.ad-tight { margin-top: 12px; }
.ad-block { margin-top: 18px; }

/* --- Desktop ad rail --- */
.with-rail { display:grid; grid-template-columns: 1fr 340px; gap:16px; }
.ad-rail { width:320px; display:none; }
@media (min-width:1100px){ .ad-rail{ display:block; } }

/* --- ATF hero (reuse homepage classes) tweaks for chooser --- */
.hero--chooser { /* uses same bg rules as homepage hero; attach your hero bg class too if you have one */
  position: relative;
}
.hero__icon {
  width:64px; height:64px; border-radius:16px; background:#fff; border:1px solid #e5e7eb;
  box-shadow: 0 4px 12px rgba(16,24,40,.08); display:inline-flex; align-items:center; justify-content:center;
  margin:0 auto 10px; overflow:hidden;
}
.hero__icon img{ width:100%; height:100%; object-fit:cover; }

/* --- Graphic slabs (wide image/cards placeholders) --- */
.graphic-slab {
  background:#fff; border:1px solid #e5e7eb; border-radius:16px; box-shadow:0 4px 16px rgba(16,24,40,.06);
  padding: 0; overflow: visible;
}
.graphic-slab .img { aspect-ratio: 16/9; background:linear-gradient(135deg,#eef2f7,#f8fafc); }
.graphic-slab .body { padding:14px; }
.grid-graphics { display:grid; grid-template-columns: 1fr 1fr; gap:16px; }
@media (max-width: 900px){ .grid-graphics{ grid-template-columns: 1fr; } }

/* --- TL;DR cards (one button each) --- */
.card.tldr { text-align:left; }
.card.tldr .actions { margin-top:10px; }

/* --- Comparison table: 3 columns with checks/crosses --- */
.table-compare { 
  width:100%; 
  border-collapse: collapse; 
  background:#fff; 
  border-radius:16px; 
  overflow:hidden; 
  border:1px solid #e5e7eb;
  box-shadow: 0 4px 16px rgba(16,24,40,.08);
  font-size: 0.95rem;
}
.table-compare thead th {
  text-align:center; 
  padding:18px 16px; 
  font-weight:700; 
  font-size:1rem;
  border-bottom:3px solid #10b981;
  background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
  color: #1e293b;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.table-compare thead th:first-child {
  text-align:left;
  text-transform: none;
  letter-spacing: normal;
  font-weight:800;
  color: #0f172a;
}
.table-compare tbody th { 
  padding:16px 18px; 
  border-top:1px solid #e5e7eb; 
  font-weight:600;
  color: #374151;
  background: #fafbfc;
  text-align:left;
  font-size: 0.9rem;
}
.table-compare tbody td { 
  padding:16px 18px; 
  border-top:1px solid #e5e7eb; 
  text-align:center;
  vertical-align:middle;
  color: #4b5563;
  font-weight:500;
}
.table-compare tbody tr:nth-child(even) td, 
.table-compare tbody tr:nth-child(even) th { 
  background:#f8fafc; 
}
.table-compare tbody tr:hover td,
.table-compare tbody tr:hover th {
  background: #f1f5f9;
  transition: background-color 0.2s ease;
}
.tick, .cross {
  display:inline-block; 
  width:28px; 
  height:28px; 
  border-radius:8px; 
  vertical-align:middle; 
  margin-right:8px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}
.tick{ 
  background:#16a34a; 
  -webkit-mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='%23fff' viewBox='0 0 24 24'%3E%3Cpath d='M9 16.2 4.8 12l-1.4 1.4L9 19 21 7l-1.4-1.4z'/%3E%3C/svg%3E") center/20px 20px no-repeat; 
  mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='%23fff' viewBox='0 0 24 24'%3E%3Cpath d='M9 16.2 4.8 12l-1.4 1.4L9 19 21 7l-1.4-1.4z'/%3E%3C/svg%3E") center/20px 20px no-repeat; 
}
.cross{ 
  background:#ef4444; 
  -webkit-mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M18.3 5.7 12 12m0 0-6.3 6.3M12 12l6.3 6.3M12 12 5.7 5.7' stroke='%23fff' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E") center/20px 20px no-repeat; 
  mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M18.3 5.7 12 12m0 0-6.3 6.3M12 12l6.3 6.3M12 12 5.7 5.7' stroke='%23fff' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E") center/20px 20px no-repeat; 
}

/* Mobile table stacking */
@media (max-width: 760px){
  .table-compare thead { display:none; }
  .table-compare, .table-compare tbody, .table-compare tr, .table-compare td, .table-compare th { display:block; width:100%; }
  .table-compare tr { border-top:1px solid #e5e7eb; padding:8px 0; }
  .table-compare td[data-label]::before { content: attr(data-label) " — "; font-weight:700; color:#111827; }
}

/* --- Clean single-CTA band like homepage Ready section --- */
.chooser-cta {
  background: linear-gradient(180deg,#ffffff 0%, #f7fafc 100%);
  border-top:1px solid #e5e7eb;
}
.chooser-cta .cta-card {
  background:#fff; border:1px solid #e5e7eb; border-radius:16px; box-shadow:0 8px 20px rgba(16,24,40,.12);
  padding: clamp(18px, 4vw, 32px); text-align:center;
}
.chooser-cta .cta-card .actions { margin-top:12px; }
.chooser-cta .ad-slot { margin-top:16px; }

/* ---------- Global helpers ---------- */
.center { text-align:center; }
.stack-12 > * + * { margin-top: 12px; }
.stack-16 > * + * { margin-top: 16px; }
.stack-24 > * + * { margin-top: 24px; }

/* ---------- Hero (ensure exact centering like homepage) ---------- */
.hero.atf .content { text-align:center; max-width: 980px; margin-inline:auto; }

/* Hero Icon Styling */
.hero__icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 1.5rem;
    border-radius: 20px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
    animation: heroIconFloat 3s ease-in-out infinite;
}

.hero__icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 18px;
}

@keyframes heroIconFloat {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-5px);
    }
}

/* ---------- Server icons & accents ---------- */
.server-icon{
  width:56px; height:56px; border-radius:14px; overflow:hidden;
  display:inline-flex; align-items:center; justify-content:center;
  background:#fff; border:1px solid #e5e7eb; box-shadow:0 6px 16px rgba(16,24,40,.08);
  margin-right:10px;
}
.server-icon img{ width:100%; height:100%; object-fit:cover; }

.accent-vanilla{ --accent:#16a34a; }
.accent-infinity{ --accent:#0ea5e9; }
.card.accent{
  border-top:4px solid var(--accent);
  box-shadow: 0 4px 14px rgba(16,24,40,.06);
}

/* ---------- Benefit bullets with icons ---------- */
.benefits{ display:grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap:10px; margin-top:10px; }
@media (max-width: 700px){ .benefits{ grid-template-columns: 1fr; } }
.benefit{
  display:flex; align-items:flex-start; gap:10px; background:#fff; border:1px solid #e5e7eb;
  border-radius:10px; padding:10px 12px;
}
.benefit .i{
  width:18px; height:18px; border-radius:6px; background: var(--accent,#16a34a);
  -webkit-mask: var(--mask) center/16px 16px no-repeat; mask: var(--mask) center/16px 16px no-repeat;
}
.i-gem      { --mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 3h12l3 4-9 14L3 7l3-4z'/%3E%3C/svg%3E"); }
.i-bolt     { --mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M13 2 3 14h7l-1 8 10-12h-7l1-8z'/%3E%3C/svg%3E"); }
.i-shield   { --mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2 4 5v6c0 5 3.4 9.3 8 11 4.6-1.7 8-6 8-11V5l-8-3z'/%3E%3C/svg%3E"); }
.i-swords   { --mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M7 21 3 17l6-6 4 4-6 6zm14-14-4-4-6 6 4 4 6-6z'/%3E%3C/svg%3E"); }
.i-wand     { --mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='m2 22 9-9 2 2-9 9H2zm12-10 4-4-2-2-4 4 2 2z'/%3E%3C/svg%3E"); }
.i-store    { --mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M3 4h18l-1 4H4L3 4zm1 6h16v10H4V10z'/%3E%3C/svg%3E"); }

/* ---------- TL;DR layout polish ---------- */
.tldr .head{ display:flex; align-items:center; gap:10px; margin-bottom:6px; }
.tldr .lead{ color:#4b5563; margin:0; }
.tldr .actions{ margin-top:12px; }

/* ---------- Comparison table (3-col w/ ticks/crosses stays) ---------- */
.table-compare thead th { font-size:1rem; }
.tick, .cross { vertical-align:-4px; }

/* ---------- Safety note (same look as homepage) ---------- */
.note{
  background:#f8fafc; border:1px solid #e2e8f0; border-radius:12px; padding:14px; color:#334155;
}

/* ---------- CTA band neat spacing ---------- */
.chooser-cta .cta-card{ text-align:center; }
.chooser-cta .actions{ display:flex; gap:10px; justify-content:center; flex-wrap:wrap; }

/* ---------- Ads neat spacing here ---------- */
.ad-slot.ad-near-cta, .ad-slot.in-article{ margin-top:16px; }

/* ---------- Help card styling ---------- */
.help-card{
  background:#fff; border:1px solid #e5e7eb; border-radius:16px;
  box-shadow:0 6px 16px rgba(16,24,40,.08); padding:18px; text-align:center;
}
.help-card .kicker{ color:#4b5563; margin:6px 0 12px; }
.help-card .actions{ display:flex; gap:10px; justify-content:center; flex-wrap:wrap; }
.btn.discord{ background:#5865F2; color:#fff; }
.btn.discord:hover{ filter:brightness(1.05); }

/* ===== Server Stats Animations ===== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes countUp {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Server Stats Card Hover Effects */
.server-stats-card .stat-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    background: rgba(255, 255, 255, 0.8) !important;
}

/* Pulse animation for stat numbers */
.stat-number {
    position: relative;
}

.stat-number::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 100%;
    background: inherit;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    opacity: 0;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        transform: translate(-50%, -50%) scale(0.8);
        opacity: 0.7;
    }
    70% {
        transform: translate(-50%, -50%) scale(1.2);
        opacity: 0;
    }
    100% {
        transform: translate(-50%, -50%) scale(1.2);
        opacity: 0;
    }
}

/* ===== Enhanced Server Chooser Styles ===== */
.table-compare-enhanced {
    width: 100%;
    border-collapse: collapse;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.table-compare-enhanced th,
.table-compare-enhanced td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid #e5e7eb;
}

.table-compare-enhanced th {
    font-weight: 700;
    background: transparent;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.table-compare-enhanced .comparison-row:hover {
    background: rgba(248, 250, 252, 0.5);
    transform: translateX(2px);
    transition: all 0.2s ease;
}

.tick-enhanced,
.cross-enhanced {
    display: inline-block;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    text-align: center;
    line-height: 20px;
    font-weight: bold;
    font-size: 12px;
}

.tick-enhanced {
    background: #dcfce7;
    color: #16a34a;
}

.tick-enhanced::before {
    content: "✓";
}

.cross-enhanced {
    background: #fee2e2;
    color: #dc2626;
}

.cross-enhanced::before {
    content: "✗";
}

/* Server Card Enhancements */
.server-card {
    position: relative;
    overflow: hidden;
}

.server-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    animation: shimmer 3s infinite;
}

.server-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.server-card-vanilla:hover {
    border-color: rgba(22, 163, 74, 0.4);
}

.server-card-infinity:hover {
    border-color: rgba(14, 165, 233, 0.4);
}

@keyframes shimmer {
    0% {
        transform: translateX(-100%);
    }
    100% {
        transform: translateX(100%);
    }
}

/* Enhanced button hover effects */
.server-card .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

/* TL;DR Section Card Hover Effects */
#tldr .card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.15);
}

#tldr .card.tldr:hover {
    border-width: 4px;
}

#tldr .card.accent-vanilla:hover {
    border-color: rgba(22, 163, 74, 0.5);
    box-shadow: 0 25px 50px rgba(22, 163, 74, 0.3);
}

#tldr .card.accent-infinity:hover {
    border-color: rgba(14, 165, 233, 0.5);
    box-shadow: 0 25px 50px rgba(14, 165, 233, 0.3);
}

/* TL;DR CTA Button Hover */
#tldr .btn:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.3);
}

/* Floating Circle Animations (Performance Optimized) */
@keyframes float1 {
    0%, 100% { 
        transform: translate3d(0, 0, 0) rotate(0deg); 
        opacity: 0.6;
    }
    50% { 
        transform: translate3d(0, -15px, 0) rotate(3deg); 
        opacity: 0.8;
    }
}

@keyframes float2 {
    0%, 100% { 
        transform: translate3d(0, 0, 0) rotate(0deg); 
        opacity: 0.7;
    }
    50% { 
        transform: translate3d(0, -12px, 0) rotate(-2deg); 
        opacity: 0.9;
    }
}

@keyframes float3 {
    0%, 100% { 
        transform: translate3d(-50%, -50%, 0) translateY(0px) rotate(0deg); 
        opacity: 0.5;
    }
    50% { 
        transform: translate3d(-50%, -50%, 0) translateY(-8px) rotate(1deg); 
        opacity: 0.7;
    }
}

@keyframes float4 {
    0%, 100% { 
        transform: translate3d(0, 0, 0) rotate(0deg); 
        opacity: 0.6;
    }
    50% { 
        transform: translate3d(0, -18px, 0) rotate(-1deg); 
        opacity: 0.8;
    }
}

@keyframes float5 {
    0%, 100% { 
        transform: translate3d(0, 0, 0) rotate(0deg); 
        opacity: 0.8;
    }
    50% { 
        transform: translate3d(0, -14px, 0) rotate(2deg); 
        opacity: 1;
    }
}

/* Pulse Animation for Lightning Bolt (Performance Optimized) */
@keyframes pulse {
    0%, 100% { 
        transform: scale3d(1, 1, 1); 
        opacity: 1; 
    }
    50% { 
        transform: scale3d(1.05, 1.05, 1); 
        opacity: 0.8; 
    }
}

/* Performance-optimized floating circles */
.floating-circle {
    will-change: transform, opacity;
    transform: translate3d(0, 0, 0);
    backface-visibility: hidden;
    perspective: 1000px;
}

/* Optimize bounce animation */
@keyframes bounce {
    0%, 100% { 
        transform: translate3d(0, 0, 0); 
    }
    50% { 
        transform: translate3d(0, -3px, 0); 
    }
}

@keyframes gradientShift {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.8;
    }
}

@keyframes glow {
    0% {
        opacity: 0.5;
        transform: scale(1);
    }
    100% {
        opacity: 0.8;
        transform: scale(1.1);
    }
}

/* Modern Design Enhancements */
.feature-item {
    will-change: transform;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), 
                box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.feature-item:hover {
    transform: translate3d(0, -4px, 0);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.15);
}

/* Enhanced TL;DR Cards */
.card.tldr {
    will-change: transform, box-shadow;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.card.tldr:hover {
    transform: translate3d(0, -8px, 0);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.15);
}

.card.tldr .server-icon:hover img {
    transform: scale(1.1) rotate(5deg);
}

.card.tldr .benefit {
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.card.tldr .benefit::before {
    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;
}

.card.tldr .benefit:hover::before {
    left: 100%;
}

.card.tldr .benefit:hover {
    transform: translateX(4px);
    background: rgba(var(--accent-rgb, 22, 163, 74), 0.1);
}

/* Enhanced CTA Button */
.card.tldr .btn {
    position: relative;
    overflow: hidden;
}

.card.tldr .btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s ease;
}

.card.tldr .btn:hover::before {
    left: 100%;
}

/* Enhanced glass morphism effect */
.glass-morphism {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

/* Modern gradient backgrounds */
.gradient-modern {
    background: linear-gradient(135deg, 
        rgba(99, 102, 241, 0.1) 0%, 
        rgba(139, 92, 246, 0.1) 50%, 
        rgba(14, 165, 233, 0.1) 100%);
}

.gradient-vanilla {
    background: linear-gradient(135deg, 
        rgba(22, 163, 74, 0.1) 0%, 
        rgba(34, 197, 94, 0.1) 100%);
}

.gradient-infinity {
    background: linear-gradient(135deg, 
        rgba(14, 165, 233, 0.1) 0%, 
        rgba(59, 130, 246, 0.1) 100%);
}

/* Modern card shadows */
.card-modern {
    box-shadow: 
        0 1px 3px rgba(0, 0, 0, 0.12),
        0 1px 2px rgba(0, 0, 0, 0.24);
    transition: box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.card-modern:hover {
    box-shadow: 
        0 14px 28px rgba(0, 0, 0, 0.25),
        0 10px 10px rgba(0, 0, 0, 0.22);
}

/* Enhanced button styles */
.btn-modern {
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-ink) 100%);
    border: none;
    box-shadow: 0 4px 15px rgba(39, 70, 156, 0.3);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-modern::before {
    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;
}

.btn-modern:hover::before {
    left: 100%;
}

.btn-modern:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.3);
}

/* Enhanced Server Icon Hover Effects */
#tldr .server-icon:hover {
    transform: scale(1.1) rotate(5deg);
}

#tldr .server-icon:hover img {
    transform: scale(1.05);
    filter: brightness(1.1) saturate(1.2);
}

/* Enhanced Brand Tag Hover Effects */
#tldr .card .head span:hover {
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* Enhanced CTA Button Hover with Shimmer Effect */
#tldr .btn:hover div {
    left: 100%;
}

/* Enhanced Card Hover with Staggered Animation */
#tldr .card:hover .benefit {
    transform: translateX(5px);
    transition-delay: calc(var(--i) * 0.1s);
}

#tldr .card .benefit {
    --i: 0;
    transition: transform 0.3s ease;
}

#tldr .card .benefit:nth-child(1) { --i: 1; }
#tldr .card .benefit:nth-child(2) { --i: 2; }

/* Ready to Jump In Section Hover Effects */
#ready .btn:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.3);
}

#ready .btn:hover div {
    left: 100%;
}

/* Newsletter Section Hover Effects */
#newsletter .btn:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.3);
}

#newsletter .btn:hover div {
    left: 100%;
}

#newsletter input:focus {
    transform: scale(1.02);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
    border-color: rgba(255, 255, 255, 0.5);
}

/* Feature Items Hover Effects */
.feature-item:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    background: rgba(255, 255, 255, 0.8) !important;
}

/* Core Features specific hover */
.card:has(.core-circle-1) .feature-item:hover {
    border-color: rgba(99, 102, 241, 0.3);
    box-shadow: 0 8px 25px rgba(99, 102, 241, 0.2);
}

/* Vanilla Exclusives specific hover */
.card:has(.vanilla-circle-1) .feature-item:hover {
    border-color: rgba(22, 163, 74, 0.3);
    box-shadow: 0 8px 25px rgba(22, 163, 74, 0.2);
}

/* Infinity Exclusives specific hover */
.card:has(.infinity-circle-1) .feature-item:hover {
    border-color: rgba(14, 165, 233, 0.3);
    box-shadow: 0 8px 25px rgba(14, 165, 233, 0.2);
}

/* Community Section Hover Effects */
#community .btn-social:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.3);
}

#community .btn-social:hover div {
    left: 100%;
}

#community .stat-item:hover {
    transform: translateY(-5px) scale(1.02);
    background: rgba(255, 255, 255, 0.25) !important;
    border-color: rgba(255, 255, 255, 0.4);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

/* ===== Modern Loading States ===== */
.loading-skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
    border-radius: 4px;
}

@keyframes loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.skeleton-text {
    height: 1rem;
    margin-bottom: 0.5rem;
}

.skeleton-text.short { width: 60%; }
.skeleton-text.medium { width: 80%; }
.skeleton-text.long { width: 100%; }

.skeleton-card {
    padding: 1rem;
    border-radius: 8px;
    background: #fff;
    border: 1px solid #e5e7eb;
}

/* Modern progress indicators */
.progress-bar {
    width: 100%;
    height: 4px;
    background: #e5e7eb;
    border-radius: 2px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    border-radius: 2px;
    transition: width 0.3s ease;
    animation: progress-shimmer 2s infinite;
}

@keyframes progress-shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

/* Modern focus states */
.focus-ring {
    outline: 2px solid transparent;
    outline-offset: 2px;
    transition: outline-color 0.2s ease;
}

.focus-ring:focus-visible {
    outline-color: var(--primary);
    outline-width: 2px;
}

/* Enhanced accessibility */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .card {
        border: 2px solid #000;
    }
    
    .btn {
        border: 2px solid #000;
    }
    
    .ad-slot {
        border: 2px solid #000;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .loading-skeleton,
    .progress-fill,
    .floating-circle,
    .feature-item,
    .btn-modern::before {
        animation: none !important;
    }
    
    .btn-modern:hover {
        transform: none;
    }
}


/* ===== Print Styles ===== */
@media print {
    .site-header,
    .site-footer,
    .ad-slot,
    .menu-toggle,
    .social-icons,
    .floating-circle {
        display: none;
    }
    
    .card {
        box-shadow: none;
        border: 1px solid #000;
    }
    
    .btn {
        background: #000 !important;
        color: #fff !important;
        border: 1px solid #000;
    }
}

/* Mobile media element constraints */
@media (max-width: 768px) {
  img, video, canvas, iframe {
    max-width: 100%;
    height: auto;
    display: block;
  }
}

/* Authoritative mobile container rule */
@media (max-width: 768px) {
  .container {
    width: 100% !important;
    max-width: 100% !important;
    padding-left: 16px !important;
    padding-right: 16px !important;
    margin-left: auto !important;
    margin-right: auto !important;
    box-sizing: border-box !important;
  }
}

/* Make inline grid layouts collapse to one column on tablet/mobile */
@media (max-width: 1023px) {
  /* If any sidebar exists, hide it on smaller screens */
  .sidebar { display: none !important; }

  /* Collapse any grid that sets columns inline (covers multiple variants) */
  .grid[style*="grid-template-columns"]       { grid-template-columns: 1fr !important; }
  .grid[style*="repeat(auto-fit"]             { grid-template-columns: 1fr !important; }
  .grid[style*="repeat(auto-fill"]            { grid-template-columns: 1fr !important; }
  .grid[style*="minmax(250px"]                { grid-template-columns: 1fr !important; }
  .grid[style*="minmax(320px"]                { grid-template-columns: 1fr !important; }
}

/* Ensure common blocks are visually centered on mobile */
@media (max-width: 768px) {
  .card, .note, .steps, .highlight, .tile, .ad-slot, .cta-royal, .help-card {
    margin-left: auto;
    margin-right: auto;
  }
}

/* Center TLDR cards specifically */
@media (max-width: 1023px) {
  /* Center the TLDR cards grid container */
  #tldr .grid[style*="grid-template-columns: repeat(auto-fit, minmax(320px, 1fr))"] {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 2.5rem !important;
  }
  
  /* Center individual TLDR cards */
  .card.tldr.accent-vanilla,
  .card.tldr.accent-infinity {
    margin-left: auto !important;
    margin-right: auto !important;
    max-width: 400px !important;
    width: 100% !important;
  }
}



/* Prevent ads from breaking grid layouts */
.grid .ad-slot,
.grid-2 .ad-slot,
.grid-3 .ad-slot {
  grid-column: 1 / -1;
  justify-self: center;
  max-width: 100%;
}

/* Ad loading state improvements */
.ad-slot.loading {
  min-height: 250px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(90deg, #f3f4f6 25%, #e5e7eb 50%, #f3f4f6 75%);
  background-size: 200% 100%;
  animation: shimmer 2s infinite;
}

/* Ensure ads don't break section alignment */
.section .ad-slot {
  margin-left: auto;
  margin-right: auto;
  max-width: 100%;
}

/* Prevent ads from causing horizontal scroll */
.ad-slot * {
  max-width: 100% !important;
  box-sizing: border-box !important;
}

/* ===== NEWSLETTER FORM MOBILE FIXES ===== */
/* Fix subscribe button text cutoff on mobile */
@media (max-width: 768px) {
  .newsletter-form .input-group {
    flex-direction: column !important;
    gap: 1rem !important;
  }
  
  .newsletter-form .input-group input[type="email"] {
    width: 100% !important;
    flex: none !important;
  }
  
  .newsletter-form .input-group button {
    width: 100% !important;
    padding: 1rem 2rem !important;
    font-size: 1.1rem !important;
    white-space: nowrap !important;
    min-width: auto !important;
  }
  
  .newsletter-form .input-group button span {
    display: inline-block !important;
  }
}

/* Ensure newsletter form doesn't exceed container width */
@media (max-width: 480px) {
  .newsletter-form {
    max-width: 100% !important;
    padding: 0 1rem !important;
  }
  
  .newsletter-form .input-group button {
    padding: 1.25rem 2rem !important;
    font-size: 1.2rem !important;
  }
}

/* ===== DISCORD IFRAME MOBILE FIXES ===== */
/* Fix Discord iframe on server chooser page for mobile */
@media (max-width: 768px) {
  /* Discord iframe container */
  .discord-widget-container {
    width: 100% !important;
    max-width: 100% !important;
    padding: 1rem !important;
    margin: 0 auto !important;
  }
  
  /* Discord iframe itself */
  iframe[src*="discord"] {
    width: 100% !important;
    max-width: 100% !important;
    height: 400px !important;
    min-height: 300px !important;
    border-radius: 8px !important;
  }
  
  /* Discord widget wrapper */
  .discord-widget-wrapper {
    width: 100% !important;
    max-width: 100% !important;
    background: rgba(255, 255, 255, 0.1) !important;
    border-radius: 16px !important;
    padding: 1rem !important;
    backdrop-filter: blur(10px) !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2) !important;
  }
}

/* Extra small mobile devices */
@media (max-width: 480px) {
  iframe[src*="discord"] {
    height: 350px !important;
    min-height: 250px !important;
  }
  
  .discord-widget-wrapper {
    padding: 0.75rem !important;
  }
  
}

/* Server chooser page mobile layout fixes */
@media (max-width: 768px) {
  /* Make the two-column layout stack on mobile */
  div[style*="grid-template-columns: 1fr 1fr"] {
    grid-template-columns: 1fr !important;
    gap: 2rem !important;
  }
  
  /* Center the Discord widget on mobile */
  .discord-widget-container {
    order: 2 !important;
    margin-top: 2rem !important;
  }
  
  /* Ensure proper spacing for the help section */
  .help-section {
    margin-top: 2rem !important;
  }
}

/* === AdSense: canonical rules (no clipping, no caps) === */
.ad-slot{
  display:block !important;
  position:relative !important;
  width:100% !important;
  max-width:100% !important;
  margin:16px auto !important;
  padding:0 !important;
  border:0 !important;
  background:none !important;
  line-height:0 !important;
  /* Never clip responsive iframes */
  overflow:visible !important;
  /* CLS reserve ONLY (adjust per placement below) */
  min-height: 250px !important;
}

/* Common placement reserves (NOT caps) */
.ad-header{min-height:90px !important;}
.ad-in-article{min-height:280px !important;}
.ad-near-cta{min-height:250px !important;}
.ad-sidebar{min-height:250px !important;}
.ad-sticky-footer{min-height:60px !important;}

/* Let Google size the unit; do not override heights */
.ad-slot ins.adsbygoogle,
.ad-slot iframe{
  display:block !important;
  width:100% !important;
  max-width:100% !important;
  height:auto;            /* no !important: allow Google's inline height */
  max-height:none;
  overflow:visible;
  box-sizing:border-box;
}

/* Defensive: decorative wrappers shouldn't clip ads */
.section, .container, .card, .chooser-cta, .band-aqua, .graphic-slab, .hero--royale-bg{
  overflow:visible !important;
}

/* Sidebar-specific ad constraints */
.sidebar .ad-slot {
  max-width: 100% !important;
  width: 100% !important;
  box-sizing: border-box !important;
}

.sidebar .ad-slot ins.adsbygoogle,
.sidebar .ad-slot iframe {
  max-width: 100% !important;
  width: 100% !important;
  box-sizing: border-box !important;
}

@media (max-width:768px){
  .ad-slot{ margin:12px auto !important; }
}

/* === Light Mobile Width Protection === */
/* Prevent ads from breaking mobile layout without interfering with height */
@media (max-width: 768px) {
  .ad-slot {
    max-width: 100%;
    width: 100%;
    box-sizing: border-box;
  }
  
  .ad-slot ins.adsbygoogle,
  .ad-slot iframe,
  .ad-slot .adsbygoogle {
    max-width: 100%;
    width: 100%;
    box-sizing: border-box;
  }
  
  /* Prevent any ad content from causing horizontal scroll */
  .ad-slot * {
    max-width: 100%;
    box-sizing: border-box;
  }
}
