:root {
    --primary-color: #00a551;
    --primary-hover: #008a44;
    --accent-red: #dc2626;
    --accent-red-hover: #b91c1c;
    --bg-dark: #0f172a;
    --bg-card: #1e293b;
    --bg-sidebar: #1e293b;
    --text-primary: #f1f5f9;
    --text-secondary: #94a3b8;
    --header-height: 56px;
    --bottom-nav-height: 60px;
    --content-top-margin: 24px; /* Reduced from 80px to 24px */
}

/* General styles */
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    padding-top: var(--header-height); /* Add padding for entire body */
    text-rendering: optimizeLegibility;
}

/* Tabs */
.tab-active {
    color: var(--primary-color);
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 0.5rem;
}

/* Sports icons */
.sport-icon {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem;
    min-width: 60px;
    color: var(--text-secondary);
}

.sport-icon i {
    font-size: 1.5rem;
}

/* Banner */
.banner-carousel {
    position: relative;
    border-radius: 0.5rem;
    overflow: hidden;
    aspect-ratio: 2.67 / 1;
    width: 100%;
    height: auto;
    background: var(--bg-card);
}

.banner-slide {
    width: 100%;
    height: 100%;
    position: relative;
}

.banner-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 0.5rem;
}

.banner-slide a {
    display: block;
    width: 100%;
    height: 100%;
}

.banner-slide .banner-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 2rem;
    background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
    color: white;
    border-radius: 0 0 0.5rem 0.5rem;
}

.banner-content h3 {
    font-size: 1.5rem;
    font-weight: bold;
    margin-bottom: 0.5rem;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
}

.banner-content p {
    font-size: 1rem;
    opacity: 0.9;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
}

.banner-controls {
    position: absolute;
    bottom: 1rem;
    right: 1rem;
    display: flex;
    gap: 0.5rem;
    z-index: 10;
}

.banner-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    transition: all 0.2s;
    cursor: pointer;
    border: none;
    padding: 0;
}

.banner-dot.active {
    background: white;
    transform: scale(1.2);
}

/* Banner animations */
.banner-slide > div {
    transition: opacity 0.3s ease-in-out;
}

/* Match card */
.match-card {
    background: var(--bg-card);
    border-radius: 0.5rem;
    padding: 1rem;
    margin-bottom: 1rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.3);
    transition: transform 0.2s;
    min-height: 120px; /* Fixed minimum height */
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.match-info {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 0.5rem;
}

