@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');

:root {
    --primary: #6200EA;
    --primary-dark: #3700B3;
    --secondary: #FFD700;
    --background: #F4F6F9;
    --card-bg: #FFFFFF;
    --text-main: #2D3436;
    --text-muted: #636E72;
    --success: #00B894;
    --danger: #D63031;
    --warning: #FDCB6E;
    --radius: 16px;
    --shadow: 0 4px 15px rgba(98, 0, 234, 0.1);
    --shadow-hover: 0 8px 25px rgba(98, 0, 234, 0.2);
}

* {
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: 'Poppins', sans-serif;
    background-color: var(--background);
    margin: 0;
    padding: 0;
    color: var(--text-main);
    display: block;
    /* Changed from flex center for website flow */
    min-height: 100vh;
}

/* Mobile Container Simulation */
.app-container {
    width: 100%;
    /* max-width: 480px; Removed for full website view */
    background-color: var(--background);
    min-height: 100vh;
    position: relative;
    box-shadow: 0 0 40px rgba(0, 0, 0, 0.05);
    padding-bottom: 80px;
    /* Space for bottom nav */
    overflow-x: hidden;
}

/* Header/AppBar */
.app-bar {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    padding: 20px;
    border-radius: 0 0 24px 24px;
    box-shadow: var(--shadow);
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 100;
}

.app-bar h1 {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
}

.app-bar-actions {
    display: flex;
    gap: 15px;
}

.profile-pic {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid var(--secondary);
    object-fit: cover;
}

/* Auth Pages */
.auth-container {
    padding: 30px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 100vh;
    background: white;
}

.auth-header {
    text-align: center;
    margin-bottom: 40px;
}

.auth-header img {
    width: 80px;
    margin-bottom: 15px;
}

.auth-header h2 {
    color: var(--primary);
    margin: 0;
    font-size: 28px;
}

.auth-header p {
    color: var(--text-muted);
    font-size: 14px;
}

.input-group {
    margin-bottom: 20px;
    position: relative;
}

.input-group label {
    display: block;
    margin-bottom: 8px;
    font-size: 13px;
    color: var(--text-muted);
    font-weight: 500;
}

.form-control {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid #E0E0E0;
    border-radius: 12px;
    font-size: 15px;
    font-family: 'Poppins', sans-serif;
    transition: all 0.3s ease;
    background: #FAFAFA;
}

.form-control:focus {
    border-color: var(--primary);
    background: white;
    outline: none;
    box-shadow: 0 0 0 3px rgba(98, 0, 234, 0.1);
}

.btn-primary {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: var(--shadow);
    transition: transform 0.2s;
}

.btn-primary:active {
    transform: scale(0.98);
}

.auth-footer {
    text-align: center;
    margin-top: 25px;
    font-size: 14px;
    color: var(--text-muted);
}

.auth-footer a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
}

/* Dashboard Cards */
.stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    padding: 20px;
}

.stat-card {
    background: white;
    padding: 20px;
    border-radius: 20px;
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    position: relative;
    overflow: hidden;
}

.stat-card.primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
}

.stat-card.secondary {
    background: linear-gradient(135deg, #FFB300, #FF6F00);
    color: white;
}

.stat-value {
    font-size: 24px;
    font-weight: 700;
    margin: 5px 0;
}

.stat-label {
    font-size: 12px;
    opacity: 0.9;
}

/* Game List */
.section-title {
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 10px;
    font-weight: 600;
    color: var(--text-main);
}

.game-list {
    padding: 20px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.game-card {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
    transition: transform 0.2s;
    text-decoration: none;
    color: inherit;
    display: block;
}

.game-card:active {
    transform: scale(0.97);
}

.game-img {
    width: 100%;
    height: 120px;
    object-fit: cover;
    background: #eee;
}

.game-info {
    padding: 12px;
}

.game-title {
    font-size: 14px;
    font-weight: 600;
    margin: 0 0 5px 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.game-reward {
    font-size: 11px;
    color: var(--success);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 4px;
}

/* Bottom Nav */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    /* max-width: 480px; Removed for Website */
    background: white;
    display: flex;
    justify-content: space-around;
    padding: 12px 0;
    box-shadow: 0 -5px 20px rgba(0, 0, 0, 0.05);
    border-radius: 20px 20px 0 0;
    z-index: 1000;
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: #B2BEC3;
    font-size: 11px;
    gap: 5px;
    transition: color 0.3s;
}

.nav-item.active {
    color: var(--primary);
}

.nav-icon {
    font-size: 22px;
    margin-bottom: 2px;
}

/* Floating Action Button */
.fab {
    position: fixed;
    bottom: 90px;
    right: 20px;
    /* Adjusted for website layout */
    width: 56px;
    height: 56px;
    background: var(--secondary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-hover);
    color: var(--text-main);
    font-size: 24px;
    text-decoration: none;
    z-index: 900;
}

/* List Items (Leaderboard, History) */
.list-item {
    background: white;
    margin: 0 20px 10px;
    padding: 15px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    gap: 15px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
}

.rank-badge {
    width: 30px;
    height: 30px;
    background: #eee;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 14px;
}

.rank-1 {
    background: #FFD700;
    color: white;
}

.rank-2 {
    background: #C0C0C0;
    color: white;
}

.rank-3 {
    background: #CD7F32;
    color: white;
}

/* Utilities */
.text-center {
    text-align: center;
}

.mt-4 {
    margin-top: 20px;
}

.mb-4 {
    margin-bottom: 20px;
}

.w-100 {
    width: 100%;
}

.glass {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
}

.badge {
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
}

.badge-success {
    background: #dcefe0;
    color: var(--success);
}

.badge-danger {
    background: #fadddd;
    color: var(--danger);
}

.badge-warning {
    background: #fef3cd;
    color: #856404;
}

/* Alert */
.alert {
    padding: 12px;
    border-radius: 12px;
    margin-bottom: 20px;
    font-size: 14px;
}

.alert-danger {
    background: #ffebee;
    color: var(--danger);
}

.alert-success {
    background: #e8f5e9;
    color: var(--success);
}