/**
 * SlotsGamblers Game Filter - Frontend Styles
 *
 * @package SlotsGamblersGameFilter
 * @version 2.7.2
 */

/* CSS Variables */
.sgf-container {
    --color-purple: #9333EA;
    --color-purple-light: #F3E8FF;
    --color-orange: #FF8C42;
    --color-orange-light: #FFF4E6;
    --color-green: #10B981;
    --color-green-light: #D1FAE5;
    --color-red: #EF4444;
    --color-red-light: #FEE2E2;
    --color-white: #FFFFFF;
    --color-gray-light: #F7F7F7;
    --color-gray-medium: #E0E0E0;
    --color-gray-dark: #6B7280;
    --color-black: #1A1A1A;
    --text-primary: #1A1A1A;
    --text-secondary: #6B7280;
    --text-muted: #9CA3AF;
    --border-color: #E0E0E0;
    --brand-gradient: linear-gradient(135deg, #9333EA 0%, #FF8C42 100%);
    --spacing-xs: 0.25rem;
    --spacing-sm: 0.5rem;
    --spacing-md: 0.75rem;
    --spacing-lg: 1rem;
    --spacing-xl: 1.25rem;
    --spacing-2xl: 1.75rem;
    --radius-sm: 0.25rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
    --radius-2xl: 1.5rem;
}

/* Container */
.sgf-container {
    max-width: 85rem;
    width: 100%;
    margin: 0 auto;
    background: var(--color-white);
    border-radius: var(--radius-2xl);
    border: 0.125rem solid var(--border-color);
    box-shadow: 0 0.5rem 2rem rgba(0, 0, 0, 0.1);
    overflow: hidden;
    font-family: 'Inter', sans-serif;
    line-height: 1.5;
    color: var(--text-primary);
}

/* Banner Header */
.sgf-banner-header {
    background: var(--brand-gradient);
    padding: var(--spacing-xl) var(--spacing-lg);
    position: relative;
    overflow: hidden;
}

.sgf-banner-header::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 30rem;
    height: 30rem;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.2) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

.sgf-banner-content {
    position: relative;
    z-index: 2;
    text-align: left;
    max-width: calc(100% - 12rem);
    margin: 0;
}

.sgf-banner-badge {
    position: absolute;
    top: var(--spacing-xl);
    right: var(--spacing-lg);
    display: inline-block;
    background: rgba(255, 255, 255, 0.2);
    color: var(--color-white);
    padding: 0.25rem 0.75rem;
    border-radius: 100px;
    font-size: 0.75rem;
    font-weight: 700;
    margin-bottom: 0;
    border: 0.0625rem solid rgba(255, 255, 255, 0.3);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    z-index: 3;
}

.sgf-banner-title {
    font-size: clamp(1.75rem, 3.5vw + 0.5rem, 2.5rem);
    font-weight: 900;
    color: var(--color-white);
    margin-bottom: var(--spacing-sm);
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

.sgf-banner-description {
    font-size: clamp(0.9375rem, 1.5vw + 0.3rem, 1.125rem);
    color: rgba(255, 255, 255, 0.95);
    line-height: 1.6;
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

/* Content Wrapper */
.sgf-content-wrapper {
    padding: var(--sgf-content-padding-desktop, var(--spacing-xl) var(--spacing-lg));
}

/* Featured Game Carousel */
.sgf-featured-carousel-wrapper {
    position: relative;
    margin-bottom: var(--spacing-xl);
    overflow: hidden;
    width: 100%;
}

.sgf-featured-carousel {
    position: relative;
    display: flex;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    width: 100%;
}

.sgf-featured-game {
    flex: 0 0 100%;
    width: 100%;
    background: var(--brand-gradient);
    border-radius: var(--radius-xl);
    padding: var(--spacing-lg);
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-lg);
    align-items: center;
    position: relative;
    overflow: hidden;
    box-shadow: 0 0.5rem 2rem rgba(147, 51, 234, 0.3);
    min-height: 400px;
}

.sgf-featured-game + .sgf-featured-game {
    margin-left: var(--spacing-xl);
}

.sgf-featured-game::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 30rem;
    height: 30rem;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.15) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

.sgf-featured-content {
    position: relative;
    z-index: 2;
}

.sgf-featured-badge {
    display: inline-block;
    background: rgba(255, 255, 255, 0.2);
    color: var(--color-white);
    padding: 0.25rem 0.625rem;
    border-radius: 100px;
    font-size: 0.625rem;
    font-weight: 700;
    margin-bottom: var(--spacing-sm);
    border: 0.0625rem solid rgba(255, 255, 255, 0.3);
    text-transform: uppercase;
}

.sgf-featured-title {
    font-size: clamp(1.25rem, 1.8vw + 0.5rem, 1.875rem);
    font-weight: 900;
    color: var(--color-white);
    margin-bottom: var(--spacing-sm);
    line-height: 1.2;
}

.sgf-featured-description {
    font-size: clamp(0.8125rem, 0.9vw + 0.3rem, 0.9375rem);
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: var(--spacing-sm);
    line-height: 1.5;
}

.sgf-featured-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--spacing-sm);
    margin-bottom: var(--spacing-md);
}

.sgf-featured-stats + .sgf-featured-cta {
    display: flex;
    width: max-content;
}

.sgf-stat-item {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    padding: var(--spacing-sm);
    border-radius: var(--radius-lg);
    border: 0.0625rem solid rgba(255, 255, 255, 0.2);
    text-align: center;
}

.sgf-stat-label {
    font-size: 0.625rem;
    color: rgba(255, 255, 255, 0.8);
    text-transform: uppercase;
    font-weight: 600;
    margin-bottom: 0.1875rem;
    letter-spacing: 0.05em;
    text-align: center;
}

.sgf-stat-value {
    font-size: clamp(0.9375rem, 1vw + 0.3rem, 1.25rem);
    font-weight: 900;
    color: var(--color-white);
    text-align: center;
}

.sgf-featured-cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.375rem;
    background: var(--color-white);
    color: var(--color-purple);
    padding: 0.625rem 1.25rem;
    border-radius: var(--radius-md);
    font-weight: 700;
    font-size: 0.8125rem;
    text-decoration: none;
    transition: all 0.3s ease;
    text-transform: uppercase;
    margin: 0 auto;
    animation: sgf-pulse-glow 2s ease-in-out infinite;
    box-shadow: 0 0 1rem rgba(255, 255, 255, 0.3);
    border: none;
    cursor: pointer;
    font-family: 'Inter', sans-serif;
}