.time {
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.teams {
    font-weight: 500;
    color: var(--text-primary);
}

.badges {
    display: flex;
    gap: 0.5rem;
    color: var(--primary-color);
}

.odds {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.odd-btn {
    flex: 1;
    text-align: center;
    padding: 0.5rem;
    background: var(--bg-card);
    border-radius: 0.25rem;
    color: var(--text-primary);
    font-weight: 500;
    transition: all 0.2s;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.odd-btn:hover {
    background: var(--bg-sidebar);
    transform: scale(1.02);
    border-color: var(--primary-color);
}

/* Bottom navigation */
.tab-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    color: var(--text-secondary);
    font-size: 0.75rem;
    position: relative;
    padding: 0.5rem;
    transition: color 0.2s ease;
}

.tab-item i {
    font-size: 1.25rem;
}

.tab-item.active {
    color: white;
}

.tab-indicator {
    position: absolute;
    bottom: -2px;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 4px;
    background: white;
    border-radius: 50%;
    display: none;
}

.tab-item.active .tab-indicator {
    display: block;
}

.tab-item .relative {
    position: relative;
    display: inline-block;
}

/* Sidebar */
.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.nav-item {
    color: var(--text-primary);
    padding: 0.5rem;
    border-radius: 0.25rem;
    transition: background-color 0.2s;
}

.nav-item:hover {
    background-color: var(--bg-card);
}

/* Dark theme */
.dark {
    --text-primary: #f1f5f9;
    --text-secondary: #94a3b8;
}

.dark .match-card {
    background: var(--bg-card);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.dark .odd-btn {
    background: var(--bg-card);
    color: var(--text-primary);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.dark .odd-btn:hover {
    background: var(--bg-sidebar);
    border-color: var(--primary-color);
}

.dark .nav-item:hover {
    background-color: var(--bg-card);
}

/* Animations */
@keyframes slideIn {
    from {
        transform: translateX(-100%);
    }
    to {
        transform: translateX(0);
    }
}

.sidebar-open {
    transform: translateX(0) !important;
    animation: slideIn 0.3s ease-out;
}

/* Fixed sizes for icons */
.sport-icon img,
.match-header img {
    width: 24px;
    height: 24px;
    object-fit: contain;
}

/* Fixed height for bottom navigation */
.bottom-nav {
    height: 60px;
}

/* Main content container */
.content-wrapper {
    padding-top: var(--content-top-margin);
    min-height: calc(100vh - var(--header-height) - var(--bottom-nav-height));
}

/* Sidebar stabilization */
.sidebar {
    height: calc(100vh - var(--header-height));
    overflow-y: auto;
}

/* Sidebars stabilization */
.sidebar.sticky {
    top: calc(var(--header-height) + 12px); /* Reduced sidebar margin from 20px to 12px */
    height: calc(100vh - var(--header-height) - 24px);
}

.nav-link {
    font-weight: 500;
    transition: color 0.2s;
}

.nav-link:hover {
    color: var(--primary-color) !important;
}

.text-primary-color {
    color: var(--primary-color);
}

.hover\:text-primary-color:hover {
    color: var(--primary-color);
}

/* Filters */
.filter-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem;
    border-radius: 0.25rem;
    transition: all 0.2s;
    font-size: 0.75rem;
}

.filter-item:hover {
    background-color: var(--bg-card);
    color: var(--primary-color) !important;
}

.dark .filter-item:hover {
    background-color: var(--bg-card);
}

.filter-item i {
    width: 1.25rem;
    text-align: center;
    font-size: 0.75rem;
}

.sport-filters h3 {
    font-size: 0.75rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

/* Content Visibility for large sections */
.cv {
    content-visibility: auto;
    contain-intrinsic-size: 1px 1000px;
}

/* Tables styling */
table {
    border-collapse: collapse;
    width: 100%;
}

table th,
table td {
    padding: 0.75rem 1rem;
    text-align: left;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.875rem;
}

table th {
    font-weight: 600;
    background-color: var(--bg-card);
    color: var(--text-primary);
}

table td {
    color: var(--text-secondary);
}

table tr:hover {
    background-color: rgba(0, 165, 81, 0.1);
}

.overflow-x-auto {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

/* Mobile table styles */
@media (max-width: 1023px) {
    table th,
    table td {
        padding: 0.5rem 0.5rem;
        font-size: 0.75rem;
    }
    
    table th {
        font-size: 0.75rem;
        font-weight: 600;
    }
}

@media (max-width: 640px) {
    table th,
    table td {
        padding: 0.4rem 0.35rem;
        font-size: 0.7rem;
    }
    
    table th {
        font-size: 0.7rem;
    }
}

/* Games grid styling */
.games-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

@media (min-width: 640px) {
    .games-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 1.25rem;
    }
}

@media (min-width: 1024px) {
    .games-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 1.5rem;
    }
}

@media (min-width: 1280px) {
    .games-grid {
        grid-template-columns: repeat(5, 1fr);
        gap: 1.5rem;
    }
}

/* Game card styling */
.game-card {
    display: flex;
    flex-direction: column;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    cursor: pointer;
}

.game-card:hover {
    transform: translateY(-4px);
}

.game-card-image {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    border-radius: 0.5rem;
    overflow: hidden;
    background: var(--bg-card);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.game-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.game-card:hover .game-card-image img {
    transform: scale(1.05);
}

.game-card-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.7) 0%, transparent 50%);
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding: 1rem;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.game-card:hover .game-card-overlay {
    opacity: 1;
}

.game-card-button {
    width: 100%;
    max-width: 200px;
    padding: 0.625rem 1rem;
    border-radius: 0.375rem;
    color: white;
    font-weight: 600;
    font-size: 0.875rem;
    border: none;
    cursor: pointer;
    transition: background-color 0.2s ease, transform 0.2s ease;
}

.game-card-button:hover {
    transform: scale(1.05);
    background-color: var(--primary-hover) !important;
}

.game-card-title {
    margin-top: 0.5rem;
    color: white;
    font-size: 0.875rem;
    font-weight: 500;
    text-align: center;
    line-height: 1.4;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ============================================================
   DESIGN ENHANCEMENTS & UNIQUE ANIMATIONS
   ============================================================ */

/* Custom scrollbar */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: var(--bg-dark); }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.12); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--primary-color); }

