/* ========================================
   FREE SLOTS PAGE - PERFORMANCE OPTIMIZED
   Version: 12.0 - Ultra Fast Dark Theme
   Optimizations:
   - Removed complex gradients
   - Removed backdrop-filter (heavy)
   - Removed animations (CPU intensive)
   - Added content-visibility for lazy rendering
   - Simplified shadows
   - Added contain for layout isolation
   ======================================== */

:root {
    --primary-navy: #0b004b;
    --navy-dark: #08022a;
    --navy-medium: #1a0d5c;
    --accent-red: #da1f15;
    --red-hover: #ff4d43;
    --white: #ffffff;
    --text-bright: #f0f0f0;
    --text-muted: rgba(255, 255, 255, 0.7);
    --border-glow: rgba(218, 31, 21, 0.3);
    --shadow-simple: 0 4px 12px rgba(0, 0, 0, 0.4);
    --transition-fast: transform 0.15s ease, box-shadow 0.15s ease;
}

/* ========================================
   BASE STYLES - SIMPLIFIED
   ======================================== */

.games-section-content {
    background: var(--primary-navy);
    min-height: 100vh;
}

/* ========================================
   INTRO SECTION - SIMPLIFIED
   ======================================== */

.free-slots-intro {
    margin: 40px auto 60px;
    padding: 40px;
    max-width: 1200px;
    background: var(--navy-medium);
    border-radius: 12px;
    border: 1px solid var(--border-glow);
    box-shadow: var(--shadow-simple);
}

.free-slots-intro .lead-text {
    font-size: 22px;
    font-weight: 700;
    color: var(--white);
    margin-bottom: 16px;
    line-height: 1.4;
}

/* ========================================
   CONTENT CONTAINERS
   ======================================== */

.software-description,
.play-game-content,
.game-detail-content {
    background: transparent;
    padding: 40px 16px;
    color: var(--white);
    max-width: 1200px;
    margin: 0 auto;
}

/* ========================================
   TYPOGRAPHY - OPTIMIZED
   ======================================== */

.software-description h1,
.play-game-content h1 {
    font-size: 36px;
    font-weight: 800;
    color: var(--white);
    margin: 40px 0 24px;
    padding-bottom: 16px;
    border-bottom: 3px solid var(--accent-red);
}

.software-description h2,
.play-game-content h2 {
    font-size: 28px;
    font-weight: 700;
    color: var(--white);
    margin: 36px 0 20px;
    padding: 16px 0 16px 20px;
    background: rgba(218, 31, 21, 0.15);
    border-left: 4px solid var(--accent-red);
    border-radius: 0 8px 8px 0;
}

.software-description h3,
.play-game-content h3 {
    font-size: 22px;
    font-weight: 700;
    color: var(--white);
    margin: 28px 0 16px;
    padding-left: 12px;
    border-left: 3px solid var(--accent-red);
}

.software-description h4,
.play-game-content h4 {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-bright);
    margin: 24px 0 12px;
}

/* ========================================
   PARAGRAPHS
   ======================================== */

.software-description p,
.play-game-content p,
.game-detail-content p {
    font-size: 16px;
    line-height: 1.7;
    color: var(--text-bright);
    margin: 16px 0;
}

.software-description > p:first-of-type,
.play-game-content > p:first-of-type {
    font-size: 18px;
    font-weight: 500;
}

/* ========================================
   LISTS
   ======================================== */

.software-description ul,
.play-game-content ul {
    margin: 20px 0;
    padding: 0;
    list-style: none;
}

.software-description ul li,
.play-game-content ul li {
    position: relative;
    padding-left: 28px;
    margin: 12px 0;
    font-size: 16px;
    line-height: 1.7;
    color: var(--text-bright);
}

.software-description ul li::before,
.play-game-content ul li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 10px;
    width: 16px;
    height: 2px;
    background: var(--accent-red);
    border-radius: 1px;
}

.software-description ol,
.play-game-content ol {
    margin: 20px 0;
    padding: 0 0 0 32px;
    list-style: none;
    counter-reset: item;
}

