/* ============================================
   Sistema de Sorteios - Estilos Customizados
   Visual Moderno com Animações
   ============================================ */

/* ============================================
   VARIÁVEIS CSS
   ============================================ */

:root {
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --secondary: #ec4899;
    --accent: #22d3ee;
    --dark: #0f172a;
    --dark-light: #1e293b;
    --gray: #64748b;
    --light: #f8fafc;
    --success: #10b981;
    --warning: #f59e0b;
}

/* ============================================
   BACKGROUND ANIMADO
   ============================================ */

.bg-animated {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -1;
}

.bg-gradient-base {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--dark) 0%, #1a1a2e 50%, var(--dark-light) 100%);
    z-index: -3;
}

.bg-grid {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        linear-gradient(rgba(99, 102, 241, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(99, 102, 241, 0.03) 1px, transparent 1px);
    background-size: 70px 70px;
    z-index: -2;
    pointer-events: none;
}

.floating-orb {
    position: fixed;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.35;
    animation: floatOrb 15s infinite ease-in-out, orbPulse 8s infinite ease-in-out;
    z-index: -1;
    pointer-events: none;
}

.orb-1 {
    width: 400px;
    height: 400px;
    background: var(--primary);
    top: -100px;
    right: -100px;
}

.orb-2 {
    width: 300px;
    height: 300px;
    background: var(--secondary);
    bottom: 20%;
    left: -100px;
    animation-delay: -7s;
}

.orb-3 {
    width: 250px;
    height: 250px;
    background: var(--accent);
    top: 50%;
    right: 10%;
    animation-delay: -14s;
}

@keyframes floatOrb {

    0%,
    100% {
        transform: translate(0, 0) scale(1);
    }

    25% {
        transform: translate(40px, -50px) scale(1.08);
    }

    50% {
        transform: translate(-30px, 40px) scale(0.92);
    }

    75% {
        transform: translate(50px, 20px) scale(1.05);
    }
}

@keyframes orbPulse {

    0%,
    100% {
        opacity: 0.35;
        filter: blur(80px);
    }

    50% {
        opacity: 0.35;
        filter: blur(70px);
    }
}

/* ============================================
   ANIMAÇÕES
   ============================================ */

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse-glow {

    0%,
    100% {
        box-shadow: 0 0 20px rgba(99, 102, 241, 0.3);
    }

    50% {
        box-shadow: 0 0 40px rgba(99, 102, 241, 0.5);
    }
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }
}

@keyframes spin-slow {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

@keyframes confetti {
    0% {
        transform: translateY(0) rotate(0deg);
        opacity: 1;
    }

    100% {
        transform: translateY(100vh) rotate(720deg);
        opacity: 0;
    }
}

@keyframes shimmer {
    0% {
        background-position: -200% 0;
    }

    100% {
        background-position: 200% 0;
    }
}

@keyframes cardGlow {

    0%,
    100% {
        box-shadow: 0 0 0 0 rgba(99, 102, 241, 0);
    }

    50% {
        box-shadow: 0 0 25px 0 rgba(99, 102, 241, 0.15);
    }
}

/* ============================================
   CLASSES DE ANIMAÇÃO
   ============================================ */

.animate-fade-in {
    animation: fadeIn 0.5s ease-out forwards;
}

.animate-slide-up {
    animation: slideUp 0.6s ease-out forwards;
}

.animate-pulse-glow {
    animation: pulse-glow 2s ease-in-out infinite;
}

.animate-float {
    animation: float 3s ease-in-out infinite;
}

.animate-spin-slow {
    animation: spin-slow 20s linear infinite;
}

/* Elementos animados com Intersection Observer */
[data-animate] {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

[data-animate].animated {
    opacity: 1;
    transform: translateY(0);
}

/* ============================================
   DELAY DE ANIMAÇÃO
   ============================================ */

.delay-100 {
    animation-delay: 100ms;
}

.delay-200 {
    animation-delay: 200ms;
}

.delay-300 {
    animation-delay: 300ms;
}

.delay-400 {
    animation-delay: 400ms;
}

.delay-500 {
    animation-delay: 500ms;
}

/* ============================================
   SECTION HEADERS (Novo Estilo)
   ============================================ */

.section-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: rgba(99, 102, 241, 0.1);
    border: 1px solid rgba(99, 102, 241, 0.3);
    border-radius: 50px;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 1rem;
}

.section-title-new {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 0.75rem;
    color: white;
}

.section-subtitle {
    color: var(--gray);
    font-size: 1.125rem;
    max-width: 600px;
    margin: 0 auto;
}

/* ============================================
   CARDS DE SORTEIO (Estilo Aprimorado)
   ============================================ */

.raffle-card {
    background: linear-gradient(145deg, rgba(30, 41, 59, 0.9), rgba(15, 23, 42, 0.9));
    border: 1px solid rgba(71, 85, 105, 0.3);
    border-radius: 1.25rem;
    overflow: hidden;
    transition: all 0.4s ease;
    position: relative;
}

.raffle-card::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 1.25rem;
    padding: 1px;
    background: linear-gradient(135deg, transparent, transparent);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
}

