/* style.css */

/* --- CONFIGURAÇÕES GLOBAIS E FONTES --- */
:root {
    --background-light: #f3f4f6;
    --background-dark: #111827;
    --text-light: #1f2937;
    --text-dark: #e5e7eb;
}

* {
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    transition: background-color 0.3s ease, color 0.3s ease;
    margin: 0;
    padding: 0;
    line-height: 1.6;
}

/* --- LOADER INICIAL OTIMIZADO --- */
#initial-loader {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    height: 100vh;
    font-size: 1.5rem;
    color: #9ca3af;
    gap: 1rem;
}

.loader-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #e5e7eb;
    border-top: 4px solid #06b6d4;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* --- ANIMAÇÃO PWA INSTALL PROMPT --- */
@keyframes slide-up {
    from {
        transform: translateY(100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.animate-slide-up {
    animation: slide-up 0.3s ease-out;
}

/* --- ANIMAÇÕES OTIMIZADAS --- */
@keyframes fall {
    from {
        transform: translateY(-10vh) rotate(0deg);
        opacity: 0.7;
    }
    to {
        transform: translateY(110vh) rotate(720deg);
        opacity: 0;
    }
}

/* --- CRIPTO TICKER OTIMIZADO --- */
.ticker-wrap {
    overflow: hidden;
    width: 100%;
    background-color: transparent;
    padding: 0.5rem 0;
    border-top: 1px solid #e5e7eb;
    border-bottom: 1px solid #e5e7eb;
    will-change: transform;
}

.dark .ticker-wrap {
    border-top-color: #374151;
    border-bottom-color: #374151;
}

.ticker-move {
    display: inline-block;
    white-space: nowrap;
    animation: ticker-scroll 60s linear infinite;
    will-change: transform;
}

@keyframes ticker-scroll {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-50%);
    }
}

/* --- OTIMIZAÇÕES DE PERFORMANCE --- */
.number-ball {
    will-change: transform;
    backface-visibility: hidden;
    transform: translateZ(0);
    contain: layout style paint;
}

.hover-scale {
    transition: transform 0.2s ease;
    will-change: transform;
}

.hover-scale:hover {
    transform: scale(1.05) translateZ(0);
}

/* Otimizações para elementos que mudam frequentemente */
.dynamic-content {
    contain: layout style paint;
    will-change: contents;
}

.modal-overlay {
    contain: layout style paint;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

/* Prevenção de layout shifts */
.loading-skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading-shimmer 1.5s infinite;
}

@keyframes loading-shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

/* Otimização de GPU para animações */
.gpu-accelerated {
    transform: translateZ(0);
    will-change: transform, opacity;
    backface-visibility: hidden;
}

/* --- MELHORIAS MODO ESCURO --- */
@media (prefers-color-scheme: dark) {
    html {
        color-scheme: dark;
    }
}

/* --- ESTILOS DE TEXTO (PROSE) --- */
.prose {
    max-width: 65ch;
    margin-left: auto;
    margin-right: auto;
}

.dark .prose-invert {
    color: #d1d5db;
}

.dark .prose-invert h1,
.dark .prose-invert h2,
.dark .prose-invert h3,
.dark .prose-invert h4,
.dark .prose-invert strong {
    color: #f9fafb;
}

/* === RESPONSIVIDADE MOBILE COMPLETA === */

/* Mobile Portrait (até 480px) */
@media (max-width: 480px) {
  /* Layout principal */
  body {
    font-size: 14px;
  }
  
  /* Header responsivo */
  header h1 {
    font-size: 1.5rem !important;
    line-height: 1.2;
  }
  
  header p {
    font-size: 0.75rem !important;
  }
  
  /* Botões menores em mobile */
  button {
    padding: 8px 12px;
    font-size: 0.875rem;
  }
  
  /* Modais ocupam tela inteira */
  .modal-overlay {
    padding: 5px;
  }
  
  .modal-content {
    margin: 0;
    max-height: 98vh;
    border-radius: 8px;
  }
  
  /* Grids responsivos */
  .grid-cols-10 {
    grid-template-columns: repeat(5, 1fr) !important;
  }
  
  .grid-cols-5 {
    grid-template-columns: repeat(3, 1fr) !important;
  }
  
  /* Números das loterias menores */
  .number-ball {
    width: 32px !important;
    height: 32px !important;
    font-size: 12px !important;
  }
  
  /* Tabelas responsivas */
  table {
    font-size: 0.75rem;
  }
  
  th, td {
    padding: 4px 6px !important;
  }
  
  /* Inputs menores */
  input, select, textarea {
    padding: 6px 8px !important;
    font-size: 14px !important;
  }
  
  /* Floating buttons ajustados */
  .fixed.bottom-5.right-5 {
    bottom: 10px !important;
    right: 10px !important;
  }
  
  .fixed.top-5.left-5 {
    top: 10px !important;
    left: 10px !important;
  }
  
  #initial-loader {
    font-size: 1.25rem;
  }
}

