@import url('https://fonts.googleapis.com/css2?family=Nunito:wght@400;600;700;800;900&display=swap');

:root {
    --bg-color: #e6ebf0;
    /* Off-white / light silver */
    --text-main: #5c748c;
    --text-highlight: #34495e;
    --accent-teal: #4b8895;
    --accent-bronze: #cfaa8e;
    --shadow-light: #ffffff;
    --shadow-dark: #c1cdd8;

    /* Neumorphic Shadows */
    --nm-flat: 8px 8px 16px var(--shadow-dark), -8px -8px 16px var(--shadow-light);
    --nm-pressed: inset 6px 6px 12px var(--shadow-dark), inset -6px -6px 12px var(--shadow-light);
    --nm-small: 4px 4px 8px var(--shadow-dark), -4px -4px 8px var(--shadow-light);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 0;
    font-family: 'Nunito', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-main);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 40px 20px;
}

a {
    text-decoration: none;
    color: inherit;
}

/* The iPad-like Main Tablet Container */
.tablet-container {
    background: var(--bg-color);
    width: 100%;
    max-width: 1400px;
    border-radius: 40px;
    padding: 50px 60px;
    box-shadow: 20px 20px 60px rgba(0, 0, 0, 0.1),
        -20px -20px 60px rgba(255, 255, 255, 0.8),
        inset 2px 2px 5px rgba(255, 255, 255, 0.5),
        inset -2px -2px 5px rgba(0, 0, 0, 0.05);
    /* Soft tablet bezel */
    border: 8px solid rgba(255, 255, 255, 0.4);
    position: relative;
}

/* Header Section */
.header-area {
    text-align: center;
    margin-bottom: 40px;
}

.page-title {
    font-size: 2rem;
    font-weight: 900;
    color: var(--accent-teal);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin: 0 0 25px;
    text-shadow: 1px 1px 2px rgba(255, 255, 255, 0.8);
}

/* Tabs */
.tabs-container {
    display: inline-flex;
    background: var(--bg-color);
    border-radius: 30px;
    padding: 8px;
    box-shadow: var(--nm-pressed);
    gap: 10px;
}

.tab {
    padding: 10px 25px;
    border-radius: 20px;
    font-weight: 800;
    font-size: 0.85rem;
    color: var(--text-main);
    text-transform: uppercase;
    transition: all 0.2s;
    cursor: pointer;
}

.tab.active {
    background: var(--bg-color);
    box-shadow: var(--nm-flat);
    color: var(--accent-teal);
}

.tab:not(.active):hover {
    color: var(--text-highlight);
}

/* Grid Layout for Cards */
.ranking-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
}

/* Individual Card */
.ranking-card {
    background: var(--bg-color);
    border-radius: 25px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 20px;
    box-shadow: var(--nm-flat);
    transition: transform 0.2s;
}

.ranking-card:hover {
    transform: translateY(-2px);
}

/* Rank Badge */
.rank-badge {
    width: 60px;
    height: 70px;
    background: linear-gradient(145deg, #dfbca3, #c5a085);
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    font-weight: 900;
    color: #fff;
    box-shadow: 4px 4px 10px rgba(0, 0, 0, 0.2), -4px -4px 10px rgba(255, 255, 255, 0.6);
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.2);
    flex-shrink: 0;
}

/* Game Info */
.game-info {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 15px;
}

.game-avatar {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    object-fit: cover;
    box-shadow: var(--nm-small);
    border: 4px solid var(--bg-color);
    flex-shrink: 0;
}

.game-details {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.game-title {
    font-size: 1.1rem;
    font-weight: 900;
    color: var(--text-highlight);
    text-transform: uppercase;
    margin: 0;
}

.game-meta {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-main);
}

.stars {
    color: var(--accent-teal);
    font-size: 0.75rem;
    margin-top: 2px;
}

/* Hashtags */
.hashtags {
    display: flex;
    gap: 8px;
    margin-top: 8px;
}

.tag-pill {
    background: var(--bg-color);
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 800;
    color: var(--text-main);
    box-shadow: var(--nm-pressed);
}

/* Action Area */
.action-area {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 15px;
    min-width: 140px;
}

.view-stats {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.75rem;
    font-weight: 800;
}

.progress-track {
    width: 60px;
    height: 6px;
    background: var(--bg-color);
    border-radius: 3px;
    box-shadow: var(--nm-pressed);
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: var(--accent-teal);
    border-radius: 3px;
}

.btn-play {
    background: var(--bg-color);
    color: var(--accent-teal);
    padding: 10px 25px;
    border-radius: 20px;
    font-weight: 900;
    font-size: 0.85rem;
    text-transform: uppercase;
    box-shadow: var(--nm-small);
    transition: all 0.2s;
    text-align: center;
    width: 100%;
    border: 2px solid transparent;
}

.btn-play:hover {
    box-shadow: var(--nm-pressed);
    color: var(--text-highlight);
}

/* SEO Tags & Disclaimer */
.footer-area {
    margin-top: 50px;
    text-align: center;
}

.global-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
    margin-bottom: 30px;
    padding: 20px;
    background: var(--bg-color);
    box-shadow: var(--nm-pressed);
    border-radius: 20px;
}

.global-tag {
    padding: 6px 15px;
    border-radius: 15px;
    background: var(--bg-color);
    box-shadow: var(--nm-small);
    font-size: 0.75rem;
    font-weight: 800;
    transition: all 0.2s;
}

.global-tag:hover {
    box-shadow: var(--nm-pressed);
    color: var(--accent-teal);
}

.disclaimer {
    font-size: 0.8rem;
    font-weight: 600;
    color: #9cb1c4;
    max-width: 800px;
    margin: 0 auto;
    line-height: 1.5;
}

/* Responsive */
@media (max-width: 1200px) {
    .tablet-container {
        padding: 30px;
    }

    .ranking-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    body {
        padding: 10px;
    }

    .tablet-container {
        padding: 20px 15px;
        border-radius: 25px;
        border-width: 4px;
    }

    .page-title {
        font-size: 1.4rem;
    }

    .tabs-container {
        flex-wrap: wrap;
        justify-content: center;
        box-shadow: none;
        background: transparent;
    }

    .tab {
        box-shadow: var(--nm-flat);
    }

    .ranking-card {
        flex-direction: column;
        align-items: stretch;
        text-align: center;
        gap: 15px;
    }

    .game-info {
        flex-direction: column;
    }

    .rank-badge {
        width: 100%;
        height: 50px;
    }

    .hashtags {
        justify-content: center;
    }

    .action-area {
        align-items: center;
    }
}