/* ==========================================================================
   RIFA SOLIDÁRIA TAEKWONDO - SISTEMA DE DESIGN RESPONSIVO
   Dispositivos: Mobile (320px-599px), Tablet (600px-1024px), PC/Desktop (1025px+)
   Tema Dark Premium, Glassmorphism e Cores Oficiais de Taekwondo
   ========================================================================== */

:root {
    /* Paleta de Cores de Fundo */
    --bg-dark: #080c14;
    --bg-surface: #0f172a;
    --bg-card: rgba(18, 26, 43, 0.85);
    --bg-card-hover: rgba(28, 39, 64, 0.95);
    --bg-glass: rgba(15, 23, 42, 0.75);
    
    /* Bordas e Realces */
    --border-color: rgba(255, 255, 255, 0.09);
    --border-highlight: rgba(245, 158, 11, 0.35);
    --border-active: #f59e0b;
    
    /* Cores Temáticas Taekwondo */
    --primary: #f59e0b;           /* Dourado Taekwondo */
    --primary-hover: #d97706;
    --primary-glow: rgba(245, 158, 11, 0.35);
    
    --accent-red: #ef4444;        /* Faixa Preta / Rubi */
    --accent-red-glow: rgba(239, 68, 68, 0.35);
    
    --accent-blue: #3b82f6;       /* Azul Taekwondo */
    --accent-blue-glow: rgba(59, 130, 246, 0.35);
    
    --accent-green: #10b981;      /* Sucesso / Disponível */
    --accent-green-glow: rgba(16, 185, 129, 0.35);
    
    /* Tipografia */
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    
    --font-heading: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    
    /* Raios e Sombras */
    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 20px;
    --radius-full: 9999px;
    
    --shadow-sm: 0 4px 12px rgba(0, 0, 0, 0.25);
    --shadow-md: 0 10px 25px rgba(0, 0, 0, 0.45);
    --shadow-lg: 0 20px 40px rgba(0, 0, 0, 0.65);
}

/* ==========================================================================
   RESET & CONFIGURAÇÕES GLOBAIS
   ========================================================================== */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    -webkit-tap-highlight-color: transparent;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    background-color: var(--bg-dark);
    background-image: 
        radial-gradient(circle at 10% 15%, rgba(239, 68, 68, 0.08) 0%, transparent 45%),
        radial-gradient(circle at 90% 85%, rgba(245, 158, 11, 0.08) 0%, transparent 45%),
        radial-gradient(circle at 50% 50%, rgba(59, 130, 246, 0.05) 0%, transparent 65%);
    background-attachment: fixed;
    color: var(--text-primary);
    font-family: var(--font-body);
    line-height: 1.55;
    min-height: 100vh;
    padding-bottom: 140px; /* Espaço para o carrinho flutuante */
    overflow-x: hidden;
}

/* Container Principal Responsivo */
.rifa-container {
    width: 100%;
    max-width: 1220px;
    margin: 0 auto;
    padding: 16px 16px 40px;
}

@media (min-width: 768px) {
    .rifa-container {
        padding: 24px 24px 50px;
    }
}

@media (min-width: 1200px) {
    .rifa-container {
        padding: 30px 20px 60px;
    }
}

/* ==========================================================================
   HEADER & NAVBAR (RESPONSIVO PARA MOBILE / TABLET / PC)
   ========================================================================== */
.rifa-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 18px;
    background: var(--bg-glass);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-full);
    margin-bottom: 24px;
    box-shadow: var(--shadow-sm);
    flex-wrap: wrap;
    gap: 10px;
}

.rifa-nav-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--text-primary);
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 1.1rem;
    letter-spacing: 0.5px;
}

.rifa-nav-brand .belt-badge {
    background: #000000;
    border: 2px solid #ef4444;
    color: #ffffff;
    padding: 3px 8px;
    border-radius: var(--radius-sm);
    font-size: 0.72rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    box-shadow: 0 0 10px rgba(239, 68, 68, 0.4);
}

.rifa-nav-links {
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-link-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-full);
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.82rem;
    font-weight: 600;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.nav-link-btn:hover, .nav-link-btn:active {
    background: rgba(255, 255, 255, 0.12);
    color: var(--text-primary);
    border-color: rgba(255, 255, 255, 0.2);
}

