/**
 * ===========================================
 * RECHENMEISTER - Stylesheet
 * ===========================================
 */

/* -----------------------------------------
   ALLGEMEIN
----------------------------------------- */

:root {
    --primary-color: #667eea;
    --secondary-color: #764ba2;
    --success-color: #28a745;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --gradient-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-success: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
    --gradient-danger: linear-gradient(135deg, #eb3349 0%, #f45c43 100%);
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    min-height: 100vh;
}

.page {
    display: none;
}

.page.active {
    display: block;
}

/* -----------------------------------------
   KARTEN
----------------------------------------- */

.card {
    border: none;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.card[onclick] {
    cursor: pointer;
}

.card[onclick]:hover {
    transform: translateY(-5px);
}

.border-dashed {
    border: 2px dashed #dee2e6 !important;
}

/* -----------------------------------------
   LEHRER-DASHBOARD
----------------------------------------- */

.players-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.player-badge {
    background: var(--gradient-primary);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 25px;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: scale(0.9); }
    to { opacity: 1; transform: scale(1); }
}

/* -----------------------------------------
   DUELLE
----------------------------------------- */

.duel-card {
    border-radius: 15px;
    overflow: hidden;
}

.duel-card.finished {
    background: linear-gradient(135deg, #e8f5e9 0%, #c8e6c9 100%);
}

.duel-players {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.duel-player {
    font-size: 1.2rem;
    font-weight: 600;
    padding: 0.5rem 1rem;
    background: rgba(0,0,0,0.05);
    border-radius: 10px;
}

.duel-player.winner {
    background: var(--gradient-success);
    color: white;
}

.vs {
    font-weight: bold;
    color: var(--danger-color);
    font-size: 0.9rem;
}

/* -----------------------------------------
   SCHÜLER-ANSICHT
----------------------------------------- */

.student-body {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
}

.student-body .card {
    background: white;
}

.duel-question-card {
    background: white;
    border-radius: 20px;
    padding: 2rem;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
}

.question-text {
    font-size: 1.8rem;
    font-weight: 700;
    text-align: center;
    color: #333;
    line-height: 1.4;
}

.mc-option,
.practice-option {
    font-size: 1.1rem;
    padding: 1rem;
    text-align: left;
}

.pulse {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

/* -----------------------------------------
   GEWINNER
----------------------------------------- */

.winner-card {
    background: var(--gradient-success);
    color: white;
    padding: 2rem 3rem;
    border-radius: 20px;
    max-width: 400px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
}

.winner-avatar {
    width: 100px;
    height: 100px;
    background: rgba(255,255,255,0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    font-size: 3rem;
}

.winner-trophy {
    animation: bounce 1s infinite;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-15px); }
}

/* -----------------------------------------
   AUFGABEN-EDITOR
----------------------------------------- */

.question-card .card {
    border: 1px solid #dee2e6;
}

.question-card .card-header {
    background: #f8f9fa;
}

/* -----------------------------------------
   RESPONSIVE
----------------------------------------- */

@media (max-width: 768px) {
    .question-text {
        font-size: 1.4rem;
    }

    .duel-players {
        flex-direction: column;
    }

    .vs {
        margin: 0.5rem 0;
    }

    .display-1 {
        font-size: 3rem;
    }

    .display-4 {
        font-size: 2rem;
    }
}

/* -----------------------------------------
   ANIMATIONEN
----------------------------------------- */

.shake {
    animation: shake 0.5s ease-in-out;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-10px); }
    75% { transform: translateX(10px); }
}

.confetti-bg {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    z-index: -1;
}

/* -----------------------------------------
   QR CODE
----------------------------------------- */

#qr-code canvas,
#beamer-qr canvas {
    border-radius: 10px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
}
