/* Layout - Content Wrapper with Ad Sidebars */

.content-wrapper {
    max-width: 2000px;
    margin: 0 auto;
    padding: 0 15px;
    display: flex;
    justify-content: center;
    gap: 20px;
    align-items: flex-start;
}

.main-content-area {
    width: 1200px;
    max-width: 1200px;
    flex-shrink: 0;
}

.ad-sidebar-wrapper {
    width: 280px;
    max-width: 280px;
    flex-shrink: 0;
}

@media (max-width: 1599px) {
    .ad-sidebar-wrapper {
        display: none !important;
    }
    .main-content-area {
        width: 100%;
        max-width: 1200px;
    }
}

@media (max-width: 1199px) {
    .main-content-area {
        width: 100%;
        max-width: 100%;
    }
    
    .content-wrapper {
        max-width: 100%;
        padding: 0 10px;
    }
}

/* Ad Sidebar Styles */

.ad-sidebar {
    position: sticky;
    top: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 600px;
    overflow: visible;
}

.ad-sidebar img {
    width: 600px;
    height: auto;
}

.ad-placeholder {
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
    border: 2px dashed var(--mt-gray);
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    aspect-ratio: 562 / 720;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.ad-placeholder i {
    font-size: 3rem;
    color: var(--mt-gray-light);
    margin-bottom: 15px;
}

.ad-placeholder p {
    color: var(--mt-text-muted);
    font-size: 0.9rem;
    margin: 0;
}

/* Game Card Styles (Vertical) */

.game-card {
    width: 230px;
    min-width: 230px;
    max-width: 230px;
    flex-shrink: 0;
    border-radius: 12px;
    overflow: hidden;
    height: 100%;
    position: relative;
}

@media (max-width: 767px) {
    .game-card {
        width: 280px;
        min-width: 280px;
        max-width: 280px;
        margin: 0 auto;
    }
    
    .game-card .card-img-top {
        height: 210px;
    }
    
    .d-flex.flex-wrap {
        flex-direction: column !important;
        align-items: center;
    }
}

.game-card .card-img-top {
    height: 175px;
    object-fit: cover;
    width: 100%;
}

.game-card .card-body {
    background: var(--mt-dark);
    padding: 12px;
}

.game-card .card-title {
    font-size: 0.95rem !important;
    font-weight: 600 !important;
    color: #fff !important;
    margin-bottom: 6px !important;
    line-height: 1.2 !important;
    height: 2.4em;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.game-card:hover {
    transform: translateY(-5px);
    transition: transform 0.3s ease;
    box-shadow: 0 8px 25px rgba(255, 215, 0, 0.3);
}

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

.game-card .badge {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 1;
}

/* Game Card Styles (Horizontal) */

.game-card-horizontal {
    min-width: 200px;
    max-width: 200px;
    flex-shrink: 0;
    border-radius: 12px;
    overflow: hidden;
    height: 100%;
    position: relative;
}

@media (max-width: 767px) {
    .game-card-horizontal {
        min-width: 260px;
        max-width: 260px;
    }
}

.game-card-horizontal .card-img-top {
    height: 150px;
    object-fit: cover;
    width: 100%;
}

.game-card-horizontal .card-body {
    background: var(--mt-dark);
    padding: 12px;
}

.game-card-horizontal .card-title {
    font-size: 0.95rem !important;
    font-weight: 600 !important;
    color: #fff !important;
    margin-bottom: 6px !important;
    line-height: 1.2 !important;
    height: 2.4em;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.game-card-horizontal:hover {
    transform: translateY(-5px);
    transition: transform 0.3s ease;
    box-shadow: 0 8px 25px rgba(255, 215, 0, 0.3);
}

/* Favorite Button */

.favorite-btn-corner {
    position: absolute;
    bottom: 10px;
    right: 10px;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.7);
    border: 2px solid var(--mt-gold);
    transition: all 0.3s ease;
    z-index: 2;
}

.favorite-btn-corner:hover {
    background: var(--mt-gold);
    transform: scale(1.1);
    box-shadow: 0 0 15px rgba(255, 215, 0, 0.5);
}

.favorite-btn-corner i {
    color: var(--mt-gold);
}

.favorite-btn-corner:hover i {
    color: #000;
}

.favorite-btn-corner.favorited {
    background: var(--mt-gold);
}

.favorite-btn-corner.favorited i {
    color: #000;
}

/* Region Blocked Overlay */

.region-blocked-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.75);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 5;
    border-radius: 12px;
}

