/* ═══════════════════════════════════════════════════════════════════
   index.php - games.php Design Theme Override
   ═══════════════════════════════════════════════════════════════════
   This file overrides index.php styles to match games.php design
   ═══════════════════════════════════════════════════════════════════ */

/* ─── Page Container ─── */
.main-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 30px 20px 80px !important;
}

/* ─── Hero Section Update ─── */
.hero {
    background: linear-gradient(135deg, #1a0f3c 0%, #2d1b69 50%, #1a0f3c 100%) !important;
    border: 1px solid rgba(139,92,246,0.3);
    border-radius: var(--radius-3xl, 18px);
    padding: 44px 40px !important;
    margin-bottom: 28px;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -60px;
    right: -60px;
    width: 320px;
    height: 320px;
    background: radial-gradient(circle, rgba(139,92,246,0.15) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
    z-index: 0;
}

.hero::after {
    content: '';
    position: absolute;
    bottom: -40px;
    left: 10%;
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(99,102,241,0.1) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
    z-index: 0;
}

.hero-content {
    position: relative;
    z-index: 1;
}

/* Hero Typography */
.hero h1, .hero .title {
    color: white !important;
    font-size: var(--font-size-hero, 2.2rem) !important;
    font-weight: 800 !important;
    margin: 0 0 8px !important;
    text-align: center !important;
}

.hero h1 i, .hero .title i {
    color: #a78bfa !important;
    margin-right: 10px;
}

.hero .hero-tagline, .hero p {
    color: rgba(255,255,255,0.7) !important;
    font-size: 1rem !important;
    margin: 0 0 20px !important;
    text-align: center !important;
    width: 100% !important;
}

/* Hero container centering */
.hero > div {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    width: 100%;
}

.hero-icon {
    margin: 0 auto 16px auto !important;
}

/* Hero Buttons */
.hero-buttons {
    display: flex;
    gap: var(--gap-base, 12px);
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    margin-top: 20px;
}

.hero .btn {
    border-radius: var(--radius-md, 7px) !important;
    font-weight: 600 !important;
    padding: 8px 20px !important;
    transition: all 0.2s;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 5px !important;
    text-decoration: none !important;
}

.hero .btn[style*="primary"] {
    background: #8b5cf6 !important;
    color: white !important;
    border: none !important;
}

.hero .btn[style*="primary"]:hover {
    background: #7c3aed !important;
}

.hero .btn[style*="secondary"] {
    background: rgba(139,92,246,0.08) !important;
    color: #a78bfa !important;
    border: 1px solid rgba(139,92,246,0.15) !important;
}

.hero .btn[style*="secondary"]:hover {
    background: rgba(139,92,246,0.18) !important;
}

/* ─── Section Headers ─── */
.section-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 22px;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary, #f1f0f5);
}

.section-header i {
    color: #8b5cf6 !important;
}

/* ─── Cards ─── */
.card {
    background: var(--card-bg, #1a1a2e) !important;
    border: 1px solid var(--border-color, rgba(139,92,246,0.12)) !important;
    border-radius: var(--radius-2xl, 14px) !important;
    overflow: hidden;
    transition: all 0.25s;
}

.card:hover {
    border-color: #8b5cf6 !important;
    transform: translateY(-3px);
    box-shadow: 0 12px 32px rgba(139,92,246,0.2);
}

.card-header {
    padding: 14px 18px;
    border-bottom: 1px solid rgba(139,92,246,0.1);
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-primary, #f1f0f5);
}

.card-body {
    padding: 18px;
}

/* Card Title */
.card-title {
    color: var(--text-primary, #f1f0f5) !important;
    font-size: 0.95rem !important;
    font-weight: 700 !important;
    margin: 0 0 7px !important;
}

/* ─── Cards Grid ─── */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
    gap: 18px;
}

/* News Grid */
.news-grid {
    display: grid;
    gap: 18px;
}

/* ─── Announcements Specific ─── */
.announcements-section {
    margin-top: 36px;
}

.announcement-badge {
    background: rgba(139,92,246,0.12);
    color: #c4b5fd;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 0.72rem;
    font-weight: 600;
}

.announcement-badge.type-announcement {
    background: rgba(139,92,246,0.12);
    color: #c4b5fd;
}

.announcement-badge.type-update {
    background: rgba(59,130,246,0.12);
    color: #60a5fa;
}

.announcement-badge.type-event {
    background: rgba(245,158,11,0.12);
    color: #f59e0b;
}

.announcement-badge.type-warning {
    background: rgba(239,68,68,0.12);
    color: #ef4444;
}

/* ─── Meta Information ─── */
.card-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.8rem;
    color: var(--text-muted, #9ca3af);
    margin-top: 12px;
}

.card-meta i {
    color: #8b5cf6;
    margin-right: 5px;
}

/* ─── News Cards ─── */
.news-card {
    background: var(--card-bg, #1a1a2e);
    border: 1px solid var(--border-color, rgba(139,92,246,0.12));
    border-radius: var(--radius-2xl, 14px);
    padding: 18px;
    transition: all 0.25s;
    cursor: pointer;
    text-decoration: none;
    display: block;
}

.news-card:hover {
    border-color: #8b5cf6;
    transform: translateY(-3px);
    box-shadow: 0 12px 32px rgba(139,92,246,0.2);
    text-decoration: none;
}

.news-card.featured {
    border-color: rgba(245,158,11,0.3);
}

.news-card.featured:hover {
    border-color: #f59e0b;
}

.news-card h3 {
    color: var(--text-primary, #f1f0f5);
    font-size: 0.95rem;
    font-weight: 700;
    margin: 0 0 8px;
}

.news-card .featured-badge {
    background: rgba(245,158,11,0.12);
    color: #f59e0b;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 0.72rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-bottom: 8px;
}

.news-card .news-meta {
    display: flex;
    align-items: center;
    gap: 15px;
    font-size: 0.8rem;
    color: var(--text-muted, #9ca3af);
    margin-top: 12px;
}

.news-card .news-meta i {
    color: #8b5cf6;
}

.news-card .read-more {
    color: #8b5cf6;
    font-size: 0.85rem;
    font-weight: 600;
    margin-top: 12px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

/* ─── Stream Cards ─── */
.streams-section {
    margin-top: 36px;
}

.stream-card {
    background: var(--card-bg, #1a1a2e);
    border: 1px solid var(--border-color, rgba(139,92,246,0.12));
    border-radius: var(--radius-2xl, 14px);
    overflow: hidden;
    transition: all 0.25s;
}

.stream-card:hover {
    border-color: #8b5cf6;
    transform: translateY(-3px);
    box-shadow: 0 12px 32px rgba(139,92,246,0.2);
}

.stream-card.live {
    border-color: rgba(239,68,68,0.3);
}

.stream-card.live:hover {
    border-color: #ef4444;
}

.live-badge {
    background: rgba(239,68,68,0.9);
    color: white;
    padding: 3px 8px;
    border-radius: 20px;
    font-size: 0.72rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

/* ─── Events Cards ─── */
.event-card {
    background: var(--card-bg, #1a1a2e);
    border: 1px solid var(--border-color, rgba(139,92,246,0.12));
    border-radius: var(--radius-2xl, 14px);
    padding: 18px;
    transition: all 0.25s;
}

.event-card:hover {
    border-color: #8b5cf6;
    transform: translateY(-3px);
    box-shadow: 0 12px 32px rgba(139,92,246,0.2);
}

.event-date {
    background: rgba(139,92,246,0.12);
    color: #c4b5fd;
    padding: 6px 12px;
    border-radius: 10px;
    font-size: 0.85rem;
    font-weight: 600;
    display: inline-block;
    margin-bottom: 10px;
}

/* ─── Featured Members ─── */
.member-card {
    background: var(--card-bg, #1a1a2e);
    border: 1px solid var(--border-color, rgba(139,92,246,0.12));
    border-radius: var(--radius-2xl, 14px);
    padding: 18px;
    text-align: center;
    transition: all 0.25s;
}

.member-card:hover {
    border-color: #8b5cf6;
    transform: translateY(-3px);
    box-shadow: 0 12px 32px rgba(139,92,246,0.2);
}

.member-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    margin: 0 auto 12px;
    border: 3px solid rgba(139,92,246,0.3);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(139,92,246,0.2);
}

.member-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.member-name {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-primary, #f1f0f5);
    margin-bottom: 5px;
}

.member-rank {
    font-size: 0.8rem;
    color: var(--text-muted, #9ca3af);
}

/* ─── Leaderboard ─── */
.leaderboard-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 0;
    border-bottom: 1px solid rgba(139,92,246,0.07);
}

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

.leaderboard-rank {
    font-size: 0.8rem;
    font-weight: 800;
    color: var(--text-muted, #9ca3af);
    width: 24px;
    text-align: center;
    flex-shrink: 0;
}

.leaderboard-rank.gold { color: #f59e0b; }
.leaderboard-rank.silver { color: #9ca3af; }
.leaderboard-rank.bronze { color: #b45309; }

.leaderboard-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(139,92,246,0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    overflow: hidden;
}

.leaderboard-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.leaderboard-info {
    flex: 1;
    min-width: 0;
}

.leaderboard-name {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-primary, #f1f0f5);
}

.leaderboard-points {
    font-size: 0.85rem;
    color: #8b5cf6;
    font-weight: 700;
}

/* ─── Poll Section ─── */
.poll-section {
    background: var(--card-bg, #1a1a2e);
    border: 1px solid var(--border-color, rgba(139,92,246,0.12));
    border-radius: var(--radius-2xl, 14px);
    padding: 18px;
}

.poll-question {
    color: var(--text-primary, #f1f0f5);
    font-size: 0.95rem;
    font-weight: 700;
    margin-bottom: 16px;
}

.poll-option {
    margin-bottom: 10px;
}

.poll-bar {
    background: rgba(139,92,246,0.1);
    border-radius: 8px;
    height: 32px;
    overflow: hidden;
    position: relative;
}

.poll-bar-fill {
    background: linear-gradient(90deg, #8b5cf6, #a78bfa);
    height: 100%;
    transition: width 0.3s;
}

.poll-bar-text {
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    color: white;
    font-size: 0.8rem;
    font-weight: 600;
}

/* ─── Gallery Thumbnails ─── */
.gallery-thumbnail {
    background: var(--card-bg, #1a1a2e);
    border: 1px solid var(--border-color, rgba(139,92,246,0.12));
    border-radius: var(--radius-2xl, 14px);
    overflow: hidden;
    transition: all 0.25s;
    aspect-ratio: 16/9;
}

.gallery-thumbnail:hover {
    border-color: #8b5cf6;
    transform: translateY(-3px);
    box-shadow: 0 12px 32px rgba(139,92,246,0.2);
}

.gallery-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* ─── General Button Updates ─── */
.btn {
    border-radius: var(--radius-md, 7px) !important;
    font-weight: 600 !important;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    text-decoration: none;
    box-sizing: border-box;
}

.btn-primary {
    background: #8b5cf6 !important;
    color: white !important;
    border: none !important;
}

.btn-primary:hover {
    background: #7c3aed !important;
}

.btn-secondary {
    background: rgba(139,92,246,0.08) !important;
    color: #a78bfa !important;
    border: 1px solid rgba(139,92,246,0.15) !important;
}

.btn-secondary:hover {
    background: rgba(139,92,246,0.18) !important;
}

/* ─── Video Highlights ─── */
.video-card {
    background: var(--card-bg, #1a1a2e);
    border: 1px solid var(--border-color, rgba(139,92,246,0.12));
    border-radius: var(--radius-2xl, 14px);
    overflow: hidden;
    transition: all 0.25s;
}

.video-card:hover {
    border-color: #8b5cf6;
    transform: translateY(-3px);
    box-shadow: 0 12px 32px rgba(139,92,246,0.2);
}

.video-thumbnail {
    position: relative;
    aspect-ratio: 16/9;
    overflow: hidden;
}

.video-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.video-platform-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    background: rgba(0,0,0,0.7);
    color: white;
    padding: 3px 8px;
    border-radius: 6px;
    font-size: 0.72rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 4px;
}

/* ─── Sections ─── */
section {
    margin-top: 36px;
}

/* ─── Responsive Breakpoints ─── */
@media (max-width: 1100px) {
    .cards-grid,
    .news-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    }
}

@media (max-width: 768px) {
    .hero {
        padding: 28px 20px !important;
    }

    .hero h1, .hero .title {
        font-size: 1.6rem !important;
    }

    .buttons-container,
    .hero-buttons {
        flex-direction: column;
        align-items: stretch;
    }

    .cards-grid,
    .news-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    }

    .cards-grid.list-view {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .cards-grid,
    .news-grid {
        grid-template-columns: 1fr;
    }

    .hero h1, .hero .title {
        font-size: 1.4rem !important;
    }
}