/* Mobile Landscape (481px - 640px) */
@media (min-width: 481px) and (max-width: 640px) {
  /* Header ajustado */
  header h1 {
    font-size: 2rem !important;
  }
  
  header p {
    font-size: 0.875rem !important;
  }
  
  /* Modais com mais espaço */
  .modal-overlay {
    padding: 15px;
  }
  
  .modal-content {
    margin: 0;
    max-height: 95vh;
    border-radius: 12px;
  }
  
  /* Números um pouco maiores */
  .number-ball {
    width: 36px !important;
    height: 36px !important;
    font-size: 13px !important;
  }
  
  /* Grids otimizados */
  .grid-cols-10 {
    grid-template-columns: repeat(6, 1fr) !important;
  }
}

/* Tablet Portrait (641px - 768px) */
@media (min-width: 641px) and (max-width: 768px) {
  /* Modais com bordas */
  .modal-overlay {
    padding: 20px;
  }
  
  .modal-content {
    max-height: 90vh;
    border-radius: 16px;
  }
  
  /* Grids balanceados */
  .grid-cols-10 {
    grid-template-columns: repeat(8, 1fr) !important;
  }
  
  /* Números padrão */
  .number-ball {
    width: 40px !important;
    height: 40px !important;
    font-size: 14px !important;
  }
}

/* Tablet Landscape (769px - 1024px) */
@media (min-width: 769px) and (max-width: 1024px) {
  .modal-content {
    max-height: 85vh;
  }
  
  /* Grids quase completos */
  .grid-cols-10 {
    grid-template-columns: repeat(9, 1fr) !important;
  }
}

/* Desktop pequeno (1025px - 1280px) */
@media (min-width: 1025px) and (max-width: 1280px) {
  .modal-content {
    max-height: 80vh;
  }
}

/* Orientação landscape específica */
@media (orientation: landscape) and (max-height: 500px) {
  /* Para dispositivos em landscape com pouca altura */
  .modal-content {
    max-height: 95vh;
    overflow-y: auto;
  }
  
  header {
    padding: 8px 16px !important;
  }
  
  header h1 {
    font-size: 1.75rem !important;
  }
  
  header p {
    font-size: 0.75rem !important;
  }
}

/* Touch targets maiores para mobile */
@media (max-width: 768px) {
  button, .clickable {
    min-height: 44px;
    min-width: 44px;
  }
  
  /* Espaçamento entre elementos tocáveis */
  .flex.gap-2 {
    gap: 8px !important;
  }
  
  .flex.gap-3 {
    gap: 12px !important;
  }
  
  /* Scrollbars mais grossas em mobile */
  ::-webkit-scrollbar {
    width: 8px;
    height: 8px;
  }
  
  ::-webkit-scrollbar-thumb {
    border-radius: 6px;
  }
}

/* Animações reduzidas em dispositivos com pouca performance */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Alto contraste para acessibilidade */
@media (prefers-contrast: high) {
  .bg-gray-100 {
    background-color: #ffffff !important;
  }
  
  .bg-gray-800 {
    background-color: #000000 !important;
  }
  
  .border-gray-300 {
    border-color: #000000 !important;
  }
  
  .text-gray-600 {
    color: #000000 !important;
  }
}

