:root {
    /* Brand */
    --primary: #22c55e;
    --primary-dark: #16a34a;
    --primary-glow: rgba(34, 197, 94, 0.35);
    --secondary: #facc15;
    --secondary-glow: rgba(250, 204, 21, 0.35);

    /* Surfaces */
    --bg-dark: #060606;
    --card-bg: rgba(18, 18, 18, 0.75);
    --card-bg-hover: rgba(25, 25, 25, 0.9);
    --glass-border: rgba(255, 255, 255, 0.07);
    --glass-border-hover: rgba(255, 255, 255, 0.15);

    /* Typography */
    --text-main: #f8fafc;
    --text-muted: #64748b;
    --text-dim: #94a3b8;

    /* Radii */
    --radius-lg: 1.25rem;
    --radius-md: 0.75rem;
    --radius-sm: 0.5rem;

    /* Semantic */
    --success: #22c55e;
    --warning: #facc15;
    --danger: #ef4444;

    /* Elevation */
    --shadow-card: 0 4px 24px rgba(0,0,0,0.4);
    --shadow-modal: 0 20px 60px rgba(0,0,0,0.7);
    --shadow-float: 0 8px 32px rgba(0,0,0,0.6);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
}

h1, h2, h3, .logo h2 {
    font-family: 'Outfit', sans-serif !important;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
    padding-top: 120px;
    background-image: 
        radial-gradient(circle at 0% 0%, rgba(34, 197, 94, 0.05) 0%, transparent 50%),
        radial-gradient(circle at 100% 100%, rgba(250, 204, 21, 0.03) 0%, transparent 50%);
}