.software-description ol li,
.play-game-content ol li {
    position: relative;
    padding-left: 12px;
    margin: 12px 0;
    font-size: 16px;
    line-height: 1.7;
    color: var(--text-bright);
    counter-increment: item;
}

.software-description ol li::before,
.play-game-content ol li::before {
    content: counter(item);
    position: absolute;
    left: -32px;
    width: 24px;
    height: 24px;
    background: var(--accent-red);
    color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 12px;
}

/* ========================================
   LINKS
   ======================================== */

.software-description a,
.play-game-content a {
    color: var(--accent-red);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.15s ease;
}

.software-description a:hover,
.play-game-content a:hover {
    color: var(--red-hover);
    text-decoration: underline;
}

/* ========================================
   TEXT FORMATTING
   ======================================== */

.software-description strong,
.play-game-content strong {
    font-weight: 700;
    color: var(--white);
}

.software-description em,
.play-game-content em {
    font-style: italic;
    color: var(--text-muted);
}

/* ========================================
   TABLES - SIMPLIFIED
   ======================================== */

.software-description table,
.play-game-content table,
#single-game-table {
    width: 100%;
    margin: 28px 0;
    border-collapse: collapse;
    background: var(--navy-medium);
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid var(--border-glow);
}

.software-description table th,
.play-game-content table th {
    background: var(--accent-red);
    color: var(--white);
    font-weight: 700;
    font-size: 12px;
    padding: 14px 16px;
    text-align: left;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.software-description table td,
.play-game-content table td,
#single-game-table td {
    padding: 14px 16px;
    color: var(--text-bright);
    font-size: 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.software-description table tr:last-child td,
.play-game-content table tr:last-child td {
    border-bottom: none;
}

#single-game-table tr td:first-child {
    font-weight: 700;
    color: var(--accent-red);
}

/* ========================================
   BLOCKQUOTES
   ======================================== */

.software-description blockquote,
.play-game-content blockquote {
    margin: 28px 0;
    padding: 20px 24px;
    background: rgba(218, 31, 21, 0.1);
    border-left: 4px solid var(--accent-red);
    border-radius: 0 8px 8px 0;
    font-size: 17px;
    font-style: italic;
    line-height: 1.7;
    color: var(--text-bright);
}

/* ========================================
   HORIZONTAL RULES
   ======================================== */

.software-description hr,
.play-game-content hr {
    margin: 40px 0;
    height: 2px;
    border: none;
    background: var(--accent-red);
    opacity: 0.5;
}

/* ========================================
   EPIC GAME GRID - PERFORMANCE OPTIMIZED
   Mobile-first responsive grid
   ======================================== */

.epic-game-grid,
#epicFreeGameGrid {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important; /* Mobile: 2 cols */
    gap: 12px !important;
    padding: 20px 0;
    width: 100% !important;
    /* Performance: contain layout */
    contain: layout style;
}

@media (min-width: 768px) {
    .epic-game-grid,
    #epicFreeGameGrid {
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 20px !important;
    }
}

@media (min-width: 992px) {
    .epic-game-grid,
    #epicFreeGameGrid {
        grid-template-columns: repeat(4, 1fr) !important;
        gap: 24px !important;
    }
}

@media (min-width: 1200px) {
    .epic-game-grid,
    #epicFreeGameGrid {
        grid-template-columns: repeat(5, 1fr) !important;
    }
}

/* ========================================
   EPIC GAME CARD - PERFORMANCE OPTIMIZED
   Key optimizations:
   - content-visibility for lazy rendering
   - contain for layout isolation
   - simplified shadows and transforms
   - GPU acceleration with will-change on hover only
   ======================================== */

.epic-game-card {
    background: var(--navy-medium);
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--border-glow);
    box-shadow: var(--shadow-simple);
    transition: var(--transition-fast);
    /* Performance: lazy rendering */
    content-visibility: auto;
    contain-intrinsic-size: 0 400px;
    /* Performance: layout isolation */
    contain: layout paint;
}

.epic-game-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 8px 24px rgba(218, 31, 21, 0.4);
    border-color: var(--accent-red);
    will-change: transform;
}