/* Subtle radial ambient glow on body */
body::before {
    content: '';
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background:
        radial-gradient(ellipse 80% 40% at 10% 60%, rgba(0,165,81,0.04) 0%, transparent 60%),
        radial-gradient(ellipse 60% 30% at 90% 15%, rgba(0,165,81,0.03) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
}

/* Animated shimmer line at bottom of header */
.header-accent {
    position: absolute;
    bottom: 0; left: 0; right: 0;
    height: 2px;
    background: linear-gradient(90deg,
        transparent 0%,
        rgba(0,165,81,0.3) 20%,
        #00a551 45%,
        #00e676 55%,
        rgba(0,165,81,0.3) 80%,
        transparent 100%);
    background-size: 200% 100%;
    animation: shimmerLine 3.5s linear infinite;
}

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

/* LIVE pulse dot */
@keyframes livePulse {
    0%, 100% { transform: scale(1); opacity: 1; box-shadow: 0 0 0 0 rgba(239,68,68,0.5); }
    50%       { transform: scale(1.3); opacity: 0.7; box-shadow: 0 0 0 4px rgba(239,68,68,0); }
}
.live-dot {
    display: inline-block;
    width: 7px; height: 7px;
    background: #ef4444;
    border-radius: 50%;
    margin-left: 4px;
    vertical-align: middle;
    animation: livePulse 1.6s ease-in-out infinite;
}

/* Primary button glow */
.btn-glow {
    transition: box-shadow 0.3s ease, background-color 0.2s ease !important;
}
.btn-glow:hover {
    box-shadow: 0 0 18px rgba(0,165,81,0.55), 0 0 40px rgba(0,165,81,0.2) !important;
}

/* Game card shine sweep on hover */
.game-card-image {
    position: relative;
    overflow: hidden;
}
.game-card-image::after {
    content: '';
    position: absolute;
    top: 0; left: -120%;
    width: 60%; height: 100%;
    background: linear-gradient(105deg, transparent 40%, rgba(255,255,255,0.12) 50%, transparent 60%);
    transform: skewX(-15deg);
    pointer-events: none;
}
.game-card:hover .game-card-image::after {
    animation: cardShine 0.55s ease forwards;
}
@keyframes cardShine {
    0%   { left: -120%; }
    100% { left: 150%; }
}

/* Game card richer hover */
.game-card:hover {
    transform: translateY(-6px);
    filter: drop-shadow(0 8px 20px rgba(0,165,81,0.25));
}

/* Game badges */
.badge-hot, .badge-new {
    position: absolute;
    top: 7px; left: 7px;
    font-size: 0.6rem;
    font-weight: 800;
    padding: 2px 7px;
    border-radius: 3px;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    z-index: 3;
    color: #fff;
}
.badge-hot {
    background: linear-gradient(120deg, #ff4500, #ff8c00);
    animation: badgePop 2.2s ease-in-out infinite;
}
.badge-new {
    background: linear-gradient(120deg, #00a551, #00e676);
}
@keyframes badgePop {
    0%, 100% { transform: scale(1) rotate(0deg); }
    40%       { transform: scale(1.08) rotate(-1deg); }
}

/* Stats bar */
.stats-bar {
    display: flex;
    align-items: center;
    gap: 0;
    background: linear-gradient(135deg, var(--bg-card) 0%, rgba(0,165,81,0.06) 100%);
    border: 1px solid rgba(0,165,81,0.15);
    border-radius: 0.5rem;
    margin-bottom: 1.25rem;
    overflow-x: auto;
    scrollbar-width: none;
    padding: 0;
}
.stats-bar::-webkit-scrollbar { display: none; }
.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0.6rem 1.2rem;
    min-width: 85px;
    flex-shrink: 0;
}
.stat-value {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--primary-color);
    line-height: 1;
    font-variant-numeric: tabular-nums;
}
.stat-label {
    font-size: 0.6rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.07em;
    margin-top: 3px;
    white-space: nowrap;
}
.stat-divider {
    width: 1px;
    height: 28px;
    background: rgba(255,255,255,0.08);
    flex-shrink: 0;
}

/* Scroll reveal */
.reveal {
    opacity: 0;
    transform: translateY(22px);
    transition: opacity 0.65s ease, transform 0.65s ease;
}
.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Scroll-to-top button */
.scroll-top-btn {
    position: fixed;
    bottom: 76px; right: 1rem;
    width: 38px; height: 38px;
    background: var(--primary-color);
    color: #fff;
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    transform: translateY(12px) scale(0.85);
    transition: opacity 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
    z-index: 45;
    box-shadow: 0 3px 12px rgba(0,165,81,0.4);
    font-size: 0.85rem;
}
.scroll-top-btn.visible {
    opacity: 1;
    transform: translateY(0) scale(1);
}
.scroll-top-btn:hover {
    background: var(--primary-hover);
    box-shadow: 0 4px 20px rgba(0,165,81,0.6);
    transform: translateY(-2px) scale(1.05);
}
@media (min-width: 1024px) {
    .scroll-top-btn { bottom: 2rem; right: 1.5rem; }
}

/* Section headings underline accent */
.seo-h2-accent {
    position: relative;
    padding-bottom: 0.5rem;
    display: inline-block;
}
.seo-h2-accent::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0;
    width: 36px; height: 2px;
    background: var(--primary-color);
    border-radius: 2px;
}