.navbar {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    height: 70px;
    padding: 0 2.5rem;
    background: rgba(10, 10, 10, 0.7);
    backdrop-filter: blur(25px) saturate(200%);
    -webkit-backdrop-filter: blur(25px) saturate(200%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    position: fixed;
    top: 1.5rem;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    max-width: 900px;
    border-radius: 100px;
    z-index: 2000;
    box-shadow: 0 20px 40px rgba(0,0,0,0.4);
}

.navbar > a {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    height: 100%;
}

.navbar-links {
    display: flex;
    gap: 3rem;
    align-items: center;
    justify-self: center;
    height: 100%;
}

.nav-auth {
    display: flex;
    gap: 1.5rem;
    align-items: center;
    justify-self: end;
    height: 100%;
}

.hamburger-btn {
    display: none;
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
}

@media (max-width: 768px) {
    .navbar {
        display: flex;
        justify-content: space-between;
        padding: 0.75rem 1rem;
        top: 0.5rem;
        height: auto; /* Deixa a altura livre no mobile */
    }
    .navbar > a {
        display: flex;
    }
    .navbar-links {
        display: none;
    }
    .nav-auth {
        display: flex;
    }
    
    .nav-secure-badge {
        display: none;
    }
    
    .hamburger-btn {
        display: block;
    }
}

.navbar-links a {
    color: var(--text);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    line-height: 1;
    display: flex;
    align-items: center;
    padding-top: 2px; /* Nudge para alinhar visualmente com o texto do cadeado */
}


.mobile-menu-overlay {
    position: fixed;
    top: 0;
    right: -100%;
    width: 100%;
    height: 100vh;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(10px);
    z-index: 3000;
    transition: right 0.3s ease;
}

.mobile-menu-overlay.open {
    right: 0;
}

.mobile-menu-content {
    width: 280px;
    height: 100%;
    background: #111;
    float: right;
    display: flex;
    flex-direction: column;
    box-shadow: -5px 0 25px rgba(0,0,0,0.5);
}

.close-menu-btn {
    background: none;
    border: none;
    color: white;
    font-size: 2rem;
    cursor: pointer;
}

.mobile-menu-links {
    display: flex;
    flex-direction: column;
    padding: 2rem;
    gap: 1.5rem;
}

.mobile-menu-links a {
    color: white;
    text-decoration: none;
    font-size: 1.2rem;
    font-weight: 700;
    text-transform: uppercase;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

/* Glassmorphism Evolution */
.glass {
    background: var(--card-bg);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
}

/* Header & Hero */
header {
    text-align: center;
    margin-bottom: 3rem;
    padding: 2rem 0;
}

.hero-card {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
    padding: 2rem;
    align-items: center;
    margin-bottom: 3rem;
}

.hero-image {
    flex: 1;
    min-width: 300px;
    height: 400px; /* Aumentado para acomodar melhor imagens verticais */
    border-radius: 1rem;
    overflow: hidden;
    position: relative;
    background: #0d0d0d;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-image img {
    width: 100%;
    height: 100%;
    object-fit: contain; /* Foto INTEIRA sem cortes */
    transition: transform 0.5s ease;
}

.hero-image:hover img {
    transform: scale(1.05);
}

.hero-content {
    flex: 1.5;
    min-width: 300px;
}

.badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: var(--primary);
    border-radius: 2rem;
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

h1 {
    font-size: clamp(2.2rem, 8vw, 4.5rem);
    font-weight: 900;
    margin-bottom: 0.5rem;
    background: linear-gradient(180deg, #ffffff 0%, #a1a1aa 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -2px;
    line-height: 1.1;
}

.price-tag {
    font-size: 2rem;
    font-weight: 700;
    color: var(--secondary);
    margin-bottom: 1.5rem;
}

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

.progress-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--primary) 0%, #34d399 60%, #a3e635 100%);
    box-shadow: 0 0 12px var(--primary-glow);
    transition: width 1.2s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 4px;
}

/* Raffle Grid */
.raffle-container {
    margin-top: 2rem;
}

.grid-header {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.filter-bar {
    display: flex;
    gap: 0.75rem;
    overflow-x: auto;
    padding: 0.5rem 0.25rem 1rem 0.25rem;
    -ms-overflow-style: none;  /* IE and Edge */
    scrollbar-width: none;  /* Firefox */
}

.filter-bar::-webkit-scrollbar {
    display: none; /* Chrome, Safari and Opera */
}

.filter-btn {
    padding: 0.75rem 1.5rem;
    border-radius: 100px;
    border: 1px solid var(--glass-border);
    background: rgba(255, 255, 255, 0.03);
    color: var(--text-muted);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(5px);
}

.filter-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    transform: translateY(-2px);
}

.filter-btn.active[data-filter="todos"] {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    font-weight: 800;
    border-color: rgba(255, 255, 255, 0.3);
    box-shadow: none;
}

.filter-btn.active[data-filter="disponivel"] {
    background: var(--primary);
    color: #000;
    font-weight: 800;
    border-color: var(--primary);
    box-shadow: 0 0 20px rgba(34, 197, 94, 0.4);
}

.filter-btn.active[data-filter="reservado"] {
    background: #f59e0b;
    color: #000;
    font-weight: 800;
    border-color: #f59e0b;
    box-shadow: 0 0 20px rgba(245, 158, 11, 0.4);
}

.filter-btn.active[data-filter="vendido"] {
    background: #dc2626;
    color: #fff;
    font-weight: 800;
    border-color: #dc2626;
    box-shadow: 0 0 20px rgba(220, 38, 38, 0.4);
}

.filters-wrapper {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    position: sticky;
    top: 90px; /* abaixo do navbar fixo no desktop */
    z-index: 50;
    background: var(--bg);
    padding: 0.5rem 0 0.75rem 0;
    margin: 0 -0.5rem;
    padding-left: 0.5rem;
    padding-right: 0.5rem;
}

@media (max-width: 768px) {
    .filters-wrapper {
        top: 68px; /* navbar mobile é menor */
    }
}

.search-trigger-btn {
    width: 100%;
}

@media (min-width: 768px) {
    .filters-wrapper {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }
    .search-trigger-btn {
        width: auto !important;
        margin-top: 0 !important;
    }
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.dot.available { background: var(--success); }
.dot.reserved { background: var(--warning); }
.dot.sold { background: var(--danger); }

.numbers-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(60px, 1fr));
    gap: 0.75rem;
    margin-bottom: 2rem;
    contain: layout style; /* Otimização de renderização */
}