/* Game Card Image */
.game-card-image {
    position: relative;
    overflow: hidden;
    aspect-ratio: 3/2;
    background: var(--navy-dark);
}

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

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

.image-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(11, 0, 75, 0.8) 0%, transparent 50%);
    pointer-events: none;
}

/* Play Overlay */
.play-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(11, 0, 75, 0.7);
    opacity: 0;
    transition: opacity 0.15s ease;
}

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

.epic-play-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: var(--accent-red);
    color: var(--white);
    font-weight: 700;
    font-size: 14px;
    border-radius: 8px;
    text-decoration: none;
    transition: background 0.15s ease;
}

.epic-play-btn:hover {
    background: var(--red-hover);
    color: var(--white);
}

.epic-play-btn svg {
    width: 20px;
    height: 20px;
}

/* Game Card Info */
.game-card-info {
    padding: 16px;
}

.game-card-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--white);
    margin: 0 0 8px;
    line-height: 1.3;
    /* Truncate long titles */
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Provider Badge */
.provider-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 12px;
    font-size: 12px;
    color: var(--text-muted);
}

.provider-icon {
    font-size: 14px;
}

.provider-name {
    font-weight: 500;
}

/* Game Stats Row */
.game-stats-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
}

.stat-badge {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 6px;
    font-size: 12px;
}

.stat-icon {
    font-size: 14px;
}

.stat-content {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.stat-label {
    font-size: 10px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.stat-value {
    font-weight: 700;
    color: var(--white);
}

.rtp-badge .stat-value {
    color: #4ade80;
}

.volatility-badge .stat-value {
    color: #fbbf24;
}

.maxwin-badge .stat-value {
    color: var(--accent-red);
}

/* Game Details Grid */
.game-details-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 6px;
    padding-top: 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.detail-item {
    font-size: 12px;
    color: var(--text-muted);
}

.detail-label {
    color: var(--text-muted);
}

.detail-value {
    color: var(--text-bright);
    font-weight: 500;
}

/* ========================================
   OLD GAME CARDS - PERFORMANCE OPTIMIZED
   ======================================== */

.game-content {
    margin-bottom: 24px;
    /* Performance: lazy rendering */
    content-visibility: auto;
    contain-intrinsic-size: 0 200px;
}

.game-content .content {
    border-radius: 10px;
    overflow: hidden;
    box-shadow: var(--shadow-simple);
    border: 1px solid var(--border-glow);
    background: var(--navy-medium);
    transition: var(--transition-fast);
    /* Performance: layout isolation */
    contain: layout paint;
}

.game-content .content:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 32px rgba(218, 31, 21, 0.4);
    border-color: var(--accent-red);
}

.game-content .content-image {
    width: 100%;
    display: block;
    aspect-ratio: 1;
    object-fit: cover;
    transition: transform 0.2s ease;
}

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

.game-content .content-details {
    padding: 16px;
    background: rgba(11, 0, 75, 0.6);
}

.gameh5Span {
    color: var(--white);
    font-size: 14px;
    font-weight: 700;
    text-align: center;
    display: block;
    margin-bottom: 10px;
    /* Truncate */
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.gamePlayNowButton {
    display: inline-block;
    width: 100%;
    padding: 12px 24px;
    background: var(--accent-red);
    color: var(--white);
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    text-align: center;
    transition: background 0.15s ease;
    text-transform: uppercase;
}

.gamePlayNowButton:hover {
    background: var(--red-hover);
}

/* ========================================
   FILTER PANEL - SIMPLIFIED
   ======================================== */

.epic-filter-wrapper {
    margin-bottom: 24px;
}

.epic-filter-toggle {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    background: var(--navy-medium);
    border: 1px solid var(--border-glow);
    border-radius: 8px;
    color: var(--white);
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: var(--transition-fast);
}

.epic-filter-toggle:hover {
    border-color: var(--accent-red);
}

.filter-count {
    background: var(--accent-red);
    color: var(--white);
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 700;
}

.epic-filter-panel {
    display: none;
    margin-top: 16px;
    padding: 20px;
    background: var(--navy-medium);
    border: 1px solid var(--border-glow);
    border-radius: 12px;
}

.epic-filter-panel.active {
    display: block;
}

.filter-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.filter-header h3 {
    font-size: 18px;
    font-weight: 700;
    color: var(--white);
    margin: 0;
}

.reset-filters {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--text-muted);
    font-size: 13px;
    text-decoration: none;
    transition: color 0.15s ease;
}

.reset-filters:hover {
    color: var(--accent-red);
}

.filter-section {
    margin-bottom: 16px;
}

.filter-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.05);
    border: none;
    border-radius: 8px;
    color: var(--white);
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: background 0.15s ease;
}

