:root {
    --bg-color: #040404;
    --card-bg: #111;
    --primary-color: #007bff;
    --accent-color: #ffd700;
    --text-color: #f8f9fa;
    --muted-color: #888;
    --card-hover: #1a1a1a;
    --transition: all 0.3s cubic-bezier(0.19, 1, 0.22, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: 'Poppins', 'Lato', sans-serif;
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
}

.overlay-glow {
    position: fixed;
    top: -100px;
    left: 50%;
    transform: translateX(-50%);
    width: 60%;
    height: 400px;
    background: radial-gradient(ellipse at center, rgba(0, 123, 255, 0.1) 0%, transparent 70%);
    pointer-events: none;
    z-index: -1;
}

.container {
    width: 100%;
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */

.sticky-header {
    position: sticky;
    top: 0;
    background: rgba(10, 10, 10, 0.98);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding: 15px 0;
    z-index: 200;
}

.sticky-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, transparent 0%, var(--primary-color) 50%, transparent 100%);
    box-shadow: 0 0 10px rgba(0, 123, 255, 0.5);
}

.header-top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.header-spacer {
    width: 120px;
}

.logo {
    font-size: 22px;
    letter-spacing: 2px;
    font-weight: 700;
    color: var(--text-color);
    text-align: center;
    flex: 1;
}

.logo span {
    color: var(--primary-color);
    text-shadow: 0 0 10px rgba(0, 123, 255, 0.4);
    margin-left: 5px;
}

.header-play-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 24px;
    background: var(--primary-color);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    text-decoration: none;
    transition: var(--transition);
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.3);
    white-space: nowrap;
}

.header-play-btn:hover {
    background: #006ae6;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 123, 255, 0.5);
}

.header-play-btn svg {
    width: 16px;
    height: 16px;
}

.main-header {
    background: rgba(10, 10, 10, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding: 20px 0 10px 0;
    position: relative;
    z-index: 100;
}

.header-content {
    display: flex;
    flex-direction: column;
    gap: 16px;
    width: 100%;
}

.header-banner {
    width: 100%;
    height: 180px;
    background: linear-gradient(135deg, rgba(20, 20, 30, 0.8) 0%, rgba(10, 10, 20, 0.9) 100%);
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
}

.header-banner img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.banner-placeholder {
    color: rgba(255, 255, 255, 0.2);
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.header-decoration {
    display: none;
}

.header-controls {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
    margin-bottom: -4px;
}

.search-bar {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(30, 30, 40, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    padding: 12px 16px;
    transition: var(--transition);
}

.search-bar:focus-within {
    border-color: rgba(0, 123, 255, 0.4);
    background: rgba(30, 30, 40, 0.8);
}

.search-bar svg {
    color: rgba(255, 255, 255, 0.4);
    flex-shrink: 0;
}

.search-bar input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    color: var(--text-color);
    font-size: 14px;
    font-family: 'Poppins', sans-serif;
}

.search-bar input::placeholder {
    color: rgba(255, 255, 255, 0.3);
}

.filter-buttons {
    display: flex;
    gap: 8px;
    justify-content: flex-start;
}

.filter-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 12px 20px;
    background: rgba(30, 30, 40, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    color: rgba(255, 255, 255, 0.6);
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
}

.filter-btn svg {
    width: 16px;
    height: 16px;
}

.filter-btn:hover {
    background: rgba(40, 40, 50, 0.8);
    border-color: rgba(255, 255, 255, 0.15);
    color: rgba(255, 255, 255, 0.8);
}

.filter-btn.active {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: #fff;
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.3);
}

/* Game Grid */

.game-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    grid-gap: 12px;
    padding: 12px 0 40px 0;
    opacity: 1;
    transition: opacity 0.5s ease;
    width: 100%;
}

.game-grid.fade-out {
    opacity: 0;
}

.game-card {
    background: var(--card-bg);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    transition: var(--transition);
    border: 1px solid rgba(255, 255, 255, 0.03);
    cursor: pointer;
    position: relative;
    aspect-ratio: 3/4;
}

.game-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    border-color: rgba(0, 123, 255, 0.3);
}

.image-container {
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #000;
}

.game-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.8s cubic-bezier(0.19, 1, 0.22, 1);
}

.game-card:hover img {
    transform: scale(1.05);
}

.game-info {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 16px 12px 12px 12px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.95) 0%, rgba(0, 0, 0, 0.85) 50%, transparent 100%);
    z-index: 10;
}

.game-name {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-color);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-align: center;
    margin-bottom: 10px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8);
}

.play-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 100%;
    padding: 8px;
    background: linear-gradient(135deg, var(--primary-color) 0%, #0056b3 100%);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    text-decoration: none;
    transition: var(--transition);
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.3);
}