.number-card {
    aspect-ratio: 1;
    position: relative; /* necessário para o ::after badge */
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 0.9rem;
    cursor: pointer;
    transition: transform 0.18s cubic-bezier(0.4, 0, 0.2, 1),
                box-shadow 0.18s cubic-bezier(0.4, 0, 0.2, 1),
                background 0.15s ease,
                border-color 0.15s ease;
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 0.6rem;
    background: rgba(255, 255, 255, 0.03);
    color: var(--text-dim);
    user-select: none;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation; /* elimina 300ms delay no mobile */
    min-height: 44px; /* acessibilidade: área mínima de toque */
}

.number-card.disponivel {
    border-color: rgba(34, 197, 94, 0.18);
    color: var(--primary);
}

@media (hover: hover) {
    .number-card.disponivel:hover {
        background: rgba(34, 197, 94, 0.08);
        border-color: rgba(34, 197, 94, 0.4);
        transform: translateY(-1px);
    }
}

.number-card.disponivel:active {
    transform: scale(0.93);
    transition: transform 0.08s;
}

.number-card.selected {
    background: var(--secondary);
    color: #000;
    border-color: var(--secondary);
    box-shadow: 0 0 0 2px var(--secondary), 0 6px 20px rgba(250, 204, 21, 0.4);
}

.number-card.selected::after {
    content: '✓';
    position: absolute;
    top: -5px;
    right: -5px;
    background: #111;
    color: var(--secondary);
    border-radius: 50%;
    width: 16px;
    height: 16px;
    font-size: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
    border: 1px solid rgba(0,0,0,0.3);
}

.number-card.reservado {
    background: rgba(245, 158, 11, 0.15);
    color: #f59e0b;
    border-color: rgba(245, 158, 11, 0.35);
    cursor: not-allowed;
}

.number-card.vendido {
    background: rgba(220, 38, 38, 0.15);
    color: rgba(239, 68, 68, 0.8);
    border-color: rgba(220, 38, 38, 0.25);
    cursor: not-allowed;
}

/* Animations & Skeletons */
@keyframes skeletonPulse {
    0% { background-color: rgba(255, 255, 255, 0.03); }
    50% { background-color: rgba(255, 255, 255, 0.08); }
    100% { background-color: rgba(255, 255, 255, 0.03); }
}

.skeleton {
    animation: skeletonPulse 1.5s infinite ease-in-out;
    border-radius: 0.5rem;
    pointer-events: none;
}

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

.number-card {
    opacity: 0;
    animation: gridFadeIn 0.4s ease forwards;
}

/* Floating Action Bar */
.action-bar {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    max-width: 500px;
    padding: 1.25rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 100;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
    visibility: hidden;
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    background: rgba(15, 15, 15, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 100px;
}

.action-bar.visible {
    visibility: visible;
    opacity: 1;
    bottom: 3rem;
}

.btn {
    padding: 1rem 1.5rem;
    border-radius: 0.75rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: none;
    font-size: 1rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 50px; /* Thumb-friendly height */
}

.btn-primary {
    background: var(--primary);
    color: white;
    box-shadow: 0 4px 15px var(--primary-glow);
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: 0 8px 25px var(--primary-glow);
}

.btn-primary:active {
    transform: scale(0.97);
    transition: transform 0.08s;
}

.btn:active, .number-card:active {
    transform: scale(0.95);
    transition: transform 0.1s;
}



.modal::-webkit-scrollbar {
    width: 4px;
}

.modal::-webkit-scrollbar-thumb {
    background: var(--secondary);
    border-radius: 10px;
}

.modal h2 {
    margin-bottom: 1.5rem;
}

.form-group {
    margin-bottom: 1.25rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
    color: var(--text-muted);
}

.form-group input {
    width: 100%;
    padding: 0.75rem 1rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    border-radius: 0.5rem;
    color: white;
    outline: none;
}

.form-group input:focus {
    border-color: var(--primary);
}

.pix-instructions {
    background: rgba(255, 255, 255, 0.05);
    padding: 1.5rem;
    border-radius: 1rem;
    margin-bottom: 1.5rem;
    text-align: center;
}

.pix-key {
    font-family: monospace;
    background: black;
    padding: 0.5rem;
    border-radius: 0.25rem;
    display: block;
    margin: 1rem 0;
    word-break: break-all;
}

/* --- MODALS (BLINDAGEM UI) --- */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(10px);
    display: none; /* Escondido por padrão */
    align-items: center;
    justify-content: center;
    z-index: 100000; /* Mais alto que o cabeçalho */
    padding: 1rem;
}

