﻿/* =========================
   HOME PAGE
========================= */

.home-page {
    padding: 34px 0 60px;
}

/* =========================
   HERO
========================= */

.hero-section {
    min-height: 320px;
    border-radius: 30px;
    overflow: hidden;
    margin-bottom: 34px;
    background-image: url("/images/badminton-court.jpg");
    background-size: cover;
    background-position: center;
    box-shadow: 0 14px 35px rgba(0,0,0,.14);
}

.hero-overlay {
    width: 100%;
    height: 100%;
    min-height: 320px;
    background: linear-gradient(90deg, rgba(15,23,42,.88), rgba(15,23,42,.55), rgba(15,23,42,.12));
    display: flex;
    align-items: center;
    padding: 46px;
}

.hero-content h1 {
    color: white;
    font-size: 3rem;
    font-weight: 900;
    margin-bottom: 10px;
    white-space: nowrap;
}

.hero-content p {
    color: #e5e7eb;
    font-size: 1.2rem;
    font-weight: 700;
}

/* =========================
   DASHBOARD
========================= */

.home-stat-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin-top: 10px;
    margin-bottom: 50px;
}

.home-stat-card {
    background: white;
    border-radius: 24px;
    padding: 26px;
    display: flex;
    align-items: center;
    gap: 20px;
    border: 1px solid #e5e7eb;
    box-shadow: 0 10px 28px rgba(0,0,0,.07);
    min-height: 145px;
}

.stat-icon {
    font-size: 2.4rem;
}

.home-stat-card p {
    margin: 0;
    color: #64748b;
    font-size: .95rem;
    font-weight: 800;
}

.home-stat-card h2 {
    margin: 4px 0;
    color: #0f172a;
    font-size: 1.6rem;
    font-weight: 900;
    line-height: 1;
}

.home-stat-card small {
    color: #64748b;
    font-weight: 700;
}

/* =========================
   LEADERBOARD
========================= */

.leaderboard-section {
    background: radial-gradient(circle at top, rgba(250,204,21,.18), transparent 35%), linear-gradient(180deg, #ffffff, #f8fafc);
    border-radius: 34px;
    padding: 46px;
    border: 1px solid #e5e7eb;
    box-shadow: 0 18px 45px rgba(15,23,42,.12);
    overflow: visible;
}

.leaderboard-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 14px;
}

    .leaderboard-title h2 {
        font-size: 3.2rem;
        font-weight: 900;
        color: #0f172a;
    }

    .leaderboard-title p {
        color: #64748b;
        font-size: 1.15rem;
        font-weight: 700;
    }

.leaderboard-more,
.leaderboard-more:link,
.leaderboard-more:visited,
.leaderboard-more:hover,
.leaderboard-more:active,
.leaderboard-more:focus {
    text-decoration: none !important;
    color: #000 !important;
    font-weight: 900;
}

.leaderboard-more {
    font-size: .95rem;
    padding: 9px 16px;
    border-radius: 999px;
    background: rgba(15,23,42,.08);
    white-space: nowrap;
}

    .leaderboard-more:hover {
        background: rgba(15,23,42,.14);
    }

.podium {
    display: flex;
    justify-content: center;
    align-items: flex-end;
    gap: 38px;
    margin-top: 110px;
    margin-bottom: 48px;
}

.rank-card {
    width: 300px;
    min-height: 330px;
    background: rgba(255,255,255,.92);
    border-radius: 34px;
    padding: 28px;
    text-align: center;
    position: relative;
    overflow: visible;
    box-shadow: 0 18px 45px rgba(15,23,42,.12);
}

    .rank-card img {
        width: 145px;
        height: 145px;
        object-fit: cover;
        border-radius: 50%;
        border: 7px solid white;
        background: #f3f4f6;
        box-shadow: 0 16px 32px rgba(0,0,0,.22);
        margin-top: -95px;
    }

    .rank-card h3 {
        margin-top: 16px;
        font-size: 1.55rem;
        font-weight: 900;
        color: #0f172a;
    }

    .rank-card p {
        color: #64748b;
        font-size: 1.05rem;
        font-weight: 900;
    }

.rank-number {
    width: 46px;
    height: 46px;
    margin: 14px auto 0;
    border-radius: 50%;
    background: #0f172a;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    font-weight: 900;
}