@media (max-width: 580px) {
    .rifa-nav {
        padding: 8px 12px;
        border-radius: var(--radius-md);
    }
    .rifa-nav-brand {
        font-size: 0.95rem;
    }
    .rifa-nav-brand .belt-badge {
        padding: 2px 6px;
        font-size: 0.68rem;
    }
    .rifa-nav-links .nav-link-btn .nav-btn-text {
        display: none;
    }
    .rifa-nav-links .nav-link-btn {
        padding: 7px 11px;
        font-size: 0.92rem;
        gap: 0;
        justify-content: center;
    }
}

/* ==========================================================================
   HERO SECTION (APRESENTAÇÃO & KPIS)
   ========================================================================== */
.hero-card {
    background: linear-gradient(135deg, rgba(20, 29, 47, 0.92) 0%, rgba(15, 23, 42, 0.96) 100%);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 24px 20px;
    box-shadow: var(--shadow-md);
    position: relative;
    overflow: hidden;
    margin-bottom: 24px;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.hero-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #ef4444, #f59e0b, #3b82f6);
}

.hero-header-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(245, 158, 11, 0.12);
    border: 1px solid rgba(245, 158, 11, 0.3);
    color: var(--primary);
    padding: 5px 12px;
    border-radius: var(--radius-full);
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    margin-bottom: 12px;
}

.hero-title {
    font-family: var(--font-heading);
    font-size: clamp(1.5rem, 4.5vw, 2.5rem);
    font-weight: 900;
    line-height: 1.2;
    color: #ffffff;
    margin-bottom: 12px;
}

.hero-title .gradient-text {
    background: linear-gradient(135deg, #f59e0b 0%, #fbbf24 50%, #f97316 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-description-wrapper {
    margin-bottom: 18px;
    max-width: 860px;
}

.hero-subtitle {
    color: var(--text-secondary);
    font-size: 0.92rem;
    line-height: 1.55;
    margin-bottom: 6px;
    transition: all 0.3s ease;
}

.hero-subtitle strong {
    color: #ffffff;
}

.hero-subtitle.text-collapsed {
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    line-clamp: 1;
}

.hero-subtitle.text-expanded {
    display: block;
}

.btn-toggle-desc {
    background: transparent;
    border: none;
    color: var(--primary);
    font-family: var(--font-body);
    font-size: 0.8rem;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 2px 4px;
    border-radius: var(--radius-sm);
    transition: all 0.2s ease;
}

.btn-toggle-desc:hover {
    color: #fbbf24;
    text-decoration: underline;
}

.btn-toggle-desc i {
    font-size: 0.72rem;
    transition: transform 0.25s ease;
}

.btn-toggle-desc.active i {
    transform: rotate(180deg);
}

@media (min-width: 768px) {
    .hero-card {
        padding: 28px 24px;
        margin-bottom: 24px;
    }
    .hero-subtitle {
        font-size: 0.98rem;
    }
}

/* Grid de KPIs / Destaques (Compacto & Responsivo) */
.hero-highlights-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    margin-top: 14px;
}

@media (min-width: 600px) {
    .hero-highlights-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 10px;
        margin-top: 16px;
    }
}