/* Info section hover left-border accent */
.info-section {
    border-left: 3px solid transparent;
    padding-left: 0.75rem;
    transition: border-color 0.3s ease;
}
.info-section:hover { border-left-color: var(--primary-color); }

/* Enhanced table */
table tr { transition: background-color 0.15s ease; }
table tr:hover { background-color: rgba(0,165,81,0.07) !important; }
table tr:hover td { color: var(--text-primary); }

/* Improved odds buttons */
.odds-btn-hover {
    transition: all 0.15s ease;
}
.odds-btn-hover:hover {
    background: rgba(0,165,81,0.18) !important;
    border: 1px solid rgba(0,165,81,0.5);
    color: #fff;
    transform: translateY(-1px);
}

/* Filter active state */
.filter-item.active {
    background-color: rgba(0,165,81,0.12);
    color: var(--primary-color) !important;
    border-left: 2px solid var(--primary-color);
    padding-left: 0.6rem;
}

/* Gradient text utility */
.text-gradient-green {
    background: linear-gradient(120deg, #00a551 0%, #00e676 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Responsible gaming block */
.responsible-gaming {
    background: linear-gradient(135deg, rgba(30,41,59,0.85), rgba(15,23,42,0.7));
    border: 1px solid rgba(255,255,255,0.05);
    border-left: 3px solid var(--primary-color);
}

/* Banner enhanced overlay */
.banner-content h3 {
    animation: fadeInUp 0.55s ease both;
    animation-delay: 0.1s;
}
.banner-content p {
    animation: fadeInUp 0.55s ease both;
    animation-delay: 0.25s;
}
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(16px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* Navigation link active indicator */
.nav-link-active {
    color: var(--primary-color) !important;
    position: relative;
}
.nav-link-active::after {
    content: '';
    position: absolute;
    bottom: -4px; left: 0; right: 0;
    height: 2px;
    background: var(--primary-color);
    border-radius: 1px;
}

/* Mobile tab active enhancement */
.tab-item.active {
    color: var(--primary-color) !important;
}
.tab-item.active i {
    filter: drop-shadow(0 0 4px rgba(0,165,81,0.6));
}

/* SEO section placeholder visual cue */
.seo-zone {
    min-height: 2rem;
    position: relative;
}

/* Footer link hover */
footer a {
    transition: color 0.2s ease;
}
footer a:hover {
    color: var(--primary-color) !important;
}

/* ── FAQ accordion ── */
.faq-item {
    background: var(--bg-card);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 0.5rem;
    overflow: hidden;
    transition: border-color 0.25s ease;
}
.faq-item[open] {
    border-color: rgba(0,165,81,0.35);
}
.faq-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.25rem;
    cursor: pointer;
    font-weight: 600;
    color: var(--text-primary);
    list-style: none;
    user-select: none;
    gap: 1rem;
    transition: color 0.2s ease;
}
.faq-summary::-webkit-details-marker { display: none; }
.faq-summary::after {
    content: '\f107';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    font-size: 0.85rem;
    color: var(--primary-color);
    flex-shrink: 0;
    transition: transform 0.3s ease;
}
.faq-item[open] .faq-summary::after {
    transform: rotate(180deg);
}
.faq-item:hover .faq-summary {
    color: var(--primary-color);
}
.faq-body {
    padding: 0 1.25rem 1rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.65;
    border-top: 1px solid rgba(255,255,255,0.05);
    padding-top: 0.75rem;
    animation: faqOpen 0.25s ease;
}
@keyframes faqOpen {
    from { opacity: 0; transform: translateY(-6px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* Table header green-tinted rows */
table thead tr[style] th {
    border-bottom: 2px solid rgba(0,165,81,0.3);
}

/* Whitespace nowrap helper */
.whitespace-nowrap { white-space: nowrap; }

/* ── Responsive table → card layout on mobile ── */
@media (max-width: 1023px) {

    /* Hide the header row — labels come from data-label */
    .table-responsive thead {
        display: none;
    }

    /* Each row becomes a self-contained card */
    .table-responsive tbody tr {
        display: block;
        background: var(--bg-card);
        border: 1px solid rgba(255,255,255,0.07);
        border-radius: 0.5rem;
        margin-bottom: 0.625rem;
        padding: 0.75rem 1rem;
        /* override the default top-border set by Tailwind border-t */
        border-top: 1px solid rgba(255,255,255,0.07) !important;
    }

    .table-responsive tbody tr:hover {
        border-color: rgba(0,165,81,0.3);
        background: rgba(0,165,81,0.04);
    }

    /* All cells become block elements */
    .table-responsive td {
        display: block;
        padding: 0 !important;
        border: none !important;
        font-size: 0.85rem;
        line-height: 1.5;
    }

    /* Col 1 — category badge */
    .table-responsive td[data-label="cat"] {
        font-size: 0.68rem;
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: 0.08em;
        color: var(--primary-color) !important;
        margin-bottom: 0.35rem;
    }

    /* Col 2 — question (lighter, smaller) */
    .table-responsive td[data-label="q"] {
        color: var(--text-secondary);
        font-size: 0.82rem;
        margin-bottom: 0.3rem;
        font-style: italic;
    }

    /* Col 3 — answer (main readable text) */
    .table-responsive td[data-label="a"] {
        color: var(--text-primary);
        font-size: 0.9rem;
        font-weight: 500;
    }
}

/* ════════════════════════════════════════════
   Aviator mini-game
   ════════════════════════════════════════════ */
.aviator-card {
    position: relative;
}

.aviator-shell {
    position: relative;
    background: linear-gradient(160deg, #111827 0%, #1e293b 55%, #0b1020 100%);
    border: 1px solid rgba(148, 163, 184, 0.12);
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 18px 40px -20px rgba(0, 0, 0, 0.6);
    isolation: isolate;
}

.aviator-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px;
    background: linear-gradient(90deg, rgba(0, 0, 0, 0.35), rgba(0, 0, 0, 0));
    border-bottom: 1px solid rgba(148, 163, 184, 0.08);
}

.aviator-head-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.aviator-logo {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    background: linear-gradient(135deg, #ef4444, #b91c1c);
    box-shadow: 0 6px 18px -6px rgba(239, 68, 68, 0.7);
}

.aviator-title {
    margin: 0;
    color: #fff;
    font-size: 1.05rem;
    font-weight: 700;
    letter-spacing: 0.01em;
}

.aviator-subtitle {
    display: block;
    color: var(--text-secondary);
    font-size: 0.72rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    margin-top: 1px;
}

.aviator-live-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 10px;
    border-radius: 999px;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    color: #fecaca;
    background: rgba(239, 68, 68, 0.12);
    border: 1px solid rgba(239, 68, 68, 0.35);
}

.aviator-live-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #ef4444;
    box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7);
    animation: aviator-live-pulse 1.4s infinite;
}

@keyframes aviator-live-pulse {
    0% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7); }
    70% { box-shadow: 0 0 0 8px rgba(239, 68, 68, 0); }
    100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
}

.aviator-screen {
    position: relative;
    aspect-ratio: 20 / 9;
    width: 100%;
    background:
        radial-gradient(1200px 400px at 20% 110%, rgba(239, 68, 68, 0.18), transparent 60%),
        radial-gradient(800px 400px at 100% 0%, rgba(59, 130, 246, 0.12), transparent 60%),
        linear-gradient(180deg, #060913 0%, #0b1324 60%, #111b33 100%);
    overflow: hidden;
}

.aviator-stars {
    position: absolute;
    inset: 0;
    background-image:
        radial-gradient(1px 1px at 12% 30%, rgba(255, 255, 255, 0.8), transparent 60%),
        radial-gradient(1px 1px at 28% 65%, rgba(255, 255, 255, 0.6), transparent 60%),
        radial-gradient(1.5px 1.5px at 55% 20%, rgba(255, 255, 255, 0.9), transparent 60%),
        radial-gradient(1px 1px at 72% 80%, rgba(255, 255, 255, 0.55), transparent 60%),
        radial-gradient(1.5px 1.5px at 84% 40%, rgba(255, 255, 255, 0.8), transparent 60%),
        radial-gradient(1px 1px at 40% 85%, rgba(255, 255, 255, 0.5), transparent 60%),
        radial-gradient(1px 1px at 65% 50%, rgba(255, 255, 255, 0.65), transparent 60%);
    opacity: 0.7;
    animation: aviator-stars-float 12s ease-in-out infinite alternate;
}

@keyframes aviator-stars-float {
    from { transform: translateY(0); }
    to { transform: translateY(-6px); }
}

.aviator-glow {
    position: absolute;
    left: 0;
    bottom: 0;
    width: 60%;
    height: 55%;
    background: radial-gradient(ellipse at 20% 100%, rgba(239, 68, 68, 0.25), transparent 70%);
    filter: blur(2px);
    pointer-events: none;
}

.aviator-cover {
    position: absolute;
    inset: 0;
    z-index: 3;
    transition: opacity 0.35s ease;
    cursor: pointer;
    overflow: hidden;
}

.aviator-cover::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(6, 9, 19, 0) 40%, rgba(6, 9, 19, 0.55) 100%);
    pointer-events: none;
}

