* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    -webkit-tap-highlight-color: transparent;
}

body {
    min-height: 100vh;
    background-image: url('back-background.png');
    background-color: #080f26;
    /* background-size: 100%; */
    /* background-position: bottom; */
    /* background-repeat: repeat; */
    color: white;
    display: flex;
    flex-direction: column;
    align-items: center;
    /*overflow: hidden;*/
}

.app-container {
    max-width: 480px;
    width: 100%;
    min-height: 100vh;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.8), rgba(0, 0, 0, 0.6)), url('background.png') center/contain no-repeat fixed;
    position: relative;
    overflow: hidden;
}

.app-container::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        45deg,
        rgba(255, 215, 0, 0.03) 0%,
        transparent 50%,
        rgba(255, 165, 0, 0.03) 100%
    );
    animation: backgroundPulse 8s ease-in-out infinite;
    pointer-events: none;
    z-index: 0;
}

.app-container > * {
    position: relative;
    z-index: 1;
}

/*.overlay {*/
/*  position: absolute;*/
/*  top: 0;*/
/*  left: 0;*/
/*  right: 0;*/
/*  bottom: 0;*/
/*  background: linear-gradient(180deg, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.8) 100%);*/
/*}*/

.content {
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.title {
    font-size: 1.8rem;
    font-weight: bold;
    color: #FFD700;
    text-align: center;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 1);
    margin-bottom: 10px;
}

.verse-container {
    background: rgba(0, 0, 0, 0.7);
    border: 2px solid #FFD700;
    border-radius: 15px;
    padding: 20px;
    width: 100%;
    text-align: center;
    min-height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 10px 0;
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.2);
    transition: all 0.5s ease;
    position: relative;
}

.verse-container::before {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: 15px;
    padding: 2px;
    background: linear-gradient(45deg, #FFD700, #FFA500, #FFD700);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0;
    animation: borderGlow 3s ease-in-out infinite;
}

.verse-container.timer-running {
    transform: scale(1.02);
    box-shadow: 0 0 30px rgba(255, 215, 0, 0.4), 0 0 60px rgba(255, 215, 0, 0.2);
}

.verse-container.timer-running::before {
    opacity: 1;
}

.verse-container.verse-found {
    animation: verseReveal 0.8s ease-out;
    background: rgba(0, 50, 0, 0.8);
    border-color: #00FF00;
    box-shadow: 0 0 40px rgba(0, 255, 0, 0.6), 0 10px 30px rgba(0, 0, 0, 0.5);
}

.verse-reference {
    color: #FFD700;
    font-size: 1.3rem;
    font-weight: bold;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.8);
    display: block;
    animation: highlightReference 1s ease-in-out;
}

.verse-text {
    color: #FFFFFF;
    font-size: 1.1rem;
    line-height: 1.6;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8);
}

.timer-display {
    font-family: 'Courier New', monospace;
    font-size: 2.5rem;
    color: #FFD700;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
    margin: 15px 0;
    transition: all 0.3s ease;
}

.timer-display.timer-running {
    animation: timerPulse 2s ease-in-out infinite;
}

.timer-display.timer-warning {
    color: #FFA500;
    text-shadow: 0 0 20px rgba(255, 165, 0, 0.8);
    animation: timerPulseWarning 1.5s ease-in-out infinite;
}

.timer-display.timer-danger {
    color: #FF4500;
    text-shadow: 0 0 30px rgba(255, 69, 0, 1);
    animation: timerPulseDanger 1s ease-in-out infinite;
}

.btn {
    width: 80%;
    padding: 15px;
    border: none;
    border-radius: 25px;
    font-size: 1.2rem;
    font-weight: bold;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    box-shadow: 0 0 10px 5px rgba(238, 173, 45);
}

.btn .ripple {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.6);
    transform: scale(0);
    animation: rippleEffect 0.6s ease-out;
    pointer-events: none;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg,
    transparent,
    rgba(255, 255, 255, 0.2),
    transparent);
    transition: 0.5s;
}

.btn:active {
    transform: scale(0.95);
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 20px 8px rgba(238, 173, 45, 0.8);
}

.btn:hover::before {
    left: 100%;
}