.modal-overlay.open {
    display: flex; /* Mostra quando tem a classe .open */
}

.modal {
    width: 100%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    padding: 2rem;
    margin: 1rem;
    animation: modalIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

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

/* Admin Styles */
.info-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-top: 3rem;
}

@media (max-width: 992px) {
    .info-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .info-grid {
        grid-template-columns: 1fr;
    }
}

.admin-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.stat-card {
    padding: 1.5rem;
    text-align: center;
}

.stat-value {
    font-size: 2rem;
    font-weight: 800;
    color: var(--primary);
}

.stat-label {
    color: var(--text-muted);
    font-size: 0.875rem;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
}

th, td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--glass-border);
}

.status-pill {
    padding: 0.25rem 0.75rem;
    border-radius: 1rem;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
}

.status-pill.disponivel { background: rgba(34, 197, 94, 0.2); color: #4ade80; }
.status-pill.reservado { background: rgba(234, 179, 8, 0.2); color: #facc15; }
.status-pill.vendido { background: rgba(239, 68, 68, 0.2); color: #f87171; }

.admin-actions {
    display: flex;
    gap: 0.5rem;
}

.btn-sm {
    padding: 0.4rem 0.8rem;
    font-size: 0.875rem;
}

.btn-success { background: var(--success); color: white; }
.btn-danger { background: var(--danger); color: white; }

.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

.raffle-grid-home {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
    width: 100%;
}

.home-card {
    background: var(--card-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1),
                border-color 0.25s ease,
                box-shadow 0.25s ease;
    display: flex;
    flex-direction: column;
}

.home-card:hover {
    transform: translateY(-6px);
    border-color: var(--glass-border-hover);
    box-shadow: 0 20px 50px rgba(0,0,0,0.5), 0 0 0 1px rgba(34,197,94,0.1);
}

.home-card-img {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1; /* Quadrado agora para aceitar melhor qualquer formato */
    overflow: hidden;
    background: #0d0d0d;
    display: flex;
    align-items: center;
    justify-content: center;
}

.home-card-img img {
    width: 100%;
    height: 100%;
    object-fit: contain; /* Foto INTEIRA sem cortes */
    display: block;
}

/* AJUSTE EXCLUSIVO MOBILE */
@media (max-width: 768px) {
    .home-card-img {
        aspect-ratio: 4 / 5 !important; /* Formato mais vertical no mobile */
        height: auto !important;
        min-height: 0;
        background: #0d0d0d;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .home-card-img img {
        height: 100% !important;
        width: 100% !important;
        object-fit: contain !important; /* Foto INTEIRA no mobile */
    }
    
    .home-card-img::after {
        content: '';
        position: absolute;
        bottom: 0;
        left: 0;
        width: 100%;
        height: 50%;
        background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
        pointer-events: none;
    }
}

.home-card-content {
    padding: 1.5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.home-card-title {
    font-weight: 800;
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

.home-card-desc {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* Footer Sections */
.info-section {
    padding: 4rem 0;
    border-top: 1px solid var(--glass-border);
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 3rem;
}

.section-title {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.5rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
}

.how-it-works {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
    counter-reset: step;
}

.step-card {
    position: relative;
    padding-left: 4rem;
}

.step-card::before {
    counter-increment: step;
    content: counter(step);
    position: absolute;
    left: 0;
    top: 0;
    font-size: 4rem;
    font-weight: 900;
    color: rgba(255, 255, 255, 0.05);
    line-height: 1;
}

.step-title {
    font-weight: 700;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.step-desc {
    font-size: 0.875rem;
    color: var(--text-muted);
}

/* Floating WhatsApp */
.whatsapp-btn {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 60px;
    height: 60px;
    background: #25d366;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    z-index: 1000;
    transition: transform 0.3s;
}

.whatsapp-btn:hover {
    transform: scale(1.1);
}

.whatsapp-btn img {
    width: 35px;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .container {
        padding: 1rem;
    }

    nav, .navbar {
        padding: 0.75rem 1.5rem;
        width: 95%;
        top: 0.5rem;
    }

    .nav-links, .navbar-links {
        display: none;
    }

    h1 {
        font-size: 2.25rem;
        line-height: 1;
        letter-spacing: -1px;
        margin-bottom: 0.25rem;
    }

    header {
        padding: 1rem 0 0.25rem 0 !important;
        margin-bottom: 1rem !important;
    }

    .premium-hero {
        padding: 4rem 1rem;
    }

    .premium-hero p {
        font-size: 1rem !important;
    }

    .hero-card {
        padding: 1rem;
        flex-direction: column;
    }

    .hero-image {
        width: 100%;
        height: auto;
        min-height: 250px;
        max-height: 650px;
        aspect-ratio: auto;
        min-width: unset;
    }

    .hero-image img {
        height: auto !important;
    }

    .numbers-grid {
        grid-template-columns: repeat(5, 1fr); /* 5 colunas no mobile */
        gap: 6px;
    }

    .number-card {
        font-size: 0.875rem;
        min-height: 44px; /* Área de toque mínima */
    }

    .action-bar {
        width: 100%;
        padding: 0.75rem 1.25rem;
        padding-bottom: calc(0.75rem + env(safe-area-inset-bottom, 0px));
        flex-direction: row;
        gap: 1rem;
        text-align: left;
        bottom: 0 !important;
        border-radius: 1.5rem 1.5rem 0 0;
        box-shadow: 0 -10px 25px rgba(0,0,0,0.5);
    }

    .action-bar .btn {
        width: auto;
        flex: 1;
        padding: 0.75rem;
    }

    .home-card {
        flex-direction: column;
    }

    .home-card-img {
        width: 100%;
        height: auto;
    }

    .modal {
        margin: 0;
        max-width: 100%;
        width: 100%;
        border-radius: 1.5rem 1.5rem 0 0;
        align-self: flex-end;
        padding-top: 2.5rem;
        animation: slideUp 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    }
    
    .modal::before {
        content: '';
        position: absolute;
        top: 10px;
        left: 50%;
        transform: translateX(-50%);
        width: 40px;
        height: 4px;
        background: rgba(255, 255, 255, 0.2);
        border-radius: 4px;
    }
}

@keyframes slideUp {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
}

/* Premium Hero Section */
.premium-hero {
    padding: 8rem 0 0 0; /* Zero absoluto na base */
    text-align: center;
    background: 
        radial-gradient(circle at top, rgba(239, 68, 68, 0.2) 0%, transparent 60%),
        linear-gradient(to bottom, #0a0a0a 0%, transparent 10%, transparent 90%, #0a0a0a 100%);
    position: relative;
    overflow: hidden;
    margin-top: -100px; /* Faz o brilho subir para trás do navbar */
    z-index: 1;
}

.premium-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        repeating-linear-gradient(45deg, rgba(255, 255, 255, 0.05) 25%, transparent 25%, transparent 75%, rgba(255, 255, 255, 0.05) 75%, rgba(255, 255, 255, 0.05)),
        repeating-linear-gradient(45deg, rgba(255, 255, 255, 0.05) 25%, transparent 25%, transparent 75%, rgba(255, 255, 255, 0.05) 75%, rgba(255, 255, 255, 0.05));
    background-position: 0 0, 10px 10px;
    background-size: 20px 20px;
    opacity: 0.1;
    pointer-events: none;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}



/* Trust Badges */
.trust-badges-container {
    display: flex;
    justify-content: center;
    gap: 3rem;
    margin-top: 4rem;
    flex-wrap: wrap;
}

.trust-badge-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    opacity: 0.7;
    transition: opacity 0.3s;
}

.trust-badge-item:hover {
    opacity: 1;
}

.trust-badge-icon {
    font-size: 2rem;
}

.trust-badge-text {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Urgency Timer */
.timer-container {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.2);
    padding: 0.75rem;
    border-radius: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    color: #f87171;
    font-weight: 700;
    margin-bottom: 1.5rem;
}

.timer-dot {
    width: 8px;
    height: 8px;
    background: #ef4444;
    border-radius: 50%;
    animation: pulse 1s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.5); opacity: 0.5; }
    100% { transform: scale(1); opacity: 1; }
}

/* Copy Button */
.copy-btn {
    padding: 0.5rem 1rem;
    background: var(--secondary);
    color: black;
    border: none;
    border-radius: 0.5rem;
    font-weight: 800;
    font-size: 0.75rem;
    cursor: pointer;
    transition: all 0.2s;
    margin-left: 0.5rem;
}

.copy-btn:hover {
    transform: scale(1.05);
    background: #fbbf24;
}

@media (max-width: 480px) {
    .numbers-grid {
        grid-template-columns: repeat(4, 1fr); /* 4 colunas em telas muito pequenas */
    }

    /* QR Code maior no mobile para facilitar leitura */
    #pagou-qr-code {
        width: 240px !important;
        height: 240px !important;
    }
}

/* Padding extra no grid quando a action bar está visível (evita última linha ficar escondida) */
.numbers-grid.has-selection {
    padding-bottom: 110px;
}

/* Description Box Scrollable */
.description-box-scroll {
    background: #1a1a1a;
    color: #eee;
    padding: 1.25rem;
    border-radius: 0.75rem;
    max-height: 220px;
    overflow-y: auto;
    font-size: 0.875rem;
    line-height: 1.6;
    margin: 1.25rem 0;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

#raffle-desc {
    white-space: pre-wrap;
}

/* Custom scrollbar para a descrição - Dark Mode */
.description-box-scroll::-webkit-scrollbar {
    width: 6px;
}
.description-box-scroll::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.02);
    border-radius: 10px;
}
.description-box-scroll::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
}
.description-box-scroll::-webkit-scrollbar-thumb:hover {
    background: var(--secondary);
}