/* === TOGGLE DE TEMA INTUITIVO === */

.theme-toggle {
  position: relative;
  width: 64px;
  height: 32px;
  background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
  border-radius: 16px;
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 
    0 2px 8px rgba(0, 0, 0, 0.15),
    inset 0 1px 2px rgba(255, 255, 255, 0.2);
  overflow: hidden;
  border: 2px solid rgba(255, 255, 255, 0.1);
}

.theme-toggle:hover {
  transform: scale(1.05);
  box-shadow: 
    0 4px 16px rgba(0, 0, 0, 0.25),
    inset 0 1px 2px rgba(255, 255, 255, 0.3);
}

.theme-toggle:active {
  transform: scale(0.98);
}

.theme-toggle.dark {
  background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
  border-color: rgba(148, 163, 184, 0.2);
}

.theme-toggle-bg-icon {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  opacity: 0.4;
  transition: all 0.4s ease;
  pointer-events: none;
  font-size: 14px;
}

.theme-toggle-sun {
  left: 6px;
  color: #fbbf24;
  filter: drop-shadow(0 0 4px rgba(251, 191, 36, 0.5));
}

.theme-toggle-moon {
  right: 6px;
  color: #94a3b8;
  filter: drop-shadow(0 0 4px rgba(148, 163, 184, 0.5));
}

.theme-toggle.dark .theme-toggle-sun {
  opacity: 0.1;
  transform: translateY(-50%) scale(0.8);
}

.theme-toggle:not(.dark) .theme-toggle-moon {
  opacity: 0.1;
  transform: translateY(-50%) scale(0.8);
}

.theme-toggle.dark .theme-toggle-moon {
  opacity: 0.6;
  transform: translateY(-50%) scale(1);
}

.theme-toggle:not(.dark) .theme-toggle-sun {
  opacity: 0.6;
  transform: translateY(-50%) scale(1);
}

.theme-toggle-slider {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 26px;
  height: 26px;
  background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
  border-radius: 50%;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 
    0 2px 8px rgba(0, 0, 0, 0.2),
    0 1px 3px rgba(0, 0, 0, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(0, 0, 0, 0.05);
}

.theme-toggle.dark .theme-toggle-slider {
  transform: translateX(32px);
  background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
  border-color: rgba(148, 163, 184, 0.2);
  box-shadow: 
    0 2px 8px rgba(0, 0, 0, 0.4),
    0 1px 3px rgba(0, 0, 0, 0.2);
}

.theme-toggle-icon {
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  color: #f59e0b;
  font-size: 14px;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.1));
}

.theme-toggle.dark .theme-toggle-icon {
  color: #94a3b8;
}

.theme-toggle-icon.animating {
  transform: rotate(360deg) scale(1.3);
  filter: drop-shadow(0 0 8px currentColor);
}

/* Efeito de brilho no hover */
.theme-toggle::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  transition: left 0.6s ease;
}

.theme-toggle:hover::before {
  left: 100%;
}

/* Responsividade para o toggle */
@media (max-width: 640px) {
  .theme-toggle {
    width: 56px;
    height: 28px;
    border-radius: 14px;
  }
  
  .theme-toggle-slider {
    width: 22px;
    height: 22px;
    top: 2px;
    left: 2px;
  }
  
  .theme-toggle.dark .theme-toggle-slider {
    transform: translateX(28px);
  }
  
  .theme-toggle-bg-icon {
    font-size: 12px;
  }
  
  .theme-toggle-icon {
    font-size: 12px;
  }
}

/* Acessibilidade - foco */
.theme-toggle:focus {
  outline: none;
  box-shadow: 
    0 0 0 3px rgba(59, 130, 246, 0.5),
    0 4px 16px rgba(0, 0, 0, 0.25);
}