.filter-section-header:hover {
    background: rgba(255, 255, 255, 0.1);
}

.filter-section-header .chevron {
    transition: transform 0.15s ease;
}

.filter-section-header.active .chevron {
    transform: rotate(180deg);
}

.filter-section-content {
    display: none;
    padding: 16px;
    max-height: 200px;
    overflow-y: auto;
}

.filter-section-content.active {
    display: block;
}

.filter-checkbox,
.filter-radio {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 0;
    cursor: pointer;
    font-size: 14px;
    color: var(--text-bright);
}

.filter-checkbox input,
.filter-radio input {
    width: 16px;
    height: 16px;
    accent-color: var(--accent-red);
}

.apply-filters-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 14px 24px;
    background: var(--accent-red);
    border: none;
    border-radius: 8px;
    color: var(--white);
    font-weight: 700;
    font-size: 14px;
    cursor: pointer;
    transition: background 0.15s ease;
    margin-top: 16px;
}

.apply-filters-btn:hover {
    background: var(--red-hover);
}

/* ========================================
   SEARCH BAR - SIMPLIFIED
   ======================================== */

.search-bar {
    position: relative;
    max-width: 500px;
    margin: 0 auto;
}

.search-bar input {
    width: 100%;
    padding: 14px 20px 14px 48px;
    background: var(--navy-medium);
    border: 1px solid var(--border-glow);
    border-radius: 10px;
    color: var(--white);
    font-size: 15px;
    transition: border-color 0.15s ease;
}

.search-bar input:focus {
    outline: none;
    border-color: var(--accent-red);
}

.search-bar input::placeholder {
    color: var(--text-muted);
}

.search-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
}

/* ========================================
   NO GAMES MESSAGE
   ======================================== */

.no-games-message {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
    color: var(--text-muted);
}

.no-games-message h3 {
    font-size: 24px;
    color: var(--white);
    margin-bottom: 10px;
}

/* ========================================
   RESPONSIVE DESIGN
   ======================================== */

@media (max-width: 768px) {
    .epic-game-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }

    .game-card-info {
        padding: 12px;
    }

    .game-card-title {
        font-size: 14px;
    }

    .game-stats-row {
        gap: 6px;
    }

    .stat-badge {
        padding: 4px 8px;
    }

    .game-details-grid {
        display: none;
    }

    .software-description,
    .play-game-content {
        padding: 28px 16px;
    }

    .software-description h1,
    .play-game-content h1 {
        font-size: 28px;
    }

    .software-description h2,
    .play-game-content h2 {
        font-size: 22px;
    }
}

@media (max-width: 480px) {
    .epic-game-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }

    .stat-badge .stat-label {
        display: none;
    }
}

/* ========================================
   SELECTION STYLING
   ======================================== */

::selection {
    background: var(--accent-red);
    color: var(--white);
}

/* ========================================
   FORCE WHITE TEXT
   ======================================== */

.software-description *,
.play-game-content *,
.game-detail-content * {
    color: inherit;
}

/* ========================================
   PRINT STYLES
   ======================================== */

@media print {
    .epic-filter-wrapper,
    .search-bar,
    .play-overlay {
        display: none !important;
    }

    .epic-game-card {
        break-inside: avoid;
    }
}