.sgf-featured-cta:hover {
    transform: translateY(-0.125rem) scale(1.05);
    box-shadow: 0 0.5rem 1.5rem rgba(255, 255, 255, 0.5);
    animation: none;
}

@keyframes sgf-pulse-glow {
    0%, 100% {
        box-shadow: 0 0 1rem rgba(255, 255, 255, 0.3), 0 0 2rem rgba(255, 255, 255, 0.2);
        transform: scale(1);
    }
    50% {
        box-shadow: 0 0 1.5rem rgba(255, 255, 255, 0.6), 0 0 3rem rgba(255, 255, 255, 0.4);
        transform: scale(1.03);
    }
}

.sgf-featured-image {
    position: relative;
    z-index: 2;
}

.sgf-featured-game-box {
    width: 100%;
    height: 16rem;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: var(--radius-xl);
    border: 0.125rem solid rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 1rem 3rem rgba(0, 0, 0, 0.3);
    overflow: hidden;
    position: relative;
}

.sgf-featured-game-box::after {
    content: '🎲';
    font-size: 5rem;
    opacity: 0.5;
}

.sgf-featured-game-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.sgf-featured-game-box:has(.sgf-featured-game-image)::after {
    display: none;
}

/* Carousel Numbered Navigation */
.sgf-carousel-dots {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: var(--spacing-lg);
}

.sgf-featured-carousel-wrapper .sgf-dot {
    min-width: 2.5rem;
    height: 2.5rem;
    border-radius: var(--radius-md);
    background: var(--color-white) !important;
    border: 0.125rem solid var(--color-purple) !important;
    color: var(--color-purple) !important;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 0;
    font-weight: 700;
    font-size: 0.875rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sgf-featured-carousel-wrapper .sgf-dot:hover {
    background: rgba(147, 51, 234, 0.1) !important;
    transform: translateY(-0.125rem);
}

.sgf-featured-carousel-wrapper .sgf-dot.active {
    background: var(--brand-gradient) !important;
    color: var(--color-white) !important;
    border-color: transparent !important;
    transform: scale(1.1);
    box-shadow: 0 0.25rem 0.75rem rgba(147, 51, 234, 0.3);
}

/* Filter Section */
.sgf-filter-section {
    background: linear-gradient(135deg, rgba(147, 51, 234, 0.05) 0%, rgba(255, 140, 66, 0.05) 100%);
    border: 0.125rem solid var(--border-color);
    border-radius: var(--radius-xl);
    padding: var(--spacing-md);
    margin-bottom: var(--spacing-xl);
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.sgf-filter-section::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 20rem;
    height: 20rem;
    background: radial-gradient(circle, rgba(147, 51, 234, 0.1) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

.sgf-filter-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--spacing-md);
    position: relative;
    z-index: 2;
    cursor: pointer;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
    padding: 0.5rem 0.75rem;
    border-radius: 0.75rem;
    transition: all 0.3s ease;
    border: 2px dashed transparent;
}

.sgf-filter-header:hover {
    background: rgba(147, 51, 234, 0.08);
    border-color: var(--color-purple);
    transform: translateY(-1px);
}

.sgf-filter-header::after {
    content: 'Click to Show Filters';
    position: absolute;
    right: 9rem;              /* Left of Reset button */
    font-size: 0.7rem;
    color: white;
    background: linear-gradient(135deg, var(--color-purple) 0%, #A855F7 100%);
    padding: 0.375rem 0.75rem;
    border-radius: 0.5rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border: 2px solid var(--color-purple);
    box-shadow: 0 2px 8px rgba(147, 51, 234, 0.3);
    transition: all 0.3s ease;
}

.sgf-filter-header:hover::after {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(147, 51, 234, 0.5);
    background: linear-gradient(135deg, #A855F7 0%, #C084FC 100%);
}

.sgf-filter-section.sgf-filter-open .sgf-filter-header::after {
    content: 'Click to Hide Filters';
    background: linear-gradient(135deg, var(--color-orange) 0%, #FF6B35 100%);
    border-color: var(--color-orange);
}

.sgf-filter-title {
    font-size: 1rem;
    font-weight: 900;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--brand-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    position: relative;
}

/* Remove emoji animation - button is enough visual cue */

.sgf-filter-reset {
    font-size: 0.7rem;
    color: var(--color-white);
    background: var(--color-purple);
    text-decoration: none;
    font-weight: 700;
    padding: 0.3rem 0.75rem;
    border-radius: var(--radius-md);
    transition: all 0.3s ease;
    border: 0.125rem solid var(--color-purple);
}

.sgf-filter-reset:hover {
    background: transparent;
    color: var(--color-purple);
    transform: translateY(-0.0625rem);
}

.sgf-filter-groups {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
    gap: var(--spacing-lg);
    position: relative;
    z-index: 2;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: all 0.4s ease;
    margin-top: 0;
}

.sgf-filter-section.sgf-filter-open .sgf-filter-groups {
    max-height: 800px;
    opacity: 1;
    margin-top: var(--spacing-lg);
}

.sgf-filter-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    background: var(--color-white);
    padding: var(--spacing-md);
    border-radius: var(--radius-lg);
    border: 0.125rem solid var(--border-color);
}

.sgf-filter-label {
    font-size: 0.75rem;
    font-weight: 800;
    color: var(--text-primary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    display: flex;
    align-items: center;
    gap: 0.375rem;
    cursor: pointer;
    position: relative;
}

.sgf-filter-label::before {
    content: '▸';
    color: var(--color-purple);
    font-size: 0.875rem;
    transition: transform 0.3s ease;
}

.sgf-filter-group.open .sgf-filter-label::before {
    transform: rotate(90deg);
}

.sgf-filter-expand-hint {
    display: none;
    font-size: 0.875rem;
    color: var(--color-purple);
    font-weight: 700;
    margin-left: auto;
    transition: transform 0.3s ease;
}

.sgf-filter-expand-hint::before {
    content: '▼';
}

.sgf-filter-group.open .sgf-filter-expand-hint::before {
    content: '▲';
}

.sgf-filter-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.375rem;
}

.sgf-filter-btn {
    padding: 0.375rem 0.875rem;
    border-radius: var(--radius-md);
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-secondary);
    background: var(--color-gray-light);
    border: 0.125rem solid transparent;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    position: relative;
}

.sgf-filter-btn:hover {
    background: var(--color-white);
    border-color: var(--color-purple);
    color: var(--color-purple);
    transform: translateY(-0.125rem);
    box-shadow: 0 0.25rem 0.75rem rgba(147, 51, 234, 0.2);
}

.sgf-filter-btn.active {
    background: var(--brand-gradient);
    color: var(--color-white);
    border-color: transparent;
    box-shadow: 0 0.25rem 0.75rem rgba(147, 51, 234, 0.3);
}

.sgf-filter-btn.active::before {
    content: '✓';
    margin-right: 0.25rem;
}

.sgf-filter-count {
    display: inline-block;
    margin-left: 0.5rem;
    background: var(--color-purple-light);
    color: var(--color-purple);
    padding: 0.125rem 0.5rem;
    border-radius: var(--radius-sm);
    font-size: 0.6875rem;
    font-weight: 900;
    -webkit-text-fill-color: var(--color-purple);
}

/* Game Recommender Grid */
.sgf-game-recommender {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(18rem, 1fr));
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-xl);
}