.region-blocked-overlay i {
    font-size: 2rem;
    color: #dc3545;
    margin-bottom: 8px;
}

.region-blocked-overlay p {
    color: #fff;
    font-size: 0.85rem;
    font-weight: 600;
    text-align: center;
    margin: 0;
    padding: 0 10px;
}

/* Horizontal Scroll Container */

.horizontal-scroll {
    display: flex;
    overflow-x: auto;
    overflow-y: hidden;
    gap: 20px;
    padding: 20px 0;
    scrollbar-width: thin;
    scrollbar-color: var(--mt-gold) var(--mt-gray);
    -webkit-overflow-scrolling: touch;
}

@media (max-width: 767px) {
    .horizontal-scroll {
        gap: 15px;
        padding: 15px 0;
    }
}

.horizontal-scroll::-webkit-scrollbar {
    height: 8px;
}

.horizontal-scroll::-webkit-scrollbar-track {
    background: var(--mt-gray);
    border-radius: 4px;
}

.horizontal-scroll::-webkit-scrollbar-thumb {
    background: var(--mt-gold);
    border-radius: 4px;
}

/* Section Header */

.section-header {
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--mt-gold);
}

.section-title {
    color: var(--mt-gold);
    font-size: 1.8rem;
    font-weight: bold;
    margin: 0;
}

.section-heading {
    color: var(--mt-gold);
    font-size: 1.8rem;
    font-weight: bold;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--mt-gold);
}

/* Page Header */

.page-header {
    margin-bottom: 1.5rem;
}

.page-header h1 {
    color: var(--mt-gold);
    font-size: 2.5rem;
    margin-bottom: 8px;
}

.page-header p {
    color: var(--mt-text-muted);
    font-size: 1.1rem;
    margin-bottom: 0;
}

/* Stats Card */

.stats-card {
    background: var(--mt-dark);
    border: 1px solid var(--mt-gray);
    border-radius: 12px;
    padding: 15px;
    text-align: center;
    transition: transform 0.2s ease, border-color 0.2s ease;
    height: 100%;
}

.stats-card:hover {
    transform: translateY(-3px);
    border-color: var(--mt-gold);
}

.stats-card h3 {
    color: var(--mt-gold) !important;
    font-size: 2rem;
    font-weight: bold;
    margin: 0 0 5px 0;
}

.stats-card p {
    font-size: 0.85rem;
    color: var(--mt-text-muted);
}

/* Stats Summary */

.stats-summary {
    background: var(--mt-dark);
    border: 2px solid var(--mt-gold);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 30px;
}

.stat-box {
    text-align: center;
    padding: 15px;
}

.stat-box h3 {
    color: var(--mt-gold) !important;
    font-size: 2rem;
    margin: 0;
}

.stat-box p {
    color: var(--mt-text-muted) !important;
    margin: 5px 0 0 0;
    font-size: 0.9rem;
}

/* Filter Section */

.filter-section {
    background: var(--mt-dark);
    border: 1px solid var(--mt-gray);
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 30px;
}

/* Letter Picker */

.letter-picker {
    background: var(--mt-dark);
    border: 2px solid var(--mt-gold);
    border-radius: 12px;
    padding: 20px;
}