/* ========================================
@media (max-width: 768px) {
    .newHeader {
        padding: 60px 16px 40px;
        min-height: 200px;
    }
    
    .newHeader h1 {
        font-size: 28px;
    }
}

/* ========================================
   HEADER & BREADCRUMB SECTION - FIXED
   ======================================== */

.newHeader {
    position: relative;
    padding: 80px 20px 60px;
    text-align: center;
    background-size: cover;
    background-position: center;
    min-height: 280px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.newHeader::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, rgba(8, 2, 42, 0.7), rgba(11, 0, 75, 0.9));
}

.game-banner-content {
    position: relative;
    z-index: 1;
    display: block;
    text-align: center;
    width: 100%;
    max-width: 900px;
}

.newHeader h1 {
    font-size: 42px;
    font-weight: 800;
    color: #ffffff;
    margin: 0 0 20px;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
    display: block;
}

/* Breadcrumb Navigation - Properly Styled */
.cBreadcrumb {
    display: flex !important;
    justify-content: center;
    align-items: center;
    gap: 0;
    flex-wrap: wrap;
    font-size: 15px;
    color: rgba(255, 255, 255, 0.8);
    margin-top: 20px;
    padding: 0;
}

.cBreadcrumb span {
    display: inline-flex !important;
    align-items: center;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 400;
}

.cBreadcrumb span:not(:last-child)::after {
    content: "/" !important;
    display: inline-block !important;
    margin: 0 12px;
    color: rgba(255, 255, 255, 0.5);
    font-weight: 300;
}

.cBreadcrumb span:last-child {
    color: rgba(255, 255, 255, 0.7);
    font-weight: 500;
}

.cBreadcrumb a {
    color: #ff6b6b !important;
    text-decoration: none;
    transition: color 0.15s ease;
}

.cBreadcrumb a:hover {
    color: #ff4d43 !important;
    text-decoration: underline;
}

@media (max-width: 768px) {
    .newHeader {
        padding: 60px 16px 40px;
        min-height: 200px;
    }
    
    .newHeader h1 {
        font-size: 28px;
    }
    
    .cBreadcrumb {
        font-size: 13px;
    }
}

/* Override subPage.css inline-block rule */
#newHeader .game-banner-content {
    display: block !important;
    width: 100%;
}

#newHeader .game-banner-content h1 {
    display: block !important;
    margin-bottom: 16px !important;
}

#newHeader .game-banner-content .cBreadcrumb {
    display: flex !important;
    justify-content: center !important;
    margin-top: 16px !important;
}

#newHeader .game-banner-content .cBreadcrumb span {
    display: inline-flex !important;
}

/* Fix spacing issues */
#games-new-section .newHeader {
    margin-bottom: 0 !important;
    padding-bottom: 40px !important;
}

.games-section-content {
    padding-top: 30px !important;
}

.games-section-content .container {
    padding-top: 0 !important;
}

.intro-text {
    margin-top: 0 !important;
}

/* Reduce gap before game cards */
.sectionPTPB {
    padding-top: 20px !important;
}

/* ========================================
   ENHANCED GAME CARDS - v12.5
   Better images, more info display
   ======================================== */

/* Larger, better quality images */
.game-card-image {
    aspect-ratio: 16/10 !important;
    min-height: 180px;
}

.game-card-image img {
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
}

/* Enhanced game info section */
.game-card-info {
    padding: 16px 16px 20px !important;
}

.game-card-title {
    font-size: 17px !important;
    margin-bottom: 6px !important;
    white-space: normal !important;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 44px;
}

/* Better provider badge */
.provider-badge {
    background: rgba(218, 31, 21, 0.15) !important;
    padding: 4px 10px !important;
    border-radius: 4px !important;
    display: inline-block !important;
    margin-bottom: 14px !important;
}

.provider-name {
    color: #ff6b63 !important;
    font-weight: 600 !important;
    font-size: 11px !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
}

/* Enhanced stat badges */
.game-stats-row {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 8px !important;
    margin-bottom: 14px !important;
}

.stat-badge {
    background: rgba(255, 255, 255, 0.08) !important;
    border-radius: 6px !important;
    padding: 8px 10px !important;
    flex: 1 !important;
    min-width: 70px !important;
    text-align: center !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
}

