@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;600;700;800;900&display=swap');

:root {
    --primary: #fbbf24;
    --primary-glow: rgba(251, 191, 36, 0.3);
    --bg: #09090b;
}

/* Temas Fechados */
body[data-theme="green"] { --primary: #065f46; --primary-glow: rgba(6, 95, 70, 0.4); }
body[data-theme="red"] { --primary: #991b1b; --primary-glow: rgba(153, 27, 27, 0.4); }
body[data-theme="blue"] { --primary: #1e3a8a; --primary-glow: rgba(30, 58, 138, 0.4); }
body[data-theme="zinc"] { --primary: #3f3f46; --primary-glow: rgba(63, 63, 70, 0.4); }

/* Sobrescrevendo cores fixas para usar as variáveis */
.btn-primary { background: var(--primary) !important; box-shadow: 0 4px 15px var(--primary-glow) !important; }
.text-yellow-500 { color: var(--primary) !important; }
.border-yellow-500 { border-color: var(--primary) !important; }
.bg-yellow-500 { background-color: var(--primary) !important; }
.category-tab.active { color: var(--primary) !important; }
.category-tab::after { background: var(--primary) !important; }
.nav-item.active { color: var(--primary) !important; }
.gold-glow { box-shadow: 0 0 25px var(--primary-glow) !important; }

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg);
    background:
        radial-gradient(circle at 50% -20%, #27272a, #09090b),
        url('https://www.transparenttextures.com/patterns/carbon-fibre.png');
    background-attachment: fixed;
    color: white;
    -webkit-tap-highlight-color: transparent;
    overflow-x: hidden;
    position: relative;
}

/* Floating Particles Background */
body::after {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        radial-gradient(1px 1px at 10% 20%, white, transparent),
        radial-gradient(1px 1px at 30% 50%, rgba(251, 191, 36, 0.3), transparent),
        radial-gradient(1px 1px at 70% 30%, white, transparent),
        radial-gradient(1px 1px at 90% 80%, rgba(251, 191, 36, 0.3), transparent),
        radial-gradient(2px 2px at 50% 10%, white, transparent);
    background-size: 200% 200%;
    animation: particles 20s linear infinite;
    opacity: 0.3;
    pointer-events: none;
    z-index: -1;
}

@keyframes particles {
    from { background-position: 0% 0%; }
    to { background-position: 100% 100%; }
}

/* Efeito de Vidro Refinado */
.card-glass {
    background: rgba(24, 24, 27, 0.45);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    border-left: 1px solid rgba(255, 255, 255, 0.03);
    border-right: 1px solid rgba(255, 255, 255, 0.01);
    border-bottom: 1px solid rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(12px);
    box-shadow: 0 10px 30px -10px rgba(0,0,0,0.5);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.card-glass {
    background: rgba(24, 24, 27, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
}

.btn-primary {
    background: var(--primary);
    color: black;
    font-weight: 900;
    text-transform: uppercase;
    transition: all 0.2s;
}

.btn-primary:active {
    transform: scale(0.98);
    opacity: 0.9;
}

input, select, textarea {
    background: #18181b !important;
    border: 1px solid #27272a !important;
    border-radius: 1rem !important;
    padding: 1rem !important;
    font-size: 0.875rem !important;
    color: white !important;
    width: 100%;
    outline: none !important;
}

input:focus {
    border-color: var(--primary) !important;
}

.bottom-nav {
    position: fixed;
    bottom: 0;
    width: 100%;
    z-index: 50;
    background: rgba(9, 9, 11, 0.95);
    backdrop-filter: blur(20px);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding-bottom: env(safe-area-inset-bottom);
}

/* Splash Screen */
.splash-logo {
    animation: pulse 1.5s infinite;
    filter: drop-shadow(0 0 15px rgba(251, 191, 36, 0.4));
}

@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.15); opacity: 0.8; }
}

@keyframes fadeInScale {
    from { opacity: 0; transform: scale(0.95) translateY(10px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

.animate-in {
    animation: fadeInScale 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

.shimmer {
    background: linear-gradient(90deg, #18181b 25%, #27272a 50%, #18181b 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}

.btn-primary {
    background: var(--primary);
    color: black;
    font-weight: 900;
    text-transform: uppercase;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 4px 15px rgba(251, 191, 36, 0.2);
}

.btn-primary:active {
    transform: scale(0.96);
    box-shadow: 0 2px 8px rgba(251, 191, 36, 0.1);
}

.card-glass {
    background: rgba(24, 24, 27, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(12px);
    transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1), border-color 0.2s ease, box-shadow 0.2s ease;
}

.card-glass:active {
    transform: scale(0.97);
    border-color: rgba(251, 191, 36, 0.3);
    box-shadow: 0 0 15px rgba(0,0,0,0.5);
}

.gold-glow {
    box-shadow: 0 0 20px rgba(251, 191, 36, 0.15);
    position: relative;
    overflow: hidden;
}

.gold-glow::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(251, 191, 36, 0.05), transparent);
    transform: rotate(45deg);
    animation: shine-sweep 3s infinite;
}

@keyframes shine-sweep {
    0% { transform: translateX(-100%) rotate(45deg); }
    100% { transform: translateX(100%) rotate(45deg); }
}

.category-tab {
    position: relative;
    border-bottom: none;
    opacity: 0.5;
    transition: all 0.3s;
}

.category-tab::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--primary);
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.category-tab.active {
    opacity: 1;
    color: var(--primary);
}

.nav-item {
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    opacity: 0.4;
}

.nav-item.active {
    opacity: 1;
    color: var(--primary);
    transform: translateY(-2px);
}

.nav-item.active i {
    filter: drop-shadow(0 0 8px rgba(251, 191, 36, 0.4));
}

.no-scrollbar::-webkit-scrollbar {
    display: none;
}

/* New UI Juice */
.view-transition {
    transition: opacity 0.3s ease, transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.view-hidden {
    opacity: 0;
    transform: translateY(10px);
    pointer-events: none;
}

.toast-container {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
}

.toast {
    background: rgba(24, 24, 27, 0.9);
    border: 1px solid rgba(251, 191, 36, 0.3);
    color: white;
    padding: 12px 24px;
    border-radius: 100px;
    font-size: 11px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    backdrop-filter: blur(10px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    animation: toastIn 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards, toastOut 0.4s 2.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    display: flex;
    items-center;
    gap: 8px;
}

@keyframes toastIn {
    from { opacity: 0; transform: translateY(-20px) scale(0.9); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes toastOut {
    from { opacity: 1; transform: translateY(0) scale(1); }
    to { opacity: 0; transform: translateY(-20px) scale(0.9); }
}

/* Pulse for Live indicator */
.pulse-red {
    background: #ef4444;
    box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7);
    animation: pulse-red 2s infinite;
}

@keyframes pulse-red {
    0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7); }
    70% { transform: scale(1); box-shadow: 0 0 10px 0 rgba(239, 68, 68, 0); }
    100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
}

/* Glass depth */
.glass-depth {
    box-shadow:
        inset 0 1px 1px rgba(255,255,255,0.05),
        0 20px 40px rgba(0,0,0,0.4);
}

/* Modal Animations */
.modal-backdrop {
    backdrop-filter: blur(0px);
    background: rgba(0,0,0,0);
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-backdrop.active {
    backdrop-filter: blur(8px);
    background: rgba(0,0,0,0.8);
}

.modal-content-anim {
    transform: scale(0.9) translateY(30px);
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.modal-backdrop.active .modal-content-anim {
    transform: scale(1) translateY(0);
    opacity: 1;
}

/* Empty States */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    text-align: center;
}

.empty-state i {
    font-size: 40px;
    margin-bottom: 15px;
    color: rgba(255,255,255,0.05);
}

/* Animations */
@keyframes bounce-subtle {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-3px); }
}

.animate-bounce-subtle {
    animation: bounce-subtle 2s infinite ease-in-out;
}

/* Podium Glows */
.gold-glow {
    box-shadow: 0 0 35px rgba(251, 191, 36, 0.35);
    background: linear-gradient(110deg, rgba(251, 191, 36, 0.15) 0%, rgba(251, 191, 36, 0.05) 100%) !important;
    position: relative;
    overflow: hidden;
    border: 2px solid rgba(251, 191, 36, 0.6) !important;
    transform: scale(1.02);
    z-index: 10;
}

/* Efeito de Brilhos (Confetes Sutil) */
.gold-glow::after {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background-image:
        radial-gradient(circle, #fbbf24 1px, transparent 1px),
        radial-gradient(circle, #fbbf24 1px, transparent 1px);
    background-size: 20px 20px, 30px 30px;
    background-position: 0 0, 15px 15px;
    opacity: 0.3;
    animation: floating-confetti 4s linear infinite;
    pointer-events: none;
}

@keyframes floating-confetti {
    0% { background-position: 0 0, 15px 15px; opacity: 0; }
    50% { opacity: 0.5; }
    100% { background-position: 0 40px, 15px 55px; opacity: 0; }
}

.gold-glow::before {
    content: '';
    position: absolute;
    top: 0;
    left: -150%;
    width: 150%;
    height: 100%;
    background: linear-gradient(
        120deg,
        transparent,
        rgba(251, 191, 36, 0.3),
        transparent
    );
    animation: shine-sweep 3s infinite;
    z-index: 1;
}

@keyframes shine-sweep {
    0% { left: -100%; }
    20% { left: 100%; }
    100% { left: 100%; }
}

@keyframes pulse-gold {
    0% { box-shadow: 0 0 20px rgba(251, 191, 36, 0.2); }
    50% { box-shadow: 0 0 40px rgba(251, 191, 36, 0.5); }
    100% { box-shadow: 0 0 20px rgba(251, 191, 36, 0.2); }
}

.animate-pulse-gold {
    animation: pulse-gold 2s infinite ease-in-out;
}

.silver-glow {
    box-shadow: 0 0 20px rgba(161, 161, 170, 0.15);
    background: linear-gradient(110deg, rgba(161, 161, 170, 0.08) 0%, rgba(161, 161, 170, 0.02) 100%) !important;
}

.bronze-glow {
    box-shadow: 0 0 15px rgba(194, 65, 12, 0.15);
    background: linear-gradient(110deg, rgba(194, 65, 12, 0.08) 0%, rgba(194, 65, 12, 0.02) 100%) !important;
}

/* Card Shine Effect */
.card-shine {
    position: relative;
    overflow: hidden;
}

.card-shine::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg,
        transparent 45%,
        rgba(255, 255, 255, 0.05) 50%,
        transparent 55%);
    transform: rotate(45deg);
    animation: shine 4s infinite;
}

@keyframes shine {
    0% { transform: translateX(-100%) rotate(45deg); }
    20% { transform: translateX(100%) rotate(45deg); }
    100% { transform: translateX(100%) rotate(45deg); }
}

/* Glass Refinement */
.glass-depth {
    box-shadow:
        inset 0 1px 1px rgba(255,255,255,0.1),
        0 10px 20px rgba(0,0,0,0.4);
}

/* Tab Transitions */
.tab-pane {
    transition: opacity 0.3s ease, transform 0.3s ease;
}
.tab-pane.hidden {
    display: none;
    opacity: 0;
    transform: translateY(5px);
}

/* Scanline Effect for Live Header */
.live-scan {
    position: relative;
    overflow: hidden;
}

.live-scan::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom,
        transparent 0%,
        rgba(239, 68, 68, 0.05) 50%,
        transparent 100%);
    animation: scan 2s linear infinite;
}

@keyframes scan {
    from { transform: translateY(-100%); }
    to { transform: translateY(100%); }
}

/* Category Pill refinement */
.category-tab {
    position: relative;
    z-index: 1;
}

.category-tab::before {
    content: "";
    position: absolute;
    inset: 0;
    background: var(--primary);
    border-radius: 100px;
    z-index: -1;
    transform: scale(0.8);
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.category-tab.active::before {
    transform: scale(1);
    opacity: 0.15;
}

/* Carousel Styles */
#sponsors-carousel-track {
    display: flex;
    will-change: transform;
}
.sponsor-item {
    flex: 0 0 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Animação do Banner de Aviso */
@keyframes slideDown {
    from { transform: translateY(-100%); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.animate-slideDown {
    animation: slideDown 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