.sgf-game-card {
    background: var(--color-white);
    border: 0.125rem solid var(--border-color);
    border-radius: var(--radius-xl);
    overflow: hidden;
    transition: all 0.3s ease;
    position: relative;
    box-shadow: 0 0.125rem 0.5rem rgba(0, 0, 0, 0.08);
}

.sgf-game-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 0.25rem;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.sgf-game-card.sgf-color-purple::before {
    background: var(--color-purple);
}

.sgf-game-card.sgf-color-orange::before {
    background: var(--color-orange);
}

.sgf-game-card.sgf-color-green::before {
    background: var(--color-green);
}

.sgf-game-card:hover {
    transform: translateY(-0.5rem);
    box-shadow: 0 1rem 3rem rgba(0, 0, 0, 0.15);
    border-color: transparent;
}

.sgf-game-card:hover::before {
    opacity: 1;
}

.sgf-game-image-box {
    width: 100%;
    height: 9rem;
    background: linear-gradient(135deg, #1A1A1A 0%, #2D2D2D 100%);
    position: relative;
    overflow: hidden;
}

.sgf-game-image-box::after {
    content: '🎰';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 2.5rem;
    opacity: 0.3;
}

.sgf-game-badge {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    padding: 0.1875rem 0.5rem;
    border-radius: var(--radius-md);
    font-size: 0.625rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    backdrop-filter: blur(10px);
    z-index: 2;
}

.sgf-game-card.sgf-color-purple .sgf-game-badge {
    background: rgba(147, 51, 234, 0.9);
    color: var(--color-white);
}

.sgf-game-card.sgf-color-orange .sgf-game-badge {
    background: rgba(255, 140, 66, 0.9);
    color: var(--color-white);
}

.sgf-game-card.sgf-color-green .sgf-game-badge {
    background: rgba(16, 185, 129, 0.9);
    color: var(--color-white);
}

.sgf-game-provider {
    position: absolute;
    bottom: 0.5rem;
    left: 0.5rem;
    background: rgba(255, 255, 255, 0.95);
    padding: 0.1875rem 0.5rem;
    border-radius: var(--radius-md);
    font-size: 0.625rem;
    font-weight: 700;
    color: var(--text-primary);
}

.sgf-game-content {
    padding: var(--spacing-md);
}

.sgf-game-title {
    font-size: clamp(0.9375rem, 0.95vw + 0.3rem, 1.0625rem);
    font-weight: 800;
    margin-bottom: var(--spacing-sm);
    color: var(--text-primary);
    line-height: 1.4;
}

.sgf-game-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.375rem;
    margin-bottom: var(--spacing-sm);
}

.sgf-meta-item {
    display: flex;
    align-items: center;
    gap: 0.1875rem;
    font-size: 0.75rem;
    color: var(--text-secondary);
    background: var(--color-gray-light);
    padding: 0.1875rem 0.375rem;
    border-radius: var(--radius-sm);
    font-weight: 600;
}

.sgf-game-features {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.25rem;
    margin-bottom: var(--spacing-sm);
}

.sgf-feature-item {
    display: flex;
    align-items: center;
    gap: 0.1875rem;
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.sgf-feature-item::before {
    content: '✓';
    color: var(--color-green);
    font-weight: 700;
    font-size: 0.75rem;
}

.sgf-game-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.375rem;
}

