/* Sorteio Comentários do Youtube - Frontend Styles v2.0 */

#lottery-container {
    width: 100%;
    max-width: 1600px;
    margin: 0 auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
    background: linear-gradient(135deg, #7c3aed 0%, #6d28d9 50%, #5b21b6 100%);
    border-radius: 20px;
    color: white;
}

.lottery-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    align-items: start;
}

/* ===== PAINEL ESQUERDO ===== */
.lottery-left-panel {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.lottery-header h1 {
    font-size: 3em;
    margin: 0;
    font-weight: 900;
    text-shadow: 3px 3px 6px rgba(0,0,0,0.3);
    text-align: left;
}

/* Caixa do Prêmio */
.lottery-prize-box {
    background: linear-gradient(135deg, rgba(255,255,255,0.25) 0%, rgba(255,255,255,0.15) 100%);
    border: 3px solid rgba(255,255,255,0.3);
    border-radius: 20px;
    padding: 25px;
    backdrop-filter: blur(10px);
    box-shadow: 0 8px 32px rgba(0,0,0,0.2);
}

.prize-icon {
    font-size: 2em;
    margin-bottom: 10px;
}

.prize-label {
    font-size: 1.1em;
    font-weight: 700;
    color: white;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
    margin-bottom: 15px;
    letter-spacing: 1px;
}

.prize-value {
    font-size: 1.3em;
    font-weight: 600;
    color: white;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
    line-height: 1.4;
    min-height: 30px;
}

/* Caixa de Regras */
.lottery-rules-box {
    background: linear-gradient(135deg, rgba(255,255,255,0.25) 0%, rgba(255,255,255,0.15) 100%);
    border: 3px solid rgba(255,255,255,0.3);
    border-radius: 20px;
    padding: 25px;
    backdrop-filter: blur(10px);
    box-shadow: 0 8px 32px rgba(0,0,0,0.2);
}

.rules-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
}

.rules-icon {
    font-size: 1.8em;
}

.rules-title {
    font-size: 1.1em;
    font-weight: 700;
    letter-spacing: 1px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

.rules-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.rule-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    font-size: 1.05em;
    line-height: 1.5;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.3);
}

.rule-check {
    color: #4ade80;
    font-size: 1.3em;
    flex-shrink: 0;
    margin-top: 2px;
}

.rule-text {
    flex: 1;
}

.loading-rules {
    text-align: center;
    padding: 10px;
    opacity: 0.8;
}

/* Caixa de Total de Participantes */
.lottery-participants-count-box {
    background: linear-gradient(135deg, rgba(255,255,255,0.25) 0%, rgba(255,255,255,0.15) 100%);
    border: 3px solid rgba(255,255,255,0.3);
    border-radius: 20px;
    padding: 25px;
    backdrop-filter: blur(10px);
    box-shadow: 0 8px 32px rgba(0,0,0,0.2);
    text-align: center;
}

.count-icon {
    font-size: 2.5em;
    margin-bottom: 10px;
}

.count-title {
    font-size: 1.1em;
    font-weight: 700;
    letter-spacing: 1px;
    margin-bottom: 15px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

.count-value {
    font-size: 1.2em;
    font-weight: 600;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.3);
}

/* Botão Iniciar Sorteio */
.lottery-button-green {
    background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
    color: white;
    border: none;
    padding: 20px 40px;
    font-size: 1.5em;
    font-weight: 900;
    border-radius: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 8px 20px rgba(0,0,0,0.3);
    text-transform: uppercase;
    letter-spacing: 2px;
    width: 100%;
}

.lottery-button-green:hover:not(:disabled) {
    transform: translateY(-3px);
    box-shadow: 0 12px 30px rgba(0,0,0,0.4);
    background: linear-gradient(135deg, #16a34a 0%, #15803d 100%);
}

.lottery-button-green:disabled {
    background: #94a3b8;
    cursor: not-allowed;
    transform: none;
    opacity: 0.6;
}

/* ===== PAINEL DIREITO ===== */
.lottery-right-panel {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.date-header {
    text-align: right;
}

.date-header h2 {
    font-size: 3em;
    margin: 0;
    font-weight: 900;
    text-shadow: 3px 3px 6px rgba(0,0,0,0.3);
}

.current-date {
    font-size: 1.3em;
    font-weight: 600;
    margin-top: 10px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

/* Grid de Participantes */
.participants-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    max-height: 600px;
    overflow-y: auto;
    padding: 20px;
    background: rgba(255,255,255,0.1);
    border-radius: 15px;
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255,255,255,0.2);
}

/* Scrollbar personalizada */
.participants-grid::-webkit-scrollbar {
    width: 8px;
}

.participants-grid::-webkit-scrollbar-track {
    background: rgba(255,255,255,0.1);
    border-radius: 10px;
}

.participants-grid::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.3);
    border-radius: 10px;
}

