/* assets/css/style.css */
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;600;800&display=swap');

:root {
    --primary: #46178f; /* Kahoot-like purple */
    --secondary: #864cbf;
    --bg-light: #f2f2f2;
    --text-dark: #333;
    --text-light: #fff;
    --btn-blue: #1368ce;
    --btn-red: #e21b3c;
    --btn-green: #26890c;
    --btn-yellow: #d89e00;
    --btn-hover: rgba(0,0,0,0.1);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Montserrat', sans-serif;
}

body {
    background-color: var(--bg-light);
    color: var(--text-dark);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

header {
    background-color: #fff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

header h1 {
    color: var(--primary);
    font-weight: 800;
    font-size: 1.5rem;
}

.container {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
}

/* Forms & Inputs */
.card {
    background: #fff;
    border-radius: 8px;
    padding: 2rem;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    width: 100%;
    max-width: 400px;
    text-align: center;
}

input[type="text"], input[type="password"], input[type="number"] {
    width: 100%;
    padding: 1rem;
    margin-bottom: 1rem;
    border: 2px solid #ccc;
    border-radius: 4px;
    font-size: 1.2rem;
    font-weight: 600;
    text-align: center;
    outline: none;
    transition: border-color 0.3s;
}

input:focus {
    border-color: var(--primary);
}

button {
    width: 100%;
    padding: 1rem;
    border: none;
    border-radius: 4px;
    font-size: 1.2rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.1s, filter 0.2s;
    color: var(--text-light);
}

button:active {
    transform: scale(0.98);
}

button:hover {
    filter: brightness(1.1);
}

.btn-primary { background-color: var(--primary); }
.btn-red { background-color: var(--btn-red); }
.btn-blue { background-color: var(--btn-blue); }
.btn-green { background-color: var(--btn-green); }
.btn-yellow { background-color: var(--btn-yellow); }

/* Play Grid (Options) */
.options-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    width: 100%;
    max-width: 800px;
    margin-top: 2rem;
}

.option-btn {
    height: 150px;
    font-size: 1.5rem;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 0 rgba(0,0,0,0.2);
}

.option-btn:nth-child(1) { background-color: var(--btn-red); }
.option-btn:nth-child(2) { background-color: var(--btn-blue); }
.option-btn:nth-child(3) { background-color: var(--btn-yellow); }
.option-btn:nth-child(4) { background-color: var(--btn-green); }

/* Admin Dashboard */
.dashboard-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
    width: 100%;
}
.quiz-item {
    background: #fff;
    padding: 1rem;
    border-radius: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* Host Screen */
.host-bg {
    background-color: var(--primary);
    color: var(--text-light);
}
.pin-display {
    background: #fff;
    color: var(--text-dark);
    padding: 1rem 3rem;
    font-size: 4rem;
    font-weight: 800;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
    margin-bottom: 2rem;
}

.players-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
    margin-top: 2rem;
}
.player-tag {
    background: rgba(255,255,255,0.2);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-weight: 600;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.player-tag img {
    width: 30px;
    height: 30px;
    border-radius: 50%;
}

.question-text {
    font-size: 2.5rem;
    font-weight: 800;
    text-align: center;
    margin-bottom: 2rem;
}

.timer {
    font-size: 3rem;
    font-weight: 800;
    background: var(--secondary);
    width: 100px;
    height: 100px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 2rem;
    box-shadow: 0 0 0 5px rgba(255,255,255,0.3);
}

.question-image {
    max-width: 600px;
    max-height: 400px;
    object-fit: contain;
    margin-bottom: 2rem;
    border-radius: 8px;
}

.leaderboard-row {
    display: flex;
    justify-content: space-between;
    background: #fff;
    color: var(--text-dark);
    padding: 1rem 2rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    font-size: 1.5rem;
    font-weight: 600;
    width: 100%;
    max-width: 600px;
}

/* Audio Controls */
.audio-controls {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: rgba(0,0,0,0.5);
    padding: 10px;
    border-radius: 20px;
    display: flex;
    gap: 10px;
    align-items: center;
}
.audio-controls button {
    width: 40px;
    height: 40px;
    padding: 0;
    border-radius: 50%;
    background: #fff;
    color: var(--text-dark);
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes popIn {
    0% { transform: scale(0.8); opacity: 0; }
    80% { transform: scale(1.05); opacity: 1; }
    100% { transform: scale(1); opacity: 1; }
}
@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

.confetti {
    font-size: 2rem;
    animation: pulse 1s infinite;
    margin-bottom: 1rem;
}

.leaderboard-row {
    animation: fadeIn 0.5s ease-out forwards;
    opacity: 0;
}
.leaderboard-row:nth-child(1) { animation-delay: 0.1s; }
.leaderboard-row:nth-child(2) { animation-delay: 0.2s; }
.leaderboard-row:nth-child(3) { animation-delay: 0.3s; }
.leaderboard-row:nth-child(4) { animation-delay: 0.4s; }
.leaderboard-row:nth-child(5) { animation-delay: 0.5s; }

@media (max-width: 768px) {
    .options-grid {
        grid-template-columns: 1fr;
    }
    .question-text { font-size: 1.5rem; }
    .pin-display { font-size: 2.5rem; }
}