.aviator-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
}

.aviator-screen.is-flying .aviator-cover {
    opacity: 0;
    pointer-events: none;
}

.aviator-svg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    display: block;
}

#aviatorPlane {
    transition: opacity 0.25s ease;
    filter: drop-shadow(0 4px 10px rgba(239, 68, 68, 0.6));
}

.aviator-multiplier {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -55%);
    color: #fff;
    font-weight: 800;
    letter-spacing: -0.02em;
    text-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    line-height: 1;
    pointer-events: none;
    transition: color 0.25s ease, transform 0.25s ease;
    white-space: nowrap;
}

.aviator-mult-value {
    font-size: clamp(2.2rem, 6vw, 4.2rem);
    font-variant-numeric: tabular-nums;
}

.aviator-mult-x {
    font-size: clamp(1.4rem, 3.5vw, 2.6rem);
    opacity: 0.85;
    margin-left: 2px;
}

.aviator-multiplier.state-idle { opacity: 0; }
.aviator-multiplier.state-running { color: #fff; }
.aviator-multiplier.state-win {
    color: #22c55e;
    text-shadow: 0 0 30px rgba(34, 197, 94, 0.6);
    animation: aviator-pop 0.4s ease;
}
.aviator-multiplier.state-lose {
    color: #ef4444;
    text-shadow: 0 0 30px rgba(239, 68, 68, 0.6);
    animation: aviator-shake 0.4s ease;
}

@keyframes aviator-pop {
    0% { transform: translate(-50%, -55%) scale(0.9); }
    50% { transform: translate(-50%, -55%) scale(1.15); }
    100% { transform: translate(-50%, -55%) scale(1); }
}

@keyframes aviator-shake {
    0%, 100% { transform: translate(-50%, -55%); }
    25% { transform: translate(-54%, -55%); }
    50% { transform: translate(-46%, -55%); }
    75% { transform: translate(-52%, -55%); }
}

.aviator-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px 16px;
    background: rgba(6, 9, 19, 0.72);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    transition: opacity 0.25s ease, visibility 0.25s ease;
    z-index: 5;
    text-align: center;
    overflow-y: auto;
}