.sgf-game-play-btn {
    padding: 0.5rem 0.75rem;
    border-radius: var(--radius-md);
    font-weight: 700;
    font-size: 0.75rem;
    text-decoration: none;
    text-align: center;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.sgf-btn-primary {
    background: var(--color-green);
    color: var(--color-white);
}

.sgf-btn-primary:hover {
    background: #0D9F6E;
    transform: translateY(-0.125rem);
    box-shadow: 0 0.375rem 1rem rgba(16, 185, 129, 0.3);
}

.sgf-btn-secondary {
    background: var(--color-white);
    color: var(--text-primary);
    border: 0.125rem solid var(--border-color);
}

.sgf-btn-secondary:hover {
    background: var(--color-gray-light);
    border-color: var(--color-gray-dark);
}

/* Responsive - Tablet */
@media (max-width: 75rem) {
    .sgf-featured-game {
        grid-template-columns: 1fr;
    }

    .sgf-featured-image {
        order: -1;
    }

    .sgf-featured-game-box {
        height: 15rem;
    }
}

/* Responsive - Mobile with calc(-50vw + 50%) Full Width */
@media (max-width: 48rem) {
    /* Mobile Full-Width Technique */
    .sgf-container {
        width: 100vw !important;
        max-width: none !important;
        margin-left: calc(-50vw + 50%) !important;
        border-radius: 0;
        border-left: none;
        border-right: none;
    }

    .sgf-banner-header {
        padding: var(--spacing-lg) var(--spacing-md);
        border-radius: var(--radius-xl) var(--radius-xl) 0 0;
    }
    
    .sgf-banner-badge {
        position: static;              /* Not absolute on mobile */
        display: block;
        float: right;                  /* Float to right */
        margin-bottom: var(--spacing-sm);
    }
    
    .sgf-banner-content {
        max-width: 100%;              /* Full width on mobile */
        clear: both;                   /* Clear the float */
    }

    .sgf-banner-title {
        font-size: clamp(1.5rem, 5vw, 2rem);
        white-space: normal;          /* Allow wrapping on mobile */
    }
    
    .sgf-banner-description {
        white-space: normal;          /* Allow wrapping on mobile */
    }

    .sgf-content-wrapper {
        padding: var(--sgf-content-padding-mobile, var(--spacing-lg) var(--spacing-md));
    }

    .sgf-filter-section {
        padding: var(--spacing-md);
    }

    .sgf-filter-groups {
        grid-template-columns: 1fr;
        gap: var(--spacing-sm);
    }

    .sgf-filter-group {
        cursor: pointer;
    }

    .sgf-filter-buttons {
        max-height: 0;
        overflow: hidden;
        opacity: 0;
        transition: all 0.3s ease;
        margin-top: 0;
    }

    .sgf-filter-group.open .sgf-filter-buttons {
        max-height: 500px;
        opacity: 1;
        margin-top: 0.5rem;
    }

    /* Mobile filter buttons - same size as modal */
    .sgf-filter-btn {
        padding: 0.5rem 0.7rem;
        font-size: 0.8rem;
        border-radius: 6px;
    }

    .sgf-filter-show-more {
        padding: 0.5rem 0.7rem;
        font-size: 0.8rem;
        border-radius: 6px;
    }

    .sgf-filter-header {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        gap: var(--spacing-sm);
    }

    .sgf-filter-title {
        font-size: 1rem;
    }

    .sgf-filter-expand-hint {
        display: block;
    }

    .sgf-filter-group.open .sgf-filter-expand-hint {
        display: none;
    }

    .sgf-game-recommender {
        grid-template-columns: 1fr;
    }

    .sgf-game-image-box {
        height: 10rem;
    }

    .sgf-game-actions {
        grid-template-columns: 1fr;
    }

    .sgf-featured-stats {
        grid-template-columns: repeat(3, 1fr);
        gap: var(--spacing-sm);
    }

    .sgf-stat-item {
        padding: var(--spacing-sm);
    }

    .sgf-featured-game-box {
        height: 12rem;
    }
}

/* Responsive - Small Mobile */
@media (max-width: 30rem) {
    .sgf-game-image-box {
        height: 8rem;
    }

    .sgf-game-meta {
        gap: 0.25rem;
    }

    .sgf-featured-stats {
        gap: 0.5rem;
    }

    .sgf-stat-label {
        font-size: 0.625rem;
    }

    .sgf-stat-value {
        font-size: 1rem;
    }
}

/* 32" Display Full Width Support */
@media (min-width: 100rem) {
    .sgf-container {
        max-width: 100%;
    }
}

/* ========================================
   PAGINATION STYLE 3: MODERN COMPACT
   Desktop only (hidden on mobile)
   ======================================== */
.sgf-pagination-v3 {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: var(--spacing-xl);
    margin-bottom: var(--spacing-xl);
    padding: 1.25rem 1.5rem;
    background: var(--color-white);
    border-radius: var(--radius-xl);
    border: 0.125rem solid var(--border-color);
    box-shadow: 0 0.25rem 0.75rem rgba(0, 0, 0, 0.08);
}

.sgf-pagination-v3 .sgf-left-section,
.sgf-pagination-v3 .sgf-right-section {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.sgf-pagination-v3 .sgf-page-info-text {
    font-size: 0.9375rem;
    color: var(--text-secondary);
    font-weight: 600;
    white-space: nowrap;
}

.sgf-pagination-v3 .sgf-page-numbers {
    display: flex;
    align-items: center;
    gap: 0.375rem;
}

.sgf-pagination-v3 button {
    background: var(--color-white);
    border: 0.125rem solid var(--border-color);
    color: var(--text-primary);
    padding: 0.5rem 0.875rem;
    border-radius: var(--radius-md);
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: 'Inter', sans-serif;
    font-size: 0.875rem;
    min-width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sgf-pagination-v3 .sgf-nav-btn {
    background: var(--color-purple);
    border-color: var(--color-purple);
    color: var(--color-white);
    padding: 0.5rem 1.25rem;
    font-size: 0.875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.sgf-pagination-v3 .sgf-nav-btn:hover:not(:disabled) {
    background: #7E22CE;
    border-color: #7E22CE;
    box-shadow: 0 0.25rem 0.75rem rgba(126, 34, 206, 0.3);
}

.sgf-pagination-v3 .sgf-nav-btn:disabled {
    background: var(--color-gray-light);
    border-color: var(--border-color);
    color: #9CA3AF;
    cursor: not-allowed;
}

.sgf-pagination-v3 button:hover:not(:disabled):not(.sgf-nav-btn) {
    background: var(--color-gray-light);
    border-color: var(--color-purple);
    color: var(--color-purple);
}

.sgf-pagination-v3 button.active {
    background: var(--brand-gradient);
    border-color: transparent;
    color: var(--color-white);
    box-shadow: 0 0.25rem 0.75rem rgba(147, 51, 234, 0.3);
}

.sgf-pagination-v3 .sgf-dots {
    padding: 0 0.25rem;
    color: #9CA3AF;
    font-weight: 700;
}

.sgf-pagination-v3 .sgf-jump-to {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.sgf-pagination-v3 .sgf-jump-to span {
    font-size: 0.875rem;
    color: var(--text-secondary);
    font-weight: 600;
    white-space: nowrap;
}

.sgf-pagination-v3 .sgf-jump-to input {
    width: 60px;
    padding: 0.375rem 0.5rem;
    border: 0.125rem solid var(--border-color);
    border-radius: 0.375rem;
    text-align: center;
    font-weight: 700;
    font-family: 'Inter', sans-serif;
    font-size: 0.875rem;
}

.sgf-pagination-v3 .sgf-jump-to button {
    padding: 0.375rem 0.75rem;
    font-size: 0.8125rem;
}

/* Hide pagination on mobile */
@media (max-width: 48rem) {
    .sgf-pagination-v3 {
        display: none !important;
    }
}

/* Loading state for pagination */
.sgf-game-recommender.sgf-loading {
    opacity: 0.5;
    pointer-events: none;
}

/* Features Modal */
.sgf-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    display: none;
}

.sgf-modal.active {
    display: flex !important;
    align-items: center;
    justify-content: center;
}

/* Mobile - Add top padding for browser URL bar */
@media (max-width: 768px) {
    .sgf-modal.active {
        align-items: flex-start;    /* Start from top instead of center */
        padding-top: 3rem;          /* Space for browser URL bar */
    }
    
    /* Filter header - Stack buttons vertically on mobile */
    .sgf-filter-header {
        flex-direction: column;
        align-items: stretch;
        gap: 0.75rem;
    }
    
    .sgf-filter-header::after {
        position: static;       /* Not absolute on mobile */
        right: auto;
        width: 100%;
        text-align: center;
        margin-top: 0.5rem;
    }
    
    .sgf-filter-reset {
        width: 100%;            /* Full width on mobile */
        text-align: center;
    }
}

.sgf-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
}

.sgf-modal-content {
    position: relative;
    background: #fff;
    border-radius: 12px;
    padding: 2rem;
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: sgfModalFadeIn 0.3s ease;
    z-index: 10001;
}

@keyframes sgfModalFadeIn {
    from {
        opacity: 0;
        transform: translateY(-20px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.sgf-modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    font-size: 2rem;
    line-height: 1;
    color: #666;
    cursor: pointer;
    transition: color 0.2s;
    padding: 0;
    width: 32px;
    height: 32px;
}

.sgf-modal-close:hover {
    color: #000;
}

.sgf-modal-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0 0 1.5rem 0;
    color: #1a1a1a;
    padding-right: 2rem;
}

.sgf-modal-features {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.sgf-modal-features .sgf-feature-item {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
    transition: transform 0.2s, box-shadow 0.2s;
}

.sgf-modal-features .sgf-feature-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.sgf-feature-more {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
    border: none;
    padding: 0.35rem 0.7rem;
    border-radius: 5px;
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 2px 6px rgba(245, 87, 108, 0.3);
    white-space: nowrap;
}

.sgf-feature-more:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(245, 87, 108, 0.4);
}

/* Mobile Modal Adjustments */
@media (max-width: 48rem) {
    .sgf-modal-content {
        width: 92%;
        padding: 1rem;
        max-height: 85vh;
        border-radius: 10px;
    }

    .sgf-modal-title {
        font-size: 1rem;
        margin-bottom: 0.75rem;
        padding-right: 1.5rem;
    }

    .sgf-modal-close {
        top: 0.75rem;
        right: 0.75rem;
        font-size: 1.5rem;
        width: 28px;
        height: 28px;
    }

    .sgf-modal-features {
        gap: 0.5rem;
    }

    .sgf-modal-features .sgf-feature-item {
        padding: 0.5rem 0.7rem;
        font-size: 0.8rem;
    }

    /* Filter modal buttons - smaller on mobile */
    .sgf-modal-filter-buttons {
        gap: 0.5rem;
    }

    .sgf-modal-filter-buttons .sgf-filter-btn {
        padding: 0.5rem 0.7rem;
        font-size: 0.8rem;
        border-radius: 6px;
    }
}

/* Filter Modal Specific Styles */
.sgf-modal-filter-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.sgf-modal-filter-buttons .sgf-filter-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
    transition: transform 0.2s, box-shadow 0.2s;
    text-decoration: none;
    display: inline-block;
}

.sgf-modal-filter-buttons .sgf-filter-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.sgf-modal-filter-buttons .sgf-filter-btn.active {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    box-shadow: 0 2px 8px rgba(245, 87, 108, 0.3);
}

.sgf-filter-show-more {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 2px 6px rgba(245, 87, 108, 0.3);
}

.sgf-filter-show-more:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(245, 87, 108, 0.4);
}

/* Iframe Modal Specific Styles */
/* Game Iframe Modal - Sidebar Layout */
.sgf-iframe-modal .sgf-modal-content {
    max-width: 1600px;
    width: 95vw;
    height: 90vh;
    max-height: 90vh;
    padding: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

/* Laptop optimization (1024px - 1440px) */
@media (min-width: 1024px) and (max-width: 1440px) {
    .sgf-iframe-modal .sgf-modal-content {
        width: 92vw;
        max-width: 1400px;
    }
}

/* Small laptop optimization (1024px - 1280px) */
@media (min-width: 1024px) and (max-width: 1280px) {
    .sgf-iframe-modal .sgf-modal-content {
        width: 90vw;
        max-width: 1200px;
    }
}

.sgf-iframe-modal .sgf-modal-title {
    padding: 1.25rem 1.5rem;
    margin: 0;
    background: var(--brand-gradient);
    color: white;
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
    font-size: 1.5rem;
    font-weight: 700;
}

.sgf-iframe-modal .sgf-modal-close {
    position: absolute;
    top: 1.25rem;
    right: 1.25rem;
    z-index: 10;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.3);
    width: 36px;
    height: 36px;
    border-radius: 8px;
    font-size: 1.5rem;
}

.sgf-iframe-modal .sgf-modal-close:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Modal Body - Split Layout */
.sgf-iframe-modal-body {
    display: flex;
    flex: 1;
    overflow: hidden;
}

/* Iframe Section */
.sgf-iframe-section {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    background: #0D1117;
    padding: 1.5rem;
    overflow-y: auto;
}

.sgf-iframe-wrapper {
    width: 100%;
    max-width: 1100px;
    aspect-ratio: 16/9;        /* Proper 16:9 ratio */
    background: #000;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    flex-shrink: 0;
    position: relative;        /* For fullscreen button */
}

/* Fullscreen Button */
.sgf-fullscreen-btn {
    position: absolute;
    bottom: 1rem;
    right: 1rem;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(10px);
    color: white;
    border: 2px solid rgba(245, 158, 11, 0.5);
    border-radius: 8px;
    padding: 0.5rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 100;
    display: flex;
    align-items: center;
    gap: 0.375rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.sgf-fullscreen-btn:hover {
    background: rgba(245, 158, 11, 0.9);
    border-color: #F59E0B;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.4);
}

.sgf-fullscreen-btn::before {
    content: '⛶';
    font-size: 1rem;
}

/* Mobile - Fullscreen button IN MODAL HEADER (right side, above X button) */
@media (max-width: 768px) {
    .sgf-iframe-modal .sgf-modal-title {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding-right: 3rem;    /* Space for close button */
    }
    
    .sgf-fullscreen-btn {
        position: absolute;
        top: 0.35rem;          /* Higher - ABOVE the X button */
        right: 0.5rem;         /* RIGHT side */
        left: auto;
        bottom: auto;
        padding: 0.375rem 0.625rem;
        font-size: 0.65rem;
        z-index: 999;
        background: rgba(255, 255, 255, 0.2);
        border-color: rgba(255, 255, 255, 0.4);
    }
    
    .sgf-fullscreen-btn:hover {
        background: rgba(255, 255, 255, 0.3);
    }
    
    .sgf-fullscreen-btn::before {
        font-size: 0.875rem;
        color: white;
    }
    
    /* Close button - Position below fullscreen */
    .sgf-iframe-modal .sgf-modal-close {
        top: 2.25rem;          /* Below fullscreen button */
        right: 0.5rem;
    }
    
    /* Remove extra margin from iframe */
    .sgf-iframe-wrapper {
        margin-top: 0;
    }
}

/* When in fullscreen mode */
.sgf-iframe-wrapper:fullscreen {
    max-width: 100vw;
    width: 100vw;
    height: 100vh;
    border-radius: 0;
}

.sgf-iframe-wrapper:-webkit-full-screen {
    max-width: 100vw;
    width: 100vw;
    height: 100vh;
    border-radius: 0;
}

.sgf-iframe-wrapper:-moz-full-screen {
    max-width: 100vw;
    width: 100vw;
    height: 100vh;
    border-radius: 0;
}

.sgf-iframe-wrapper:-ms-fullscreen {
    max-width: 100vw;
    width: 100vw;
    height: 100vh;
    border-radius: 0;
}

/* Exit fullscreen button */
.sgf-iframe-wrapper:fullscreen .sgf-fullscreen-btn::before,
.sgf-iframe-wrapper:-webkit-full-screen .sgf-fullscreen-btn::before,
.sgf-iframe-wrapper:-moz-full-screen .sgf-fullscreen-btn::before {
    content: '⛶';  /* Exit icon */
}

/* Laptop iframe optimization */
@media (min-width: 1024px) and (max-width: 1440px) {
    .sgf-iframe-wrapper {
        max-width: 950px;
    }
    
    .sgf-game-specs {
        max-width: 950px;
    }
}

/* Small laptop iframe optimization */
@media (min-width: 1024px) and (max-width: 1280px) {
    .sgf-iframe-wrapper {
        max-width: 850px;
    }
    
    .sgf-game-specs {
        max-width: 850px;
    }
}

.sgf-iframe-container {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #0D1117;
    position: relative;
}

.sgf-iframe-container iframe {
    width: 100%;
    height: 100%;
    border: none;
    display: block;
}

/* Casino Sidebar */
.sgf-casino-sidebar {
    width: 340px;
    background: #1C2128;
    padding: 1.5rem;
    overflow-y: auto;
    border-left: 1px solid #30363D;
}

/* Laptop sidebar optimization */
@media (min-width: 1024px) and (max-width: 1440px) {
    .sgf-casino-sidebar {
        width: 320px;
        padding: 1.25rem;
    }
}

/* Small laptop sidebar optimization */
@media (min-width: 1024px) and (max-width: 1280px) {
    .sgf-casino-sidebar {
        width: 300px;
        padding: 1rem;
    }
}

/* Game Specifications - Modern Grid Layout */
.sgf-game-specs {
    margin-top: 1.5rem;
    width: 100%;
    max-width: 1100px;
    position: relative;
}

.sgf-specs-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.75rem;
    background: #161B22;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.sgf-specs-header {
    grid-column: 1 / -1;
    background: linear-gradient(135deg, #F59E0B 0%, #F97316 100%);
    margin: -1.5rem -1.5rem 1rem -1.5rem;
    padding: 0.875rem 1.5rem;
    border-radius: 12px 12px 0 0;
}

#sgf-specs-container {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.75rem;
}

.sgf-specs-header h4,
.sgf-specs-header p {
    color: #0D1117;
    font-weight: 700;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 0;
}

.sgf-spec-item {
    background: #0D1117;
    padding: 0.875rem 1rem;
    border-radius: 8px;
    border: 1px solid #21262D;
    transition: all 0.2s;
}

.sgf-spec-item:hover {
    background: #1C2128;
    border-color: #F59E0B;
    transform: translateY(-1px);
}

.sgf-spec-label {
    color: #8B949E;
    font-size: 0.7rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.25rem;
    line-height: 1.2;
}

.sgf-spec-value {
    color: white;
    font-size: 0.9rem;
    font-weight: 600;
    line-height: 1.3;
}

/* Read Review Button - Top Right Corner */
.sgf-read-review-btn {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    display: inline-block;
    background: linear-gradient(135deg, #9333EA 0%, #A855F7 100%);
    color: white;
    padding: 0.625rem 1.25rem;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.875rem;
    text-decoration: none;
    transition: all 0.3s;
    box-shadow: 0 4px 12px rgba(147, 51, 234, 0.3);
    z-index: 10;
}

.sgf-read-review-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(147, 51, 234, 0.5);
    background: linear-gradient(135deg, #A855F7 0%, #C084FC 100%);
}

/* Laptop/Tablet responsive - Goldilocks Zone Optimization */
@media (max-width: 1200px) {
    /* Specs Grid - 2 columns with reduced spacing */
    .sgf-specs-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.5rem;              /* Was 0.75rem - reduced 33% */
        padding: 1rem;            /* Was 1.5rem - reduced 33% */
    }
    
    #sgf-specs-container {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.5rem;              /* Was 0.75rem - reduced 33% */
    }
    
    .sgf-specs-header {
        margin: -1rem -1rem 0.75rem -1rem;  /* Adjusted for new padding */
        padding: 0.65rem 1rem;    /* Was 0.875rem 1.5rem - reduced 25% */
    }
    
    .sgf-specs-header h4,
    .sgf-specs-header p {
        font-size: 0.75rem;       /* Was 0.875rem - reduced 15% */
    }
    
    /* Spec Items - Reduced size */
    .sgf-spec-item {
        padding: 0.65rem 0.75rem; /* Was 0.875rem 1rem - reduced 25% */
    }
    
    .sgf-spec-label {
        font-size: 0.625rem;      /* Was 0.7rem - reduced 11% */
        margin-bottom: 0.2rem;    /* Was 0.25rem - reduced 20% */
    }
    
    .sgf-spec-value {
        font-size: 0.8rem;        /* Was 0.9rem - reduced 11% */
    }
    
    /* Read Review Button - Smaller */
    .sgf-read-review-btn {
        padding: 0.5rem 1rem;     /* Was 0.625rem 1.25rem - reduced 20% */
        font-size: 0.75rem;       /* Was 0.875rem - reduced 15% */
    }
    
    /* Modal Content - Reduced padding */
    .sgf-iframe-modal-content {
        padding: 1rem;            /* Was default - reduced padding */
        max-width: 95%;           /* Slightly narrower */
    }
    
    /* Game Iframe - Laptop optimization */
    .sgf-iframe-wrapper {
        max-width: 100%;
        aspect-ratio: 16/9;       /* Maintain 16:9 on laptop */
    }
    
    /* Game Specs Section */
    .sgf-game-specs {
        max-width: 100%;
    }
    
    /* Casino Sidebar - Compact */
    .sgf-casino-sidebar {
        padding: 1rem;            /* Reduced padding */
    }
    
    .sgf-casino-sidebar-title {
        font-size: 1rem;          /* Was 1.125rem - reduced 11% */
        margin-bottom: 0.75rem;   /* Was 1rem - reduced 25% */
    }
    
    .sgf-casino-card {
        padding: 0.875rem;        /* Reduced padding */
        margin-bottom: 0.75rem;   /* Reduced spacing */
    }
    
    .sgf-casino-name {
        font-size: 0.875rem;      /* Reduced font */
        margin-bottom: 0.35rem;   /* Reduced spacing */
    }
    
    .sgf-casino-bonus {
        font-size: 0.75rem;       /* Reduced font */
        margin-bottom: 0.5rem;    /* Reduced spacing */
    }
    
    .sgf-casino-cta {
        padding: 0.5rem 1rem;     /* Reduced padding */
        font-size: 0.75rem;       /* Reduced font */
    }
}

@media (max-width: 768px) {
    
    #sgf-specs-container {
        grid-template-columns: repeat(3, 1fr);  /* Changed from 2 to 3 columns */
        max-height: 0;
        overflow: hidden;
        opacity: 0;
        transition: all 0.4s ease;
        margin: 0;
        padding: 0 1.25rem;
        gap: 0.5rem;              /* Smaller gap for 3 columns */
    }
    
    #sgf-specs-container.sgf-specs-open {
        max-height: 1000px;
        opacity: 1;
        margin-top: 1rem;
        padding: 1.25rem;
    }
    
    .sgf-specs-header {
        margin: 0;
        padding: 0.875rem 1.25rem;
        border-radius: 12px;
        cursor: pointer;
        position: relative;
        transition: all 0.3s ease;
        user-select: none;
        -webkit-tap-highlight-color: transparent;
    }
    
    .sgf-specs-header:hover {
        background: linear-gradient(135deg, #FF8C42 0%, #FF6B35 100%);
        transform: translateY(-1px);
    }
    
    .sgf-specs-header::after {
        content: '▼';
        position: absolute;
        right: 1.25rem;
        top: 50%;
        transform: translateY(-50%);
        font-size: 0.75rem;
        color: #0D1117;
        transition: transform 0.3s ease;
    }
    
    .sgf-specs-header.sgf-specs-active::after {
        transform: translateY(-50%) rotate(180deg);
    }
    
    /* Mobile Layout Order: Iframe -> Casino -> Review -> Specs */
    .sgf-iframe-modal-body {
        display: flex;
        flex-direction: column;
    }
    
    .sgf-iframe-section {
        display: flex;
        flex-direction: column;
    }
    
    /* 1. Iframe - TOP */
    .sgf-iframe-wrapper {
        order: 1;
        width: 100%;
        max-width: 100%;
        aspect-ratio: 16/9;       /* 16:9 ratio on mobile - LARGER! */
        margin-bottom: 1.5rem;    /* Space below iframe */
    }
    
    /* 2. Casino Sidebar - AFTER iframe */
    .sgf-casino-sidebar {
        order: 2;
        display: flex;
        flex-direction: row;
        gap: 1rem;
        overflow-x: auto;
        overflow-y: hidden;
        scroll-behavior: smooth;
        -webkit-overflow-scrolling: touch;
        padding: 1rem;
        margin-bottom: 1.5rem;    /* Space below casino */
        width: 100%;
        
        /* Show scrollbar */
        scrollbar-width: thin;
        scrollbar-color: #F59E0B #161B22;
    }
    
    /* 3. Game Specs Section (contains Review + Specs) */
    .sgf-game-specs {
        order: 3;
        display: flex;
        flex-direction: column;
    }
    
    /* 4. Read Review Button */
    .sgf-read-review-btn {
        order: 1;                 /* First in specs section */
        position: static;
        display: block;
        margin-top: 0;
        margin-bottom: 1.5rem;    /* Space below review button */
        text-align: center;
    }
    
    /* 5. Specs Grid - LAST */
    .sgf-specs-grid {
        order: 2;                 /* After review button */
        grid-template-columns: 1fr;
        padding: 0;
        margin-top: 0;
    }
    
    .sgf-casino-sidebar::-webkit-scrollbar {
        height: 10px;              /* Increased from 6px - easier to grab */
    }
    
    .sgf-casino-sidebar::-webkit-scrollbar-track {
        background: #161B22;
        border-radius: 5px;
        border: 1px solid #30363D;  /* Border for visibility */
    }
    
    .sgf-casino-sidebar::-webkit-scrollbar-thumb {
        background: linear-gradient(135deg, #F59E0B 0%, #FF8C42 100%);  /* Gradient */
        border-radius: 5px;
        border: 2px solid #161B22;  /* Inner border */
        box-shadow: 0 2px 6px rgba(245, 158, 11, 0.3);  /* Glow effect */
    }
    
    .sgf-casino-sidebar::-webkit-scrollbar-thumb:hover {
        background: linear-gradient(135deg, #FF8C42 0%, #F59E0B 100%);
    }
    
    .sgf-casino-sidebar::-webkit-scrollbar-thumb:active {
        background: #FF6B35;   /* Brighter when dragging */
    }
    
    .sgf-casino-sidebar-title {
        display: none; /* Hide title on mobile carousel */
    }
    
    .sgf-casino-card {
        min-width: 280px;      /* Fixed width for carousel */
        flex-shrink: 0;        /* Prevent shrinking */
        margin-bottom: 0;      /* Remove bottom margin */
        cursor: grab;          /* Show it's draggable */
    }
    
    .sgf-casino-card:active {
        cursor: grabbing;      /* When dragging */
    }
}

@media (max-width: 480px) {
    .sgf-specs-grid {
        grid-template-columns: 1fr;
    }
    
    #sgf-specs-container {
        grid-template-columns: repeat(3, 1fr);  /* KEEP 3 columns on small mobile too! */
        gap: 0.375rem;              /* Smaller gap for tiny screens */
    }
    
    #sgf-specs-container.sgf-specs-open {
        padding: 1rem;
    }
    
    .sgf-spec-item {
        padding: 0.5rem 0.625rem;   /* Even more compact */
    }
    
    .sgf-spec-label {
        font-size: 0.5rem;          /* Smaller label */
    }
    
    .sgf-spec-value {
        font-size: 0.7rem;          /* Smaller value */
    }
}