.raffle-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.4), 0 0 25px rgba(99, 102, 241, 0.15);
    border-color: rgba(99, 102, 241, 0.5);
}

.raffle-card:hover::before {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    opacity: 1;
}

.raffle-card-image {
    position: relative;
    overflow: hidden;
}

.raffle-card-image img {
    transition: transform 0.5s ease;
}

.raffle-card:hover .raffle-card-image img {
    transform: scale(1.08);
}

.raffle-card-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    padding: 0.5rem 1rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    backdrop-filter: blur(10px);
}

/* ============================================
   BOTÕES (Estilo Aprimorado)
   ============================================ */

.btn-primary {
    background: linear-gradient(135deg, #6366f1, #4f46e5);
    color: white;
    padding: 0.875rem 1.75rem;
    border-radius: 0.75rem;
    font-weight: 600;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
    text-decoration: none;
    border: none;
    cursor: pointer;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #4f46e5, #4338ca);
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(99, 102, 241, 0.4);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #e2e8f0;
    padding: 0.875rem 1.75rem;
    border-radius: 0.75rem;
    font-weight: 500;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    text-decoration: none;
    cursor: pointer;
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(99, 102, 241, 0.5);
    color: white;
    transform: translateY(-2px);
}

.btn-success {
    background: linear-gradient(135deg, #22c55e, #16a34a);
    color: white;
    padding: 0.875rem 1.75rem;
    border-radius: 0.75rem;
    font-weight: 600;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    box-shadow: 0 4px 15px rgba(34, 197, 94, 0.3);
}

.btn-success:hover {
    background: linear-gradient(135deg, #16a34a, #15803d);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(34, 197, 94, 0.4);
}

.btn-danger {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white;
    padding: 0.875rem 1.75rem;
    border-radius: 0.75rem;
    font-weight: 600;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    box-shadow: 0 4px 15px rgba(239, 68, 68, 0.3);
    text-decoration: none;
    border: none;
    cursor: pointer;
}

.btn-danger:hover {
    background: linear-gradient(135deg, #dc2626, #b91c1c);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(239, 68, 68, 0.4);
}

/* ============================================
   FORMULÁRIOS
   ============================================ */

.form-input {
    width: 100%;
    background: rgba(30, 41, 59, 0.8);
    border: 1px solid rgba(71, 85, 105, 0.5);
    border-radius: 0.75rem;
    padding: 0.875rem 1rem;
    color: #f1f5f9;
    transition: all 0.3s ease;
}

.form-input:focus {
    outline: none;
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
}

.form-input::placeholder {
    color: #64748b;
}

.form-label {
    display: block;
    color: #cbd5e1;
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.form-error {
    color: #f87171;
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

.form-input.uppercase {
    text-transform: uppercase;
}

.form-input:read-only {
    background: rgba(15, 23, 42, 0.8);
    cursor: not-allowed;
    opacity: 0.7;
}

/* ============================================
   SEÇÃO HERO (Novo Estilo)
   ============================================ */

.hero-section {
    min-height: 85vh;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
    padding-top: 2rem;
    padding-bottom: 4rem;
}

/* Stats Cards no Hero */
.stat-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 1rem;
    padding: 1.5rem;
    text-align: center;
    transition: all 0.3s ease;
}

.stat-card:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(99, 102, 241, 0.3);
    transform: translateY(-3px);
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.2;
}

.stat-label {
    color: var(--gray);
    font-size: 0.9rem;
    margin-top: 0.25rem;
}

/* ============================================
   SEÇÃO DE GANHADORES (Estilo Aprimorado)
   ============================================ */

.winner-card {
    background: linear-gradient(145deg, rgba(30, 41, 59, 0.9), rgba(15, 23, 42, 0.9));
    border: 1px solid rgba(71, 85, 105, 0.3);
    border-radius: 1rem;
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: all 0.4s ease;
}

.winner-card:hover {
    transform: translateX(8px);
    border-color: rgba(234, 179, 8, 0.5);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.winner-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: 3px solid #eab308;
    overflow: hidden;
    flex-shrink: 0;
    box-shadow: 0 0 20px rgba(234, 179, 8, 0.3);
}

.winner-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* ============================================
   GLASS CARDS (Próximos Sorteios)
   ============================================ */

.glass-card {
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 1rem;
    padding: 1.5rem;
    transition: all 0.3s ease;
}

.glass-card:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(99, 102, 241, 0.3);
    transform: translateY(-3px);
}

/* ============================================
   COUNTDOWN
   ============================================ */

.countdown-item {
    background: rgba(30, 41, 59, 0.8);
    border: 1px solid rgba(71, 85, 105, 0.3);
    border-radius: 0.75rem;
    padding: 1rem;
    text-align: center;
    min-width: 70px;
}

.countdown-value {
    font-size: 2rem;
    font-weight: 700;
    color: #6366f1;
    line-height: 1;
}

.countdown-label {
    font-size: 0.75rem;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-top: 0.25rem;
}

/* ============================================
   STEPS (Como Participar)
   ============================================ */

.step-card {
    text-align: center;
    padding: 1.5rem;
}

.step-number {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    border-radius: 1.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    font-size: 2rem;
    font-weight: 800;
    color: white;
    box-shadow: 0 10px 30px rgba(99, 102, 241, 0.3);
    transition: all 0.3s ease;
}

.step-card:hover .step-number {
    transform: scale(1.1) rotate(5deg);
    box-shadow: 0 15px 40px rgba(99, 102, 241, 0.4);
}

/* ============================================
   ANIMAÇÃO DE SORTEIO
   ============================================ */

.draw-animation {
    position: relative;
}

.draw-wheel {
    width: 300px;
    height: 300px;
    border-radius: 50%;
    border: 4px solid #6366f1;
    position: relative;
    margin: 0 auto;
    animation: spin-slow 0.5s linear infinite;
}

.draw-wheel.spinning {
    animation-duration: 0.1s;
}

.draw-wheel.stopping {
    animation: none;
    transition: transform 3s cubic-bezier(0.17, 0.67, 0.12, 0.99);
}

.draw-winner-reveal {
    animation: fadeIn 0.5s ease-out forwards;
}

/* ============================================
   UTILITÁRIOS
   ============================================ */

.text-gradient {
    background: linear-gradient(135deg, #6366f1, #a855f7, #ec4899);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.text-gradient-alt {
    background: linear-gradient(135deg, var(--primary), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.glass-effect {
    background: rgba(30, 41, 59, 0.7);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(71, 85, 105, 0.3);
}

.glow-accent {
    box-shadow: 0 0 30px rgba(99, 102, 241, 0.3);
}

.glow-success {
    box-shadow: 0 0 20px rgba(34, 197, 94, 0.3);
}

.glow-warning {
    box-shadow: 0 0 20px rgba(234, 179, 8, 0.3);
}

/* ============================================
   NAVBAR SCROLL EFFECT
   ============================================ */

.navbar-scrolled {
    background: rgba(15, 23, 42, 0.85) !important;
    backdrop-filter: blur(20px) saturate(180%) !important;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3), inset 0 -1px 0 rgba(255, 255, 255, 0.05) !important;
    border-color: rgba(255, 255, 255, 0.08) !important;
}

/* ============================================
   HERO SEPARATOR
   ============================================ */

.hero-separator {
    position: relative;
    height: 80px;
    margin: 2rem auto;
    max-width: 800px;
    background: transparent;
    pointer-events: none;
}

.hero-separator::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80%;
    max-width: 400px;
    height: 1px;
    background: linear-gradient(90deg,
            transparent 0%,
            rgba(99, 102, 241, 0.3) 25%,
            rgba(168, 85, 247, 0.4) 50%,
            rgba(99, 102, 241, 0.3) 75%,
            transparent 100%);
}

.hero-separator::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 6px;
    height: 6px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: 50%;
    box-shadow: 0 0 15px rgba(99, 102, 241, 0.4);
}

/* ============================================
   RESPONSIVIDADE
   ============================================ */

@media (max-width: 768px) {
    .hero-section {
        min-height: auto;
        padding-top: 3rem;
        padding-bottom: 3rem;
    }

    .stat-number {
        font-size: 1.75rem;
    }

    .section-title-new {
        font-size: 1.75rem;
    }

    .countdown-value {
        font-size: 1.5rem;
    }

    .countdown-item {
        padding: 0.75rem;
        min-width: 55px;
    }

    .draw-wheel {
        width: 200px;
        height: 200px;
    }

    .step-number {
        width: 60px;
        height: 60px;
        font-size: 1.5rem;
    }

    .floating-orb {
        opacity: 0.2;
    }

    .orb-1 {
        width: 250px;
        height: 250px;
    }

    .orb-2 {
        width: 200px;
        height: 200px;
    }

    .orb-3 {
        display: none;
    }
}

/* ============================================
   SCROLLBAR CUSTOMIZADA
   ============================================ */

::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #1e293b;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #475569, #6366f1);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #64748b, #818cf8);
}

/* ============================================
   SELEÇÃO DE TEXTO
   ============================================ */

::selection {
    background: rgba(99, 102, 241, 0.3);
    color: white;
}

/* ============================================
   INPUTS DATE/TIME - ÍCONES BRANCOS
   ============================================ */

input[type="date"]::-webkit-calendar-picker-indicator,
input[type="time"]::-webkit-calendar-picker-indicator,
input[type="datetime-local"]::-webkit-calendar-picker-indicator {
    filter: invert(1);
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.2s;
}

input[type="date"]::-webkit-calendar-picker-indicator:hover,
input[type="time"]::-webkit-calendar-picker-indicator:hover,
input[type="datetime-local"]::-webkit-calendar-picker-indicator:hover {
    opacity: 1;
}

/* ============================================
   SEÇÃO ALTERNADA (bg diferenciado)
   ============================================ */

.section-alt {
    background: linear-gradient(180deg, rgba(99, 102, 241, 0.03) 0%, transparent 100%);
    position: relative;
}

.section-alt::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(99, 102, 241, 0.3), transparent);
}