:root {
    --primary-color: #ffb804;
    --primary-color-hover: #ff8c5a;
    --primary-color-transparent: rgba(255, 107, 53, 0.15);
    --site-header: #ffb804;
    --dark-bg: #0a0a0a;
    --dark-card: rgba(255, 107, 53, 0.15);
    --dark-card-hover: rgba(255, 107, 53, 0.25);
    --card-bg: #1a1a1a;
    --pola-header-bg: #ffb804;
    --pola-patterns-bg: #1a1a1a;
    --modal-bg: #1a1a1a;
    --provider-tag-bg: rgba(0, 0, 0, 0.8);
    --online-players-bg: rgba(0, 0, 0, 0.8);
    --play-overlay-bg: rgba(255, 107, 53, 0.7);
    --box-shadow-content: rgba(0, 0, 0, 0.5);
    
    --play-btn-bg: #ff6b35;
    --play-btn-hover-bg: #ff8c5a;
    --play-btn-text-color: white;
    --text-color-main: #ffa726;
    
    --success-color: #4caf50;
    --warning-color: #ff9800;
    --danger-color: #f44336;
    
    --indicator-yes-bg: #4caf50;
    --indicator-no-bg: #f44336;
    
    --success-gradient: linear-gradient(90deg, #4caf50, #66bb6a);
    --warning-gradient: linear-gradient(90deg, #ff9800, #ffb74d);
    --danger-gradient: linear-gradient(90deg, #f44336, #ef5350);
    
    --text-light: #ffffff;
    --text-muted: #b0b0b0;
    --text-dark: #333333;
    
    --border-light: rgba(255, 255, 255, 0.1);
    --border-primary: #ffa726;
    
    --card-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
    --hover-shadow: 0 8px 24px rgba(255, 107, 53, 0.4);
    --play-btn-shadow: 0 0 15px rgba(255, 107, 53, 0.6);
    
    --footer-bg: #1a1a1a;
    --footer-text: #b0b0b0;
    --footer-link: #dddddd;
    --footer-border: var(--primary-color);
    
    --hover-transition: 0.3s ease;
    --card-transition: all 0.3s ease;
    
    --text-xs: clamp(0.6rem, 1.5vw, 0.7rem);
    --text-sm: clamp(0.7rem, 1.8vw, 0.8rem);
    --text-base: clamp(0.8rem, 2vw, 0.9rem);
    --text-lg: clamp(0.9rem, 2.2vw, 1rem);
    --text-xl: clamp(1rem, 2.5vw, 1.1rem);
    
    --space-xs: clamp(0.25rem, 0.8vw, 0.4rem);
    --space-sm: clamp(0.4rem, 1.2vw, 0.6rem);
    --space-md: clamp(0.6rem, 1.5vw, 0.8rem);
    --space-lg: clamp(0.8rem, 2vw, 1.2rem);
    --space-xl: clamp(1.2rem, 2.5vw, 1.8rem);
    
    --border-radius: clamp(4px, 1vw, 6px);
    --border-radius-sm: clamp(2px, 0.8vw, 3px);
    --border-radius-lg: clamp(6px, 1.5vw, 10px);
    
    --tag-font-size: clamp(0.5rem, 1.2vw, 0.65rem);
    --tag-padding: clamp(1px, 0.3vw, 3px) clamp(3px, 0.8vw, 6px);
    --tag-size: clamp(40px, 8vw, 60px);
}

html {
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
}

body {
    background-color: var(--dark-bg);
    background-image: 
        radial-gradient(circle at 25% 25%, rgba(255, 107, 53, 0.05) 0%, transparent 50%),
        radial-gradient(circle at 75% 75%, rgba(255, 167, 38, 0.03) 0%, transparent 50%);
    color: var(--text-light);
    font-family: 'Anek Tamil', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    transition: background-color 0.3s ease;
    padding-top: 56px;
    margin: 0;
    line-height: 1.6;
    font-size: var(--text-base);
}

::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--dark-bg); border-radius: 8px; }
::-webkit-scrollbar-thumb { background: var(--primary-color); border-radius: 8px; }
::-webkit-scrollbar-thumb:hover { background: var(--primary-color-hover); }

.navbar {
    background-color: var(--site-header) !important;
    border-bottom: 2px solid var(--primary-color);
    box-shadow: 0 4px 12px var(--box-shadow-content);
    z-index: 1030;
    height: 56px;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    height: 100%;
    padding: 0 var(--space-md);
    max-width: 1400px;
    margin: 0 auto;
}

.navbar-left {
    color: var(--text-light);
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
    text-shadow: 0 0 10px var(--box-shadow-content);
    font-size: var(--text-sm);
}

.navbar-logo {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1031;
    height: 50px;
    display: flex;
    align-items: center;
}

.navbar-logo a {
    display: block;
    height: 100%;
    transition: all 0.3s ease;
}

.navbar-logo a:hover { transform: translateY(-2px); }

.logo-image {
    margin-top: 5px;
    height: clamp(30px, 5vw, 38px);
    max-width: clamp(120px, 20vw, 160px);
    object-fit: contain;
    transition: filter 0.3s ease;
}

.logo-placeholder {
    width: clamp(100px, 18vw, 140px);
    height: 40px;
    background: linear-gradient(45deg, var(--card-bg), var(--dark-card));
    border: 1px solid var(--border-primary);
    border-radius: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Anek Tamil', sans-serif;
    font-weight: 700;
    color: var(--primary-color);
    font-size: var(--text-lg);
    box-shadow: var(--card-shadow);
}

.navbar-right {
    display: flex;
    align-items: center;
}

.navbar-right.container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    padding: var(--space-sm) var(--space-lg);
    gap: var(--space-lg);
    background: linear-gradient(135deg, rgba(255, 107, 53, 0.1), rgba(255, 167, 38, 0.05));
    border-radius: var(--space-md);
    border: 1px solid rgba(255, 107, 53, 0.3);
    backdrop-filter: blur(10px);
    box-shadow: var(--card-shadow);
    position: relative;
    overflow: hidden;
    margin-bottom: var(--space-lg);
    flex-direction: row; /* Force horizontal layout */
}