/* Animação de entrada */
@keyframes toggleAppear {
  from {
    opacity: 0;
    transform: scale(0.8);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.theme-toggle {
    animation: toggleAppear 0.3s ease-out;
}

/* === ANIMAÇÕES E TRANSIÇÕES SUAVES === */
.fade-in {
    animation: fadeIn 0.3s ease-in-out;
}

.fade-out {
    animation: fadeOut 0.3s ease-in-out;
}

.slide-in-up {
    animation: slideInUp 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.slide-in-down {
    animation: slideInDown 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.slide-in-left {
    animation: slideInLeft 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.slide-in-right {
    animation: slideInRight 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.scale-in {
    animation: scaleIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.bounce-in {
    animation: bounceIn 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.pulse-glow {
    animation: pulseGlow 2s infinite;
}

.loading-spinner {
    animation: spin 1s linear infinite;
}

.shake {
    animation: shake 0.5s ease-in-out;
}

.float {
    animation: float 3s ease-in-out infinite;
}

/* Keyframes para animações */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes fadeOut {
    from { opacity: 1; }
    to { opacity: 0; }
}

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

@keyframes slideInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes bounceIn {
    0% {
        opacity: 0;
        transform: scale(0.3);
    }
    50% {
        opacity: 1;
        transform: scale(1.05);
    }
    70% {
        transform: scale(0.9);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes pulseGlow {
    0%, 100% {
        box-shadow: 0 0 5px rgba(59, 130, 246, 0.5);
        transform: scale(1);
    }
    50% {
        box-shadow: 0 0 20px rgba(59, 130, 246, 0.8);
        transform: scale(1.02);
    }
}

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

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
    20%, 40%, 60%, 80% { transform: translateX(5px); }
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

/* Transições suaves para elementos interativos */
.smooth-transition {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.smooth-hover {
    transition: all 0.2s ease-in-out;
}

.smooth-hover:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

/* Animações para botões */
.btn-animate {
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.btn-animate::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.btn-animate:hover::before {
    left: 100%;
}

.btn-animate:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.btn-animate:active {
    transform: translateY(0);
    transition: transform 0.1s;
}

/* Animações para cards */
.card-animate {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.card-animate:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
}

/* Animações para modais */
.modal-backdrop {
    animation: fadeIn 0.3s ease-out;
}

.modal-content {
    animation: modalSlideIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: scale(0.7) translateY(-50px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

/* Animações para números da loteria */
.lottery-number {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.lottery-number:hover {
    transform: scale(1.1) rotate(5deg);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

.lottery-number.selected {
    animation: numberSelect 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

@keyframes numberSelect {
    0% { transform: scale(1); }
    50% { transform: scale(1.2); }
    100% { transform: scale(1.1); }
}

/* Animações para loading states */
.loading-dots::after {
    content: '';
    animation: loadingDots 1.5s infinite;
}

@keyframes loadingDots {
    0%, 20% { content: '.'; }
    40% { content: '..'; }
    60%, 100% { content: '...'; }
}

/* Animações para notificações */
.notification-enter {
    animation: notificationSlideIn 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.notification-exit {
    animation: notificationSlideOut 0.3s ease-in-out;
}

@keyframes notificationSlideIn {
    from {
        opacity: 0;
        transform: translateX(100%) scale(0.8);
    }
    to {
        opacity: 1;
        transform: translateX(0) scale(1);
    }
}

@keyframes notificationSlideOut {
    from {
        opacity: 1;
        transform: translateX(0) scale(1);
    }
    to {
        opacity: 0;
        transform: translateX(100%) scale(0.8);
    }
}

/* Animações para progress bars */
.progress-bar {
    position: relative;
    overflow: hidden;
}

.progress-bar::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
    background-image: linear-gradient(
        -45deg,
        rgba(255, 255, 255, 0.2) 25%,
        transparent 25%,
        transparent 50%,
        rgba(255, 255, 255, 0.2) 50%,
        rgba(255, 255, 255, 0.2) 75%,
        transparent 75%,
        transparent
    );
    background-size: 50px 50px;
    animation: progressStripes 1s linear infinite;
}

@keyframes progressStripes {
    0% { background-position: 0 0; }
    100% { background-position: 50px 50px; }
}

/* Animações responsivas */
@media (max-width: 768px) {
    .card-animate:hover {
        transform: translateY(-2px) scale(1.01);
    }
    
    .smooth-hover:hover {
        transform: translateY(-1px);
    }
    
    .lottery-number:hover {
        transform: scale(1.05) rotate(2deg);
    }
}

/* Redução de movimento para acessibilidade */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* === SISTEMA DE TOOLTIPS INFORMATIVOS === */
.tooltip-animate {
    animation: tooltipFadeIn 0.2s ease-out;
    backdrop-filter: blur(4px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

@keyframes tooltipFadeIn {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(-8px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0) scale(1);
    }
}

/* Tooltips para diferentes posições */
.tooltip-animate[class*="bottom-full"] {
    animation: tooltipFadeInTop 0.2s ease-out;
}

.tooltip-animate[class*="top-full"] {
    animation: tooltipFadeInBottom 0.2s ease-out;
}

.tooltip-animate[class*="right-full"] {
    animation: tooltipFadeInLeft 0.2s ease-out;
}

.tooltip-animate[class*="left-full"] {
    animation: tooltipFadeInRight 0.2s ease-out;
}

@keyframes tooltipFadeInTop {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(-8px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0) scale(1);
    }
}

@keyframes tooltipFadeInBottom {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(8px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0) scale(1);
    }
}

@keyframes tooltipFadeInLeft {
    from {
        opacity: 0;
        transform: translateY(-50%) translateX(-8px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(-50%) translateX(0) scale(1);
    }
}

@keyframes tooltipFadeInRight {
    from {
        opacity: 0;
        transform: translateY(-50%) translateX(8px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(-50%) translateX(0) scale(1);
    }
}

/* Estilo especial para tooltips em elementos pequenos */
.tooltip-small .tooltip-animate {
    font-size: 12px;
    padding: 6px 8px;
}

/* Tooltips com conteúdo rico */
.tooltip-rich {
    max-width: 250px;
    white-space: normal;
    line-height: 1.4;
}

.tooltip-rich .tooltip-title {
    font-weight: 600;
    margin-bottom: 4px;
    color: #fbbf24;
}

.tooltip-rich .tooltip-description {
    opacity: 0.9;
    font-size: 12px;
}

/* Responsividade para tooltips */
@media (max-width: 640px) {
    .tooltip-animate {
        font-size: 12px;
        padding: 6px 8px;
        max-width: 200px;
    }
    
    /* Ocultar tooltips em dispositivos touch para evitar problemas */
    @media (hover: none) {
        .tooltip-animate {
            display: none;
        }
    }
}

/* --- GERENCIAMENTO DE FOCO --- */
button:focus,
input:focus,
select:focus {
    outline: 2px solid #06b6d4;
    outline-offset: 2px;
}

/* --- SCROLLBAR CUSTOMIZADO --- */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.dark ::-webkit-scrollbar-track {
    background: #374151;
}

::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

.dark ::-webkit-scrollbar-thumb {
    background: #6b7280;
}

::-webkit-scrollbar-thumb:hover {
    background: #a1a1a1;
}

.dark ::-webkit-scrollbar-thumb:hover {
    background: #9ca3af;
}

/* --- GRADIENTES MELHORADOS PARA PREMIAÇÃO --- */
.prize-gradient {
    background: linear-gradient(135deg, #f39c12, #e67e22);
}

.winner-badge {
    background: linear-gradient(135deg, #2ecc71, #27ae60);
}

.improvement-notice {
    background: linear-gradient(135deg, #3498db, #2980b9);
    border: 1px solid rgba(52, 152, 219, 0.3);
}

/* --- ANIMAÇÃO DE TOOLTIP MELHORADA --- */
@keyframes tooltipFadeIn {
    0% {
        opacity: 0;
        transform: translateY(-5px) scale(0.95);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Estilos adicionais para tooltips */
[role="tooltip"] {
    pointer-events: none;
    user-select: none;
    will-change: transform, opacity;
}

/* Melhorar legibilidade dos tooltips */
[role="tooltip"] * {
    line-height: 1.5;
    letter-spacing: 0.01em;
}
