/* Variáveis CSS Místicas */
:root {
    --mystic-purple: #6B46C1;
    --mystic-gold: #F59E0B;
    --mystic-pink: #EC4899;
    --dark-purple: #4C1D95;
    --light-purple: #8B5CF6;
    --dark-bg: #1a1a2e;
    --card-bg: rgba(255, 255, 255, 0.1);
    --text-light: #f8fafc;
    --text-muted: #cbd5e1;
    --success: #10b981;
    --error: #ef4444;
    --shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    --glow: 0 0 20px rgba(107, 70, 193, 0.5);
}

/* Reset e Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, var(--dark-bg) 0%, var(--dark-purple) 50%, var(--mystic-purple) 100%);
    color: var(--text-light);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
    padding-bottom: 60px; /* Espaço para o rodapé */
}

/* Partículas Místicas */
.particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

.particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: var(--mystic-gold);
    border-radius: 50%;
    animation: float 6s ease-in-out infinite;
    opacity: 0.7;
    box-shadow: 0 0 10px var(--mystic-gold);
}

.particle:nth-child(1) {
    top: 20%;
    left: 10%;
    animation-delay: 0s;
    animation-duration: 8s;
}

.particle:nth-child(2) {
    top: 60%;
    left: 80%;
    animation-delay: 2s;
    animation-duration: 6s;
}

.particle:nth-child(3) {
    top: 40%;
    left: 30%;
    animation-delay: 4s;
    animation-duration: 7s;
    background: var(--mystic-pink);
    box-shadow: 0 0 10px var(--mystic-pink);
}

.particle:nth-child(4) {
    top: 80%;
    left: 60%;
    animation-delay: 1s;
    animation-duration: 9s;
}

.particle:nth-child(5) {
    top: 30%;
    left: 70%;
    animation-delay: 3s;
    animation-duration: 5s;
    background: var(--light-purple);
    box-shadow: 0 0 10px var(--light-purple);
}

.particle:nth-child(6) {
    top: 70%;
    left: 20%;
    animation-delay: 5s;
    animation-duration: 8s;
}

.particle:nth-child(7) {
    top: 50%;
    left: 90%;
    animation-delay: 2.5s;
    animation-duration: 6.5s;
    background: var(--mystic-pink);
    box-shadow: 0 0 10px var(--mystic-pink);
}

.particle:nth-child(8) {
    top: 10%;
    left: 50%;
    animation-delay: 4.5s;
    animation-duration: 7.5s;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px) rotate(0deg);
        opacity: 0.7;
    }
    50% {
        transform: translateY(-20px) rotate(180deg);
        opacity: 1;
    }
}

/* Layout Principal */
.screen {
    display: none;
    min-height: 100vh;
    padding: 2rem 1rem;
    position: relative;
    z-index: 2;
    animation: fadeIn 0.6s ease-out;
}

.screen.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.container {
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
}

/* Cabeçalho Místico */
.mystical-header {
    text-align: center;
    margin-bottom: 2rem;
}

.title {
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 700;
    background: linear-gradient(45deg, var(--mystic-gold), var(--mystic-pink), var(--light-purple));
    background-size: 200% 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradientShift 3s ease-in-out infinite;
    text-shadow: 0 0 30px rgba(107, 70, 193, 0.5);
    margin-bottom: 0.5rem;
}

.subtitle {
    font-size: clamp(1.2rem, 3vw, 1.8rem);
    color: var(--mystic-gold);
    font-weight: 300;
    text-shadow: 0 0 15px rgba(245, 158, 11, 0.5);
}

@keyframes gradientShift {
    0%, 100% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
}

/* Cartão Místico */
.mystical-card {
    background: var(--card-bg);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    padding: 2rem;
    box-shadow: var(--shadow);
    position: relative;
    overflow: hidden;
}

.mystical-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--mystic-purple), var(--mystic-gold), var(--mystic-pink));
    animation: shimmer 2s linear infinite;
}

@keyframes shimmer {
    0% {
        transform: translateX(-100%);
    }
    100% {
        transform: translateX(100%);
    }
}

/* Texto Introdutório */
.intro-text {
    font-size: 1.1rem;
    line-height: 1.6;
    color: var(--text-light);
    margin-bottom: 2rem;
    text-align: center;
}

/* Input Chakra */
.chakra-input {
    text-align: center;
}

.chakra-input label {
    display: block;
    font-size: 1.1rem;
    color: var(--mystic-gold);
    margin-bottom: 1rem;
    font-weight: 500;
}

.chakra-input input {
    width: 100%;
    max-width: 300px;
    padding: 1rem;
    font-size: 1.1rem;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid var(--mystic-purple);
    border-radius: 10px;
    color: var(--text-light);
    text-align: center;
    margin-bottom: 1.5rem;
    transition: all 0.3s ease;
}

.chakra-input input:focus {
    outline: none;
    border-color: var(--mystic-gold);
    box-shadow: var(--glow);
    transform: scale(1.02);
}

.chakra-input input::placeholder {
    color: var(--text-muted);
}

/* Botões Místicos */
.mystical-btn {
    background: linear-gradient(45deg, var(--mystic-purple), var(--mystic-pink));
    color: white;
    border: none;
    padding: 1rem 2rem;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    text-decoration: none;
    display: inline-block;
    text-align: center;
    min-width: 200px;
}