.current-time {
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.8), rgba(0, 0, 0, 0.6));
    padding: var(--space-sm) var(--space-md);
    border-radius: var(--border-radius-sm);
    border: 2px solid var(--primary-color);
    font-family: 'Anek Tamil', sans-serif;
    font-weight: 600;
    color: var(--text-light);
    font-size: var(--text-sm);
    white-space: nowrap;
    flex-shrink: 0;
    position: relative;
    overflow: hidden;
    box-shadow: var(--card-shadow);
    z-index: 1;
}

.current-time i {
    color: var(--primary-color);
    margin-right: var(--space-xs);
}

.header-auth-buttons {
    display: flex;
    gap: var(--space-md);
    flex-shrink: 0;
    z-index: 1;
}

.btn-auth-header {
    position: relative;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.05));
    color: var(--text-light);
    border: 2px solid rgba(255, 255, 255, 0.3);
    padding: var(--space-sm) var(--space-md);
    border-radius: var(--border-radius-sm);
    font-family: 'Anek Tamil', sans-serif;
    font-weight: 700;
    font-size: var(--text-sm);
    letter-spacing: 1px;
    text-transform: uppercase;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-xs);
    text-decoration: none;
    overflow: hidden;
    z-index: 1;
    text-align: center;
    min-width: clamp(70px, 12vw, 90px);
    white-space: nowrap;
    box-shadow: var(--card-shadow);
    backdrop-filter: blur(5px);
}

.btn-auth-header:hover {
    transform: translateY(-2px) scale(1.02);
    text-decoration: none;
    border-color: rgba(255, 255, 255, 0.6);
    box-shadow: var(--hover-shadow);
}