.start-btn {
    background: linear-gradient(45deg, #1e3c72, #2a5298);
    color: #FFD700;
    border: 2px solid #FFD700;
}

.stop-btn {
    background: linear-gradient(45deg, #7b1414, #c91111);
    color: white;
}

.restart-btn {
    background: linear-gradient(45deg, #1b4d2e, #2d8049);
    color: white;
}

.countdown-container {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.9);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.countdown-verse {
    font-size: 1.5rem;
    color: #FFD700;
    margin-bottom: 30px;
    text-shadow: 0 0 15px rgba(255, 215, 0, 0.6);
    font-weight: bold;
    animation: fadeInUp 0.5s ease-out;
}

.countdown-number {
    font-size: 6rem;
    color: #FFD700;
    text-shadow: 0 0 20px rgba(255, 215, 0, 0.5);
    animation: pulseCount 1s infinite, shakeCountdown 0.5s ease-in-out;
}

.countdown-text {
    font-size: 2rem;
    color: white;
    margin-top: 20px;
    text-transform: uppercase;
}

@keyframes pulseCount {
    0% {
        transform: scale(1);
        opacity: 1;
    }

    50% {
        transform: scale(1.2);
        opacity: 0.8;
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

@keyframes shakeCountdown {
    0%, 100% {
        transform: translateX(0) scale(1);
    }
    10%, 30%, 50%, 70%, 90% {
        transform: translateX(-5px) scale(1.05);
    }
    20%, 40%, 60%, 80% {
        transform: translateX(5px) scale(1.05);
    }
}

.result {
    background: rgba(255, 215, 0, 0.1);
    border: 1px solid #FFD700;
    border-radius: 10px;
    padding: 15px;
    margin-top: 20px;
    text-align: center;
    color: #FFD700;
    width: 100%;
    position: relative;
    overflow: hidden;
}

.result.result-show {
    animation: resultSlideIn 0.6s ease-out, victoryGlow 2s ease-in-out 0.6s infinite;
}

.result::before {
    content: '🎉';
    position: absolute;
    font-size: 3rem;
    opacity: 0;
    animation: confettiFall 2s ease-out infinite;
}

.result::after {
    content: '⭐';
    position: absolute;
    font-size: 2.5rem;
    opacity: 0;
    animation: confettiFall 2.3s ease-out infinite;
    animation-delay: 0.3s;
}

.hidden {
    display: none !important;
}

#version-info {
    text-align: center;
    color: rgba(255, 215, 0, 0.4);
    font-size: 0.75rem;
    margin-top: 20px;
    padding: 10px;
    transition: color 0.3s ease;
}

#version-info:hover {
    color: rgba(255, 215, 0, 0.7);
}

/* Loading Indicator */
#loading-indicator {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 15px;
    color: #FFD700;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(255, 215, 0, 0.2);
    border-top: 4px solid #FFD700;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.loading-text {
    color: rgba(255, 215, 0, 0.8);
    font-size: 0.9rem;
}

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

/* ========================================
   ANIMAÇÕES KEYFRAMES
   ======================================== */

/* Animações do Timer */
@keyframes timerPulse {
    0%, 100% {
        transform: scale(1);
        text-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
    }
    50% {
        transform: scale(1.05);
        text-shadow: 0 0 20px rgba(255, 215, 0, 0.8);
    }
}

@keyframes timerPulseWarning {
    0%, 100% {
        transform: scale(1);
        text-shadow: 0 0 20px rgba(255, 165, 0, 0.8);
    }
    50% {
        transform: scale(1.08);
        text-shadow: 0 0 35px rgba(255, 165, 0, 1);
    }
}

@keyframes timerPulseDanger {
    0%, 100% {
        transform: scale(1);
        text-shadow: 0 0 30px rgba(255, 69, 0, 1);
    }
    50% {
        transform: scale(1.12);
        text-shadow: 0 0 50px rgba(255, 69, 0, 1), 0 0 80px rgba(255, 0, 0, 0.6);
    }
}

/* Animações do Container de Versículo */
@keyframes borderGlow {
    0%, 100% {
        opacity: 0.3;
        background: linear-gradient(45deg, #FFD700, #FFA500, #FFD700);
    }
    50% {
        opacity: 0.8;
        background: linear-gradient(45deg, #FFA500, #FFD700, #FFA500);
    }
}

@keyframes verseReveal {
    0% {
        opacity: 0;
        transform: scale(0.8) rotateX(-10deg);
    }
    50% {
        transform: scale(1.05) rotateX(5deg);
    }
    100% {
        opacity: 1;
        transform: scale(1) rotateX(0deg);
    }
}

@keyframes highlightReference {
    0%, 100% {
        text-shadow: 0 0 10px rgba(255, 215, 0, 0.8);
    }
    50% {
        text-shadow: 0 0 25px rgba(255, 215, 0, 1), 0 0 40px rgba(255, 215, 0, 0.6);
    }
}

/* Animações dos Botões */
@keyframes rippleEffect {
    to {
        transform: scale(4);
        opacity: 0;
    }
}

/* Animações de Vitória */
@keyframes resultSlideIn {
    0% {
        opacity: 0;
        transform: translateY(-30px) scale(0.8);
    }
    60% {
        transform: translateY(5px) scale(1.05);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes victoryGlow {
    0%, 100% {
        box-shadow: 0 0 20px rgba(255, 215, 0, 0.4);
    }
    50% {
        box-shadow: 0 0 40px rgba(255, 215, 0, 0.8), 0 0 60px rgba(255, 215, 0, 0.4);
    }
}

@keyframes confettiFall {
    0% {
        top: -50px;
        left: 50%;
        opacity: 1;
        transform: translateX(-50%) rotate(0deg);
    }
    100% {
        top: 100%;
        left: calc(50% + 100px);
        opacity: 0;
        transform: translateX(-50%) rotate(360deg);
    }
}

/* Animação de Background */
@keyframes backgroundPulse {
    0%, 100% {
        opacity: 0.8;
    }
    50% {
        opacity: 0.6;
    }
}

/* Animação de Partículas */
@keyframes particleFloat {
    0%, 100% {
        transform: translateY(0) translateX(0);
        opacity: 0.3;
    }
    50% {
        transform: translateY(-20px) translateX(10px);
        opacity: 0.6;
    }
}

/* Animação de Fade In Up */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ========================================
   ACESSIBILIDADE - MODO REDUZIDO DE MOVIMENTO
   ======================================== */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .timer-display.timer-running,
    .timer-display.timer-warning,
    .timer-display.timer-danger {
        animation: none;
    }
    
    .verse-container::before {
        animation: none;
        opacity: 0.5;
    }
    
    .result::before,
    .result::after {
        animation: none;
        display: none;
    }
    
    .app-container::before {
        animation: none;
    }
}

/* ========================================
   MEDIA QUERIES RESPONSIVAS
   ======================================== */
@media (max-width: 768px) {
    .title {
        font-size: 1.4rem; /* Ajuste para dispositivos móveis */
    }
     .countdown-text {
        font-size: 1.4rem;
    }
}

@media (max-width: 380px) {
    .title {
        font-size: 1.3rem;
    }

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

    .btn {
        font-size: 1rem;
        padding: 12px;
    }

    .countdown-number {
        font-size: 4rem;
    }

    .countdown-text {
        font-size: 1.3rem;
    }
}
