/**
 * AI Wars WPX - Public Frontend Stylesheet
 * 100% Vanilla CSS - Professional Light / Dark Cyber-Industrial Architecture
 * Cards Light: #f1f2f6 | Cards Dark: #1A1A1A | Text: #333 / #f8fafc
 * Strict 0px Border-Radius Everywhere • High-Precision Responsive Design
 */

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@400;500;600;700;800;900&family=Space+Grotesk:wght@500;700;900&display=swap');

:root {
    --aiw-font-main: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --aiw-font-mono: 'Space Grotesk', monospace;

    /* Strict 0px Border Radius */
    --aiw-radius-lg: 0px;
    --aiw-radius-md: 0px;
    --aiw-radius-sm: 0px;

    /* High-Precision Cyber Laser Accents */
    --aiw-accent: #00d2ff;
    --aiw-accent-glow: rgba(0, 210, 255, 0.10);
    --aiw-cyber-green: #10b981;
    --aiw-cyber-green-glow: rgba(16, 185, 129, 0.4);
    --aiw-gold: #f59e0b;
    --aiw-gold-glow: rgba(245, 158, 11, 0.45);
}

/* ========================================================
   DARK THEME TOKENS (DEFAULT / [data-theme="dark"])
   Card Background: #1A1A1A
   ======================================================== */
.aiw-wars-wrapper,
.aiw-wars-wrapper[data-theme="dark"],
.aiw-modal-overlay[data-theme="dark"],
.aiw-doc-standalone-wrapper[data-theme="dark"] {
    --aiw-card-bg: #1A1A1A;
    --aiw-card-bg-hover: #242424;
    --aiw-surface-dark: #121212;
    --aiw-card-border: rgba(255, 255, 255, 0.12);
    --aiw-card-border-hover: rgba(255, 255, 255, 0.28);
    --aiw-glass-popover: #1A1A1A;
    --aiw-modal-bg: #1A1A1A;
    --aiw-pot-bg: #1A1A1A;
    --aiw-ticker-bg: #121212;
    --aiw-input-bg: #121212;
    --aiw-chart-bg: #121212;
    --aiw-text-primary: #f8fafc;
    --aiw-text-secondary: #94a3b8;
    --aiw-text-muted: #71717a;
    --aiw-title-color: #f8fafc;
    --aiw-tab-bg: #121212;
    --aiw-tab-active-bg: #2a2a2a;
    --aiw-tab-active-color: #00d2ff;
    --aiw-theme-btn-bg: #1A1A1A;
    --aiw-theme-btn-color: #e2e8f0;
}

/* ========================================================
   LIGHT THEME TOKENS ([data-theme="light"])
   Card Background: #f1f2f6 | Text: #333
   ======================================================== */
.aiw-wars-wrapper[data-theme="light"],
.aiw-modal-overlay[data-theme="light"],
.aiw-doc-standalone-wrapper[data-theme="light"] {
    --aiw-card-bg: #fdfdfd;
    ;
    --aiw-card-bg-hover: #e4ebeb;
    --aiw-surface-dark: #ffffff;
    --aiw-card-border: rgba(0, 0, 0, 0.10);
    --aiw-card-border-hover: rgba(0, 0, 0, 0.22);
    --aiw-glass-popover: #ffffff;
    --aiw-modal-bg: #ffffff;
    --aiw-pot-bg: #f1f2f6;
    --aiw-ticker-bg: #f1f2f6;
    --aiw-input-bg: #ffffff;
    --aiw-chart-bg: #ffffff;
    --aiw-text-primary: #222222;
    --aiw-text-secondary: #333333;
    --aiw-text-muted: #64748b;
    --aiw-title-color: #333333;
    --aiw-tab-bg: #e4e7eb;
    --aiw-tab-active-bg: #ffffff;
    --aiw-tab-active-color: #0284c7;
    --aiw-theme-btn-bg: #e4e7eb;
    --aiw-theme-btn-color: #1e293b;
}

/* Global Reset for 0px Radius and Box-Sizing across all plugin elements */
.aiw-wars-wrapper,
.aiw-wars-wrapper *,
.aiw-wars-wrapper *::before,
.aiw-wars-wrapper *::after,
.aiw-modal-overlay,
.aiw-modal-overlay *,
.aiw-modal-overlay *::before,
.aiw-modal-overlay *::after,
.aiw-doc-standalone-wrapper,
.aiw-doc-standalone-wrapper * {
    box-sizing: border-box !important;
    border-radius: 0px !important;
}

/* ========================================================
   OUTER CANVAS (100% TRANSPARENT - INHERITS THEME)
   ======================================================== */
.aiw-wars-wrapper {
    position: relative;
    width: 100%;
    max-width: 1120px;
    margin: 40px auto;
    font-family: var(--aiw-font-main);
    color: var(--aiw-text-primary);
    background: transparent !important;
    box-sizing: border-box;
}

.aiw-ambient-glow {
    display: none !important;
}

.aiw-glass-container {
    position: relative;
    z-index: 1;
    background: transparent !important;
    border: none !important;
    padding: 0;
}

/* ========================================================
   LIVE WAR TICKER BAR (SHARP CYBERNETIC RADAR)
   ======================================================== */
.aiw-war-ticker-bar {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    background: var(--aiw-ticker-bg, #121212);
    border: 1px solid var(--aiw-card-border);
    border-left: 3px solid var(--aiw-radar-badge-color, #e11d48);
    padding: 10px 16px;
    margin-bottom: 24px;
    overflow: hidden;
    gap: 14px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

.aiw-ticker-badge {
    display: flex;
    align-items: center;
    gap: 6px;
    background: var(--aiw-radar-badge-color, #e11d48);
    color: #ffffff;
    font-family: var(--aiw-font-mono);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 1px;
    padding: 3px 8px;
    flex-shrink: 0;
    text-transform: uppercase;
}

.aiw-ticker-pulse {
    width: 6px;
    height: 6px;
    background: #ffffff;
    animation: aiw-pulse 1.4s infinite;
}

.aiw-ticker-marquee {
    flex: 1;
    overflow: hidden;
    white-space: nowrap;
    position: relative;
}

.aiw-ticker-track {
    display: inline-flex;
    gap: 36px;
    animation: aiw-ticker-scroll 26s linear infinite;
}

.aiw-ticker-track:hover {
    animation-play-state: paused;
}

.aiw-ticker-item {
    font-size: 13px;
    color: var(--aiw-text-primary);
    font-weight: 600;
    letter-spacing: 0.2px;
}

@keyframes aiw-ticker-scroll {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-50%);
    }
}

/* Header & Hero */
.aiw-board-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 24px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.aiw-title-group {
    flex: 1;
    min-width: 280px;
}

.aiw-header-top-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}

.aiw-live-indicator {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.35);
    padding: 4px 10px;
}

.aiw-live-dot {
    width: 7px;
    height: 7px;
    background-color: #10b981;
    box-shadow: 0 0 6px #10b981;
    animation: aiw-pulse 1.8s infinite;
}

@keyframes aiw-pulse {

    0%,
    100% {
        transform: scale(1);
        opacity: 1;
    }

    50% {
        transform: scale(1.3);
        opacity: 0.5;
    }
}

.aiw-live-text {
    font-family: var(--aiw-font-mono);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 1px;
    color: #10b981;
    text-transform: uppercase;
}