.sgf-casino-sidebar-title {
    color: white;
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

/* Casino Card */
.sgf-casino-card {
    background: linear-gradient(135deg, var(--color-purple) 0%, #7928CA 100%);
    border-radius: 12px;
    padding: 1rem;
    margin-bottom: 0.75rem;
    transition: transform 0.2s;
    cursor: pointer;
}

.sgf-casino-card:hover {
    transform: translateY(-2px);
}

.sgf-casino-card:nth-child(2) {
    background: linear-gradient(135deg, var(--color-orange) 0%, #FF6B35 100%);
}

.sgf-casino-card:nth-child(3) {
    background: linear-gradient(135deg, var(--color-green) 0%, #059669 100%);
}

.sgf-casino-card:nth-child(4) {
    background: linear-gradient(135deg, var(--color-red) 0%, #DC2626 100%);
}

.sgf-casino-name {
    color: white;
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.sgf-casino-bonus {
    color: #FCD34D;
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 0.75rem;
}

.sgf-casino-cta {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    padding: 0.625rem 1rem;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    width: 100%;
    transition: background 0.2s;
    text-decoration: none;
    display: block;
    text-align: center;
}

.sgf-casino-cta:hover {
    background: rgba(255, 255, 255, 0.3);
}

.sgf-loading,
.sgf-error {
    color: white;
    text-align: center;
    padding: 2rem;
    font-size: 1.125rem;
}

.sgf-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
}

.sgf-loading::before {
    content: '';
    width: 2rem;
    height: 2rem;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: sgf-spin 0.8s linear infinite;
}

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

.sgf-error {
    color: #EF4444;
}

/* MOBILE OPTIMIZED WIDTH - Kompakt Mobil Layout Látható Keretekkel */
@media (max-width: 1024px) {
    /* Modal overlay - Add breathing space + top offset for URL bar */
    .sgf-modal.active {
        padding: 0.5rem;         /* 8px térköz körben - LÁTSZÓDNAK A KERETEK */
        padding-top: 3.5rem;     /* Extra top space for browser URL bar */
        align-items: flex-start; /* Start from top */
    }
    
    .sgf-iframe-modal .sgf-modal-content {
        max-width: calc(100vw - 1rem);      /* Full width MINUS 0.5rem * 2 padding */
        width: calc(100vw - 1rem);          /* Responsive width with breathing space */
        height: calc(100vh - 4rem);         /* Adjusted for top padding */
        max-height: calc(100vh - 4rem);
        border-radius: 0.75rem;             /* 12px kerek sarkok - LÁTSZÓDIK! */
        box-shadow: 0 1.25rem 3.75rem rgba(0, 0, 0, 0.4);  /* Enhanced shadow */
    }
    
    .sgf-iframe-modal .sgf-modal-title {
        font-size: 1.25rem;
        padding: 1rem 1.25rem;          /* Kompakt padding */
        border-radius: 0.75rem 0.75rem 0 0;  /* Match modal radius */
    }
    
    .sgf-iframe-modal .sgf-modal-close {
        top: 0.5rem;           /* Moved higher - was 1rem */
        right: 0.5rem;         /* Moved to edge - was 1rem */
        width: 36px;           /* Slightly larger for easier tap */
        height: 36px;
        z-index: 999;          /* Above everything */
    }

    .sgf-iframe-modal-body {
        flex-direction: column;
    }

    .sgf-casino-sidebar {
        width: 100%;
        border-left: none;
        border-top: 1px solid #30363D;
        max-height: 300px;
    }

    .sgf-iframe-section {
        padding: 1rem;              /* Kompakt belső térköz */
    }

    .sgf-iframe-wrapper {
        max-width: 100%;
        border-radius: 0.625rem;    /* Kisebb kerek sarkok az iframe-nek is */
    }
}

/* Még kisebb mobil - További optimalizáció */
@media (max-width: 640px) {
    .sgf-modal.active {
        padding: 0.375rem;          /* 6px térköz - még kompaktabb */
        padding-top: 3rem;          /* Adjusted top space for URL bar */
    }
    
    .sgf-iframe-modal .sgf-modal-content {
        max-width: calc(100vw - 0.75rem);
        width: calc(100vw - 0.75rem);
        height: calc(100vh - 3.5rem);  /* Adjusted for top padding */
        max-height: calc(100vh - 3.5rem);
        border-radius: 0.625rem;    /* 10px - még kisebb sarkok */
    }
    
    .sgf-iframe-modal .sgf-modal-title {
        padding: 0.75rem 1rem;      /* Még kompaktabb */
        font-size: 1.125rem;        /* Kisebb cím */
        border-radius: 0.625rem 0.625rem 0 0;
    }
    
    .sgf-iframe-section {
        padding: 0.75rem;           /* 12px - még kompaktabb */
    }
}

/* ====================================
   MOBILE PAGINATION - ARROW NAVIGATION
   4 cards per page on mobile
   ==================================== */

/* Mobile Pagination Container - Show only on mobile (<= 768px) */
.sgf-mobile-pagination {
    background: var(--color-white);
    border: 0.125rem solid var(--border-color);
    border-radius: var(--radius-xl);
    padding: 1rem;
    display: none; /* Hidden on desktop */
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-top: 1rem;
    box-shadow: 0 0.25rem 0.75rem rgba(0, 0, 0, 0.08);
}

.sgf-mobile-pagination-btn {
    background: var(--color-purple);
    color: var(--color-white);
    border: none;
    padding: 0.75rem 1.25rem;
    border-radius: var(--radius-md);
    font-weight: 700;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.sgf-mobile-pagination-btn:hover {
    transform: translateY(-0.125rem);
    box-shadow: 0 0.375rem 1rem rgba(147, 51, 234, 0.3);
}

.sgf-mobile-pagination-btn:disabled {
    background: var(--color-gray-medium);
    color: var(--text-muted);
    cursor: not-allowed;
    box-shadow: none;
}

.sgf-mobile-pagination-info {
    text-align: center;
    flex-grow: 1;
}

.sgf-mobile-page-number {
    font-size: 1.25rem;
    font-weight: 900;
    color: var(--color-purple);
    display: block;
    margin-bottom: 0.25rem;
}

.sgf-mobile-page-text {
    font-size: 0.75rem;
    color: var(--text-secondary);
    font-weight: 600;
}

.sgf-mobile-games-count {
    font-size: 0.875rem;
    color: var(--text-secondary);
    text-align: center;
    margin-top: 0.75rem;
    font-weight: 600;
}

/* Show mobile pagination ONLY on mobile (<= 768px) */
@media (max-width: 768px) {
    .sgf-mobile-pagination {
        display: flex;
    }
    
    /* Hide desktop pagination on mobile */
    .sgf-pagination-v3 {
        display: none !important;
    }
}

/* Desktop: hide mobile pagination */
@media (min-width: 769px) {
    .sgf-mobile-pagination {
        display: none !important;
    }
}

