:root {
    --pepsi-blue: #004B93;
    --pepsi-light-blue: #00BFFF;
    --pepsi-red: #ED1C24;
    --white: #FFFFFF;
    --gray-bg: #f4f7f9;
    --text-dark: #333333;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Roboto', sans-serif;
    background-color: var(--gray-bg);
    color: var(--text-dark);
    line-height: 1.6;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
}

.container {
    width: 100%;
    max-width: 500px;
    background: var(--white);
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
    text-align: center;
    margin: 10px;
}

.logo-container {
    margin-bottom: 2rem;
}

.logo {
    width: 150px;
    height: auto;
}

h1, h2, h3 {
    color: var(--pepsi-blue);
    margin-bottom: 1rem;
}

p {
    margin-bottom: 1.5rem;
    color: #666;
}

.hidden {
    display: none !important;
}

/* Form Elements */
.input-group {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

input[type="text"] {
    padding: 12px 15px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 1rem;
    outline: none;
    transition: border-color 0.3s;
}

input[type="text"]:focus {
    border-color: var(--pepsi-blue);
}

.btn-primary {
    background-color: var(--pepsi-blue);
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.3s, transform 0.1s;
}

.btn-primary:hover {
    background-color: #003a72;
}

.btn-primary:active {
    transform: scale(0.98);
}

/* Loader */
.loader {
    border: 5px solid #f3f3f3;
    border-top: 5px solid var(--pepsi-red);
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
    margin: 0 auto 1.5rem;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Quiz Styles */
.options-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.option-btn {
    background: white;
    border: 2px solid var(--pepsi-blue);
    padding: 15px;
    border-radius: 10px;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.2s;
    text-align: left;
}

.option-btn:hover {
    background: var(--pepsi-blue);
    color: white;
}

.quiz-header {
    margin-bottom: 20px;
}

.timer-container {
    width: 60px;
    height: 60px;
    border: 4px solid var(--pepsi-red);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 15px;
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--pepsi-red);
}

.timer-low {
    animation: pulse 0.5s infinite alternate;
}

@keyframes pulse {
    from { transform: scale(1); opacity: 1; }
    to { transform: scale(1.1); opacity: 0.8; }
}

.progress-container {
    background: #eee;
    height: 10px;
    border-radius: 5px;
    margin: 10px 0 20px;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--pepsi-blue), var(--pepsi-light-blue));
    width: 0%;
    transition: width 0.3s;
}

/* Results & Leaderboard */
.stats-card {
    display: flex;
    justify-content: space-around;
    background: var(--gray-bg);
    padding: 15px;
    border-radius: 10px;
    margin-bottom: 2rem;
}

.stat-item {
    display: flex;
    flex-direction: column;
}

.stat-label {
    font-size: 0.8rem;
    color: #888;
}

.stat-value {
    font-size: 1.2rem;
    font-weight: bold;
    color: var(--pepsi-blue);
}

.leaderboard {
    margin-top: 1rem;
    max-height: 300px;
    overflow-y: auto;
    text-align: left;
}

.leaderboard-item {
    margin-bottom: 15px;
}

.player-info {
    display: flex;
    justify-content: space-between;
    margin-bottom: 5px;
    font-weight: bold;
}

.player-score {
    color: var(--pepsi-red);
}

.player-progress-bg {
    background: #eee;
    height: 8px;
    border-radius: 4px;
    position: relative;
}

.player-progress-fill {
    height: 100%;
    background: var(--pepsi-blue);
    border-radius: 4px;
    transition: width 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* Admin/Presenter Dashboard Styles */
.admin-container {
    max-width: 1000px;
    width: 95%;
}

.metrics-row {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 2rem;
}

.metric-box {
    background: var(--pepsi-blue);
    color: white;
    padding: 20px 40px;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0,75,147,0.3);
}

.metric-value {
    display: block;
    font-size: 3rem;
    font-weight: bold;
}

.metric-label {
    text-transform: uppercase;
    font-size: 0.9rem;
    letter-spacing: 1px;
}

/* Podium Styles */
.leaderboard-item.rank-1 {
    background: linear-gradient(135deg, #fff9e6 0%, #fff 100%);
    border: 2px solid #ffd700;
    transform: scale(1.02);
}
.leaderboard-item.rank-1 .rank-badge { background: #ffd700; color: #000; }

.leaderboard-item.rank-2 {
    background: linear-gradient(135deg, #f5f5f5 0%, #fff 100%);
    border: 2px solid #c0c0c0;
}
.leaderboard-item.rank-2 .rank-badge { background: #c0c0c0; color: #000; }

.leaderboard-item.rank-3 {
    background: linear-gradient(135deg, #fdf5e6 0%, #fff 100%);
    border: 2px solid #cd7f32;
}
.leaderboard-item.rank-3 .rank-badge { background: #cd7f32; color: #fff; }

.rank-badge {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    margin-right: 15px;
    background: #eee;
}

.player-header {
    display: flex;
    align-items: center;
}

/* Finished State */
.leaderboard-item.finished {
    opacity: 0.9;
}

.finished-tag {
    background: #4caf50;
    color: white;
    font-size: 0.7rem;
    padding: 2px 8px;
    border-radius: 10px;
    margin-left: 10px;
}

.leaderboard-item {
    display: flex;
    flex-direction: column;
    padding: 15px;
    background: white;
    border-radius: 12px;
    margin-bottom: 15px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    transition: all 0.3s ease;
}

/* Mobile Tweaks */
@media (max-width: 480px) {
    .container {
        padding: 1.5rem;
        margin: 0;
        height: 100vh;
        max-width: none;
        border-radius: 0;
    }
}