.participants-grid::-webkit-scrollbar-thumb:hover {
    background: rgba(255,255,255,0.5);
}

.participant-card {
    background: linear-gradient(135deg, rgba(255,255,255,0.3) 0%, rgba(255,255,255,0.2) 100%);
    padding: 20px 15px;
    border-radius: 12px;
    text-align: center;
    font-weight: 600;
    font-size: 1.05em;
    transition: all 0.3s ease;
    border: 2px solid rgba(255,255,255,0.2);
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    color: white;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.3);
}

.participant-card.highlight {
    background: linear-gradient(135deg, #ffd700 0%, #ffed4e 100%);
    color: #1e293b;
    transform: scale(1.08);
    border: 3px solid #fff;
    box-shadow: 0 8px 25px rgba(255,215,0,0.6);
    font-weight: 800;
    text-shadow: none;
    z-index: 10;
}

/* Anúncio do Vencedor */
.winner-announcement {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.winner-text {
    background: linear-gradient(135deg, #ffd700 0%, #ffed4e 100%);
    color: #1e293b;
    padding: 50px 60px;
    border-radius: 25px;
    text-align: center;
    max-width: 600px;
    animation: winner-appear 0.5s ease;
    box-shadow: 0 20px 60px rgba(255,215,0,0.4);
}

@keyframes winner-appear {
    from { 
        transform: scale(0.5) rotate(-5deg); 
        opacity: 0; 
    }
    to { 
        transform: scale(1) rotate(0deg); 
        opacity: 1; 
    }
}

.winner-label {
    font-size: 1.8em;
    font-weight: 900;
    margin-bottom: 20px;
    letter-spacing: 2px;
}

.winner-name {
    font-size: 2.5em;
    font-weight: 900;
    margin: 25px 0;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.1);
}

.winner-congrats {
    font-size: 1.5em;
    font-weight: 700;
    margin-top: 20px;
}

/* Confetti */
.confetti {
    position: absolute;
    width: 100%;
    height: 100%;
    pointer-events: none;
    overflow: hidden;
}

.confetti::before,
.confetti::after {
    content: "🎊";
    position: absolute;
    font-size: 3em;
    animation: confetti-fall 3s linear infinite;
}

.confetti::before {
    left: 20%;
    animation-delay: 0s;
}

.confetti::after {
    left: 80%;
    animation-delay: 0.5s;
}

@keyframes confetti-fall {
    0% { 
        transform: translateY(-100vh) rotate(0deg); 
        opacity: 1;
    }
    100% { 
        transform: translateY(100vh) rotate(360deg); 
        opacity: 0.5;
    }
}

/* ===== RESPONSIVO ===== */
@media (max-width: 1200px) {
    .lottery-layout {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .lottery-header h1,
    .date-header h2 {
        font-size: 2.5em;
        text-align: center;
    }
    
    .date-header {
        text-align: center;
    }
    
    .participants-grid {
        max-height: 500px;
    }
}

@media (max-width: 768px) {
    #lottery-container {
        padding: 15px;
        border-radius: 15px;
    }
    
    .lottery-layout {
        gap: 20px;
    }
    
    .lottery-header h1,
    .date-header h2 {
        font-size: 2em;
    }
    
    .lottery-prize-box,
    .lottery-rules-box,
    .lottery-participants-count-box {
        padding: 20px;
    }
    
    .prize-label,
    .rules-title,
    .count-title {
        font-size: 1em;
    }
    
    .prize-value {
        font-size: 1.1em;
    }
    
    .rule-item {
        font-size: 0.95em;
    }
    
    .lottery-button-green {
        padding: 18px 30px;
        font-size: 1.2em;
    }
    
    .participants-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
        max-height: 400px;
        padding: 15px;
    }
    
    .participant-card {
        padding: 15px 10px;
        font-size: 0.95em;
    }
    
    .winner-text {
        margin: 20px;
        padding: 35px 40px;
    }
    
    .winner-label {
        font-size: 1.4em;
    }
    
    .winner-name {
        font-size: 2em;
    }
    
    .winner-congrats {
        font-size: 1.2em;
    }
}

@media (max-width: 480px) {
    .lottery-header h1,
    .date-header h2 {
        font-size: 1.5em;
    }
    
    .participants-grid {
        grid-template-columns: 1fr;
    }
    
    .lottery-button-green {
        font-size: 1em;
        padding: 15px 25px;
    }
}