.aviator-overlay.is-hidden {
    opacity: 0;
    visibility: hidden;
}

.aviator-overlay-inner {
    max-width: 420px;
    width: 100%;
    margin: auto;
}

.aviator-overlay-kicker {
    display: inline-block;
    font-size: 0.65rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: #fca5a5;
    background: rgba(239, 68, 68, 0.12);
    border: 1px solid rgba(239, 68, 68, 0.3);
    padding: 4px 10px;
    border-radius: 999px;
    margin-bottom: 10px;
}

.aviator-overlay-title {
    font-size: clamp(1.3rem, 3.5vw, 1.8rem);
    font-weight: 800;
    color: #fff;
    margin-bottom: 8px;
    letter-spacing: -0.01em;
}

.aviator-overlay-text {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 14px;
    line-height: 1.5;
}

.aviator-overlay-bonus {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #fbbf24;
    font-weight: 700;
    font-size: 0.85rem;
    margin-bottom: 14px;
}

.aviator-overlay-cta {
    display: inline-block;
    padding: 12px 24px;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-hover));
    color: #fff;
    font-weight: 700;
    font-size: 0.95rem;
    text-decoration: none;
    box-shadow: 0 10px 24px -10px rgba(0, 165, 81, 0.8);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.aviator-overlay-cta:hover {
    transform: translateY(-1px);
    box-shadow: 0 14px 28px -10px rgba(0, 165, 81, 0.9);
}