.letter-btn {
    display: inline-block;
    width: 40px;
    height: 40px;
    line-height: 40px;
    text-align: center;
    background: var(--mt-gray);
    color: var(--mt-text);
    border-radius: 8px;
    text-decoration: none;
    font-weight: bold;
    transition: all 0.2s ease;
    font-size: 0.9rem;
}

.letter-btn:hover {
    background: var(--mt-gold);
    color: #000;
    transform: scale(1.1);
}

.letter-btn.active {
    background: var(--mt-gold);
    color: #000;
    box-shadow: 0 0 15px rgba(255, 215, 0, 0.5);
}

/* Badges */

.rank-badge {
    position: absolute;
    top: 15px;
    left: 15px;
    background: #000;
    color: #ffd700;
    font-weight: bold;
    font-size: 1.1rem;
    padding: 8px 15px;
    border-radius: 8px;
    border: 2px solid #ffd700;
    z-index: 3;
}

.featured-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: var(--mt-gold);
    color: #000;
    font-weight: bold;
    padding: 6px 12px;
    border-radius: 8px;
    z-index: 2;
}

.playtime-badge {
    background: linear-gradient(135deg, #6b46c1 0%, #9333ea 100%);
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

.country-badge {
    display: inline-block;
    background: var(--mt-gray);
    color: var(--mt-text);
    padding: 5px 10px;
    border-radius: 5px;
    margin: 2px;
    font-size: 0.85rem;
}

/* Tab Navigation */

.nav-tabs {
    border-bottom: 2px solid var(--mt-gold);
}

.nav-tabs .nav-link {
    background: var(--mt-gray);
    border: 1px solid var(--mt-gray-light);
    color: var(--mt-text) !important;
    margin-right: 10px;
    border-radius: 8px 8px 0 0;
    padding: 12px 24px;
    font-weight: 600;
}

.nav-tabs .nav-link:hover {
    background: var(--mt-gray-light);
    border-color: var(--mt-gold);
}

.nav-tabs .nav-link.active {
    background: var(--mt-gold);
    color: #000 !important;
    border-color: var(--mt-gold);
}

/* Session Card */

.session-card {
    background: var(--mt-dark);
    border: 1px solid var(--mt-gray);
    border-radius: 12px;
    padding: 15px;
    margin-bottom: 15px;
    transition: border-color 0.3s ease;
}

.session-card:hover {
    border-color: var(--mt-gold);
}

/* Leaderboard Table */

.leaderboard-table {
    background: var(--mt-dark);
    border: 2px solid var(--mt-gold);
    border-radius: 12px;
    overflow: hidden;
}

.leaderboard-row {
    padding: 20px;
    border-bottom: 1px solid var(--mt-gray);
    transition: background 0.3s ease;
}

.leaderboard-row:last-child {
    border-bottom: none;
}

.leaderboard-row:hover {
    background: var(--mt-gray);
}

.rank-number {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--mt-gold);
    width: 60px;
    text-align: center;
}

.rank-1 { color: #FFD700; }
.rank-2 { color: #C0C0C0; }
.rank-3 { color: #CD7F32; }

/* Promo Banner */

.promo-banner {
    width: 100%;
    max-width: 1200px;
    height: 120px;
    object-fit: cover;
    border-radius: 15px;
    border: 2px solid var(--mt-gold);
    display: block;
}

/* Empty State */

.empty-state {
    text-align: center;
    padding: 3rem 1rem;
}

.empty-state i {
    color: var(--mt-gray-light);
    margin-bottom: 1rem;
}

.empty-state h3 {
    color: var(--mt-text);
}

.empty-state p {
    color: var(--mt-text-muted);
}

/* Remove Favorite Button */

.remove-favorite-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 10;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(220, 53, 69, 0.9);
    border: 2px solid rgba(255, 255, 255, 0.3);
    transition: all 0.3s ease;
}

.remove-favorite-btn:hover {
    background: rgba(220, 53, 69, 1);
    transform: scale(1.1);
    box-shadow: 0 0 15px rgba(220, 53, 69, 0.5);
}