.mystical-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(107, 70, 193, 0.4);
}

.mystical-btn:active {
    transform: translateY(0);
}

.mystical-btn.secondary {
    background: linear-gradient(45deg, var(--dark-purple), var(--mystic-purple));
    margin-top: 1rem;
}

/* Mensagem de Erro */
.error-hidden {
    display: none;
}

.error-visible {
    display: block;
    color: var(--error);
    margin-top: 1rem;
    font-weight: 500;
    animation: shake 0.5s ease-in-out;
}

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

/* Cabeçalho do Jogo */
.game-header {
    margin-bottom: 2rem;
    text-align: center;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 1rem;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--mystic-purple), var(--mystic-gold));
    width: 20%;
    transition: width 0.5s ease;
    border-radius: 4px;
}

.question-counter {
    color: var(--mystic-gold);
    font-weight: 600;
    font-size: 1.1rem;
}

/* Pergunta */
.question {
    font-size: 1.3rem;
    line-height: 1.5;
    color: var(--text-light);
    margin-bottom: 2rem;
    text-align: center;
    font-weight: 500;
}

/* Opções */
.options {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 2rem;
}

.option-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid var(--mystic-purple);
    color: var(--text-light);
    padding: 1rem;
    border-radius: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: left;
    font-size: 1rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.option-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: var(--mystic-gold);
    transform: translateX(5px);
}

.option-btn.selected {
    background: var(--mystic-purple);
    border-color: var(--mystic-gold);
    box-shadow: var(--glow);
}

.option-btn.correct {
    background: var(--success);
    border-color: var(--success);
    animation: pulse 0.6s ease-in-out;
}

.option-btn.incorrect {
    background: var(--error);
    border-color: var(--error);
    animation: shake 0.5s ease-in-out;
}

.option-letter {
    font-weight: 700;
    color: var(--mystic-gold);
    min-width: 30px;
}

.option-text {
    flex: 1;
}

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

/* Feedback */
.feedback {
    text-align: center;
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    margin-top: 1rem;
}

.feedback.hidden {
    display: none;
}

.feedback.visible {
    display: block;
    animation: slideUp 0.5s ease-out;
}

#feedback-text {
    font-size: 1.1rem;
    line-height: 1.5;
    margin-bottom: 1.5rem;
    color: var(--text-light);
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Tela Final */
.score-display {
    text-align: center;
    margin-bottom: 2rem;
}

.score-circle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 120px;
    height: 120px;
    border: 4px solid var(--mystic-gold);
    border-radius: 50%;
    background: linear-gradient(45deg, var(--mystic-purple), var(--mystic-pink));
    margin-bottom: 1rem;
    position: relative;
    animation: scoreReveal 1s ease-out;
}

#final-score {
    font-size: 2.5rem;
    font-weight: 700;
    color: white;
}

.score-total {
    font-size: 1.2rem;
    color: var(--mystic-gold);
    margin-left: 0.2rem;
}

@keyframes scoreReveal {
    from {
        transform: scale(0) rotate(180deg);
        opacity: 0;
    }
    to {
        transform: scale(1) rotate(0deg);
        opacity: 1;
    }
}

.final-message {
    font-size: 1.1rem;
    line-height: 1.6;
    color: var(--text-light);
    margin-bottom: 2rem;
    text-align: center;
}

.final-actions {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    align-items: center;
}

.trailer-btn {
    background: linear-gradient(45deg, var(--mystic-gold), var(--mystic-pink));
    color: white;
    text-decoration: none;
    padding: 1.2rem 2.5rem;
    font-size: 1.2rem;
    font-weight: 700;
    border-radius: 50px;
    transition: all 0.3s ease;
    display: inline-block;
    text-align: center;
    min-width: 250px;
    box-shadow: 0 5px 15px rgba(245, 158, 11, 0.3);
}

.trailer-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 30px rgba(245, 158, 11, 0.4);
}

/* Créditos */
.credits {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(26, 26, 46, 0.9);
    backdrop-filter: blur(10px);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: 0.8rem 1rem;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.9rem;
    z-index: 1000;
}

/* Animações Gerais */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsividade Mobile-First */
@media (max-width: 768px) {
    .screen {
        padding: 1rem 0.5rem;
    }
    
    .mystical-card {
        padding: 1.5rem;
        margin: 0 0.5rem;
    }
    
    .final-actions {
        gap: 0.8rem;
    }
    
    .trailer-btn {
        min-width: 200px;
        padding: 1rem 2rem;
        font-size: 1.1rem;
    }
    
    .mystical-btn {
        min-width: 180px;
        padding: 0.9rem 1.5rem;
        font-size: 1rem;
    }
    
    .option-btn {
        padding: 0.8rem;
        font-size: 0.95rem;
    }
    
    .question {
        font-size: 1.2rem;
    }
    
    .credits {
        position: relative;
        margin-top: 2rem;
        padding: 1rem;
    }
}

@media (max-width: 480px) {
    .mystical-card {
        padding: 1rem;
        border-radius: 15px;
    }
    
    .intro-text, .final-message {
        font-size: 1rem;
    }
    
    .score-circle {
        width: 100px;
        height: 100px;
    }
    
    #final-score {
        font-size: 2rem;
    }
    
    .particle {
        width: 3px;
        height: 3px;
    }
}