.rank-1 {
    min-height: 370px;
    transform: translateY(-28px);
    border: 3px solid #facc15;
    box-shadow: 0 22px 55px rgba(250,204,21,.32), 0 0 0 8px rgba(250,204,21,.12);
}

.rank-2 {
    border: 3px solid #cbd5e1;
}

.rank-3 {
    border: 3px solid #fb923c;
}

.medal,
.crown {
    position: absolute;
    top: -115px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 2.8rem;
    z-index: 10;
}

/* =========================
   RANKING LIST
========================= */

.ranking-list {
    margin-top: 20px;
}

.ranking-row {
    display: grid;
    grid-template-columns: 120px 1fr 160px;
    align-items: center;
    padding: 18px 20px;
    border-bottom: 1px solid #e5e7eb;
    font-weight: 800;
}

    .ranking-row.header {
        background: #0f172a;
        color: white;
        border-radius: 18px;
        margin-bottom: 10px;
    }

.hero-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    text-decoration: none;
}

    .hero-btn:hover {
        text-decoration: none;
    }

/* =========================
   TABLET
========================= */

@media (max-width: 1200px) {
    .home-stat-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .podium {
        flex-direction: column;
        align-items: center;
    }

    .rank-1 {
        transform: none;
    }
}

/* =========================
   MOBILE
========================= */

@media (max-width: 768px) {
    .home-page {
        padding: 16px 0 42px;
    }

    .hero-section {
        min-height: 180px;
        border-radius: 24px;
        margin-bottom: 18px;
        background-position: center;
    }

    .hero-overlay {
        min-height: 180px;
        padding: 24px;
        background: linear-gradient(90deg, rgba(15,23,42,.88), rgba(15,23,42,.55), rgba(15,23,42,.16));
    }

    .hero-content h1 {
        font-size: 1.55rem;
        line-height: 1;
        white-space: nowrap;
        margin-bottom: 8px;
    }

    .hero-content p {
        font-size: .82rem;
    }

    .home-stat-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 10px;
        margin-bottom: 24px;
    }

    .home-stat-card {
        min-height: 138px;
        padding: 12px 6px;
        border-radius: 20px;
        flex-direction: column;
        justify-content: center;
        text-align: center;
        gap: 6px;
    }

    .stat-icon {
        font-size: 1.85rem;
    }

    .home-stat-card p {
        font-size: .68rem;
        line-height: 1.15;
    }

    .home-stat-card h2 {
        font-size: 1.08rem;
        margin-top: 2px;
    }

    .home-stat-card small {
        font-size: .62rem;
        line-height: 1.1;
    }

    .leaderboard-section {
        padding: 22px 14px;
        border-radius: 28px;
    }

    .leaderboard-title {
        align-items: flex-start;
    }

        .leaderboard-title h2 {
            font-size: 1.72rem;
            line-height: 1.1;
        }

        .leaderboard-title p {
            font-size: .82rem;
            margin-top: 4px;
        }

    .leaderboard-more {
        padding: 10px 20px;
        font-weight: 900;
        color: #000 !important;
        background: rgba(15,23,42,.08);
    }

        .leaderboard-more:hover {
            color: #000 !important;
            background: rgba(15,23,42,.14);
        }

    .podium {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 10px;
        margin-top: 78px;
        margin-bottom: 24px;
        align-items: end;
    }

    .rank-card {
        width: 100%;
        min-height: 205px;
        padding: 12px 6px;
        border-radius: 24px;
    }

    .rank-1 {
        min-height: 230px;
        transform: translateY(-14px);
    }

    .rank-card img {
        width: 78px;
        height: 78px;
        margin-top: -50px;
        border-width: 5px;
    }

    .rank-card h3 {
        font-size: .9rem;
        margin-top: 8px;
        line-height: 1.2;
    }

    .rank-card p {
        font-size: .7rem;
    }

    .rank-number {
        width: 34px;
        height: 34px;
        font-size: .95rem;
        margin-top: 10px;
    }

    .medal,
    .crown {
        top: -70px;
        font-size: 2.35rem;
    }

    .ranking-list {
        display: block;
        margin-top: 18px;
    }

    .ranking-row {
        grid-template-columns: 60px 1fr 90px;
        padding: 13px 10px;
        font-size: .85rem;
    }
}
