@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;600;700;800&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    background: #2c3e50;
    background-image: 
        radial-gradient(circle at 20% 80%, rgba(120, 119, 198, 0.3) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(255, 119, 198, 0.3) 0%, transparent 50%),
        radial-gradient(circle at 40% 40%, rgba(120, 219, 226, 0.3) 0%, transparent 50%),
        url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Ctext x='10' y='20' font-family='serif' font-size='14' font-weight='bold'%3EA%3C/text%3E%3Ctext x='35' y='35' font-family='serif' font-size='12'%3Eabc%3C/text%3E%3Ctext x='15' y='50' font-family='serif' font-size='10'%3E123%3C/text%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    min-height: 100vh;
    overflow-x: hidden;
}

.header {
    background: #1a237e;
    padding: 20px;
    text-align: center;
    color: white;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

.header h1 {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.setup-section {
    background: linear-gradient(135deg, #4CAF50, #2E7D32);
    padding: 30px;
    color: white;
}

.player-setup {
    display: flex;
    gap: 15px;
    justify-content: center;
    align-items: center;
    margin-bottom: 25px;
    flex-wrap: wrap;
}

.player-setup input {
    padding: 12px 20px;
    border: none;
    border-radius: 25px;
    font-size: 1.1rem;
    width: 200px;
    font-weight: 600;
}

.avatar-selector {
    display: flex;
    gap: 10px;
}

.avatar-btn {
    width: 50px;
    height: 50px;
    border: 3px solid transparent;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    font-weight: bold;
}

.avatar-btn.blue { background: #2196F3; color: white; }
.avatar-btn.red { background: #FF1744; color: white; }
.avatar-btn.yellow { background: #FFD23F; color: #333; }
.avatar-btn.green { background: #4CAF50; color: white; }
.avatar-btn.purple { background: #9C27B0; color: white; }
.avatar-btn.orange { background: #FF9800; color: white; }
.avatar-btn.pink { background: #E91E63; color: white; }
.avatar-btn.brown { background: #795548; color: white; }

.avatar-btn.selected {
    border-color: white;
    transform: scale(1.2);
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}

.setup-btn {
    padding: 12px 25px;
    background: #FFD23F;
    color: #333;
    border: none;
    border-radius: 25px;
    font-weight: 700;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.3s ease;
    margin: 0 5px;
}

.setup-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.players-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
    margin-top: 20px;
}

.player-card {
    background: rgba(255,255,255,0.2);
    padding: 15px;
    border-radius: 20px;
    text-align: center;
    border: 3px solid transparent;
    transition: all 0.3s ease;
}

.player-card.active {
    border-color: #FFD23F;
    background: #FFD23F;
    color: #333;
    transform: scale(1.05);
    box-shadow: 0 10px 25px rgba(255,210,63,0.4);
}

.player-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    margin: 0 auto 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    font-weight: bold;
}

.player-name {
    font-weight: 700;
    font-size: 1.1rem;
    margin-bottom: 8px;
}

.player-stats {
    font-size: 0.9rem;
    opacity: 0.9;
}

/* DASHBOARD LAYOUT */
.dashboard {
    display: grid;
    grid-template-columns: 300px 1fr 350px;
    height: calc(100vh - 140px);
    gap: 20px;
    padding: 20px;
    max-width: 1600px;
    margin: 0 auto;
}

/* PAINEL ESQUERDO - JOGADOR ATUAL */
.current-player-panel {
    background: white;
    border-radius: 20px;
    padding: 25px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.current-player-header {
    text-align: center;
    padding-bottom: 20px;
    border-bottom: 2px solid #f0f0f0;
}

.current-player-avatar {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    margin: 0 auto 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    font-weight: bold;
    border: 4px solid #FFD23F;
    animation: glow 2s infinite alternate;
}

@keyframes glow {
    0% { box-shadow: 0 0 20px rgba(255,210,63,0.5); }
    100% { box-shadow: 0 0 30px rgba(255,210,63,0.8); }
}

.current-player-name {
    font-size: 1.5rem;
    font-weight: 700;
    color: #333;
    margin-bottom: 10px;
}

.current-player-stats {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.stat-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 15px;
    background: #f8f9fa;
    border-radius: 15px;
}

.stat-label {
    font-weight: 600;
    color: #666;
}

.stat-value {
    font-weight: 700;
    font-size: 1.2rem;
    color: #333;
}

.lives-display {
    display: flex;
    gap: 5px;
}

.heart {
    font-size: 1.5rem;
    color: #FF1744;
    animation: heartbeat 1.5s infinite;
}

.heart.empty {
    color: #ddd;
    animation: none;
}

@keyframes heartbeat {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.progress-bar {
    width: 100%;
    height: 20px;
    background: #e0e0e0;
    border-radius: 10px;
    overflow: hidden;
    margin-top: 10px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #4CAF50, #2E7D32);
    border-radius: 10px;
    transition: width 0.5s ease;
    position: relative;
}

.progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.timer-display {
    text-align: center;
    padding: 20px;
    background: linear-gradient(135deg, #FF9800, #F57C00);
    border-radius: 15px;
    color: white;
    margin-top: 20px;
}

.timer-number {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.timer-number.warning {
    color: #FFD23F;
    animation: timerPulse 1s infinite;
}

.timer-number.danger {
    color: #FF1744;
    animation: timerShake 0.5s infinite;
}

@keyframes timerPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

@keyframes timerShake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

/* PAINEL CENTRAL - PERGUNTA */
.question-panel {
    background: white;
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    display: flex;
    flex-direction: column;
    justify-content: center;
    text-align: center;
    position: relative;
}

.question-header {
    margin-bottom: 30px;
}

.level-badge {
    display: inline-block;
    padding: 8px 20px;
    background: linear-gradient(135deg, #9C27B0, #673AB7);
    color: white;
    border-radius: 20px;
    font-weight: 700;
    font-size: 0.9rem;
    margin-bottom: 20px;
}

.question-text {
    font-size: 1.8rem;
    font-weight: 700;
    color: #333;
    line-height: 1.4;
    margin-bottom: 40px;
}

.answers-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 30px;
}

.answer-btn {
    padding: 20px;
    border: 3px solid #e0e0e0;
    border-radius: 15px;
    background: white;
    cursor: pointer;
    font-size: 1.2rem;
    font-weight: 600;
    color: #333;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.answer-btn:hover {
    border-color: #2196F3;
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(33,150,243,0.2);
}

.answer-btn.selected {
    border-color: #2196F3;
    background: #2196F3;
    color: white;
}

.answer-btn.correct {
    border-color: #4CAF50;
    background: #4CAF50;
    color: white;
    animation: correctPulse 0.6s ease;
}

.answer-btn.wrong {
    border-color: #FF1744;
    background: #FF1744;
    color: white;
    animation: wrongShake 0.6s ease;
}

@keyframes correctPulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

@keyframes wrongShake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-10px); }
    75% { transform: translateX(10px); }
}

.feedback-area {
    min-height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    font-weight: 700;
}

.feedback-correct {
    color: #4CAF50;
    animation: bounceIn 0.8s ease;
}

.feedback-wrong {
    color: #FF1744;
    animation: bounceIn 0.8s ease;
}

@keyframes bounceIn {
    0% { transform: scale(0); opacity: 0; }
    50% { transform: scale(1.2); opacity: 1; }
    100% { transform: scale(1); opacity: 1; }
}

.next-btn {
    padding: 15px 40px;
    background: linear-gradient(135deg, #4CAF50, #2E7D32);
    color: white;
    border: none;
    border-radius: 25px;
    font-size: 1.2rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 20px;
}

.next-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(76,175,80,0.3);
}

.next-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

/* PAINEL DIREITO - JOGADORES E CONQUISTAS */
.right-panel {
    display: flex;
    flex-direction: column;
    gap: 20px;
    height: fit-content;
}

.players-online, .achievements-panel {
    background: white;
    border-radius: 20px;
    padding: 25px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    max-height: 400px;
    overflow-y: auto;
}

.panel-title {
    font-size: 1.3rem;
    font-weight: 700;
    color: #333;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.online-player {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 12px;
    border-radius: 15px;
    margin-bottom: 8px;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    min-height: 70px;
}

.online-player.current {
    background: linear-gradient(135deg, #FFD23F, #FF9800);
    border-color: #FF9800;
    transform: scale(1.02);
    box-shadow: 0 5px 15px rgba(255,152,0,0.3);
}

.online-player.eliminated {
    opacity: 0.5;
    background: #f5f5f5;
}

.online-avatar {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    font-weight: bold;
    flex-shrink: 0;
}

.online-info {
    flex: 1;
}

.online-name {
    font-weight: 700;
    color: #333;
    margin-bottom: 3px;
    font-size: 0.95rem;
}

.online-stats {
    font-size: 0.8rem;
    color: #666;
    line-height: 1.2;
}

.achievements-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.achievement {
    text-align: center;
    padding: 15px;
    border-radius: 15px;
    background: #f8f9fa;
    border: 2px solid transparent;
    transition: all 0.3s ease;
}

.achievement.unlocked {
    background: linear-gradient(135deg, #FFD23F, #FF9800);
    border-color: #FF9800;
    color: white;
    animation: achievementGlow 2s infinite alternate;
}

@keyframes achievementGlow {
    0% { box-shadow: 0 0 10px rgba(255,152,0,0.3); }
    100% { box-shadow: 0 0 20px rgba(255,152,0,0.6); }
}

.achievement-icon {
    font-size: 2rem;
    margin-bottom: 10px;
}

.achievement-name {
    font-weight: 700;
    font-size: 0.9rem;
    margin-bottom: 5px;
}

.achievement-desc {
    font-size: 0.8rem;
    opacity: 0.8;
}

.confetti {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1000;
}

.confetti-piece {
    position: absolute;
    width: 10px;
    height: 10px;
    background: #FFD23F;
    animation: confettiFall 3s linear infinite;
}

@keyframes confettiFall {
    0% {
        transform: translateY(-100vh) rotate(0deg);
        opacity: 1;
    }
    100% {
        transform: translateY(100vh) rotate(360deg);
        opacity: 0;
    }
}

@media (max-width: 1200px) {
    .dashboard {
        grid-template-columns: 1fr;
        grid-template-rows: auto auto auto;
        height: auto;
    }
    
    .current-player-panel {
        order: 1;
    }
    
    .question-panel {
        order: 2;
    }
    
    .right-panel {
        order: 3;
        flex-direction: row;
    }
}

@media (max-width: 768px) {
    .dashboard {
        padding: 10px;
        gap: 10px;
    }
    
    .answers-grid {
        grid-template-columns: 1fr;
    }
    
    .right-panel {
        flex-direction: column;
    }
    
    .achievements-grid {
        grid-template-columns: 1fr;
    }
}