.aviator-overlay-secondary {
    display: inline-block;
    margin-left: 8px;
    padding: 12px 18px;
    border-radius: 10px;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #fff;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: background 0.2s ease;
}

.aviator-overlay-secondary:hover {
    background: rgba(255, 255, 255, 0.06);
}

@media (max-width: 560px) {
    .aviator-overlay {
        padding: 18px 14px;
    }
    .aviator-overlay-title {
        font-size: 1.15rem;
        line-height: 1.25;
        margin-bottom: 6px;
    }
    .aviator-overlay-text {
        font-size: 0.82rem;
        margin-bottom: 12px;
    }
    .aviator-overlay-kicker {
        font-size: 0.6rem;
        margin-bottom: 8px;
    }
    .aviator-overlay-bonus {
        font-size: 0.78rem;
        margin-bottom: 12px;
    }
    .aviator-overlay-cta {
        display: block;
        width: 100%;
        padding: 12px 18px;
        margin-bottom: 8px;
    }
    .aviator-overlay-secondary {
        display: block;
        width: 100%;
        margin-left: 0;
        padding: 11px 18px;
    }
}

.aviator-controls {
    display: grid;
    grid-template-columns: 1fr;
    gap: 14px;
    padding: 16px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.02), rgba(0, 0, 0, 0.15));
    border-top: 1px solid rgba(148, 163, 184, 0.08);
}

@media (min-width: 640px) {
    .aviator-controls {
        grid-template-columns: 1.1fr 1fr;
        align-items: end;
    }
}

.aviator-bet-label {
    display: block;
    color: var(--text-secondary);
    font-size: 0.72rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-bottom: 6px;
}