/* Toast Notifications */
.toast {
    position: fixed;
    top: 2rem;
    left: 50%;
    transform: translateX(-50%) translateY(-20px);
    background: rgba(20, 20, 20, 0.95);
    backdrop-filter: blur(10px);
    color: white;
    padding: 1rem 2rem;
    border-radius: 1rem;
    border: 1px solid var(--glass-border);
    z-index: 999999; /* Garantir que fique acima de TODOS os modais */
    display: flex;
    align-items: center;
    gap: 1rem;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    opacity: 0;
    pointer-events: none;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.toast.visible {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
    pointer-events: auto;
}

.toast.success { border-left: 4px solid var(--success); }
.toast.error   { border-left: 4px solid var(--danger); }
.toast.warning { border-left: 4px solid var(--warning); }
.toast.info    { border-left: 4px solid #3b82f6; }

.toast-icon {
    font-size: 1.25rem;
}

/* Admin Layout Restructuring */
.admin-container {
    display: grid;
    grid-template-columns: 280px 1fr;
    min-height: 100vh;
    background: var(--bg);
}

.admin-sidebar {
    background: #0f0f0f;
    border-right: 1px solid var(--glass-border);
    padding: 2rem;
    position: sticky;
    top: 0;
    height: 100vh;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.admin-nav {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    overflow-x: auto;
    flex-wrap: nowrap; /* Garante que nunca quebre linha */
    scrollbar-width: none; 
}
.admin-nav::-webkit-scrollbar {
    display: none; /* Chrome/Safari */
}

.admin-nav-item {
    padding: 1rem;
    border-radius: 0.75rem;
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    transition: all 0.2s;
    cursor: pointer;
    white-space: nowrap; /* Impede o texto de quebrar */
    flex-shrink: 0; /* Impede o botão de esmagar */
}

.admin-nav-item:hover, .admin-nav-item.active {
    background: rgba(255, 255, 255, 0.05);
    color: white;
}

.admin-nav-item.active {
    border-left: 4px solid var(--secondary);
    background: rgba(245, 158, 11, 0.1);
}

.admin-main {
    padding: 3rem;
}

.admin-view {
    display: none;
}

.admin-view.active {
    display: block;
}

/* Winner Gallery */
.winners-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
}

.winner-card {
    background: var(--card-bg);
    border-radius: 1rem;
    overflow: hidden;
    border: 1px solid var(--glass-border);
    transition: transform 0.3s;
}

.winner-card:hover {
    transform: translateY(-5px);
}

.winner-card-img {
    width: 100%;
    aspect-ratio: 4 / 3;
    background: #0d0d0d;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.winner-card-img img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.winner-card-content {
    padding: 1.5rem;
}

.winner-card-title {
    font-weight: 800;
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
}

.winner-info-row {
    display: flex;
    justify-content: space-between;
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-bottom: 0.25rem;
}

.winner-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: var(--secondary);
    color: black;
    font-weight: 800;
    border-radius: 2rem;
    font-size: 0.75rem;
    margin-bottom: 1rem;
}

/* --- ADMIN RESPONSIVENESS --- */
@media (max-width: 1024px) {
    .admin-container {
        display: block; /* Empilha sidebar e main */
    }

    .admin-sidebar {
        width: 100%;
        height: auto;
        padding: 1rem;
        position: sticky;
        top: 0;
        z-index: 1000;
        border-right: none;
        border-bottom: 1px solid var(--glass-border);
        background: rgba(10, 10, 10, 0.95);
        backdrop-filter: blur(10px);
    }

    .admin-sidebar .logo {
        margin-bottom: 1rem;
        display: flex;
        align-items: center;
        gap: 1rem;
    }

    .admin-nav {
        display: flex;
        flex-direction: row;
        overflow-x: auto;
        gap: 0.5rem;
        padding-bottom: 0.5rem;
        scrollbar-width: none; /* Esconde barra no Firefox */
    }

    .admin-nav::-webkit-scrollbar {
        display: none; /* Esconde barra no Chrome/Safari */
    }

    .admin-nav-item {
        white-space: nowrap;
        padding: 0.6rem 1rem;
        font-size: 0.85rem;
        margin-bottom: 0;
    }

    .admin-main {
        padding: 1rem;
    }

    .admin-stats {
        grid-template-columns: 1fr; /* Um card por linha no mobile */
        gap: 1rem;
    }

    .stat-card {
        padding: 1.5rem;
    }

    .admin-table-container, 
    .glass {
        overflow-x: auto; /* Permite rolar tabelas largas */
    }

    .admin-table {
        min-width: 600px; /* Garante que a tabela não esprema os dados */
    }

    header h1 {
        font-size: 1.5rem;
    }
}
footer {
    background: #0a0a0a;
    border-top: 1px solid var(--glass-border);
    padding: 3rem 0;
    margin-top: 4rem;
    text-align: center;
}

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

.footer-copy {
    color: var(--text-muted);
    font-size: 0.875rem;
}

.footer-dev {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.footer-dev a {
    color: var(--secondary);
    text-decoration: none;
    font-weight: 700;
    transition: opacity 0.2s;
    padding: 0.5rem;
}

/* PERFORMANCE & ACCESSIBILITY PACK */

/* Se o celular estiver em modo de economia ou o usuário preferir menos movimento */
@media (prefers-reduced-motion: reduce) {
    .reveal {
        opacity: 1 !important;
        transform: none !important;
        transition: none !important;
    }
}

/* Otimização de renderização de imagens */
img {
    content-visibility: auto;
    max-width: 100%;
}

/* Melhora o contraste e legibilidade para todas as idades */
p {
    line-height: 1.6;
    letter-spacing: 0.01em;
}

/* Garantir área de clique mínima para dedos maiores */
button, .btn, a {
    min-height: 44px;
}

/* Suaviza o scroll sem pesar no processador */
html {
    scroll-behavior: smooth;
}

.footer-dev a:hover {
    opacity: 0.8;
}

/* Home card mini progress bar */
.home-card-progress {
    height: 3px;
    background: rgba(255,255,255,0.06);
    border-radius: 0;
    overflow: hidden;
    flex-shrink: 0;
}

.home-card-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), #34d399);
    transition: width 1s ease;
}