/* Theme Toggle Button */
.aiw-theme-toggle-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--aiw-theme-btn-bg, #1A1A1A);
    border: 1px solid var(--aiw-card-border);
    color: var(--aiw-theme-btn-color, #e2e8f0);
    font-family: var(--aiw-font-mono);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    padding: 4px 10px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.aiw-theme-toggle-btn:hover {
    border-color: var(--aiw-accent);
    color: var(--aiw-accent);
}

.aiw-main-title {
    font-size: 32px;
    font-weight: 900;
    line-height: 1.15;
    margin: 0 0 8px 0;
    color: #333333 !important;
    letter-spacing: -0.5px;
    text-transform: uppercase;
}

.aiw-main-subtitle {
    font-size: 14px;
    color: #4b5563 !important;
    margin: 0;
    line-height: 1.5;
    max-width: 580px;
}

/* Header Stats Cards Group (Record + Pot) */
.aiw-header-cards-group {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

/* Global Pot Card */
.aiw-pot-card {
    background: var(--aiw-pot-bg, #1A1A1A);
    border: 1px solid var(--aiw-accent-glow, rgba(0, 210, 255, 0.05));
    border-top: 3px solid var(--aiw-accent);
    padding: 16px 24px;
    min-width: 200px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2), inset 0 0 4px var(--aiw-accent-glow, rgba(0, 210, 255, 0.01));
    text-align: right;
    border-radius: 4px;
}

.aiw-record-card {
    border: 1px solid rgba(245, 158, 11, 0.35) !important;
    border-top: 3px solid #f59e0b !important;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2), inset 0 0 15px rgba(245, 158, 11, 0.08) !important;
}

.aiw-record-value {
    color: #fbbf24 !important;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.25), 0 0 14px rgba(245, 158, 11, 0.4) !important;
}

.aiw-record-donor {
    font-weight: 800;
    color: var(--aiw-text-primary);
}

.aiw-record-for {
    font-weight: 800;
}

.aiw-pot-label {
    font-family: var(--aiw-font-mono);
    font-size: 10px;
    font-weight: 800;
    color: var(--aiw-text-muted);
    letter-spacing: 1.5px;
    text-transform: uppercase;
}

.aiw-pot-value {
    font-family: var(--aiw-font-mono);
    font-size: 30px;
    font-weight: 900;
    color: var(--aiw-accent, #00d2ff);
    margin: 4px 0;
    letter-spacing: -0.5px;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.2), 0 0 14px var(--aiw-accent-glow, rgba(0, 210, 255, 0.3));
}

.aiw-pot-meta {
    font-family: var(--aiw-font-mono);
    font-size: 11px;
    color: var(--aiw-text-secondary);
}

/* Action Bar & Filter Tabs */
.aiw-action-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
    flex-wrap: wrap;
    border-top: 1px solid var(--aiw-card-border);
    padding-top: 20px;
}

.aiw-filter-tabs {
    display: flex;
    gap: 4px;
    background: var(--aiw-tab-bg, #121212);
    padding: 4px;
    border: 1px solid var(--aiw-card-border);
}

.aiw-filter-tab {
    background: transparent;
    border: 1px solid transparent;
    color: var(--aiw-text-secondary);
    font-family: var(--aiw-font-mono);
    font-size: 12px;
    font-weight: 700;
    padding: 8px 16px;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.2s ease;
}

.aiw-filter-tab:hover {
    color: var(--aiw-text-primary);
    background: rgba(255, 255, 255, 0.08);
}

.aiw-filter-tab.is-active {
    background: var(--aiw-tab-active-bg, #2a2a2a);
    border-color: rgba(255, 255, 255, 0.2);
    color: var(--aiw-tab-active-color, #00d2ff);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

/* Right Action Group */
.aiw-action-right-group {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

/* Evolution Chart Toggle Button */
.aiw-btn-toggle-chart {
    background: var(--aiw-card-bg, #1A1A1A);
    border: 1px solid var(--aiw-card-border);
    color: var(--aiw-text-primary);
    font-family: var(--aiw-font-mono);
    font-size: 12.5px;
    font-weight: 800;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    padding: 12px 18px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.aiw-btn-toggle-chart:hover {
    border-color: var(--aiw-accent);
    color: var(--aiw-accent);
}

.aiw-btn-toggle-chart.is-open {
    background: #242424;
    border-color: var(--aiw-accent);
    color: var(--aiw-accent);
    box-shadow: 0 0 14px var(--aiw-accent-glow);
}

.aiw-chart-btn-arrow {
    font-size: 11px;
    transition: transform 0.2s ease;
}

/* Primary Boost CTA Button */
.aiw-btn-boost-main {
    background: var(--aiw-accent, #00d2ff);
    border: 1px solid var(--aiw-accent, #38bdf8);
    color: #ffffff !important;
    font-family: var(--aiw-font-mono);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    padding: 12px 24px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.25);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 0 16px var(--aiw-accent-glow, rgba(0, 210, 255, 0.35));
}

.aiw-btn-boost-main:hover {
    filter: brightness(1.15);
    transform: translateY(-2px);
    box-shadow: 0 6px 24px var(--aiw-accent-glow, rgba(0, 210, 255, 0.55));
    color: #ffffff !important;
}

/* ========================================================
   INTERACTIVE TIMELINE LINE CHART SECTION
   ======================================================== */
.aiw-chart-section {
    margin-bottom: 24px;
    animation: aiw-chartSlideDown 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes aiw-chartSlideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

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

.aiw-chart-card {
    background: var(--aiw-card-bg, #1A1A1A);
    border: 1px solid var(--aiw-card-border);
    border-top: 3px solid var(--aiw-accent, #00d2ff);
    padding: 24px;
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.3);
}

.aiw-chart-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 20px;
    margin-bottom: 20px;
    flex-wrap: wrap;
    border-bottom: 1px solid var(--aiw-card-border);
    padding-bottom: 16px;
}

.aiw-chart-title-box {
    flex: 1;
    min-width: 260px;
}

.aiw-chart-badge {
    display: inline-block;
    font-family: var(--aiw-font-mono);
    font-size: 10px;
    font-weight: 800;
    color: var(--aiw-accent, #00d2ff);
    background: var(--aiw-surface-dark, #121212);
    border: 1px solid var(--aiw-accent-glow, rgba(0, 210, 255, 0.3));
    padding: 3px 8px;
    margin-bottom: 8px;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.aiw-chart-title {
    font-size: 18px;
    font-weight: 900;
    color: var(--aiw-text-primary);
    margin: 0 0 4px 0;
    text-transform: uppercase;
    letter-spacing: -0.2px;
}

.aiw-chart-subtitle {
    font-size: 13px;
    color: var(--aiw-text-secondary);
    margin: 0;
    line-height: 1.4;
}

/* Legend with Toggle Pills */
.aiw-chart-legend {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.aiw-legend-pill {
    background: var(--aiw-surface-dark, #121212);
    border: 1px solid var(--aiw-card-border);
    color: var(--aiw-text-primary);
    font-family: var(--aiw-font-mono);
    font-size: 11px;
    font-weight: 800;
    padding: 5px 10px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s ease;
}

.aiw-legend-pill:hover {
    background: var(--aiw-card-bg-hover, #242424);
    border-color: var(--pill-color, #00d2ff);
}

.aiw-legend-pill.is-disabled {
    opacity: 0.35;
    background: transparent;
    text-decoration: line-through;
}

.aiw-legend-dot {
    width: 8px;
    height: 8px;
}

/* Canvas & SVG */
.aiw-chart-canvas-wrapper {
    position: relative;
    width: 100%;
    min-height: 320px;
    background: var(--aiw-chart-bg, #121212);
    border: 1px solid var(--aiw-card-border);
    padding: 10px 0;
    overflow: hidden;
}

.aiw-chart-loading {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(18, 18, 18, 0.85);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    z-index: 10;
    font-family: var(--aiw-font-mono);
    font-size: 12px;
    color: var(--aiw-text-secondary);
}

.aiw-timeline-svg {
    width: 100%;
    height: 340px;
    display: block;
}

/* Floating SVG Tooltip */
.aiw-chart-tooltip {
    position: absolute;
    z-index: 100;
    background: var(--aiw-glass-popover, #1A1A1A);
    border: 1px solid var(--aiw-card-border-hover);
    padding: 12px 16px;
    box-shadow: 0 14px 34px rgba(0, 0, 0, 0.6);
    pointer-events: none;
    min-width: 240px;
    max-width: 320px;
    transition: left 0.1s ease, top 0.1s ease;
}

.aiw-tt-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-left: 8px;
    margin-bottom: 8px;
    border-bottom: 1px solid var(--aiw-card-border);
    padding-bottom: 6px;
}

.aiw-tt-name {
    font-size: 14px;
    font-weight: 900;
    text-transform: uppercase;
}

.aiw-tt-date {
    font-family: var(--aiw-font-mono);
    font-size: 10px;
    color: var(--aiw-text-muted);
}

.aiw-tt-body {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.aiw-tt-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-family: var(--aiw-font-mono);
    font-size: 11px;
    color: var(--aiw-text-secondary);
}

.aiw-tt-row strong {
    font-size: 12px;
    color: var(--aiw-text-primary);
}

.aiw-tt-social {
    color: var(--aiw-accent);
}

.aiw-tt-quote {
    font-size: 11px;
    font-style: italic;
    color: var(--aiw-text-secondary);
    background: var(--aiw-surface-dark, #121212);
    padding: 6px 8px;
    margin: 4px 0;
    border-left: 2px solid var(--aiw-accent);
}

.aiw-tt-total {
    border-top: 1px solid var(--aiw-card-border);
    padding-top: 6px;
    margin-top: 4px;
}

/* Leaderboard List */
.aiw-board-list {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    width: 100%;
}

/* ========================================================
   AI MODEL CARDS (SHARP BRUTALIST BLOCKS WITH BRAND LASERS)
   ======================================================== */
.aiw-model-card {
    display: flex;
    flex-direction: column;
    width: calc(100% - 24px);
    max-width: 100%;
    margin-left: auto !important;
    margin-right: auto !important;
    box-sizing: border-box;
    background: var(--aiw-card-bg, #1A1A1A);
    border: 1px solid var(--aiw-card-border);
    border-left: 4px solid var(--ai-color, #00d2ff);
    padding: 16px 20px;
    transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease, order 0.6s ease, width 0.3s ease;
    position: relative;
    z-index: 1;
    cursor: pointer;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.aiw-model-card:hover,
.aiw-model-card:focus-within {
    background: var(--aiw-card-bg-hover, #242424);
    border-color: var(--aiw-card-border-hover);
    border-left: 4px solid var(--ai-color, #00d2ff);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25), 0 0 16px var(--ai-color, #00d2ff)25;
    z-index: 20 !important;
}

.aiw-model-card.is-drawer-open {
    border-color: var(--ai-color, #00d2ff)80;
    border-left: 4px solid var(--ai-color, #00d2ff);
    background: var(--aiw-card-bg-hover, #242424);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3), 0 0 20px var(--ai-color, #00d2ff)30;
    z-index: 15 !important;
}

.aiw-model-card:has(.aiw-king-trigger:hover),
.aiw-model-card:has(.aiw-king-trigger.is-active) {
    z-index: 50 !important;
}

/* ========================================================
   PRIMEIRO COLOCADO / LÍDER (#1 CARD SPECIAL HIGHLIGHT & AURA)
   ======================================================== */
.aiw-model-card.is-first-place,
.aiw-model-card[data-rank="1"] {
    width: 100% !important;
    border: 2px dashed var(--ai-color, var(--aiw-gold)) !important;
    border-left: 6px solid var(--ai-color, var(--aiw-gold)) !important;
    padding: 22px 16px !important;
    margin-bottom: 12px !important;
    background: radial-gradient(circle at 10% 50%, color-mix(in srgb, var(--ai-color) 16%, var(--aiw-card-bg, #1A1A1A)) 0%, var(--aiw-card-bg, #1A1A1A) 80%) !important;
    box-shadow: 0 0 30px var(--ai-color)50, 0 10px 30px rgba(0, 0, 0, 0.4), inset 0 0 20px var(--ai-color)15 !important;
    animation: aiw-leader-pulse-dark 3s ease-in-out infinite !important;
    position: relative;
    z-index: 1;
}

.aiw-model-card.is-first-place .aiw-card-main-row,
.aiw-model-card[data-rank="1"] .aiw-card-main-row {
    align-items: center !important;
    min-height: 52px;
}

.aiw-model-card.is-first-place .aiw-model-name,
.aiw-model-card[data-rank="1"] .aiw-model-name {
    font-size: 18px !important;
    font-weight: 900 !important;
}

.aiw-model-card.is-first-place .aiw-model-amount,
.aiw-model-card[data-rank="1"] .aiw-model-amount {
    font-size: 18px !important;
    font-weight: 900 !important;
}

.aiw-model-card.is-first-place:hover,
.aiw-model-card[data-rank="1"]:hover {
    border-color: var(--ai-color, var(--aiw-gold)) !important;
    box-shadow: 0 0 45px var(--ai-color)75, 0 14px 40px rgba(0, 0, 0, 0.55), inset 0 0 25px var(--ai-color)25 !important;
    transform: translateY(-3px);
}

.aiw-model-card.is-first-place.is-drawer-open,
.aiw-model-card[data-rank="1"].is-drawer-open {
    border-color: var(--ai-color, var(--aiw-gold)) !important;
    box-shadow: 0 0 48px var(--ai-color)80, 0 16px 45px rgba(0, 0, 0, 0.6), inset 0 0 30px var(--ai-color)30 !important;
}

.aiw-model-card.is-first-place .aiw-crown-rank,
.aiw-model-card[data-rank="1"] .aiw-crown-rank {
    /*background: rgba(245, 158, 11, 0.15);*/
    /*border: none;*/
    /*1px solid rgba(245, 158, 11, 0.6);*/
    /*box-shadow: 0 0 14px rgba(245, 158, 11, 0.4);*/
    /*padding: 3px 6px;*/
    /*border-radius: 4px;*/
}

.aiw-model-card.is-first-place .aiw-crown-icon,
.aiw-model-card[data-rank="1"] .aiw-crown-icon {
    font-size: 18px;
    filter: drop-shadow(0 0 6px rgba(245, 158, 11, 0.7));
}

.aiw-model-card.is-first-place .aiw-model-logo-wrapper,
.aiw-model-card[data-rank="1"] .aiw-model-logo-wrapper {
    width: 40px !important;
    height: 60px !important;
    box-shadow: 0 0 22px var(--ai-color)70 !important;
    border-color: var(--ai-color) !important;
}

.aiw-model-card.is-first-place .aiw-king-avatar,
.aiw-model-card[data-rank="1"] .aiw-king-avatar {
    width: 36px !important;
    height: 60px !important;
}

.aiw-model-card.is-first-place .aiw-btn-boost-single,
.aiw-model-card[data-rank="1"] .aiw-btn-boost-single {
    padding: 11px 20px !important;
    font-size: 13px !important;
}

[data-theme="light"] .aiw-model-card.is-first-place,
[data-theme="light"] .aiw-model-card[data-rank="1"] {
    border: 2px dashed var(--ai-color, var(--aiw-gold)) !important;
    border-left: 6px solid var(--ai-color, var(--aiw-gold)) !important;
    background: radial-gradient(circle at 10% 50%, color-mix(in srgb, var(--ai-color) 12%, #ffffff) 0%, #ffffff 80%) !important;
    box-shadow: 0 0 25px var(--ai-color)50, 0 8px 25px rgba(0, 0, 0, 0.12), inset 0 0 15px var(--ai-color)15 !important;
    animation: aiw-leader-pulse-light 3s ease-in-out infinite !important;
}

@keyframes aiw-leader-pulse-dark {

    0%,
    100% {
        box-shadow: 0 0 25px var(--ai-color)45, 0 10px 30px rgba(0, 0, 0, 0.4), inset 0 0 15px var(--ai-color)15;
    }

    50% {
        box-shadow: 0 0 45px var(--ai-color)75, 0 14px 40px rgba(0, 0, 0, 0.55), inset 0 0 25px var(--ai-color)25;
    }
}

@keyframes aiw-leader-pulse-light {

    0%,
    100% {
        box-shadow: 0 0 22px var(--ai-color)45, 0 8px 25px rgba(0, 0, 0, 0.12), inset 0 0 12px var(--ai-color)12;
    }

    50% {
        box-shadow: 0 0 38px var(--ai-color)75, 0 12px 30px rgba(0, 0, 0, 0.18), inset 0 0 22px var(--ai-color)22;
    }
}

/* Card Main Horizontal Row */
.aiw-card-main-row {
    display: flex;
    align-items: center;
    gap: 18px;
    width: 100%;
}

/* Rank Position */
.aiw-card-rank {
    width: 44px;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-shrink: 0;
}

.aiw-crown-rank {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.aiw-crown-icon {
    font-size: 15px;
    animation: aiw-bounce 2s infinite;
}

@keyframes aiw-bounce {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-3px);
    }
}

.aiw-crown-rank .aiw-rank-num {
    color: var(--aiw-gold);
    font-weight: 900;
    font-size: 15px;
}

.aiw-rank-num {
    font-family: var(--aiw-font-mono);
    font-size: 15px;
    font-weight: 800;
    color: var(--aiw-text-muted);
}

/* AI Identity */
.aiw-model-identity {
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 250px;
    flex: 0 0 auto;
}

.aiw-model-logo-wrapper {
    width: 40px;
    height: 60px;
    background: var(--aiw-surface-dark, #121212);
    border: 1px solid var(--aiw-card-border);
    padding: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.aiw-model-logo {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.aiw-logo-fallback {
    width: 100%;
    height: 100%;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--aiw-font-mono);
    font-weight: 800;
    font-size: 12px;
}

.aiw-model-names {
    overflow: visible;
}

.aiw-name-row {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: nowrap;
}

.aiw-model-name {
    font-size: 16px;
    font-weight: 800;
    margin: 0;
    color: var(--aiw-text-primary);
    white-space: nowrap;
    letter-spacing: 0.2px;
}

.aiw-toggle-supporters-btn {
    background: var(--aiw-surface-dark, #121212);
    border: 1px solid var(--aiw-card-border);
    color: var(--aiw-text-secondary);
    font-family: var(--aiw-font-mono);
    font-size: 11px;
    font-weight: 700;
    padding: 2px 6px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: all 0.2s;
}

.aiw-toggle-supporters-btn:hover {
    background: var(--aiw-card-bg-hover, #242424);
    color: var(--aiw-text-primary);
    border-color: var(--aiw-card-border-hover);
}

.aiw-arrow-indicator {
    font-size: 9px;
    transition: transform 0.3s ease;
}

.aiw-model-card.is-drawer-open .aiw-arrow-indicator {
    transform: rotate(180deg);
}

.aiw-model-meta-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 4px;
    flex-wrap: nowrap;
}

.aiw-model-bids-count {
    font-family: var(--aiw-font-mono);
    font-size: 11px;
    color: var(--aiw-text-muted);
}

.aiw-model-next-min {
    font-family: var(--aiw-font-mono);
    font-size: 11px;
    color: var(--aiw-text-secondary);
    background: var(--aiw-surface-dark, #121212);
    padding: 2px 8px;
    border: 1px solid var(--aiw-card-border);
    white-space: nowrap !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 4px !important;
    border-radius: 3px;
}

.aiw-min-val {
    color: var(--aiw-gold);
    font-weight: 800;
}

/* Progress Bar & Percentage */
.aiw-model-progress-section {
    flex: 1;
    min-width: 140px;
}

.aiw-progress-stats {
    display: flex;
    justify-content: space-between;
    margin-bottom: 6px;
}

.aiw-model-amount {
    font-family: var(--aiw-font-mono);
    font-size: 16px;
    font-weight: 800;
    color: var(--aiw-text-primary);
}

.aiw-model-percentage {
    font-family: var(--aiw-font-mono);
    font-size: 13px;
    font-weight: 700;
    color: var(--aiw-text-secondary);
}

.aiw-bar-track {
    width: 100%;
    height: 6px;
    background: var(--aiw-surface-dark, #121212);
    border: 1px solid var(--aiw-card-border);
    overflow: hidden;
}

.aiw-bar-fill {
    height: 100%;
    transition: width 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}

/* King Column (Sharp Square Block) */
.aiw-king-col {
    min-width: 130px;
    width: auto;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-shrink: 0;
}

.aiw-king-trigger {
    position: relative;
    cursor: pointer;
}

.aiw-king-avatar {
    width: 36px;
    height: 60px;
    border: 2px solid;
    background: var(--aiw-surface-dark, #121212);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.aiw-king-trigger:hover .aiw-king-avatar,
.aiw-king-trigger:focus .aiw-king-avatar {
    transform: scale(1.1);
}

.aiw-king-initials {
    font-family: var(--aiw-font-mono);
    font-weight: 900;
    font-size: 12px;
    color: var(--aiw-text-primary);
}

.aiw-king-mini-crown {
    position: absolute;
    top: -9px;
    right: -5px;
    font-size: 11px;
}

/* King Floating Popover */
.aiw-king-popover {
    position: absolute;
    bottom: calc(100% + 12px);
    left: 50%;
    transform: translateX(-50%) translateY(6px);
    width: 260px;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
    z-index: 99999 !important;
}

.aiw-king-trigger:hover .aiw-king-popover,
.aiw-king-trigger:focus .aiw-king-popover {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateX(-50%) translateY(0);
}

.aiw-popover-glass {
    background: var(--aiw-glass-popover, var(--aiw-card-bg, #1A1A1A));
    border: 1px solid var(--aiw-card-border-hover);
    border-top: 3px solid var(--ai-color, var(--aiw-gold));
    padding: 14px 16px;
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.45);
    display: flex;
    flex-direction: column;
    gap: 10px;
    border-radius: 4px;
    text-align: left;
    box-sizing: border-box;
}

[data-theme="light"] .aiw-popover-glass {
    background: #ffffff;
    border-color: rgba(0, 0, 0, 0.12);
    box-shadow: 0 14px 32px rgba(0, 0, 0, 0.15), 0 2px 8px rgba(0, 0, 0, 0.06);
}

.aiw-popover-badge-row {
    display: flex;
    align-items: center;
    justify-content: flex-start;
}

.aiw-popover-crown-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(234, 179, 8, 0.12);
    border: 1px solid rgba(234, 179, 8, 0.35);
    padding: 3px 8px;
    border-radius: 3px;
}

.aiw-popover-crown-badge .aiw-crown-icon {
    font-size: 13px;
    line-height: 1;
}

.aiw-popover-title {
    font-family: var(--aiw-font-mono);
    font-size: 10px;
    font-weight: 800;
    color: var(--aiw-gold, #eab308);
    letter-spacing: 0.8px;
    text-transform: uppercase;
    line-height: 1.2;
}

[data-theme="light"] .aiw-popover-title {
    color: #b45309;
}

.aiw-popover-user-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.aiw-popover-user-info {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    min-width: 0;
}

.aiw-popover-name {
    font-size: 14px;
    font-weight: 800;
    color: var(--aiw-text-primary);
    line-height: 1.3;
    letter-spacing: -0.2px;
}

.aiw-social-badge {
    display: inline-flex;
    align-items: center;
    background: var(--aiw-surface-dark, #121212);
    border: 1px solid var(--aiw-accent-glow, rgba(0, 210, 255, 0.3));
    color: var(--aiw-accent);
    font-family: var(--aiw-font-mono);
    font-size: 10.5px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 2px;
    line-height: 1.2;
}

[data-theme="light"] .aiw-social-badge {
    background: #f1f5f9;
    border-color: rgba(2, 132, 199, 0.3);
    color: #0284c7;
}

.aiw-popover-amount {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--aiw-surface-dark, #121212);
    border: 1px solid var(--aiw-card-border);
    padding: 8px 12px;
    border-radius: 3px;
    font-family: var(--aiw-font-mono);
    margin: 0;
}

[data-theme="light"] .aiw-popover-amount {
    background: #f8fafc;
    border-color: #e2e8f0;
}

.aiw-popover-amount-label {
    font-size: 11px;
    color: var(--aiw-text-secondary);
    font-weight: 600;
}

.aiw-popover-amount-val {
    color: #10b981;
    font-size: 13px;
    font-weight: 800;
}

[data-theme="light"] .aiw-popover-amount-val {
    color: #059669;
}

.aiw-popover-quote {
    font-size: 12px;
    font-style: italic;
    color: var(--aiw-text-secondary);
    background: var(--aiw-surface-dark, #121212);
    padding: 10px 12px;
    margin: 0;
    border-left: 3px solid var(--ai-color, var(--aiw-gold));
    border-radius: 0 4px 4px 0;
    line-height: 1.45;
}

[data-theme="light"] .aiw-popover-quote {
    background: #f8fafc;
    color: #475569;
}

.aiw-popover-quote p {
    margin: 0;
}

.aiw-king-vacant {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    background: var(--aiw-surface-dark, #121212);
    border: 1px dashed var(--aiw-card-border);
    padding: 6px 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    border-radius: 4px;
}

.aiw-king-vacant:hover {
    background: rgba(245, 158, 11, 0.12);
    border-color: var(--aiw-gold);
    box-shadow: 0 0 10px rgba(245, 158, 11, 0.15);
}

.aiw-vacant-crown {
    font-size: 13px;
    opacity: 0.85;
}

.aiw-vacant-text {
    font-family: var(--aiw-font-mono);
    font-size: 9px;
    font-weight: 800;
    color: var(--aiw-text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.3px;
    white-space: nowrap;
}

/* Card Single Action Button */
.aiw-card-action {
    flex-shrink: 0;
}

.aiw-btn-boost-single {
    background: var(--aiw-accent, #6366f1);
    border: 1px solid var(--aiw-accent, #6366f1);
    color: #ffffff;
    font-family: var(--aiw-font-mono);
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 9px 16px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.25);
    transition: all 0.2s ease;
    box-shadow: 0 0 14px var(--aiw-accent-glow, rgba(99, 102, 241, 0.35));
    text-decoration: none;
}

.aiw-btn-boost-single:hover {
    background: var(--ai-color, #00d2ff) !important;
    color: #000000 !important;
    border-color: var(--ai-color, #00d2ff) !important;
    box-shadow: 0 0 18px var(--ai-color, #00d2ff)60 !important;
    transform: translateY(-1px);
}

/* ========================================================
   UNFOLDING SUPPORTERS DRAWER (ACCORDION)
   ======================================================== */
.aiw-supporters-drawer {
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s ease, margin-top 0.3s ease;
    width: 100%;
}

.aiw-model-card.is-drawer-open .aiw-supporters-drawer {
    max-height: 8000px;
    opacity: 1;
    margin-top: 14px;
    border-top: 1px solid var(--aiw-card-border);
    padding-top: 14px;
    padding-bottom: 8px;
}

.aiw-drawer-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.aiw-drawer-title {
    font-family: var(--aiw-font-mono);
    font-size: 12px;
    font-weight: 800;
    color: var(--aiw-text-primary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.aiw-drawer-count {
    font-family: var(--aiw-font-mono);
    font-size: 11px;
    color: var(--aiw-text-muted);
}

.aiw-supporters-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.aiw-supporter-item {
    display: flex;
    flex-direction: column;
    gap: 8px;
    background: var(--aiw-surface-dark, #121212);
    border: 1px solid var(--aiw-card-border);
    padding: 10px 14px;
    transition: background 0.2s;
    border-radius: 4px;
}

.aiw-supporter-item:hover {
    background: var(--aiw-card-bg-hover, #242424);
    border-color: var(--aiw-card-border-hover);
}

.aiw-supp-main-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    width: 100%;
}

.aiw-supp-avatar {
    width: 32px;
    height: 40px;
    border: 1px solid;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--aiw-font-mono);
    font-weight: 900;
    font-size: 11px;
    color: var(--aiw-text-primary);
    flex-shrink: 0;
    border-radius: 2px;
}

.aiw-supp-info {
    flex: 1;
    min-width: 0;
    overflow: hidden;
}

.aiw-supp-top {
    display: flex;
    align-items: center;
    gap: 1px;
    flex-wrap: wrap;
}

.aiw-supp-name {
    font-size: 13px;
    font-weight: 700;
    color: var(--aiw-text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-right: 4px;
}

.aiw-supp-social {
    font-family: var(--aiw-font-mono);
    font-size: 10.5px;
    color: var(--aiw-accent);
    background: var(--aiw-card-bg, #1A1A1A);
    border: 1px solid var(--aiw-accent-glow, rgba(0, 210, 255, 0.2));
    padding: 1px 5px;
    border-radius: 2px;
    white-space: nowrap;
}

.aiw-supp-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    justify-content: center;
    gap: 6px;
    flex-shrink: 0;
    text-align: right;
}

.aiw-supp-amount {
    font-family: var(--aiw-font-mono);
    font-size: 13px;
    font-weight: 800;
    color: #10b981;
    line-height: 1.2;
    white-space: nowrap;
}

.aiw-supp-time {
    font-family: var(--aiw-font-mono);
    font-size: 10px;
    color: var(--aiw-text-muted);
    line-height: 1.2;
    white-space: nowrap;
}

.aiw-supp-quote {
    font-size: 12px;
    color: var(--aiw-text-secondary);
    font-style: italic;
    margin: 0;
    width: 100%;
    box-sizing: border-box;
    background: var(--aiw-card-bg, #1A1A1A);
    border-left: 2px solid var(--ai-color, var(--aiw-accent));
    padding: 8px 12px;
    border-radius: 0 4px 4px 0;
    line-height: 1.45;
}

.aiw-supporter-item.aiw-supp-hidden {
    display: none !important;
}

.aiw-drawer-actions {
    display: flex;
    justify-content: center;
    margin-top: 10px;
    padding-top: 8px;
    border-top: 1px dashed var(--aiw-card-border);
}

.aiw-btn-see-more {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: var(--aiw-surface-dark, #121212);
    border: 1px solid var(--aiw-card-border);
    color: var(--aiw-text-primary);
    font-family: var(--aiw-font-mono);
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 8px 16px;
    cursor: pointer;
    transition: all 0.2s ease;
    width: 100%;
}

.aiw-btn-see-more:hover {
    background: var(--aiw-card-bg-hover, #242424);
    border-color: var(--aiw-accent);
    color: var(--aiw-accent);
    box-shadow: 0 0 10px var(--aiw-accent-glow);
}

.aiw-no-supporters {
    padding: 12px;
    text-align: center;
    color: var(--aiw-text-muted);
    font-family: var(--aiw-font-mono);
    font-size: 12px;
}

/* Card Bottom Unfold Indicator Chevron */
.aiw-card-unfold-handle {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 6px;
    margin-bottom: -8px;
    padding: 2px 0;
    cursor: pointer;
    color: var(--aiw-text-muted);
    transition: all 0.25s ease;
    opacity: 0.6;
    user-select: none;
}

.aiw-model-card:hover .aiw-card-unfold-handle {
    opacity: 1;
    color: var(--ai-color, var(--aiw-accent));
}

.aiw-unfold-chevron {
    font-size: 24px;
    line-height: 0.2rem;
    display: inline-block;
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1), color 0.2s ease;
    margin: 8px 0 6px;
}

.aiw-model-card.is-drawer-open .aiw-unfold-chevron {
    transform: rotate(180deg);
    color: var(--ai-color, var(--aiw-accent));
}

/* ========================================================
   INSTITUTIONAL CLEANED FOOTER BAR
   ======================================================== */
.aiw-board-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid rgba(148, 163, 184, 0.45) !important;
    border-bottom: 1px solid rgba(148, 163, 184, 0.45) !important;
    padding: 20px 0;
    margin-top: 80px;
    flex-wrap: wrap;
    gap: 14px;
}

.aiw-wars-wrapper[data-theme="dark"] .aiw-board-footer,
.aiw-wars-wrapper:not([data-theme="light"]) .aiw-board-footer {
    border-top: 1px solid rgba(148, 163, 184, 0.45) !important;
    border-bottom: 1px solid rgba(148, 163, 184, 0.45) !important;
}

.aiw-wars-wrapper[data-theme="light"] .aiw-board-footer {
    border-top: 1px solid rgba(100, 116, 139, 0.3) !important;
    border-bottom: 1px solid rgba(100, 116, 139, 0.3) !important;
}

.aiw-sync-status {
    display: flex;
    align-items: center;
    gap: 8px;
}

.aiw-pulse-circle {
    width: 7px;
    height: 7px;
    background: #10b981;
    animation: aiw-pulse 2s infinite;
}

.aiw-live-label {
    font-family: var(--aiw-font-mono);
    color: #10b981;
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.aiw-live-sub {
    color: var(--aiw-text-muted);
    font-size: 12px;
}

.aiw-footer-nav {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.aiw-footer-link {
    background: var(--aiw-surface-dark, #121212);
    border: 1px solid var(--aiw-card-border);
    color: var(--aiw-text-secondary);
    font-family: var(--aiw-font-mono);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    cursor: pointer;
    padding: 6px 12px;
    transition: all 0.2s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.aiw-footer-link:hover {
    color: var(--aiw-text-primary);
    background: var(--aiw-card-bg-hover, #242424);
    border-color: var(--aiw-accent);
}

.aiw-footer-profile-link {
    border-color: rgba(245, 158, 11, 0.4);
    color: var(--aiw-gold);
}

.aiw-footer-profile-link:hover {
    border-color: var(--aiw-gold);
    color: #fbbf24;
    box-shadow: 0 0 10px rgba(245, 158, 11, 0.25);
}

/* ========================================================
   DEDICATED COPYRIGHT & EXTRA MESSAGE SUBFOOTER
   ======================================================== */
.aiw-board-subfooter {
    /*border-top: 1px dashed var(--aiw-card-border);*/
    margin-top: 20px;
    padding-top: 120px;
    padding-bottom: 80px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.aiw-subfooter-copyright {
    font-size: 13px;
    font-weight: 700;
    color: var(--aiw-text-muted);
    letter-spacing: 0.3px;
}

.aiw-subfooter-extra {
    font-size: 12px;
    line-height: 1.6;
    color: var(--aiw-text-muted);
    max-width: 860px;
    margin: 0 auto;
    font-weight: 500;
}

/* ========================================================
   MODAL DIALOG (SHARP CYBERNETIC POPUP)
   ======================================================== */
.aiw-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(3, 6, 12, 0.85);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

.aiw-modal-overlay.is-open {
    opacity: 1;
    visibility: visible;
}

.aiw-modal-dialog {
    width: 100%;
    max-width: 800px;
    max-height: 90vh;
    overflow-y: auto;
}

.aiw-modal-glass {
    background: var(--aiw-modal-bg, #1A1A1A);
    border: 1px solid var(--aiw-card-border-hover);
    border-top: 3px solid var(--aiw-accent);
    padding: 30px;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.7);
    position: relative;
}

.aiw-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    border-bottom: 1px solid var(--aiw-card-border);
    padding-bottom: 16px;
    margin-bottom: 20px;
}

.aiw-modal-title {
    font-size: 20px;
    font-weight: 900;
    color: var(--aiw-text-primary);
    margin: 0 0 4px 0;
    text-transform: uppercase;
    letter-spacing: -0.3px;
}

.aiw-modal-subtitle {
    font-size: 13px;
    color: var(--aiw-text-secondary);
    margin: 0;
}

.aiw-modal-close {
    background: var(--aiw-surface-dark, #121212);
    border: 1px solid var(--aiw-card-border);
    color: var(--aiw-text-primary);
    font-size: 20px;
    line-height: 1;
    width: 32px;
    height: 32px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.aiw-modal-close:hover {
    background: #ef4444;
    color: #ffffff;
    border-color: #ef4444;
}

/* Modal Form Controls */
.aiw-modal-group {
    margin-bottom: 16px;
}

.aiw-field-label {
    display: block;
    font-size: 13px;
    font-weight: 700;
    color: var(--aiw-text-primary);
    margin-bottom: 8px;
    letter-spacing: 0.2px;
}

.aiw-ai-selection-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
    gap: 8px;
}

.aiw-ai-radio-card {
    background: var(--aiw-surface-dark, #121212);
    border: 1px solid var(--aiw-card-border);
    border-left: 3px solid var(--card-color, #00d2ff);
    padding: 10px 8px;
    cursor: pointer;
    text-align: center;
    transition: all 0.2s ease;
    position: relative;
}

.aiw-ai-radio-card input {
    position: absolute;
    opacity: 0;
}

.aiw-radio-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

.aiw-radio-logo {
    width: 24px;
    height: 24px;
    object-fit: contain;
}

.aiw-radio-fallback {
    width: 24px;
    height: 24px;
    color: #ffffff;
    font-family: var(--aiw-font-mono);
    font-size: 11px;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
}

.aiw-radio-name {
    font-size: 12px;
    font-weight: 800;
    color: var(--aiw-text-primary);
}

.aiw-radio-min {
    font-family: var(--aiw-font-mono);
    font-size: 10px;
    font-weight: 800;
    color: var(--aiw-gold);
    background: var(--aiw-card-bg, #1A1A1A);
    padding: 1px 5px;
    border: 1px solid rgba(245, 158, 11, 0.3);
}

.aiw-ai-radio-card.is-selected {
    background: var(--aiw-card-bg-hover, #242424);
    border-color: var(--card-color, #00d2ff);
    border-left: 3px solid var(--card-color, #00d2ff);
    box-shadow: 0 0 12px var(--card-color, #00d2ff)30;
}

.aiw-amount-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    background: var(--aiw-card-bg-hover, #18181b);
    border: 2px solid var(--aiw-accent, #6366f1);
    box-shadow: 0 0 16px var(--aiw-accent-glow, rgba(99, 102, 241, 0.25));
    transition: all 0.2s ease;
}

.aiw-amount-input-wrapper:focus-within {
    border-color: var(--aiw-accent, #6366f1);
    box-shadow: 0 0 22px var(--aiw-accent-glow, rgba(99, 102, 241, 0.45));
}

.aiw-currency-prefix {
    position: absolute;
    left: 16px;
    font-family: var(--aiw-font-mono);
    font-size: 20px;
    font-weight: 900;
    color: var(--aiw-accent, #6366f1);
}

.aiw-amount-input {
    padding-left: 54px !important;
    padding-top: 14px !important;
    padding-bottom: 14px !important;
    font-family: var(--aiw-font-mono);
    font-size: 22px !important;
    font-weight: 900;
    color: var(--aiw-text-primary, #f8fafc) !important;
    background: transparent !important;
    border: none !important;
}

.aiw-quick-amounts {
    display: flex;
    gap: 6px;
    margin-top: 10px;
    flex-wrap: wrap;
}

.aiw-btn-quick {
    background: var(--aiw-surface-dark, #121212);
    border: 1px solid var(--aiw-card-border);
    color: var(--aiw-text-secondary);
    font-family: var(--aiw-font-mono);
    font-size: 11.5px;
    font-weight: 700;
    padding: 7px 14px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.aiw-btn-quick-min {
    background: var(--aiw-accent, #6366f1) !important;
    border: 1px solid var(--aiw-accent, #6366f1) !important;
    color: #ffffff !important;
    font-weight: 900 !important;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.35);
    box-shadow: 0 0 10px var(--aiw-accent-glow, rgba(99, 102, 241, 0.3));
}

.aiw-btn-quick-min:hover {
    filter: brightness(1.15);
    transform: translateY(-1px);
}

.aiw-btn-quick:hover {
    background: var(--aiw-card-bg-hover, #242424);
    color: var(--aiw-accent);
    border-color: var(--aiw-accent);
}

.aiw-modal-row {
    display: flex;
    gap: 16px;
    width: 100%;
}

.aiw-col-half {
    flex: 1 1 0;
    min-width: 0;
}

.aiw-modal-input {
    width: 100%;
    box-sizing: border-box !important;
    background: var(--aiw-input-bg, #121212);
    border: 1px solid var(--aiw-card-border);
    padding: 11px 14px;
    color: var(--aiw-text-primary, #f8fafc) !important;
    font-family: var(--aiw-font-main);
    font-size: 14px;
    font-weight: 500;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.aiw-modal-input::placeholder {
    color: var(--aiw-text-muted, #71717a) !important;
    opacity: 0.85;
}

.aiw-modal-overlay[data-theme="light"] .aiw-modal-input,
.aiw-wars-wrapper[data-theme="light"] .aiw-modal-input {
    color: #111827 !important;
    background: #ffffff !important;
    border-color: rgba(0, 0, 0, 0.18) !important;
}

.aiw-modal-overlay[data-theme="light"] .aiw-amount-input-wrapper,
.aiw-wars-wrapper[data-theme="light"] .aiw-amount-input-wrapper {
    background: #ffffff !important;
    border: 2px solid var(--aiw-accent, #6366f1) !important;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08) !important;
}

.aiw-modal-overlay[data-theme="light"] .aiw-amount-input,
.aiw-wars-wrapper[data-theme="light"] .aiw-amount-input {
    color: #09090b !important;
    background: transparent !important;
}

.aiw-modal-overlay[data-theme="light"] .aiw-modal-input::placeholder,
.aiw-wars-wrapper[data-theme="light"] .aiw-modal-input::placeholder {
    color: #6b7280 !important;
    opacity: 0.9;
}

.aiw-field-label {
    display: block;
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--aiw-text-primary, #f8fafc);
    margin-bottom: 6px;
}

.aiw-modal-overlay[data-theme="light"] .aiw-field-label,
.aiw-wars-wrapper[data-theme="light"] .aiw-field-label {
    color: #111827 !important;
}

.aiw-modal-input:focus {
    border-color: var(--aiw-accent);
    box-shadow: 0 0 0 2px var(--aiw-accent-glow);
    background: var(--aiw-card-bg-hover, #242424);
}

.aiw-textarea {
    resize: vertical;
    min-height: 70px;
}

.aiw-btn-submit-checkout {
    width: 100%;
    background: var(--aiw-accent, #10b981);
    border: 1px solid var(--aiw-accent, #34d399);
    color: #ffffff;
    font-family: var(--aiw-font-mono);
    font-size: 15px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    padding: 14px;
    cursor: pointer;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.25);
    box-shadow: 0 4px 18px var(--aiw-accent-glow, rgba(16, 185, 129, 0.4));
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.aiw-btn-submit-checkout:hover {
    filter: brightness(1.15);
    transform: translateY(-2px);
    box-shadow: 0 6px 24px var(--aiw-accent-glow, rgba(16, 185, 129, 0.6));
    color: #ffffff;
}

.aiw-btn-spinner {
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: #ffffff;
    animation: aiw-spin 0.8s linear infinite;
}

@keyframes aiw-spin {
    to {
        transform: rotate(360deg);
    }
}

.aiw-modal-status {
    padding: 10px 14px;
    font-family: var(--aiw-font-mono);
    font-size: 12px;
    margin-bottom: 14px;
}

.aiw-modal-status.is-error {
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.5);
    color: #fca5a5;
}

.aiw-modal-status.is-success {
    background: rgba(16, 185, 129, 0.15);
    border: 1px solid rgba(16, 185, 129, 0.5);
    color: #6ee7b7;
}

.aiw-hidden {
    display: none !important;
}

/* ========================================================
   INSTITUTIONAL MULTI-TAB MODAL & STANDALONE PAGES
   ======================================================== */
.aiw-doc-dialog {
    max-width: 800px;
}

.aiw-doc-glass {
    padding: 28px;
}

.aiw-doc-nav-tabs {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.aiw-doc-tab {
    background: var(--aiw-surface-dark, #121212);
    border: 1px solid var(--aiw-card-border);
    color: var(--aiw-text-secondary);
    font-family: var(--aiw-font-mono);
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 7px 14px;
    cursor: pointer;
    transition: all 0.2s;
}

.aiw-doc-tab:hover {
    background: var(--aiw-card-bg-hover, #242424);
    color: var(--aiw-text-primary);
}

.aiw-doc-tab.is-active {
    background: var(--aiw-accent, #00d2ff);
    color: #ffffff;
    border-color: var(--aiw-accent, #00d2ff);
    font-weight: 800;
}

.aiw-doc-panel {
    display: none;
}

.aiw-doc-panel.is-active {
    display: block;
    animation: aiw-fadeIn 0.25s ease;
}

@keyframes aiw-fadeIn {
    from {
        opacity: 0;
        transform: translateY(4px);
    }

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

.aiw-doc-article {
    color: var(--aiw-text-secondary);
    line-height: 1.6;
}

.aiw-doc-hero {
    margin-bottom: 20px;
}

.aiw-doc-tag {
    display: inline-block;
    font-family: var(--aiw-font-mono);
    font-size: 10px;
    font-weight: 800;
    color: #ffffff;
    background: var(--aiw-accent, #00d2ff);
    border: 1px solid var(--aiw-accent, #00d2ff);
    padding: 3px 8px;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.aiw-doc-title {
    font-size: 24px;
    font-weight: 900;
    color: var(--aiw-text-primary);
    margin: 0 0 6px 0;
    text-transform: uppercase;
}

.aiw-doc-lead {
    font-size: 14px;
    color: var(--aiw-text-secondary);
    margin: 0;
}

.aiw-doc-section h3 {
    font-size: 16px;
    font-weight: 800;
    color: var(--aiw-text-primary);
    margin: 18px 0 6px 0;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.aiw-doc-section p,
.aiw-doc-section ul {
    font-size: 13px;
    margin: 0 0 10px 0;
}

.aiw-doc-section ul {
    padding-left: 20px;
}

.aiw-doc-grid-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
    margin-top: 20px;
}

.aiw-feature-glass-box {
    background: var(--aiw-surface-dark, #121212);
    border: 1px solid var(--aiw-card-border);
    border-top: 3px solid var(--aiw-accent, #00d2ff);
    padding: 16px;
}

.aiw-feature-icon {
    font-size: 22px;
    margin-bottom: 8px;
}

.aiw-feature-glass-box h4 {
    font-size: 14px;
    font-weight: 800;
    color: var(--aiw-text-primary);
    margin: 0 0 4px 0;
    text-transform: uppercase;
}

.aiw-feature-glass-box p {
    font-size: 12px;
    color: var(--aiw-text-secondary);
    margin: 0;
}

/* FAQ Accordion */
.aiw-faq-accordion {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.aiw-faq-item {
    background: var(--aiw-surface-dark, #121212);
    border: 1px solid var(--aiw-card-border);
    overflow: hidden;
    transition: all 0.2s;
}

.aiw-faq-question {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    background: transparent;
    border: none;
    color: var(--aiw-text-primary);
    font-family: var(--aiw-font-main);
    font-size: 14px;
    font-weight: 800;
    padding: 14px 16px;
    text-align: left;
    cursor: pointer;
}

.aiw-faq-question>span:first-child {
    flex: 1 1 auto;
    text-align: left;
}

.aiw-faq-icon {
    font-family: var(--aiw-font-mono);
    font-size: 18px;
    font-weight: 300;
    color: var(--aiw-accent);
    transition: transform 0.2s;
    flex-shrink: 0;
    margin-left: auto;
    line-height: 1;
}

.aiw-faq-item.is-open .aiw-faq-icon {
    transform: rotate(45deg);
}

.aiw-faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease;
    background: var(--aiw-card-bg, #1A1A1A);
}

.aiw-faq-item.is-open .aiw-faq-answer {
    max-height: 300px;
    padding: 12px 16px;
    border-top: 1px solid var(--aiw-card-border);
}

.aiw-faq-answer p {
    font-size: 13px;
    color: var(--aiw-text-secondary);
    margin: 0;
    line-height: 1.5;
}

/* Contact Grid */
.aiw-contact-grid {
    display: grid;
    grid-template-columns: 1.25fr 0.75fr;
    gap: 28px;
    align-items: start;
    width: 100%;
}

@media (max-width: 768px) {
    .aiw-contact-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
}

.aiw-contact-info-card {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.aiw-info-box {
    background: var(--aiw-surface-dark, #121212);
    border: 1px solid var(--aiw-card-border);
    border-left: 3px solid var(--aiw-accent);
    padding: 16px;
    display: flex;
    gap: 14px;
    align-items: flex-start;
}

.aiw-info-icon {
    font-size: 20px;
}

.aiw-info-box strong {
    font-size: 13px;
    font-weight: 800;
    color: var(--aiw-text-primary);
    display: block;
    text-transform: uppercase;
}

.aiw-info-box p {
    font-size: 12px;
    color: var(--aiw-text-secondary);
    margin: 2px 0 0 0;
}

/* Standalone Document Layouts */
.aiw-doc-standalone-wrapper {
    max-width: 860px;
    background: transparent !important;
}

.aiw-doc-container {
    padding: 32px 20px;
    background: transparent !important;
}

/* Custom User-Edited Article Typography */
.aiw-custom-doc-article {
    color: var(--aiw-text-secondary);
    line-height: 1.7;
    font-size: 14px;
}

.aiw-custom-doc-article h1,
.aiw-custom-doc-article h2,
.aiw-custom-doc-article h3,
.aiw-custom-doc-article h4 {
    color: var(--aiw-text-primary);
    font-weight: 800;
    margin: 20px 0 10px 0;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.aiw-custom-doc-article h1 {
    font-size: 24px;
}

.aiw-custom-doc-article h2 {
    font-size: 20px;
}

.aiw-custom-doc-article h3 {
    font-size: 16px;
}

.aiw-custom-doc-article h4 {
    font-size: 14px;
}

.aiw-custom-doc-article p {
    margin: 0 0 14px 0;
}

.aiw-custom-doc-article ul,
.aiw-custom-doc-article ol {
    margin: 0 0 16px 0;
    padding-left: 24px;
}

.aiw-custom-doc-article li {
    margin-bottom: 6px;
}

.aiw-custom-doc-article a {
    color: var(--aiw-accent, #00d2ff);
    text-decoration: underline;
}

/* ========================================================
   LIVE ACTIVITY TOASTS (FOMO & EXCITEMENT)
   ======================================================== */
.aiw-toast-container {
    position: fixed;
    bottom: 80px;
    right: 24px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    z-index: 99999;
    pointer-events: none;
}

.aiw-activity-toast {
    background: var(--aiw-card-bg, #1A1A1A);
    border: 1px solid var(--aiw-card-border-hover);
    border-left: 3px solid var(--aiw-accent);
    padding: 10px 14px;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
    transform: translateY(20px) scale(0.95);
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    max-width: 340px;
    pointer-events: auto;
    border-radius: 4px;
}

.aiw-activity-toast.is-visible {
    transform: translateY(0) scale(1);
    opacity: 1;
}

.aiw-toast-icon {
    font-size: 16px;
    background: var(--aiw-surface-dark, #121212);
    border: 1px solid var(--aiw-card-border);
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.aiw-toast-body {
    flex: 1;
    min-width: 0;
}

.aiw-toast-title {
    font-size: 13px;
    color: var(--aiw-text-primary);
}

.aiw-toast-meta {
    font-family: var(--aiw-font-mono);
    font-size: 11px;
    color: var(--aiw-text-muted);
}

.aiw-toast-val {
    color: #10b981;
    font-weight: 800;
}

.aiw-toast-close {
    background: transparent;
    border: none;
    color: var(--aiw-text-muted, #94a3b8);
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    padding: 4px 6px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.aiw-toast-close:hover {
    color: #ef4444;
    background: rgba(239, 68, 68, 0.15);
}

/* ========================================================
   PROFILE / SUCCESS PAGE [ai_wars_profile]
   ======================================================== */
.aiw-success-banner {
    text-align: center !important;
    margin-bottom: 36px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--aiw-card-border);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.aiw-success-banner .aiw-main-title {
    text-align: center !important;
    margin-left: auto;
    margin-right: auto;
}

.aiw-success-banner .aiw-main-subtitle {
    text-align: center !important;
    margin-left: auto;
    margin-right: auto;
    max-width: 650px;
}

.aiw-profile-receipt-row {
    display: flex;
    justify-content: center;
    width: 100%;
}

.aiw-success-badge {
    display: inline-block;
    background: rgba(16, 185, 129, 0.12);
    border: 1px solid #10b981;
    color: #10b981;
    font-family: var(--aiw-font-mono);
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 1.5px;
    padding: 6px 16px;
    text-transform: uppercase;
    margin-bottom: 14px;
}

.aiw-profile-grid {
    display: grid;
    grid-template-columns: 1.1fr 1fr;
    gap: 32px;
    align-items: start;
}

.aiw-section-heading {
    font-size: 20px;
    font-weight: 900;
    margin: 0 0 6px 0;
    color: var(--aiw-text-primary);
    text-transform: uppercase;
}

.aiw-section-sub {
    font-size: 13px;
    color: var(--aiw-text-secondary);
    margin: 0;
}

.aiw-profile-form-card {
    background: var(--aiw-card-bg, #1A1A1A);
    border: 1px solid var(--aiw-card-border);
    border-top: 3px solid var(--aiw-accent, #00d2ff);
    padding: 24px;
}

.aiw-profile-preview-card {
    background: var(--aiw-card-bg, #1A1A1A);
    border: 1px solid var(--aiw-card-border);
    border-top: 3px solid var(--aiw-accent, #00d2ff);
    padding: 24px;
}

.aiw-empty-profile {
    text-align: center;
    padding: 40px 20px;
}

.aiw-live-preview-box {
    display: flex;
    justify-content: center;
}

.aiw-live-preview-box .aiw-popover-glass {
    width: 100%;
    max-width: 320px;
}

/* Responsive */
@media (max-width: 860px) {
    .aiw-wars-wrapper {
        margin: 10px auto !important;
        padding: 0 !important;
        width: 96% !important;
        max-width: 100% !important;
    }

    .aiw-glass-container {
        padding: 0 !important;
    }

    .aiw-board-header-top {
        flex-direction: column;
        align-items: stretch;
        gap: 16px;
    }

    /* Top War Radar Ticker on Mobile (Stacked: Badge on top, Marquee below full width) */
    .aiw-war-ticker-bar {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 2px !important;
        padding: 8px 12px !important;
    }

    .aiw-ticker-badge {
        align-self: flex-start !important;
        margin-bottom: 2px !important;
    }

    .aiw-ticker-marquee {
        width: 100% !important;
    }

    .aiw-ticker-item {
        font-size: 12px !important;
    }

    /* Arena ao Vivo badge and Theme Toggle on Same Row on Mobile */
    .aiw-header-top-row {
        display: flex !important;
        flex-direction: row !important;
        align-items: center !important;
        justify-content: left !important;
        gap: 8px !important;
        flex-wrap: nowrap !important;
        width: 100% !important;
    }

    .aiw-live-indicator {
        padding: 4px 8px !important;
        flex-shrink: 0 !important;
    }

    .aiw-live-text {
        font-size: 10px !important;
        letter-spacing: 0px !important;
    }

    .aiw-theme-toggle-btn {

        /*padding: 4px 8px !important;*/
        font-size: 10px !important;
        white-space: nowrap !important;
        flex-shrink: 0 !important;
        line-height: 1rem;
        letter-spacing: 0px;
    }

    .aiw-main-title {
        font-size: 24px;
    }

    .aiw-header-cards-group {
        width: 100%;
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }

    .aiw-pot-card,
    .aiw-record-card {
        width: 100% !important;
        min-width: 100% !important;
        box-sizing: border-box !important;
        text-align: center !important;
        padding: 14px 18px;
    }

    .aiw-action-bar {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
        padding-top: 14px;
    }

    .aiw-filter-tabs {
        display: grid;
        grid-template-columns: repeat(4, 1fr);
        width: 100%;
        box-sizing: border-box;
    }

    .aiw-filter-tab {
        padding: 8px 4px;
        font-size: 11px;
        text-align: center;
        justify-content: center;
        white-space: nowrap;
    }

    .aiw-action-right-group {
        width: 100%;
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
    }

    .aiw-btn-toggle-chart,
    .aiw-btn-boost-main {
        width: 100% !important;
        justify-content: center !important;
        text-align: center !important;
        box-sizing: border-box !important;
    }

    /* Model Cards Grid Layout on Mobile */
    .aiw-model-card {
        padding: 14px 14px !important;
        width: 96% !important;
        box-sizing: border-box !important;
    }

    .aiw-card-main-row {
        display: grid !important;
        grid-template-columns: auto 1fr auto !important;
        grid-template-areas:
            "rank identity king"
            "progress progress progress"
            "action action action" !important;
        gap: 12px 10px !important;
        align-items: center !important;
    }

    .aiw-card-rank {
        grid-area: rank;
        width: 6px;
        flex-shrink: 0;
    }

    .aiw-model-identity {
        grid-area: identity;
        width: 100% !important;
        min-width: 0 !important;
        flex: 1 1 auto !important;
        display: flex !important;
        align-items: center !important;
        gap: 10px !important;
    }

    .aiw-model-names {
        flex: 1 !important;
        min-width: 0 !important;
        overflow: visible !important;
    }

    .aiw-name-row {
        display: flex !important;
        align-items: center !important;
        flex-wrap: wrap !important;
        gap: 4px 8px !important;
    }

    .aiw-model-name {
        font-size: 15px;
    }

    .aiw-model-meta-row {
        display: flex !important;
        align-items: center !important;
        margin-top: 4px !important;
        width: 100% !important;
        flex-wrap: nowrap !important;
    }

    .aiw-model-next-min {
        font-size: 11px !important;
        padding: 2px 8px !important;
        white-space: nowrap !important;
        display: inline-flex !important;
        align-items: center !important;
        gap: 4px !important;
    }

    .aiw-king-col {
        grid-area: king;
        display: flex;
        justify-content: flex-end;
        align-items: center;
        margin-left: auto;
        position: relative;
    }

    .aiw-king-trigger {
        position: relative;
    }

    .aiw-king-popover {
        left: auto !important;
        right: 0 !important;
        transform: translateY(6px) !important;
        width: 270px !important;
        max-width: min(280px, calc(100vw - 32px)) !important;
        box-sizing: border-box !important;
    }

    .aiw-king-trigger:hover .aiw-king-popover,
    .aiw-king-trigger:focus .aiw-king-popover,
    .aiw-king-trigger.is-active .aiw-king-popover {
        opacity: 1 !important;
        visibility: visible !important;
        pointer-events: auto !important;
        transform: translateY(0) !important;
    }

    .aiw-king-vacant {
        padding: 3px 6px;
        font-size: 9px;
        line-height: 0;
    }

    .aiw-model-progress-section {
        grid-area: progress;
        width: 100% !important;
        margin-top: 4px;
    }

    .aiw-progress-stats {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 6px;
    }

    .aiw-card-action {
        grid-area: action;
        width: 100% !important;
    }

    .aiw-btn-boost-single {
        width: 100% !important;
        justify-content: center !important;
        padding: 10px 16px !important;
    }

    .aiw-profile-grid {
        grid-template-columns: 1fr;
    }

    .aiw-modal-row,
    .aiw-contact-grid {
        grid-template-columns: 1fr;
        flex-direction: column;
        gap: 0;
    }

    .aiw-board-footer {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 16px;
    }

    .aiw-sync-status {
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;
        text-align: center !important;
        gap: 6px !important;
        width: 100% !important;
    }

    .aiw-sync-status .aiw-live-sub {
        display: block !important;
        text-align: center !important;
        font-size: 11.5px !important;
    }

    .aiw-footer-nav,
    .aiw-footer-links {
        justify-content: center !important;
        flex-wrap: wrap !important;
        gap: 8px !important;
        width: 100% !important;
    }

    /* Mobile Floating Toasts */
    .aiw-toast-container {
        bottom: 16px !important;
        right: 16px !important;
        left: 16px !important;
        max-width: calc(100vw - 32px) !important;
    }

    body.aiw-has-lgpd-bar .aiw-toast-container,
    body:has(.aiw-lgpd-bar.is-visible) .aiw-toast-container {
        bottom: 85px !important;
    }

    .aiw-activity-toast {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }

    /* Mobile LGPD Bottom Bar */
    .aiw-lgpd-bar {
        padding: 12px 14px !important;
        box-sizing: border-box !important;
        max-width: 100vw !important;
        overflow: hidden !important;
    }

    .aiw-lgpd-content {
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 10px !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }

    .aiw-lgpd-text {
        min-width: 0 !important;
        width: 100% !important;
        font-size: 11px !important;
        line-height: 1.4 !important;
        align-items: flex-start !important;
        gap: 8px !important;
        box-sizing: border-box !important;
    }

    .aiw-lgpd-icon {
        font-size: 18px !important;
    }

    .aiw-lgpd-actions {
        width: 100% !important;
    }

    .aiw-btn-lgpd-accept {
        width: 100% !important;
        text-align: center !important;
        justify-content: center !important;
        padding: 9px 14px !important;
        font-size: 11px !important;
        box-sizing: border-box !important;
    }
}

/* ========================================================
   FIXED BOTTOM LGPD CONSENT BAR
   ======================================================== */
.aiw-lgpd-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    z-index: 9999999;
    background: var(--aiw-card-bg, #1A1A1A);
    border-top: 2px solid var(--aiw-accent, #00d2ff);
    padding: 14px 20px;
    box-shadow: 0 -8px 28px rgba(0, 0, 0, 0.4);
    box-sizing: border-box;
    transform: translateY(100%);
    opacity: 0;
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.35s ease;
}

.aiw-lgpd-bar.is-visible {
    transform: translateY(0);
    opacity: 1;
}

.aiw-lgpd-content {
    max-width: 1120px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.aiw-lgpd-text {
    flex: 1;
    min-width: 280px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 13px;
    color: var(--aiw-text-secondary);
    line-height: 1.5;
}

.aiw-lgpd-icon {
    font-size: 22px;
    flex-shrink: 0;
}

.aiw-lgpd-link {
    background: transparent;
    border: none;
    padding: 0;
    color: var(--aiw-accent, #00d2ff);
    text-decoration: underline;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    display: inline;
}

.aiw-lgpd-link:hover {
    filter: brightness(1.2);
}

.aiw-lgpd-actions {
    flex-shrink: 0;
}

.aiw-btn-lgpd-accept {
    background: var(--aiw-accent, #00d2ff);
    border: 1px solid var(--aiw-accent, #38bdf8);
    color: #ffffff;
    font-family: var(--aiw-font-mono);
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    padding: 10px 20px;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 0 14px var(--aiw-accent-glow, rgba(0, 210, 255, 0.45));
}

.aiw-btn-lgpd-accept:hover {
    filter: brightness(1.15);
    box-shadow: 0 0 20px var(--aiw-accent-glow, rgba(0, 210, 255, 0.6));
}

/* Stripe Official Receipt View Button */
.aiw-profile-receipt-row {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 14px;
}

.aiw-btn-receipt-view {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(99, 91, 255, 0.15);
    border: 1px solid rgba(99, 91, 255, 0.5);
    color: #131313;
    font-family: var(--aiw-font-sans);
    font-size: 13px;
    font-weight: 700;
    padding: 8px 18px;
    border-radius: 8px;
    text-decoration: none;
    transition: all 0.2s ease;
    box-shadow: 0 4px 12px rgba(99, 91, 255, 0.2);
}

.aiw-btn-receipt-view:hover {
    background: rgba(99, 91, 255, 0.3);
    border-color: #818cf8;
    color: #ffffff;
    box-shadow: 0 6px 18px rgba(99, 91, 255, 0.35);
    transform: translateY(-1px);
}