/* ============================================================
   INDEX PAGE CSS - Homepage Styles
   Unique layout with 3 different card styles
   ============================================================ */

.hero {
    background: linear-gradient(135deg, #1a1a2e 0%, #0f3460 100%);
    color: white;
    padding: 4rem 2rem;
    margin-bottom: 3rem;
    border-radius: 12px;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(22, 199, 132, 0.1) 0%, transparent 70%);
    border-radius: 50%;
}

.hero-content {
    max-width: 800px;
    position: relative;
    z-index: 1;
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: white;
}

.hero p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    opacity: 0.9;
    color: white;
}

.hero .btn {
    margin-right: 1rem;
}

/* ============================================================
   INTRODUCTION SECTION
   ============================================================ */

.intro-section {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    margin-bottom: 3rem;
    box-shadow: var(--box-shadow);
    border-left: 4px solid var(--accent-color);
}

.intro-section h2 {
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.intro-section p {
    font-size: 1.05rem;
    line-height: 1.8;
    color: var(--text-dark);
}

/* ============================================================
   CATEGORIES SECTION
   ============================================================ */

.categories-section {
    margin-bottom: 4rem;
}

.categories-section h2 {
    text-align: center;
    margin-bottom: 2rem;
    position: relative;
    padding-bottom: 1rem;
}

.categories-section h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: var(--accent-color);
    border-radius: 2px;
}

.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.category-card {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: var(--box-shadow);
    border: 2px solid transparent;
}

.category-card:hover {
    border-color: var(--accent-color);
    transform: translateY(-6px);
    box-shadow: var(--box-shadow-lg);
}

.category-card-inner {
    padding: 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 1rem;
}

.category-icon {
    font-size: 2.5rem;
    width: 70px;
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--accent-color), var(--accent-light));
    border-radius: 50%;
    color: white;
}

.category-card h3 {
    margin: 0;
    color: var(--primary-color);
}

.category-count {
    font-size: 0.9rem;
    color: var(--text-light);
}

.category-card:hover h3 {
    color: var(--accent-color);
}

/* ============================================================
   FEATURED GAMES SECTION - STYLE 1
   Minimalist horizontal layout with image emphasis
   ============================================================ */

.section-featured {
    margin-bottom: 4rem;
}

.section-featured h2 {
    margin-bottom: 2rem;
    border-bottom: 3px dashed var(--accent-color);
    padding-bottom: 1rem;
}

.featured-games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
}

.game-card-featured {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--box-shadow);
    transition: var(--transition);
}

.game-card-featured:hover {
    transform: translateY(-8px);
    box-shadow: var(--box-shadow-lg);
}

.card-image {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16 / 9;
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

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

.card-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: var(--transition);
}

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

.card-content {
    padding: 1.5rem;
}

.card-category {
    display: inline-block;
    background: var(--accent-color);
    color: white;
    padding: 0.35rem 0.75rem;
    border-radius: 16px;
    font-size: 0.75rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
}

.card-title {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    color: var(--primary-color);
}

.card-description {
    font-size: 0.9rem;
    color: var(--text-light);
    margin-bottom: 1rem;
    line-height: 1.5;
}

.card-rating {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.stars {
    color: #ffc107;
    font-size: 0.85rem;
}

.rating-number {
    font-weight: 600;
    color: var(--text-dark);
    font-size: 0.9rem;
}

.card-footer {
    display: flex;
    gap: 0.5rem;
}

.card-footer .btn {
    flex: 1;
    justify-content: center;
}

/* ============================================================
   POPULAR GAMES SECTION - STYLE 2
   List-based compact layout with vertical emphasis
   ============================================================ */

.section-popular {
    margin-bottom: 4rem;
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: var(--box-shadow);
}

.section-popular h2 {
    margin-bottom: 2rem;
    border-bottom: 2px solid var(--secondary-color);
    padding-bottom: 1rem;
}

.game-card-popular {
    display: flex;
    gap: 1.5rem;
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color);
    transition: var(--transition);
    border-left: 4px solid transparent;
}

.game-card-popular:last-child {
    border-bottom: none;
}

.game-card-popular:hover {
    background: var(--bg-light);
    border-left-color: var(--accent-color);
    padding-left: 1.75rem;
}

.popular-card-image {
    flex-shrink: 0;
    width: 120px;
    height: 120px;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.popular-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.popular-card-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.popular-card-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.popular-card-meta {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 0.75rem;
}

.meta-badge {
    font-size: 0.8rem;
    padding: 0.3rem 0.6rem;
    background: var(--bg-light);
    border-radius: 4px;
    color: var(--text-dark);
}

.meta-badge.category {
    background: var(--secondary-color);
    color: white;
}

.popular-card-desc {
    font-size: 0.9rem;
    color: var(--text-light);
    margin-bottom: 0.75rem;
}

.popular-card-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* ============================================================
   TRENDING GAMES SECTION - STYLE 3
   Experimental block grid layout with ranking
   ============================================================ */

.section-trending {
    margin-bottom: 4rem;
}

.section-trending h2 {
    margin-bottom: 2rem;
    color: var(--primary-color);
    position: relative;
    padding-left: 1rem;
}

.section-trending h2::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: linear-gradient(180deg, var(--accent-color), var(--accent-light));
    border-radius: 2px;
}

.trending-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 1.5rem;
}

.game-card-trending {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--box-shadow);
    transition: var(--transition);
    cursor: pointer;
}

.game-card-trending::before {
    content: attr(data-rank);
    position: absolute;
    top: 0;
    left: 0;
    background: var(--warning-color);
    color: white;
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.2rem;
    z-index: 10;
    border-radius: 0 0 8px 0;
}

.trending-card-image {
    width: 100%;
    height: 150px;
    overflow: hidden;
}

.trending-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.game-card-trending:hover .trending-card-image img {
    transform: scale(1.1);
}

.trending-card-info {
    padding: 1rem;
    background: white;
    position: relative;
    z-index: 5;
}

.trending-card-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    word-break: break-word;
}

.trending-card-category {
    font-size: 0.75rem;
    color: var(--accent-color);
    font-weight: 600;
    text-transform: uppercase;
}

.game-card-trending:hover {
    transform: translateY(-6px);
    box-shadow: var(--box-shadow-lg);
}

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

@media (max-width: 768px) {
    .hero {
        padding: 2rem 1rem;
    }

    .hero h1 {
        font-size: 2rem;
    }

    .hero p {
        font-size: 1rem;
    }

    .categories-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }

    .featured-games-grid {
        grid-template-columns: 1fr;
    }

    .game-card-popular {
        flex-direction: column;
    }

    .popular-card-image {
        width: 100%;
        height: 180px;
    }

    .trending-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        gap: 1rem;
    }

    .section-popular {
        padding: 1.5rem;
    }
}

@media (max-width: 480px) {
    .hero h1 {
        font-size: 1.5rem;
    }

    .categories-grid {
        grid-template-columns: 1fr;
    }

    .featured-games-grid {
        gap: 1rem;
    }

    .game-card-featured {
        border-radius: 8px;
    }

    .card-content {
        padding: 1rem;
    }

    .trending-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }

    .trending-card-image {
        height: 120px;
    }

    .trending-card-info {
        padding: 0.75rem;
    }

    .trending-card-title {
        font-size: 0.85rem;
    }
}