.highlight-box {
    background: rgba(255, 255, 255, 0.035);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 8px 10px;
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.highlight-box:hover {
    transform: translateY(-2px);
    border-color: rgba(255, 255, 255, 0.18);
    background: rgba(255, 255, 255, 0.06);
}

.highlight-icon {
    width: 30px;
    height: 30px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    flex-shrink: 0;
}

.highlight-icon.gold  { background: rgba(245, 158, 11, 0.15); color: #f59e0b; }
.highlight-icon.green { background: rgba(16, 185, 129, 0.15); color: #10b981; }
.highlight-icon.red   { background: rgba(239, 68, 68, 0.15);  color: #ef4444; }
.highlight-icon.blue  { background: rgba(59, 130, 246, 0.15); color: #3b82f6; }

.highlight-content {
    min-width: 0;
    overflow: hidden;
}

.highlight-content .highlight-title {
    font-size: 0.62rem;
    text-transform: uppercase;
    font-weight: 700;
    color: var(--text-muted);
    letter-spacing: 0.3px;
    line-height: 1.1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.highlight-content .highlight-value {
    font-family: var(--font-heading);
    font-size: 0.76rem;
    font-weight: 700;
    color: #ffffff;
    line-height: 1.2;
    margin-top: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

@media (min-width: 768px) {
    .highlight-box {
        padding: 8px 12px;
        gap: 8px;
    }
    .highlight-icon {
        width: 32px;
        height: 32px;
        font-size: 0.95rem;
    }
    .highlight-content .highlight-title {
        font-size: 0.64rem;
    }
    .highlight-content .highlight-value {
        font-size: 0.82rem;
    }
}

/* ==========================================================================
   PROGRESSO GERAL
   ========================================================================== */
.progress-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 16px 18px;
    margin-bottom: 24px;
    box-shadow: var(--shadow-sm);
}

.progress-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    flex-wrap: wrap;
    gap: 6px;
}

.progress-header-title {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 8px;
}

.progress-stats-summary {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.progress-stats-summary strong {
    color: var(--primary);
}

.progress-bar-container {
    height: 12px;
    background: rgba(255, 255, 255, 0.06);
    border-radius: var(--radius-full);
    overflow: hidden;
    position: relative;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.4);
}

.progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #ef4444, #f59e0b, #10b981);
    border-radius: var(--radius-full);
    transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.progress-bar-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.35), transparent);
    animation: progressShimmer 2.5s infinite;
}

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

@media (min-width: 768px) {
    .progress-card {
        padding: 20px 24px;
        margin-bottom: 30px;
    }
    .progress-bar-container {
        height: 14px;
    }
    .progress-header-title {
        font-size: 0.95rem;
    }
    .progress-stats-summary {
        font-size: 0.85rem;
    }
}

/* ==========================================================================
   LEGENDA VISUAL DOS NÚMEROS
   ========================================================================== */
.legend-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px 18px;
    flex-wrap: wrap;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    padding: 12px 16px;
    border-radius: var(--radius-full);
    margin-bottom: 24px;
    box-shadow: var(--shadow-sm);
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.legend-dot {
    width: 12px;
    height: 12px;
    border-radius: 3px;
    display: inline-block;
    flex-shrink: 0;
}

.legend-dot.disponivel  { background: #10b981; box-shadow: 0 0 6px rgba(16, 185, 129, 0.6); }
.legend-dot.selecionado { background: #f59e0b; box-shadow: 0 0 6px rgba(245, 158, 11, 0.7); }
.legend-dot.reservado   { background: #f97316; box-shadow: 0 0 6px rgba(249, 115, 22, 0.6); }
.legend-dot.pago        { background: #475569; box-shadow: 0 0 6px rgba(71, 85, 105, 0.4); }

@media (max-width: 640px) {
    .legend-container {
        display: none !important;
    }
}

/* ==========================================================================
   CARTELAS DA RIFA (GRID RESPONSIVO)
   - Mobile (< 768px): 1 Coluna (Cartelas empilhadas)
   - Tablet (768px - 1099px): 1 ou 2 Colunas adaptáveis
   - PC / Desktop (1100px+): 3 Colunas lado a lado
   ========================================================================== */
.cartelas-section {
    margin-bottom: 35px;
}

.cartelas-section-header {
    text-align: center;
    margin-bottom: 20px;
}

.cartelas-section-title {
    font-family: var(--font-heading);
    font-size: clamp(1.3rem, 3.5vw, 1.85rem);
    font-weight: 800;
    color: #ffffff;
    margin-bottom: 4px;
}

.cartelas-section-subtitle {
    color: var(--text-secondary);
    font-size: 0.88rem;
}

/* Grid de Cartelas */
.cartelas-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
}

@media (min-width: 768px) and (max-width: 1099px) {
    .cartelas-grid {
        grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
        gap: 22px;
    }
}

@media (min-width: 1100px) {
    .cartelas-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 24px;
    }
}

/* Card da Cartela */
.cartela-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 18px 16px;
    box-shadow: var(--shadow-md);
    transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
}

.cartela-card:hover {
    border-color: rgba(245, 158, 11, 0.35);
    box-shadow: var(--shadow-lg), 0 0 20px rgba(245, 158, 11, 0.1);
}

.cartela-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 14px;
    margin-bottom: 14px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.cartela-title-group .cartela-badge {
    font-family: var(--font-heading);
    font-size: 0.72rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: var(--primary);
    background: rgba(245, 158, 11, 0.12);
    padding: 2px 7px;
    border-radius: var(--radius-sm);
    display: inline-block;
    margin-bottom: 3px;
}

.cartela-title-group .cartela-name {
    font-family: var(--font-heading);
    font-size: 1.3rem;
    font-weight: 800;
    color: #ffffff;
    line-height: 1.1;
}

.cartela-prize-badge {
    text-align: right;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.12), rgba(5, 150, 105, 0.2));
    border: 1px solid rgba(16, 185, 129, 0.35);
    padding: 5px 10px;
    border-radius: var(--radius-md);
}

.cartela-prize-badge .prize-label {
    font-size: 0.65rem;
    text-transform: uppercase;
    font-weight: 700;
    color: #34d399;
    letter-spacing: 0.4px;
}

.cartela-prize-badge .prize-amount {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    font-weight: 900;
    color: #ffffff;
    line-height: 1.1;
}

/* Informações de Status */
.cartela-info-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.78rem;
    color: var(--text-muted);
    font-weight: 600;
    margin-bottom: 14px;
}