/* Floating Price Badge on Home Cards */
.home-card-img {
    position: relative;
}

.price-badge {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    background: var(--primary);
    color: white;
    padding: 0.4rem 0.8rem;
    border-radius: 2rem;
    font-weight: 900;
    font-size: 0.8rem;
    box-shadow: 0 4px 15px rgba(34, 197, 94, 0.4);
    z-index: 2;
    border: 2px solid rgba(255,255,255,0.2);
    white-space: nowrap;
}

/* Latest Winner Banner */
.latest-winner-banner {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-border);
    padding: 1rem;
    border-radius: 1rem;
    margin-bottom: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    font-size: 0.9rem;
}

.winner-highlight {
    color: var(--secondary);
    font-weight: 700;
}

/* --- Page Loader / Skeleton --- */
#page-loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg);
    z-index: 999999;
    overflow-y: auto;
    transition: opacity 0.4s ease;
}

.skeleton-page {
    max-width: 900px;
    margin: 0 auto;
    padding: 80px 1rem 2rem 1rem;
}

.skeleton-block {
    background: linear-gradient(90deg,
        rgba(255,255,255,0.04) 25%,
        rgba(255,255,255,0.09) 50%,
        rgba(255,255,255,0.04) 75%);
    background-size: 600px 100%;
    animation: shimmer 1.4s infinite linear;
    border-radius: 0.75rem;
    flex-shrink: 0;
}