.stat-badge .stat-label {
    display: block !important;
    font-size: 9px !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    color: rgba(255, 255, 255, 0.5) !important;
    margin-bottom: 4px !important;
}

.stat-badge .stat-value {
    display: block !important;
    font-size: 13px !important;
    font-weight: 700 !important;
    color: #fff !important;
}

/* Color coded RTP */
.rtp-badge .stat-value {
    color: #4ade80 !important;
}

/* Color coded volatility */
.volatility-badge .stat-value {
    color: #fbbf24 !important;
}

/* Color coded max win */
.maxwin-badge .stat-value {
    color: #60a5fa !important;
}

/* Game details grid */
.game-details-grid {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 8px !important;
    padding-top: 12px !important;
    border-top: 1px solid rgba(255, 255, 255, 0.1) !important;
    margin-top: 4px !important;
}

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

.detail-label {
    color: rgba(255, 255, 255, 0.5) !important;
}

.detail-value {
    color: #fff !important;
    font-weight: 600 !important;
}

/* Play demo button always visible on mobile */
@media (max-width: 768px) {
    .play-overlay {
        opacity: 1 !important;
        background: linear-gradient(to top, rgba(11, 0, 75, 0.95) 0%, rgba(11, 0, 75, 0.7) 40%, transparent 100%) !important;
        align-items: flex-end !important;
        padding-bottom: 15px !important;
    }
    
    .epic-play-btn {
        padding: 10px 20px !important;
        font-size: 13px !important;
    }
    
    .game-card-image {
        min-height: 150px !important;
    }
    
    .stat-badge {
        padding: 6px 8px !important;
        min-width: 60px !important;
    }
    
    .stat-badge .stat-value {
        font-size: 12px !important;
    }
}

/* Games grid enhancement */
.games-grid {
    display: grid !important;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)) !important;
    gap: 24px !important;
}

@media (min-width: 1200px) {
    .games-grid {
        grid-template-columns: repeat(4, 1fr) !important;
    }
}

@media (max-width: 576px) {
    .games-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 12px !important;
    }
    
    .game-card-info {
        padding: 12px !important;
    }
    
    .game-card-title {
        font-size: 14px !important;
        min-height: 36px !important;
    }
}

/* ========================================
   FOOTER FIX - No gap at bottom
   SCOPED to free-slots pages only to prevent global layout issues
   ======================================== */

/* Only apply flex layout to free-slots specific pages */
#games-new-section,
#single-game-section {
    display: flex;
    flex-direction: column;
    min-height: calc(100vh - 70px); /* Account for header */
}

#games-new-section .games-section-content,
#single-game-section .single-game-content {
    flex: 1;
}

/* Footer margins for free-slots pages only */
#games-new-section ~ footer,
#games-new-section ~ .footer,
#games-new-section ~ .site-footer,
#single-game-section ~ footer,
#single-game-section ~ .footer,
#single-game-section ~ .site-footer {
    margin-top: auto !important;
    margin-bottom: 0 !important;
}

/* Remove any bottom margin/padding from last sections */
.games-section-content,
.single-game-content {
    margin-bottom: 0 !important;
    padding-bottom: 40px !important;
}

/* Fix pixelated images - smooth upscaling for small logos */
.game-card-image img {
    image-rendering: auto !important;
    image-rendering: smooth !important;
    -ms-interpolation-mode: bicubic;
    max-width: 100% !important;
    display: block !important;
}

/* Limit card size so small images don't stretch too much */
.epic-game-grid {
    grid-template-columns: repeat(auto-fill, minmax(220px, 260px)) !important;
    justify-content: center;
}

@media (min-width: 1200px) {
    .epic-game-grid {
        grid-template-columns: repeat(5, 1fr) !important;
    }
}

@media (max-width: 767px) {
    .epic-game-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

/* Filter active state - clearer visual indicator */
.epic-filter-toggle:has(+ .filter-count[style*="inline"]),
.epic-filter-toggle.has-active-filters {
    border-color: var(--accent-red) !important;
    box-shadow: 0 0 0 2px rgba(218, 31, 21, 0.2);
}

.filter-count {
    animation: filterPulse 2s ease-in-out 1;
}

@keyframes filterPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.15); }
}