.cartela-info-bar .sold-badge {
    color: var(--text-secondary);
}

.cartela-info-bar .sold-badge strong {
    color: #ffffff;
}

/* ==========================================================================
   GRID DOS 20 NÚMEROS (OTIMIZADO PARA TOUCH & CLICK)
   ========================================================================== */
.numeros-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
}

@media (min-width: 400px) {
    .numeros-grid {
        gap: 10px;
    }
}

.btn-numero {
    aspect-ratio: 1;
    min-height: 52px;
    border-radius: var(--radius-md);
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.04);
    color: #ffffff;
    font-family: var(--font-heading);
    font-size: 1.12rem;
    font-weight: 800;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    position: relative;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    user-select: none;
    outline: none;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
    padding: 4px;
}

.btn-numero .num-label {
    line-height: 1;
    font-size: 1.12rem;
}

.btn-numero .num-subtext {
    font-size: 0.58rem;
    font-family: var(--font-body);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    margin-top: 3px;
    opacity: 0.75;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 92%;
    text-align: center;
}

/* Estado: Disponível */
.btn-numero.disponivel {
    border-color: rgba(16, 185, 129, 0.28);
    background: linear-gradient(145deg, rgba(16, 185, 129, 0.1), rgba(6, 78, 59, 0.22));
    color: #ecfdf5;
}

.btn-numero.disponivel:hover, .btn-numero.disponivel:active {
    transform: translateY(-2px) scale(1.04);
    border-color: #10b981;
    background: linear-gradient(145deg, rgba(16, 185, 129, 0.28), rgba(6, 78, 59, 0.48));
    box-shadow: 0 6px 16px rgba(16, 185, 129, 0.4);
    color: #ffffff;
}

/* Estado: Selecionado (no carrinho do usuário) */
.btn-numero.selecionado {
    border-color: #f59e0b;
    background: linear-gradient(145deg, #f59e0b, #d97706);
    color: #000000;
    box-shadow: 0 0 16px rgba(245, 158, 11, 0.75);
    transform: translateY(-2px) scale(1.05);
    animation: pulseSelected 1.8s infinite;
}

.btn-numero.selecionado .num-subtext {
    color: #000000;
    font-weight: 800;
    opacity: 1;
}

@keyframes pulseSelected {
    0% { box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.75); }
    70% { box-shadow: 0 0 0 8px rgba(245, 158, 11, 0); }
    100% { box-shadow: 0 0 0 0 rgba(245, 158, 11, 0); }
}

/* Estado: Reservado (Em Pagamento - 5 min) */
.btn-numero.reservado {
    border-color: rgba(249, 115, 22, 0.35);
    background: rgba(249, 115, 22, 0.12);
    color: #fdba74;
    cursor: not-allowed;
    opacity: 0.85;
}

.btn-numero.reservado .num-subtext {
    color: #fb923c;
}

/* Estado: Pago / Comprado */
.btn-numero.pago {
    border-color: rgba(255, 255, 255, 0.05);
    background: rgba(15, 23, 42, 0.85);
    color: #64748b;
    cursor: not-allowed;
    opacity: 0.65;
}

.btn-numero.pago .num-subtext {
    color: #94a3b8;
}

/* ==========================================================================
   BARRA FLUTUANTE DE CHECKOUT (CARRINHO STICKY NO RODAPÉ)
   ========================================================================== */
.checkout-floating-bar {
    position: fixed;
    bottom: 16px;
    left: 50%;
    transform: translateX(-50%) translateY(160px);
    width: min(94%, 880px);
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(245, 158, 11, 0.55);
    border-radius: var(--radius-full);
    padding: 10px 20px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.75), 0 0 25px rgba(245, 158, 11, 0.3);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 14px;
    z-index: 999;
    transition: transform 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.checkout-floating-bar.active {
    transform: translateX(-50%) translateY(0);
}