.skeleton-hero {
    display: flex;
    gap: 2rem;
    margin-bottom: 2rem;
}

.skeleton-hero-img {
    width: 280px;
    min-width: 280px;
    aspect-ratio: 3/4;
    border-radius: 1rem;
}

.skeleton-hero-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    padding-top: 0.5rem;
}

.skeleton-grid-preview {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    gap: 0.5rem;
}

.skeleton-card {
    aspect-ratio: 1;
    border-radius: 0.6rem;
}

@media (max-width: 768px) {
    .skeleton-page { padding-top: 70px; }

    .skeleton-hero {
        flex-direction: column;
        gap: 1rem;
    }

    .skeleton-hero-img {
        width: 100%;
        min-width: 0;
        aspect-ratio: 4/3;
    }

    .skeleton-grid-preview {
        grid-template-columns: repeat(5, 1fr);
    }
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(255, 255, 255, 0.1);
    border-top-color: var(--secondary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 1rem;
}

@keyframes spin { 
    to { transform: rotate(360deg); } 
}

/* --- IMAGE UPLOAD --- */
.image-upload-box {
    width: 100%;
    height: 150px;
    border: 2px dashed var(--glass-border);
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background-size: cover;
    background-position: center;
    overflow: hidden;
    position: relative;
    margin-top: 0.5rem;
}

.image-upload-box:hover {
    border-color: var(--secondary);
    background-color: rgba(255, 255, 255, 0.05);
}

.image-upload-box span {
    font-weight: 700;
    color: var(--text-muted);
    pointer-events: none;
    background: rgba(0,0,0,0.5);
    padding: 0.5rem 1rem;
    border-radius: 2rem;
}

/* ======================================================
   EXTRAS: polish & acessibilidade
   ====================================================== */

/* Remove setas nativas do input number (busca de número) */
input[type=number]::-webkit-outer-spin-button,
input[type=number]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}
input[type=number] { -moz-appearance: textfield; }