.aviator-bet-input {
    display: flex;
    align-items: center;
    background: #0b1220;
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 10px;
    overflow: hidden;
}

.aviator-bet-input input {
    flex: 1;
    min-width: 0;
    background: transparent;
    border: 0;
    outline: none;
    color: #fff;
    font-size: 1.05rem;
    font-weight: 700;
    padding: 10px 6px;
    text-align: center;
    -moz-appearance: textfield;
    appearance: textfield;
}

.aviator-bet-input input::-webkit-outer-spin-button,
.aviator-bet-input input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.aviator-bet-currency {
    color: var(--text-secondary);
    padding-right: 10px;
    font-weight: 600;
    font-size: 0.95rem;
}

.aviator-bet-btn {
    width: 40px;
    height: 40px;
    background: transparent;
    border: 0;
    color: #fff;
    font-size: 1.2rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s ease;
}

.aviator-bet-btn:hover {
    background: rgba(255, 255, 255, 0.05);
}

.aviator-bet-presets {
    display: flex;
    gap: 6px;
    margin-top: 8px;
    flex-wrap: wrap;
}

.aviator-bet-presets button {
    flex: 1;
    min-width: 50px;
    padding: 7px 6px;
    background: rgba(148, 163, 184, 0.08);
    border: 1px solid rgba(148, 163, 184, 0.12);
    border-radius: 8px;
    color: #cbd5e1;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease;
}

.aviator-bet-presets button:hover {
    background: rgba(148, 163, 184, 0.16);
    border-color: rgba(148, 163, 184, 0.25);
}

.aviator-action-wrap {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.aviator-action {
    position: relative;
    width: 100%;
    padding: 14px 18px;
    border: 0;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: 0.01em;
    color: #fff;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.2s ease, filter 0.2s ease;
    overflow: hidden;
}

.aviator-action::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.15), transparent);
    transform: translateX(-100%);
    transition: transform 0.5s ease;
}

.aviator-action:hover::after {
    transform: translateX(100%);
}

.aviator-action-start {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-hover));
    box-shadow: 0 10px 24px -10px rgba(0, 165, 81, 0.8);
}

.aviator-action-start:hover {
    transform: translateY(-1px);
}

.aviator-action-cashout {
    background: linear-gradient(135deg, #f97316, #ea580c);
    box-shadow: 0 10px 24px -10px rgba(249, 115, 22, 0.8);
    animation: aviator-cashout-pulse 1.2s ease-in-out infinite;
}

@keyframes aviator-cashout-pulse {
    0%, 100% { box-shadow: 0 10px 24px -10px rgba(249, 115, 22, 0.8); }
    50% { box-shadow: 0 10px 34px -6px rgba(249, 115, 22, 1); }
}

.aviator-action:disabled,
.aviator-action.is-disabled {
    background: linear-gradient(135deg, #475569, #334155);
    cursor: not-allowed;
    filter: grayscale(0.4);
    box-shadow: none;
    animation: none;
}

.aviator-history {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    justify-content: center;
}

.aviator-history span {
    padding: 4px 9px;
    border-radius: 999px;
    background: rgba(148, 163, 184, 0.08);
    border: 1px solid rgba(148, 163, 184, 0.12);
    color: #cbd5e1;
    font-size: 0.72rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

.aviator-history span.win {
    background: rgba(34, 197, 94, 0.12);
    border-color: rgba(34, 197, 94, 0.3);
    color: #86efac;
}

.aviator-history span.lose {
    background: rgba(239, 68, 68, 0.1);
    border-color: rgba(239, 68, 68, 0.25);
    color: #fca5a5;
}

.aviator-screen.is-shaking {
    animation: aviator-screen-shake 0.4s ease;
}

@keyframes aviator-screen-shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-4px); }
    50% { transform: translateX(4px); }
    75% { transform: translateX(-3px); }
}

@media (prefers-reduced-motion: reduce) {
    .aviator-stars,
    .aviator-live-dot,
    .aviator-action-cashout,
    .aviator-screen.is-shaking {
        animation: none !important;
    }
} 