.login-btn {
    background: linear-gradient(135deg, #4caf50, #66bb6a);
    border-color: #4caf50;
    color: white;
}

.login-btn:hover {
    background: linear-gradient(135deg, #66bb6a, #4caf50);
    box-shadow: 0 0 20px rgba(76, 175, 80, 0.6);
    border-color: #66bb6a;
}

.register-btn {
    background: linear-gradient(135deg, #f44336, #ef5350);
    border-color: #f44336;
    color: white;
}

.register-btn:hover {
    background: linear-gradient(135deg, #ef5350, #f44336);
    box-shadow: 0 0 20px rgba(244, 67, 54, 0.6);
    border-color: #ef5350;
}

.btn-auth-header i {
    font-size: var(--text-base);
    transition: all 0.3s ease;
}

.btn-auth-header:hover i {
    transform: scale(1.1);
}

.main-content {
    padding: var(--space-lg) 0 var(--space-xl);
}

/* Banner - Fixed Ratio 2:1 (1280x640) */
.banner-container {
    margin-bottom: var(--space-xl);
    overflow: hidden;
    max-width: 100%;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--card-shadow);
}

.banner-swiper {
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
}

.banner-placeholder {
    background: linear-gradient(45deg, var(--card-bg), var(--dark-card));
    border: 1px solid var(--border-primary);
    height: auto;
    aspect-ratio: 2/1; /* Fixed 2:1 ratio for all devices */
    display: block;
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    position: relative;
}

.banner-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
    position: absolute;
    top: 0;
    left: 0;
}

.banner-img:hover { transform: scale(1.02); }

.banner-text {
    font-family: 'Anek Tamil', sans-serif;
    font-size: clamp(1.2rem, 3.5vw, 2rem);
    font-weight: 700;
    color: rgba(255, 255, 255, 0.9);
    text-transform: uppercase;
    letter-spacing: 2px;
    z-index: 2;
    text-shadow: 0 0 10px var(--primary-color);
}

/* Swiper Pagination */
.swiper-pagination {
    position: relative;
    bottom: 0;
    margin-top: var(--space-md);
}

.swiper-pagination-bullet {
    width: clamp(6px, 1.5vw, 10px);
    height: clamp(6px, 1.5vw, 10px);
    background-color: #dbdbdb;
    opacity: 0.5;
    margin: 0 var(--space-xs);
    transition: all 0.3s ease;
}

.swiper-pagination-bullet-active {
    width: clamp(16px, 3vw, 20px);
    border-radius: 5px;
    background-color: var(--primary-color-hover);
    opacity: 1;
}

/* Provider Slider */
.provider-slider-container {
    margin-bottom: var(--space-xl);
    padding: 0;
    background-color: var(--card-bg);
    border-radius: var(--border-radius-lg);
    border: 1px solid var(--border-light);
}

.provider-swiper {
    padding: var(--space-md) clamp(15px, 4vw, 30px);
}

.provider-logo-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: var(--space-xs);
    cursor: pointer;
    transition: transform 0.3s ease, filter 0.3s ease;
    padding: var(--space-sm);
    filter: grayscale(70%);
    border-radius: var(--border-radius-sm);
}

.provider-logo-item.active,
.provider-logo-item:hover {
    transform: translateY(-3px);
    filter: grayscale(0%);
    background: rgba(255, 107, 53, 0.1);
}

.provider-logo-placeholder {
    width: clamp(40px, 8vw, 60px);
    height: clamp(40px, 8vw, 60px);
    border-radius: var(--border-radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding: var(--space-xs);
    background: var(--dark-card);
    border: 2px solid var(--border-light);
}

.provider-logo {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    display: block;
    transition: transform 0.3s ease;
}

.provider-logo-item:hover .provider-logo { transform: scale(1.1); }

.provider-name {
    font-size: var(--text-xs);
    color: var(--text-muted);
    text-align: center;
    overflow: hidden;
    max-width: 50px;
    transition: color 0.3s ease;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.provider-logo-item.active .provider-name,
.provider-logo-item:hover .provider-name {
    color: var(--text-light);
}

.swiper-button-next, 
.swiper-button-prev {
    color: var(--primary-color);
    background-color: rgba(26, 26, 26, 0.8);
    width: clamp(24px, 4vw, 30px);
    height: clamp(24px, 4vw, 30px);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.swiper-button-next:after, 
.swiper-button-prev:after {
    font-size: clamp(10px, 2vw, 12px);
    font-weight: bold;
}

.swiper-button-next:hover,
.swiper-button-prev:hover {
    background-color: rgba(26, 26, 26, 0.95);
    transform: scale(1.1);
}

/* Section Header */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-xl);
    flex-wrap: wrap;
    gap: var(--space-md);
}

.section-title {
    font-family: 'Anek Tamil', sans-serif;
    position: relative;
    display: inline-block;
    color: var(--text-light);
    margin-bottom: 0;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.3);
    font-size: clamp(1.1rem, 2.5vw, 1.5rem);
}

.section-title::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -5px;
    width: 50px;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color), transparent);
}

/* Header Controls */
.header-controls {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    flex-wrap: wrap;
}

.search-container {
    position: relative;
    min-width: clamp(180px, 25vw, 250px);
}