/* Navbar: link ativo com underline sutil */
.navbar-links a.active,
.navbar-links a:hover {
    color: var(--text-main);
}

.navbar-links a.active {
    position: relative;
}

.navbar-links a.active::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--primary);
    border-radius: 2px;
}

/* Skeleton shimmer para o grid enquanto carrega */
@keyframes shimmer {
    0% { background-position: -400px 0; }
    100% { background-position: 400px 0; }
}

.number-card.skeleton {
    background: linear-gradient(90deg,
        rgba(255,255,255,0.04) 25%,
        rgba(255,255,255,0.08) 50%,
        rgba(255,255,255,0.04) 75%);
    background-size: 800px 100%;
    animation: shimmer 1.5s infinite linear, skeletonPulse 0s; /* override pulse */
    cursor: default;
    border-color: transparent;
}

/* Focus visible: acessibilidade teclado */
.btn:focus-visible,
.filter-btn:focus-visible,
.number-card:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

/* Status pill pago (alias de vendido) */
.status-pill.pago { background: rgba(34, 197, 94, 0.2); color: #4ade80; }
.status-pill.cancelado { background: rgba(100, 116, 139, 0.2); color: #94a3b8; }
.status-pill.pendente { background: rgba(234, 179, 8, 0.2); color: #facc15; }