.play-btn:hover {
    background: linear-gradient(135deg, #006ae6 0%, #004494 100%);
    transform: scale(1.03);
    box-shadow: 0 6px 20px rgba(0, 123, 255, 0.5);
}

.play-btn svg {
    fill: currentColor;
}

.thermometer-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    padding: 4px 8px;
    color: #fff;
    font-size: 11px;
    font-weight: 800;
    border-radius: 6px;
    backdrop-filter: blur(8px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    z-index: 20;
    display: flex;
    align-items: center;
    gap: 3px;
    transition: var(--transition);
}

.info-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    width: 36px;
    height: 36px;
    background: rgba(60, 60, 70, 0.35);
    backdrop-filter: blur(4px);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
    z-index: 20;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.info-badge:hover {
    background: rgba(70, 70, 80, 0.5);
    transform: scale(1.05);
    border-color: rgba(255, 255, 255, 0.15);
}

.info-badge svg {
    width: 22px;
    height: 22px;
    stroke: rgba(255, 255, 255, 0.95);
    stroke-width: 2.5;
    stroke-linecap: round;
}

.thermometer-badge svg {
    width: 12px;
    height: 12px;
    fill: currentColor;
}

/* Color States */
.thermometer-badge.red {
    background: rgba(220, 38, 38, 0.85);
    /* Red */
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.thermometer-badge.yellow {
    background: rgba(234, 179, 8, 0.85);
    /* Yellow */
    color: #000;
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.thermometer-badge.green {
    background: rgba(21, 128, 61, 0.95);
    /* Darker Green for contrast */
    animation: pulse-badge 1.5s infinite;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 0 15px rgba(21, 128, 61, 0.5);
}

@keyframes pulse-badge {
    0% {
        transform: scale(1);
        box-shadow: 0 0 10px rgba(21, 128, 61, 0.4);
    }

    50% {
        transform: scale(1.05);
        box-shadow: 0 0 20px rgba(21, 128, 61, 0.8);
    }

    100% {
        transform: scale(1);
        box-shadow: 0 0 10px rgba(21, 128, 61, 0.4);
    }
}

/* Pagination */

.pagination-footer {
    padding: 40px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.pagination-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 16px;
}

.nav-btn {
    background: rgba(100, 100, 100, 0.4);
    border: none;
    padding: 14px 32px;
    color: rgba(255, 255, 255, 0.6);
    border-radius: 12px;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 15px;
    font-weight: 600;
    min-width: 140px;
    justify-content: center;
}

.nav-btn.next {
    background: var(--primary-color);
    color: #fff;
    box-shadow: 0 4px 15px rgba(0, 123, 255, 0.3);
}

.nav-btn.next:hover:not(:disabled) {
    background: #006ae6;
    box-shadow: 0 6px 20px rgba(0, 123, 255, 0.5);
    transform: translateY(-2px);
}

.nav-btn.prev:hover:not(:disabled) {
    background: rgba(120, 120, 120, 0.5);
    color: rgba(255, 255, 255, 0.8);
}

.nav-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.page-numbers {
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(20, 20, 20, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 14px 24px;
    font-size: 16px;
    font-weight: 600;
    min-width: 120px;
}

.page-numbers span {
    color: #fff;
}

.page-numbers .current-page {
    color: #fff;
    font-weight: 700;
}

.page-numbers .separator {
    color: rgba(255, 255, 255, 0.4);
    margin: 0 6px;
}

.page-numbers .total-pages {
    color: rgba(255, 255, 255, 0.6);
}

/* Responsive */

@media (max-width: 1200px) {
    .game-grid {
        grid-template-columns: repeat(4, 1fr);
        grid-gap: 10px;
    }
}

@media (max-width: 992px) {
    .game-grid {
        grid-template-columns: repeat(3, 1fr);
        grid-gap: 10px;
    }
    
    .header-banner {
        height: 150px;
    }
}

@media (max-width: 768px) {
    .game-grid {
        grid-template-columns: repeat(2, 1fr);
        grid-gap: 8px;
    }
    
    .game-name {
        font-size: 12px;
    }
    
    .play-btn {
        font-size: 11px;
        padding: 7px;
    }
    
    .nav-btn {
        padding: 12px 20px;
        font-size: 14px;
        min-width: 110px;
    }
    
    .page-numbers {
        padding: 12px 18px;
        font-size: 14px;
        min-width: 100px;
    }
    
    .header-banner {
        height: 120px;
    }
    
    .logo {
        font-size: 16px;
    }
    
    .header-spacer {
        width: 80px;
    }
    
    .header-play-btn {
        padding: 8px 16px;
        font-size: 12px;
    }
    
    .header-controls {
        gap: 10px;
    }
    
    .filter-buttons {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
        width: 100%;
    }
    
    .filter-btn {
        padding: 14px;
        font-size: 13px;
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .game-grid {
        grid-template-columns: repeat(2, 1fr);
        grid-gap: 8px;
    }
    
    .pagination-container {
        gap: 10px;
    }
    
    .nav-btn {
        padding: 10px 16px;
        font-size: 13px;
        min-width: 90px;
    }
    
    .page-numbers {
        padding: 10px 14px;
        font-size: 13px;
        min-width: 80px;
    }
    
    .header-banner {
        height: 100px;
    }
    
    .logo {
        font-size: 14px;
    }
    
    .header-spacer {
        width: 60px;
    }
    
    .header-play-btn {
        padding: 7px 12px;
        font-size: 11px;
    }
    
    .banner-placeholder {
        font-size: 11px;
    }
}


/* Modal */

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal.active {
    display: flex;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(10px);
}

.modal-content {
    position: relative;
    background: linear-gradient(135deg, rgba(20, 20, 30, 0.98) 0%, rgba(10, 10, 20, 0.98) 100%);
    border-radius: 20px;
    padding: 20px;
    max-width: 420px;
    width: 100%;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-30px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.modal-close {
    position: absolute;
    top: 16px;
    left: 16px;
    width: 40px;
    height: 40px;
    background: rgba(50, 50, 60, 0.8);
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
    z-index: 10;
}

.modal-close:hover {
    background: rgba(70, 70, 80, 0.9);
    transform: rotate(90deg);
}

.modal-header {
    position: relative;
    width: 100%;
    aspect-ratio: 16/9;
    border-radius: 16px;
    overflow: hidden;
    margin-bottom: 20px;
}

.modal-game-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.modal-fire-badge {
    position: absolute;
    top: 16px;
    right: 16px;
    background: linear-gradient(135deg, #ff6b35 0%, #ff8c42 100%);
    padding: 8px 16px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 20px;
    font-weight: 800;
    color: #fff;
    box-shadow: 0 4px 15px rgba(255, 107, 53, 0.4);
}

.modal-fire-badge svg {
    width: 20px;
    height: 20px;
}

.modal-game-name {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-color);
    margin-bottom: 10px;
    text-align: left;
}

.modal-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: linear-gradient(135deg, rgba(255, 107, 53, 0.2) 0%, rgba(255, 140, 66, 0.2) 100%);
    border: 1px solid rgba(255, 107, 53, 0.3);
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 700;
    color: #ff8c42;
    margin-bottom: 16px;
}

.modal-status svg {
    width: 14px;
    height: 14px;
    fill: #ff8c42;
}

.modal-rtp-box {
    background: rgba(30, 30, 40, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 16px;
}

.modal-rtp-label {
    font-size: 13px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.5);
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.modal-rtp-value {
    font-size: 40px;
    font-weight: 800;
    background: linear-gradient(135deg, #00ff88 0%, #00cc6a 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1;
}

.modal-bet-info {
    margin-bottom: 14px;
}

.modal-bet-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.modal-bet-label {
    font-size: 13px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.5);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.modal-bet-value {
    font-size: 16px;
    font-weight: 700;
}

.modal-bet-bar {
    width: 100%;
    height: 12px;
    background: rgba(30, 30, 40, 0.6);
    border-radius: 6px;
    overflow: hidden;
    position: relative;
}

.modal-bet-fill {
    height: 100%;
    border-radius: 6px;
    transition: width 0.5s ease-out;
}

.modal-bet-fill.high {
    background: linear-gradient(90deg, #007bff 0%, #a855f7 100%);
    box-shadow: 0 0 10px rgba(0, 123, 255, 0.5);
}

.modal-bet-fill.low {
    background: linear-gradient(90deg, #a855f7 0%, #ec4899 100%);
    box-shadow: 0 0 10px rgba(168, 85, 247, 0.5);
}

.modal-play-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, var(--primary-color) 0%, #a855f7 100%);
    color: #fff;
    border: none;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 700;
    text-transform: uppercase;
    text-decoration: none;
    transition: var(--transition);
    box-shadow: 0 6px 20px rgba(0, 123, 255, 0.4);
    margin-top: 20px;
}

.modal-play-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(0, 123, 255, 0.6);
}

.modal-play-btn svg {
    width: 20px;
    height: 20px;
}

@media (max-width: 768px) {
    .modal-content {
        padding: 20px;
        max-width: 90%;
    }
    
    .modal-game-name {
        font-size: 18px;
    }
    
    .modal-rtp-value {
        font-size: 36px;
    }
}