.search-input-group {
    position: relative;
    display: flex;
    align-items: center;
}

.search-input {
    background-color: rgba(26, 26, 26, 0.8);
    border: 1px solid var(--primary-color);
    color: var(--text-light);
    padding: var(--space-sm) clamp(2rem, 5vw, 2.5rem) var(--space-sm) var(--space-md);
    border-radius: 6px;
    font-size: var(--text-sm);
    width: 100%;
    transition: all 0.3s ease;
}

.search-input:focus {
    box-shadow: 0 0 15px rgba(255, 107, 53, 0.3);
    border-color: var(--primary-color-hover);
    background-color: rgba(26, 26, 26, 0.95);
    color: var(--text-light);
    outline: none;
}

.search-input::placeholder { color: rgba(255, 255, 255, 0.6); }

.search-btn, .search-clear {
    position: absolute;
    right: var(--space-xs);
    background: none;
    border: none;
    color: var(--primary-color);
    padding: var(--space-xs) var(--space-sm);
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.3s ease;
    font-size: var(--text-sm);
}

.search-btn:hover, .search-clear:hover {
    color: #ffffff;
    background-color: rgba(255, 107, 53, 0.2);
    transform: scale(1.05);
}

.search-clear { color: #ef5350; }
.search-clear:hover { background-color: rgba(239, 83, 80, 0.2); }

/* Search Results */
.search-results {
    position: absolute;
    top: calc(100% + 3px);
    left: 0;
    right: 0;
    background: rgba(26, 26, 26, 0.95);
    border: 1px solid rgba(255, 107, 53, 0.3);
    border-radius: 6px;
    max-height: 200px;
    overflow-y: auto;
    z-index: 1000;
    box-shadow: var(--card-shadow);
    backdrop-filter: blur(10px);
}

.search-result-item {
    padding: var(--space-sm) var(--space-md);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.search-result-item:hover {
    background: rgba(255, 107, 53, 0.1);
    border-left: 2px solid var(--primary-color);
}

.search-result-item:last-child { border-bottom: none; }

.search-result-image {
    width: clamp(24px, 5vw, 30px);
    height: clamp(24px, 5vw, 30px);
    border-radius: 4px;
    object-fit: cover;
    background: #2c3e50;
    border: 1px solid rgba(255, 255, 255, 0.1);
    flex-shrink: 0;
}

.search-result-info {
    flex: 1;
    min-width: 0;
}

.search-result-name {
    color: var(--text-light);
    font-weight: 600;
    margin-bottom: 2px;
    font-size: var(--text-xs);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.search-result-provider {
    color: var(--text-muted);
    font-size: clamp(0.55rem, 1.2vw, 0.65rem);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Games Grid - Bootstrap Compatible */
.games-grid { 
    margin-left: -4px; 
    margin-right: -4px; 
}

.games-grid > [class*="col-"] { 
    padding-left: 4px; 
    padding-right: 4px; 
    margin-bottom: var(--space-lg);
}

/* Game Cards */
.game-card {
    position: relative;
    background-color: var(--card-bg);
    border-radius: var(--border-radius);
    overflow: visible; /* Important for pola overlay */
    border: 1px solid var(--border-primary);
    box-shadow: var(--card-shadow);
    transition: var(--card-transition);
    height: 100%;
    display: flex;
    flex-direction: column;
    backdrop-filter: blur(5px);
    z-index: 1; /* Base z-index */
}

.game-card.featured-game {
        border-width: 1px;
        border-color: #ffd700;
        box-shadow: 0 2px 12px rgba(255, 215, 0, 0.3);
    }
    
    .game-card.featured-game:hover {
        transform: translateY(-2px) scale(1.005);
        box-shadow: 0 4px 16px rgba(255, 215, 0, 0.4);
    }
    
    .featured-badge {
        width: 14px !important;
        height: 14px !important;
        font-size: 0.5rem !important;
        top: -2px;
        right: -2px;
        border-width: 1px;
    }
    
    .featured-label {
        font-size: 0.4rem !important;
        margin-top: 1px;
        letter-spacing: 0.2px;
    }
    
    .progress-featured-indicator {
        font-size: 0.5rem !important;
        right: 1px;
    }
    
    .rtp-progress-container.featured-rtp {
        background: linear-gradient(135deg, rgba(255, 215, 0, 0.15), rgba(255, 193, 7, 0.08));
    }

.game-card.pola-active {
    z-index: 999; /* Higher z-index when pola is open */
}

.game-card:hover {
    transform: translateY(-4px) scale(1.01);
    box-shadow: var(--hover-shadow);
    border-color: var(--primary-color);
}

/* Game Image Container */
.game-img-container {
    position: relative;
    flex: 1;
    aspect-ratio: 1;
    overflow: hidden;
    border-bottom: 1px solid var(--border-light);
    background: var(--dark-card);
}

.game-img-placeholder {
    width: 100%;
    height: 100%;
    background-color: var(--card-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease;
}

.game-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.game-card:hover .game-img-placeholder,
.game-card:hover .game-img { transform: scale(1.03); }

.game-img-placeholder span {
    font-family: 'Anek Tamil', sans-serif;
    font-size: clamp(1.2rem, 3vw, 1.8rem);
    font-weight: 700;
    color: var(--primary-color);
}

/* Provider tag and Online players - Optimized for responsiveness */
.provider-tag, .online-players {
    position: absolute;
    background-color: var(--provider-tag-bg);
    color: var(--text-light);
    padding: var(--tag-padding);
    border-radius: var(--border-radius-sm);
    font-size: var(--tag-font-size);
    font-weight: 600;
    z-index: 5;
    backdrop-filter: blur(3px);
    border: 1px solid var(--border-light);
    transition: var(--hover-transition);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1;
    max-width: calc(50% - 2px); /* Prevent overlap */
}

.provider-tag {
    top: var(--space-xs);
    left: var(--space-xs);
}

.online-players {
    top: var(--space-xs);
    right: var(--space-xs);
}

.online-players i {
    font-size: 0.8em;
    margin-right: 1px;
}

.game-card:hover .provider-tag {
    background-color: var(--primary-color);
    color: var(--text-light);
}

/* Play button overlay */
.play-button-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 4;
    background: var(--play-overlay-bg);
}

.game-img-container:hover .play-button-overlay { opacity: 1; }

.play-btn-hover {
    background-color: var(--play-btn-bg);
    color: var(--text-light);
    border: none;
    border-radius: 50%;
    width: clamp(35px, 7vw, 45px);
    height: clamp(35px, 7vw, 45px);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: clamp(0.9rem, 2.5vw, 1.2rem);
    transition: var(--hover-transition);
    box-shadow: var(--play-btn-shadow);
}

.play-btn-hover:hover {
    transform: scale(1.1);
    background-color: var(--play-btn-hover-bg);
}

.game-name-section {
    padding: var(--space-sm) var(--space-md) var(--space-xs);
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0.02) 100%);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.game-name {
    color: #ffffff;
    font-weight: 600;
    text-align: center;
    line-height: 1.2;
    overflow: hidden;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
    font-size: var(--text-xs);
    min-height: calc(var(--text-xs) * 1.2 * 2);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.rtp-progress-container {
    padding: 1px;
    margin: 0;
    width: 100%;
    height: clamp(25px, 3.5vw, 26px);
    background-color: rgba(15, 15, 15, 0.95);
    border-top: 1px solid var(--border-light);
    border-bottom: 1px solid var(--border-light);
    position: relative;
    overflow: hidden;

}

.progress-container {
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
    position: relative;
}

.progress-fill {
    position: absolute;
    height: 100%;
    left: 0;
    top: 0;
    margin: 0;
    padding: 0;
    border-radius: 0;
    background-size: 200% 200% !important;
    position: relative;
    overflow: hidden;
}

.progress-label, .progress-time {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    font-weight: 600;
    font-size: var(--text-xs);
    color: var(--text-light);
    z-index: 2;
    text-shadow: 0 0 3px rgba(0, 0, 0, 0.8);
    transition: color 0.3s ease;
}

.progress-label { left: var(--space-sm); }
.progress-time { right: var(--space-sm); }

/* Game Info */
.game-info {
    background-color: rgba(15, 15, 15, 0.95);
    padding: var(--space-sm);
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
}

/* Pola Toggle Button */
.pola-toggle-btn {
    background: linear-gradient(135deg, var(--primary-color), var(--text-color-main));
    color: white;
    border: none;
    padding: var(--space-xs) var(--space-sm);
    border-radius: var(--border-radius-sm);
    font-size: clamp(0.5rem, 1.1vw, 0.6rem);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-xs);
    position: relative;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(255, 107, 53, 0.2);
    margin-bottom: var(--space-xs);
}

.pola-toggle-btn:hover {
    background: linear-gradient(135deg, var(--text-color-main), var(--primary-color));
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(255, 107, 53, 0.4);
}

.pola-toggle-btn i {
    font-size: 0.8em;
    transition: transform 0.3s ease;
}

.pola-toggle-btn.active i.fa-chevron-down {
    transform: rotate(180deg);
}

.pola-toggle-btn.loading {
    opacity: 0.7;
    pointer-events: none;
}

.pola-overlay {
    position: absolute;
    top: 100%;
    left: -5px;
    right: -5px;
    background: var(--card-bg);
    border: 3px solid var(--primary-color);
    border-radius: var(--border-radius);
    box-shadow: 
        0 15px 50px rgba(0, 0, 0, 0.9),
        0 0 0 2px rgba(255, 107, 53, 0.6),
        0 0 25px rgba(255, 107, 53, 0.5);
    z-index: 1001; /* Very high z-index */
    opacity: 0;
    transform: translateY(-10px);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    pointer-events: none;
    backdrop-filter: blur(15px);
    outline: 2px solid rgba(255, 255, 255, 0.2);
    outline-offset: -1px;
    margin-top: 5px;
}

.pola-overlay.show {
    opacity: 1;
    transform: translateY(0);
    pointer-events: all;
}

.pola-overlay .pola-header {
    background: linear-gradient(135deg, var(--primary-color), var(--text-color-main));
    color: var(--text-light);
    text-align: center;
    padding: var(--space-sm) 0;
    font-weight: bold;
    font-size: var(--text-sm);
    letter-spacing: 0.5px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.pola-overlay .pola-patterns {
    padding: var(--space-md);
    background: linear-gradient(135deg, var(--card-bg), rgba(26, 26, 26, 0.98));
    border-top: 1px solid rgba(255, 107, 53, 0.2);
}

.pola-pattern-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-sm);
    font-size: var(--text-xs);
    text-align: center;
    min-height: clamp(16px, 3vw, 20px);
    opacity: 0;
    transform: translateX(-10px);
    transition: all 0.3s ease;
    padding: var(--space-xs) var(--space-sm);
    border-radius: var(--border-radius-sm);
    background: rgba(255, 255, 255, 0.02);
}

.pola-pattern-row.fade-in {
    opacity: 1;
    transform: translateX(0);
}

.pola-pattern-row:last-child { margin-bottom: 0; }

.pola-pattern-row:hover {
    background: rgba(255, 107, 53, 0.1);
}

.pattern-name {
    color: var(--text-light);
    font-weight: 500;
    flex: 1;
    text-align: left;
    margin-right: var(--space-sm);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.pattern-indicators {
    display: flex;
    gap: clamp(2px, 0.5vw, 4px);
    justify-content: center;
    flex-shrink: 0;
}

.indicator {
    width: clamp(12px, 2.2vw, 16px);
    height: clamp(12px, 2.2vw, 16px);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: clamp(0.5rem, 1.1vw, 0.6rem);
    color: var(--text-light);
    font-weight: 600;
    min-width: clamp(12px, 2.2vw, 16px);
    opacity: 0;
    transform: scale(0);
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.indicator.bounce-in {
    opacity: 1;
    transform: scale(1);
}

.indicator:hover {
    transform: scale(1.1);
}

.indicator-yes { 
    background-color: var(--indicator-yes-bg);
}

.indicator-no { 
    background-color: var(--indicator-no-bg);
}

.pola-main-section {
    display: none;
}

.modal-content {
    background-color: var(--modal-bg);
    border: 1px solid var(--border-primary);
    box-shadow: 0 0 25px var(--box-shadow-content);
}

.modal-header { border-bottom: 1px solid var(--border-light); }
.modal-footer { border-top: 1px solid var(--border-light); justify-content: center; }

.modal-title {
    color: var(--text-color-main);
    font-family: 'Anek Tamil', sans-serif;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.footer-section {
    background-color: var(--footer-bg);
    border-top: 1px solid var(--border-light);
    margin-top: var(--space-xl);
    padding: var(--space-xl) 0 0;
    position: relative;
}

.footer-widget { margin-bottom: var(--space-xl); }

.footer-title {
    color: var(--text-color-main);
    font-size: var(--text-xl);
    font-weight: 700;
    margin-bottom: var(--space-md);
    font-family: 'Anek Tamil', sans-serif;
}

.footer-line {
    width: clamp(50px, 12vw, 80px);
    height: 3px;
    background: linear-gradient(90deg, var(--text-color-main), transparent);
    margin-bottom: var(--space-md);
}

.footer-text {
    margin-bottom: var(--space-md);
    line-height: 1.6;
    color: var(--text-color-main);
    font-size: var(--text-base);
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links li { margin-bottom: var(--space-sm); }

.footer-links a {
    text-decoration: none;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    color: var(--text-color-main);
    font-size: var(--text-base);
}

.footer-links a:hover {
    color: white;
    padding-left: var(--space-xs);
}

.footer-contact {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-contact li {
    margin-bottom: var(--space-sm);
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.footer-contact a {
    color: var(--text-color-main);
    text-decoration: none;
    font-size: var(--text-base);
}

.footer-contact a:hover { color: var(--text-light); }

.footer-badges {
    display: flex;
    gap: var(--space-sm);
    margin-top: var(--space-md);
    flex-wrap: wrap;
}

.badge-item {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    background-color: rgba(255, 255, 255, 0.05);
    padding: var(--space-sm) var(--space-md);
    border-radius: 20px;
    font-size: var(--text-sm);
    color: white;
    font-weight: 500;
    border: 1px solid var(--border-primary);
    transition: all 0.3s ease;
}

.footer-bottom {
    background-color: rgba(0, 0, 0, 0.3);
    padding: var(--space-md) 0;
    margin-top: var(--space-xl);
    border-top: 1px solid var(--border-primary);
    text-align: center;
}

.footer-bottom p {
    color: var(--text-color-main);
    font-size: var(--text-sm);
    margin: 0;
}

.back-to-top {
    position: fixed;
    bottom: var(--space-lg);
    right: var(--space-lg);
    width: clamp(40px, 7vw, 50px);
    height: clamp(40px, 7vw, 50px);
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    opacity: 0;
    transition: all 0.3s;
    z-index: 1000;
    font-size: clamp(0.9rem, 2.5vw, 1.1rem);
    display: flex;
    align-items: center;
    justify-content: center;
}

.back-to-top.show { opacity: 1; }

.back-to-top:hover {
    background: var(--primary-color-hover);
    transform: scale(1.1);
}

.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 0%;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color), var(--text-color-main));
    z-index: 9999;
    transition: width 0.1s;
}

/* Loading */
.loading-dots {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: var(--space-sm);
    margin: var(--space-xl) auto;
}

.loading-dots .dot {
    width: clamp(8px, 1.5vw, 10px);
    height: clamp(8px, 1.5vw, 10px);
    background-color: var(--primary-color);
    border-radius: 50%;
    animation: bounce 1.4s infinite ease-in-out;
}

.loading-dots .dot:nth-child(1) { animation-delay: -0.32s; }
.loading-dots .dot:nth-child(2) { animation-delay: -0.16s; }

@keyframes bounce {
    0%, 80%, 100% { transform: scale(0); opacity: 0.5; }
    40% { transform: scale(1); opacity: 1; }
}

/* Load More Button */
#load-more-container {
    margin-top: var(--space-xl);
    text-align: center;
}

.load-more-btn {
    position: relative;
    background: linear-gradient(45deg, var(--primary-color), var(--text-color-main));
    color: var(--text-light);
    border: 2px solid var(--text-color-main);
    padding: var(--space-md) var(--space-xl);
    border-radius: var(--border-radius-sm);
    font-family: 'Anek Tamil', sans-serif;
    font-weight: 700;
    font-size: var(--text-base);
    letter-spacing: 1px;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm);
    overflow: hidden;
    z-index: 1;
    cursor: pointer;
    text-transform: uppercase;
}

.load-more-btn:hover {
    background: linear-gradient(45deg, var(--text-color-main), var(--primary-color));
    box-shadow: var(--hover-shadow);
    transform: translateY(-2px);
}

.lazy-img {
    opacity: 0;
    transition: opacity 0.3s ease;
}

.lazy-img.loaded { opacity: 1; }

.img-placeholder {
    background: linear-gradient(90deg, #333 25%, #444 50%, #333 75%);
    background-size: 200% 100%;
    border-radius: var(--border-radius-sm);
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
}


@media (max-width: 1400px) {
    .games-grid > [class*="col-"] {
        margin-bottom: var(--space-md);
    }
}

@media (max-width: 1200px) {
    .games-grid > .col-xxl-2,
    .games-grid > .col-xl-2 {
        flex: 0 0 auto;
        width: 20%;
    }
}

@media (max-width: 992px) {
    .navbar-right.container {
        padding: var(--space-sm) var(--space-md);
        gap: var(--space-md);
    }
    
    .btn-auth-header {
        padding: var(--space-xs) var(--space-sm);
        font-size: var(--text-xs);
        min-width: clamp(60px, 10vw, 80px);
    }
    
    .games-grid > .col-lg-2,
    .games-grid > .col-lg-3 {
        flex: 0 0 auto;
        width: 25%;
    }
}

@media (max-width: 768px) {
    .navbar .container {
        flex-direction: column;
        gap: var(--space-sm);
        padding: var(--space-sm);
    }
    
    .navbar-logo {
        position: static;
        transform: none;
        order: 1;
    }
    
    .navbar-right.container {
        flex-direction: column;
        gap: var(--space-sm);
        order: 2;
        width: 100%;
    }
    
    .header-auth-buttons {
        width: 100%;
        justify-content: center;
        gap: var(--space-md);
    }
    
    .current-time { align-self: center; }
    
    .section-header {
        flex-direction: column;
        text-align: center;
        gap: var(--space-md);
    }
    
    .header-controls {
        flex-direction: column;
        width: 100%;
        gap: var(--space-sm);
    }
    
    .search-container {
        min-width: 100%;
        order: 2;
    }
    
    .games-grid > .col-md-3,
    .games-grid > .col-md-4 {
        flex: 0 0 auto;
        width: 33.333333%;
    }
}

@media (max-width: 576px) {
    .games-grid > .col-sm-6,
    .games-grid > [class*="col-"] {
        flex: 0 0 auto;
        width: 33.333333% !important; /* 3 columns on mobile */
    }
    
    .games-grid {
        margin-left: -1px;
        margin-right: -1px;
    }
    
    .games-grid > [class*="col-"] {
        padding-left: 1px;
        padding-right: 1px;
        margin-bottom: var(--space-sm);
    }
    
    .navbar-right.container {
        padding: var(--space-sm);
        gap: var(--space-sm);
    }
    
    .current-time {
        font-size: var(--text-xs);
        padding: var(--space-xs) var(--space-sm);
    }
    
    .btn-auth-header {
        font-size: var(--text-xs);
        padding: var(--space-xs) var(--space-sm);
        min-width: clamp(50px, 12vw, 70px);
        gap: var(--space-xs);
    }
    
    .header-auth-buttons { gap: var(--space-sm); }
    
    .footer-badges { justify-content: center; }
    
    .game-card {
        margin-bottom: var(--space-sm);
    }
    
    .pola-toggle-btn {
        font-size: clamp(0.45rem, 1vw, 0.55rem);
        padding: clamp(2px, 0.8vw, 4px) clamp(4px, 1.2vw, 6px);
        gap: 1px;
    }
    
    .pola-toggle-btn i {
        font-size: 0.7em;
    }
    
    .pattern-indicators {
        gap: 1px;
    }
    
    .indicator {
        width: 10px;
        height: 10px;
        font-size: 0.4rem;
    }
    

    .provider-tag, .online-players {
        font-size: clamp(0.45rem, 1vw, 0.55rem);
        padding: 1px 3px;
        max-width: 45%;
    }
    
    .online-players i {
        font-size: 0.7em;
        margin-right: 1px;
    }
}

@media (max-width: 400px) {
    .games-grid > [class*="col-"] {
        width: 33.333333% !important; 
        padding-left: 0.5px;
        padding-right: 0.5px;
    }
    
    .game-name {
        font-size: clamp(0.5rem, 1.8vw, 0.6rem);
        line-height: 1;
        min-height: calc(clamp(0.5rem, 1.8vw, 0.6rem) * 1 * 2);
    }
    
    .provider-tag, .online-players {
        font-size: 0.35rem;
        padding: 0.5px 1px;
        max-width: 46%;
        letter-spacing: 0;
    }
    
    .online-players i {
        font-size: 0.5em;
    }
}