/* Prevent FAQ FOUC - ensure collapsed items are hidden immediately */
.panel-collapse:not(.show) {
    display: none;
}
.panel-collapse.collapsing {
    display: block;
}


/* ========================================
   PLAY BUTTON FIX - Center and contain
   ======================================== */

.epic-game-card {
    position: relative !important;
    overflow: hidden !important;
}

.game-card-image {
    position: relative !important;
    overflow: hidden !important;
    width: 100% !important;
    max-width: 100% !important;
}

.play-overlay {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100% !important;
    height: 100% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    z-index: 10 !important;
}

.epic-play-btn {
    max-width: 90% !important;
    text-align: center !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
}

.epic-play-btn span {
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    max-width: 150px !important;
    display: inline-block !important;
}

@media (max-width: 768px) {
    .play-overlay {
        opacity: 1 !important;
        background: rgba(11, 0, 75, 0.6) !important;
    }

    .epic-play-btn {
        padding: 8px 12px !important;
        font-size: 11px !important;
    }

    .epic-play-btn span {
        max-width: 100px !important;
    }
}

/* ========================================
   SEARCH BAR MOBILE FIX
   ======================================== */
@media (max-width: 768px) {
    .search-bar {
        max-width: 100% !important;
        padding: 0 15px !important;
    }
    .search-bar input {
        font-size: 16px !important; /* Prevent iOS zoom */
    }
}

/* ========================================
   SEARCH LAYOUT SHIFT PREVENTION
   ======================================== */
#epicFreeGameGrid {
    min-height: 500px;
    contain: layout style;
}

.epic-game-card:nth-child(-n+8) {
    content-visibility: visible !important;
}

/* ========================================
   GLOBAL LAYOUT FIX - Prevent overflow
   ======================================== */
html, body {
    overflow-x: hidden !important;
    max-width: 100vw !important;
}




/* ============================================
   SEARCH RESULTS VISIBILITY FIX
   Fix for disappearing game cards during search
   Added: 2026-02-06
   ============================================ */

/* Ensure game grid is always visible */
#oceanGameGrid {
    min-height: 300px !important;
    opacity: 1 !important;
    visibility: visible !important;
    display: grid !important;
}

/* Ensure game cards are always visible */
#oceanGameGrid .ocean-game-card {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

/* Search loading state - dim but do not hide */
#oceanGameGrid.searching {
    opacity: 0.5 !important;
    pointer-events: none;
}

/* After AJAX load - restore full visibility */
#oceanGameGrid:not(.searching) {
    opacity: 1 !important;
}

/* Ensure all child elements are visible after content replacement */
#oceanGameGrid > * {
    visibility: visible !important;
    opacity: 1 !important;
}

/* No games message styling */
.no-games-ocean {
    grid-column: 1 / -1 !important;
    text-align: center !important;
    padding: 60px 20px !important;
    color: rgba(255, 255, 255, 0.7) !important;
}

.no-games-ocean h3 {
    color: #fff !important;
    font-size: 24px !important;
    margin-bottom: 10px !important;
}


/* ========================================
   MOBILE GRID FIX - 2026-02-07
   Force 2 columns at all mobile breakpoints
   ======================================== */

/* Override minmax to ensure 2 columns fit on mobile */
@media (max-width: 576px) {
    .epic-game-grid,
    #epicFreeGameGrid,
    .games-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 10px !important;
    }
}

@media (max-width: 480px) {
    .epic-game-grid,
    #epicFreeGameGrid,
    .games-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 8px !important;
    }
    
    .epic-game-card {
        min-width: 0 !important;
        max-width: 100% !important;
    }
}

@media (max-width: 375px) {
    .epic-game-grid,
    #epicFreeGameGrid,
    .games-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 6px !important;
    }
    
    .game-card-title {
        font-size: 11px !important;
    }
    
    .game-card-info {
        padding: 6px !important;
    }
}
