:root {
    /* Playful Kahoot-inspired Colors */
    --c-purple: #46178f;
    --c-purple-dark: #2a0d5d;
    --c-purple-light: #6c22d6;

    --c-blue: #1368ce;
    --c-blue-dark: #0a468c;
    
    --c-red: #e21b3c;
    --c-red-dark: #a11029;
    
    --c-green: #26890c;
    --c-green-dark: #165606;
    
    --c-yellow: #d89e00;
    --c-yellow-dark: #9e7300;

    --c-light: #f2f2f2;
    --c-dark: #333333;
    
    /* Playful Variables */
    --game-radius: 12px;
    --game-radius-lg: 20px;
    --shadow-3d: 0 5px 0 rgba(0,0,0,0.15);
    --shadow-3d-hover: 0 2px 0 rgba(0,0,0,0.15);
}

body.font-game {
    font-family: 'Quicksand', sans-serif;
    font-weight: 600;
    background-color: var(--c-light);
    color: var(--c-dark);
}

body.bg-game-light {
    background-color: var(--c-light);
}

/* Base Headings */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
}

/* 3D Game Buttons */
.btn-game {
    font-weight: 700;
    font-size: 1.1rem;
    padding: 0.8rem 1.5rem;
    border-radius: var(--game-radius);
    border: none;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.1s ease;
    box-shadow: var(--shadow-3d);
    position: relative;
    top: 0;
}

.btn-game:hover {
    filter: brightness(1.1);
}

.btn-game:active {
    top: 3px;
    box-shadow: var(--shadow-3d-hover);
}

/* Primary Purple */
.btn-primary {
    background-color: var(--c-purple);
    color: white;
    box-shadow: 0 5px 0 var(--c-purple-dark);
    border: none;
}
.btn-primary:hover, .btn-primary:active {
    background-color: var(--c-purple);
    color: white;
    border: none;
}
.btn-primary:active { box-shadow: 0 2px 0 var(--c-purple-dark); transform: translateY(3px); }

/* Success Green */
.btn-success {
    background-color: var(--c-green);
    color: white;
    box-shadow: 0 5px 0 var(--c-green-dark);
    border: none;
}
.btn-success:hover, .btn-success:active {
    background-color: var(--c-green);
    color: white;
    border: none;
}
.btn-success:active { box-shadow: 0 2px 0 var(--c-green-dark); transform: translateY(3px); }

/* Danger Red */
.btn-danger {
    background-color: var(--c-red);
    color: white;
    box-shadow: 0 5px 0 var(--c-red-dark);
    border: none;
}
.btn-danger:hover, .btn-danger:active {
    background-color: var(--c-red);
    color: white;
    border: none;
}
.btn-danger:active { box-shadow: 0 2px 0 var(--c-red-dark); transform: translateY(3px); }


/* Game Card Panels */
.card-game {
    background: #fff;
    border-radius: var(--game-radius-lg);
    border: none;
    box-shadow: 0 6px 15px rgba(0,0,0,0.08);
}
.card-game-header {
    background: var(--c-purple);
    color: white;
    border-top-left-radius: var(--game-radius-lg);
    border-top-right-radius: var(--game-radius-lg);
    padding: 1.5rem;
    font-weight: 700;
}

/* Fun Inputs */
.form-control-game {
    font-size: 1.2rem;
    font-weight: 600;
    padding: 1rem 1.25rem;
    border-radius: var(--game-radius);
    border: 3px solid #e0e0e0;
    transition: all 0.2s;
    background: #fff;
}
.form-control-game:focus {
    border-color: var(--c-blue);
    box-shadow: none;
    outline: none;
}
select.form-control-game {
    appearance: auto;
}

/* Alerts */
.alert-game {
    border-radius: var(--game-radius);
    border: none;
    font-weight: 700;
    font-size: 1.1rem;
    padding: 1.25rem;
    box-shadow: 0 4px 0 rgba(0,0,0,0.1);
}
.alert-game-success { background: var(--c-green); color: white; }
.alert-game-danger { background: var(--c-red); color: white; }
.alert-game-info { background: var(--c-blue); color: white; }

/* Badges */
.badge-game {
    font-size: 0.9rem;
    padding: 0.5rem 0.8rem;
    border-radius: 20px;
    font-weight: 700;
}

/* Floating Timer Badge */
.timer-floating-game {
    background: white;
    color: var(--c-purple);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-weight: 700;
    font-size: 1.2rem;
    box-shadow: 0 4px 0 rgba(0,0,0,0.1);
    border: 3px solid var(--c-purple);
}
.timer-floating-game.warning {
    color: var(--c-red);
    border-color: var(--c-red);
}

/* Top Navbar */
.navbar-game {
    background-color: var(--c-purple);
    border-bottom: 4px solid var(--c-purple-dark);
}
.navbar-game .navbar-brand {
    font-weight: 700;
    font-size: 1.5rem;
    color: white !important;
}

/* Leaderboard */
.leaderboard-panel-game {
    background: #fff;
    border-radius: var(--game-radius-lg);
    box-shadow: 0 8px 0 rgba(0,0,0,0.05);
    border: 4px solid #eaeaea;
}
.leaderboard-item-game {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    border-radius: var(--game-radius);
    margin-bottom: 0.75rem;
    font-weight: 700;
    font-size: 1.1rem;
    background: #f8f9fa;
    border: 3px solid #eee;
}
.leaderboard-item-game.rank-1 { background: var(--c-yellow); border-color: var(--c-yellow-dark); color: white; transform: scale(1.05); }
.leaderboard-item-game.rank-2 { background: #b0bec5; border-color: #78909c; color: white; }
.leaderboard-item-game.rank-3 { background: #d7ccc8; border-color: #8d6e63; color: white; }

/* Layout adjustments */
.quiz-header-game {
    border-radius: var(--game-radius-lg);
    padding: 3rem 2rem;
    margin-bottom: 2rem;
    text-align: center;
    box-shadow: 0 8px 0 rgba(0,0,0,0.15);
    border: 4px solid rgba(255,255,255,0.2);
}

.table-game {
    background: white;
    border-radius: var(--game-radius-lg);
    overflow: hidden;
}
.table-game thead {
    background: var(--c-purple);
    color: white;
}
.table-game th, .table-game td {
    padding: 1rem;
    vertical-align: middle;
}