.checkout-bar-info {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    min-width: 0;
}

.checkout-bar-count {
    background: var(--primary);
    color: #000000;
    font-family: var(--font-heading);
    font-size: 0.88rem;
    font-weight: 800;
    padding: 4px 10px;
    border-radius: var(--radius-full);
    display: inline-flex;
    align-items: center;
    gap: 5px;
    white-space: nowrap;
}

.checkout-bar-details {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.checkout-bar-summary {
    font-size: 0.8rem;
    color: var(--text-secondary);
    max-width: 360px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.checkout-bar-total {
    font-family: var(--font-heading);
    font-size: 1.15rem;
    font-weight: 900;
    color: #ffffff;
    line-height: 1.1;
}

.checkout-bar-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.btn-clear-selection {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: var(--text-muted);
    padding: 8px 12px;
    border-radius: var(--radius-full);
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-clear-selection:hover, .btn-clear-selection:active {
    color: #ef4444;
    border-color: rgba(239, 68, 68, 0.4);
    background: rgba(239, 68, 68, 0.1);
}

.btn-checkout-cta {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    border: none;
    color: #000000;
    font-family: var(--font-heading);
    font-size: 0.95rem;
    font-weight: 800;
    padding: 10px 20px;
    border-radius: var(--radius-full);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 15px rgba(245, 158, 11, 0.45);
    transition: all 0.2s ease;
    white-space: nowrap;
}

.btn-checkout-cta:hover, .btn-checkout-cta:active {
    transform: scale(1.03);
    box-shadow: 0 6px 20px rgba(245, 158, 11, 0.65);
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
}

/* Adaptações Mobile da Barra Flutuante (< 640px) */
@media (max-width: 640px) {
    .checkout-floating-bar {
        flex-direction: column;
        align-items: stretch;
        border-radius: var(--radius-lg);
        padding: 12px 16px;
        bottom: 10px;
        gap: 10px;
        width: calc(100% - 20px);
    }
    .checkout-bar-info {
        justify-content: space-between;
        align-items: center;
        width: 100%;
    }
    .checkout-bar-details {
        text-align: right;
    }
    .checkout-bar-summary {
        max-width: 200px;
        font-size: 0.75rem;
    }
    .checkout-bar-actions {
        display: flex;
        width: 100%;
        gap: 8px;
    }
    .btn-clear-selection {
        flex: 0 0 auto;
        padding: 10px 14px;
    }
    .btn-checkout-cta {
        flex: 1;
        justify-content: center;
        padding: 12px 16px;
        font-size: 0.95rem;
    }
}

/* ==========================================================================
   MODAIS (CHECKOUT FORM & PAGAMENTO PIX)
   ========================================================================= */
.rifa-modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 1000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 12px;
}

.rifa-modal-backdrop.open {
    display: flex;
}

.rifa-modal-window {
    background: #0f172a;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 520px;
    max-height: 90vh;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    box-shadow: var(--shadow-lg), 0 0 35px rgba(0,0,0,0.8);
    position: relative;
    animation: modalSlideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modalSlideUp {
    from { opacity: 0; transform: translateY(25px) scale(0.96); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

.modal-header {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(255, 255, 255, 0.02);
    position: sticky;
    top: 0;
    z-index: 2;
    background: #0f172a;
}

.modal-header-title {
    font-family: var(--font-heading);
    font-size: 1.15rem;
    font-weight: 800;
    color: #ffffff;
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-modal-close {
    background: rgba(255, 255, 255, 0.06);
    border: none;
    color: var(--text-secondary);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.9rem;
}

.btn-modal-close:hover, .btn-modal-close:active {
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
}

.modal-body {
    padding: 20px;
}

@media (max-width: 480px) {
    .modal-header { padding: 14px 16px; }
    .modal-body { padding: 16px; }
}

/* ==========================================================================
   FORMULÁRIO DE DADOS DO COMPRADOR
   ========================================================================== */
.order-summary-box {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 14px 16px;
    margin-bottom: 18px;
}

.order-summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
    margin-bottom: 6px;
}

.order-summary-row:last-child {
    margin-bottom: 0;
    padding-top: 8px;
    border-top: 1px dashed rgba(255, 255, 255, 0.1);
    font-weight: 800;
    font-size: 1.05rem;
    color: var(--primary);
}

.selected-numbers-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 8px 0;
}

.selected-pill {
    background: rgba(245, 158, 11, 0.15);
    border: 1px solid rgba(245, 158, 11, 0.35);
    color: #fbbf24;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: var(--radius-sm);
}

.form-group {
    margin-bottom: 14px;
}

.form-label {
    display: block;
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--text-secondary);
    margin-bottom: 5px;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

.form-label .required {
    color: var(--accent-red);
}

/* Previne zoom automático indesejado no Safari iOS (font-size >= 16px) */
.form-control {
    width: 100%;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 12px 14px;
    color: #ffffff;
    font-family: var(--font-body);
    font-size: 16px;
    transition: all 0.2s ease;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.2);
    background: rgba(0, 0, 0, 0.6);
}

.form-control::placeholder {
    color: var(--text-muted);
}

.form-hint {
    font-size: 0.72rem;
    color: var(--text-muted);
    margin-top: 4px;
    line-height: 1.4;
}

.btn-submit-order {
    width: 100%;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    border: none;
    color: #ffffff;
    font-family: var(--font-heading);
    font-size: 1rem;
    font-weight: 800;
    padding: 13px 18px;
    border-radius: var(--radius-md);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 6px 18px rgba(16, 185, 129, 0.35);
    transition: all 0.2s ease;
    margin-top: 8px;
}

.btn-submit-order:hover:not(:disabled), .btn-submit-order:active:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 22px rgba(16, 185, 129, 0.5);
    background: linear-gradient(135deg, #34d399 0%, #10b981 100%);
}

.btn-submit-order:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* ==========================================================================
   MODAL DE PAGAMENTO PIX & CRONÔMETRO
   ========================================================================== */
.pix-timer-card {
    background: rgba(245, 158, 11, 0.08);
    border: 1px solid rgba(245, 158, 11, 0.25);
    border-radius: var(--radius-md);
    padding: 12px 16px;
    text-align: center;
    margin-bottom: 16px;
}

.pix-timer-card.danger {
    background: rgba(239, 68, 68, 0.12);
    border-color: rgba(239, 68, 68, 0.45);
}

.pix-timer-label {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.7px;
    color: var(--text-secondary);
    margin-bottom: 2px;
}

.pix-timer-clock {
    font-family: var(--font-heading);
    font-size: clamp(1.8rem, 6vw, 2.3rem);
    font-weight: 900;
    color: #fbbf24;
    letter-spacing: 2px;
    line-height: 1.1;
}

.pix-timer-card.danger .pix-timer-clock {
    color: #ef4444;
    animation: timerBlink 1s infinite;
}

@keyframes timerBlink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

.pix-timer-hint {
    font-size: 0.72rem;
    color: var(--text-muted);
    margin-top: 4px;
}

.qr-code-wrapper {
    background: #ffffff;
    padding: 12px;
    border-radius: var(--radius-md);
    width: fit-content;
    margin: 0 auto 16px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 180px;
    min-width: 180px;
}

.qr-code-wrapper img, .qr-code-wrapper canvas {
    max-width: 100%;
    height: auto;
    display: block;
}

.pix-copy-box {
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 10px 14px;
    margin-bottom: 16px;
}

.pix-code-text {
    font-family: monospace;
    font-size: 0.75rem;
    color: var(--text-secondary);
    word-break: break-all;
    max-height: 55px;
    overflow-y: auto;
    margin-bottom: 8px;
    padding: 6px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: var(--radius-sm);
}

.btn-copy-pix {
    width: 100%;
    background: rgba(245, 158, 11, 0.15);
    border: 1px solid rgba(245, 158, 11, 0.4);
    color: #fbbf24;
    font-family: var(--font-heading);
    font-size: 0.9rem;
    font-weight: 800;
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.2s ease;
}

.btn-copy-pix:hover, .btn-copy-pix:active {
    background: var(--primary);
    color: #000000;
}

.pix-status-badge {
    text-align: center;
    padding: 9px 12px;
    border-radius: var(--radius-md);
    font-size: 0.82rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.pix-status-badge.waiting  { background: rgba(59, 130, 246, 0.1);  border: 1px solid rgba(59, 130, 246, 0.3);  color: #60a5fa; }
.pix-status-badge.approved { background: rgba(16, 185, 129, 0.15); border: 1px solid rgba(16, 185, 129, 0.4); color: #34d399; }
.pix-status-badge.expired  { background: rgba(239, 68, 68, 0.15);  border: 1px solid rgba(239, 68, 68, 0.4);  color: #f87171; }

/* ==========================================================================
   TELA DE SUCESSO / COMPROVANTE
   ========================================================================== */
.success-screen {
    text-align: center;
    padding: 8px 0;
}

.success-icon-badge {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: rgba(16, 185, 129, 0.15);
    border: 2px solid #10b981;
    color: #10b981;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    margin: 0 auto 12px;
    box-shadow: 0 0 20px rgba(16, 185, 129, 0.4);
    animation: scaleBounce 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes scaleBounce {
    0% { transform: scale(0.3); opacity: 0; }
    70% { transform: scale(1.15); }
    100% { transform: scale(1); opacity: 1; }
}

.success-title {
    font-family: var(--font-heading);
    font-size: 1.35rem;
    font-weight: 900;
    color: #ffffff;
    margin-bottom: 4px;
}

.success-subtitle {
    color: var(--text-secondary);
    font-size: 0.85rem;
    margin-bottom: 16px;
}

.receipt-card {
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 14px;
    text-align: left;
    margin-bottom: 16px;
    font-size: 0.82rem;
}

.receipt-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 6px;
    word-break: break-word;
}

.receipt-row:last-child {
    margin-bottom: 0;
    padding-top: 6px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    font-weight: 700;
}

/* ==========================================================================
   SEÇÕES DE REGRAS, TRANSPARÊNCIA E COMPARTILHAMENTO
   ========================================================================== */
.info-section {
    margin-top: 35px;
}

.accordion-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    margin-bottom: 10px;
    overflow: hidden;
}

.accordion-header {
    padding: 16px 18px;
    font-family: var(--font-heading);
    font-size: 0.98rem;
    font-weight: 700;
    color: #ffffff;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(255, 255, 255, 0.02);
    transition: background 0.2s ease;
}

.accordion-header:hover {
    background: rgba(255, 255, 255, 0.05);
}

.accordion-body {
    padding: 0 18px 16px;
    color: var(--text-secondary);
    font-size: 0.88rem;
    line-height: 1.6;
}

.share-banner {
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.7) 0%, rgba(15, 23, 42, 0.9) 100%);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 20px 16px;
    text-align: center;
    margin-top: 28px;
}

.share-banner-title {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    font-weight: 800;
    color: #ffffff;
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.share-buttons-group {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.btn-share-whatsapp {
    background: #25d366;
    color: #ffffff;
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 0.9rem;
    padding: 10px 20px;
    border-radius: var(--radius-full);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 15px rgba(37, 211, 102, 0.35);
    transition: all 0.2s ease;
    border: none;
    cursor: pointer;
}

.btn-share-whatsapp:hover, .btn-share-whatsapp:active {
    background: #1ebc59;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(37, 211, 102, 0.5);
    color: #ffffff;
}

.btn-share-instagram {
    background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
    color: #ffffff;
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 0.9rem;
    padding: 10px 20px;
    border-radius: var(--radius-full);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 15px rgba(225, 48, 108, 0.35);
    transition: all 0.2s ease;
    border: none;
    cursor: pointer;
}

.btn-share-instagram:hover, .btn-share-instagram:active {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(225, 48, 108, 0.55);
    filter: brightness(1.1);
    color: #ffffff;
}

/* Toast Notifications */
.rifa-toast {
    position: fixed;
    bottom: 85px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: rgba(15, 23, 42, 0.95);
    border: 1px solid var(--primary);
    color: #ffffff;
    padding: 10px 18px;
    border-radius: var(--radius-full);
    font-size: 0.84rem;
    font-weight: 600;
    box-shadow: var(--shadow-lg);
    z-index: 2000;
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    pointer-events: none;
    text-align: center;
    max-width: 90%;
}

.rifa-toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* Badge Fixo no Rodapé (Pagamento Seguro Mercado Pago) */
.floating-security-badge {
    position: fixed;
    bottom: 16px;
    left: 16px;
    z-index: 990;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(15, 23, 42, 0.92);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(245, 158, 11, 0.35);
    color: var(--text-primary);
    padding: 6px 14px;
    border-radius: var(--radius-md);
    font-size: 0.74rem;
    font-weight: 600;
    line-height: 1.25;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.55);
    pointer-events: auto;
    transition: all 0.25s ease;
    letter-spacing: 0.2px;
}

.floating-security-badge span {
    display: inline-block;
    text-align: left;
}

.floating-security-badge i {
    font-size: 0.95rem;
    color: #10b981;
    flex-shrink: 0;
}

.floating-security-badge:hover {
    border-color: var(--primary);
    background: rgba(15, 23, 42, 0.98);
    transform: translateY(-1px);
    box-shadow: 0 6px 22px rgba(245, 158, 11, 0.2);
}

/* Botões Sociais Fixos no Lado Esquerdo */
.floating-social-dock-left {
    position: fixed;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 995;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.floating-social-btn {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    text-decoration: none;
    font-size: 1.4rem;
    position: relative;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.45);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.floating-social-btn.whatsapp {
    background: linear-gradient(135deg, #25d366, #128c7e);
    box-shadow: 0 4px 18px rgba(37, 211, 102, 0.45);
}

.floating-social-btn.whatsapp:hover {
    transform: scale(1.12) translateX(3px);
    box-shadow: 0 8px 25px rgba(37, 211, 102, 0.65);
    color: #ffffff;
}

.floating-social-btn.instagram {
    background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
    box-shadow: 0 4px 18px rgba(225, 48, 108, 0.45);
}

.floating-social-btn.instagram:hover {
    transform: scale(1.12) translateX(3px);
    box-shadow: 0 8px 25px rgba(225, 48, 108, 0.65);
    color: #ffffff;
}

.social-btn-tooltip {
    position: absolute;
    left: 56px;
    background: rgba(15, 23, 42, 0.95);
    color: #ffffff;
    font-size: 0.78rem;
    font-weight: 600;
    padding: 6px 12px;
    border-radius: var(--radius-md);
    border: 1px solid rgba(255, 255, 255, 0.15);
    white-space: nowrap;
    opacity: 0;
    transform: translateX(-10px);
    pointer-events: none;
    transition: all 0.25s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
}

.floating-social-btn:hover .social-btn-tooltip {
    opacity: 1;
    transform: translateX(0);
}

/* Card Fixo: Data do Sorteio (Canto Direito) */
.floating-draw-card {
    position: fixed;
    bottom: 16px;
    right: 16px;
    z-index: 990;
    background: rgba(15, 23, 42, 0.94);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1px solid rgba(245, 158, 11, 0.4);
    border-radius: var(--radius-md);
    padding: 9px 14px;
    max-width: 280px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.65), 0 0 15px rgba(245, 158, 11, 0.15);
    transition: all 0.25s ease;
    animation: fadeInDrawCard 0.5s ease-out;
}

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

.floating-draw-card:hover {
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.75), 0 0 20px rgba(245, 158, 11, 0.25);
}

.draw-card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 3px;
}

.draw-card-title {
    font-family: var(--font-heading);
    font-size: 0.8rem;
    font-weight: 800;
    color: #ffffff;
    display: flex;
    align-items: center;
    gap: 6px;
    letter-spacing: 0.3px;
}

.draw-card-title i {
    color: var(--primary);
    font-size: 0.85rem;
}

.draw-status-badge {
    background: rgba(245, 158, 11, 0.15);
    border: 1px solid rgba(245, 158, 11, 0.4);
    color: #fbbf24;
    font-size: 0.68rem;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: var(--radius-sm);
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

.draw-card-subtitle {
    font-size: 0.72rem;
    color: var(--text-secondary);
    line-height: 1.35;
    display: flex;
    align-items: center;
    gap: 5px;
}

.draw-card-subtitle i {
    color: #25d366;
    font-size: 0.8rem;
    flex-shrink: 0;
}

@media (max-width: 640px) {
    .floating-social-dock-left {
        left: 8px;
        gap: 8px;
    }
    .floating-social-btn {
        width: 38px;
        height: 38px;
        font-size: 1.15rem;
    }
    .social-btn-tooltip {
        display: none;
    }
    .floating-security-badge {
        bottom: 10px;
        left: 10px;
        padding: 5px 9px;
        font-size: 0.63rem;
        border-radius: var(--radius-sm);
    }
    .floating-security-badge i {
        font-size: 0.8rem;
    }
    .floating-draw-card {
        bottom: 10px;
        right: 10px;
        padding: 7px 9px;
        max-width: 185px;
        border-radius: var(--radius-sm);
    }
    .draw-card-title {
        font-size: 0.68rem;
    }
    .draw-status-badge {
        font-size: 0.58rem;
        padding: 1px 4px;
    }
    .draw-card-subtitle {
        font-size: 0.6rem;
        line-height: 1.2;
    }
}
