/* === RESET E BASE === */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-bg: #0f0f11;
    --accent-color:  #1bd96b;
    --accent-hover: #ff1f6b;
    --text-primary: #ffffff;
    --text-secondary: #b8b8b8;
    --card-bg: rgba(255, 255, 255, 0.05);
    --card-border: rgba(222, 5, 85, 0.2);
    --gradient-primary: linear-gradient(135deg, #0d0019 0%, #1a0033 50%, #0d0019 100%);
    --gradient-accent: linear-gradient(135deg, #de0555 0%, #ff1f6b 100%);
    --glass-bg: rgba(255, 255, 255, 0.1);
    --glass-border: rgba(255, 255, 255, 0.2);
    --shadow-primary: 0 8px 32px rgba(222, 5, 85, 0.3);
    --shadow-card: 0 4px 16px rgba(0, 0, 0, 0.4);
    --border-radius: 16px;
    --border-radius-small: 8px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--primary-bg);
    
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
}

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

::-webkit-scrollbar-track {
    background: var(--primary-bg);
}

::-webkit-scrollbar-thumb {
    background: var(--gradient-accent);
    border-radius: 4px;
    transition: var(--transition);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--accent-hover);
}

/* Firefox */
* {
    scrollbar-width: thin;
    scrollbar-color: var(--accent-color) var(--primary-bg);
}

/* === HEADER E NAVEGAÇÃO === */
header {
    background: #0f0f11;
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgb(5 222 22 / 20%);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: var(--transition);
}

nav {
    display: flex;
    justify-content: center;
    align-items: center;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
}

nav .logo {
    display: flex;
    justify-content: center;
    align-items: center;
}

nav .logo img {
    width: 200px;
    height: auto;
    transition: var(--transition);
}

nav .logo img:hover {
    transform: scale(1.05);
}

/* === SLIDER/CARROSSEL === */
.slider {
    width: 100%;
    max-width: 1400px;
    margin: 2rem auto;
    position: relative;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow-card);
}

.slider .slide {
    position: relative;
    overflow: hidden;
}

.slider img {
    width: 100%;
    height: 400px;
    object-fit: cover;
    transition: var(--transition);
}

.slider img:hover {
    transform: scale(1.02);
}

/* === CONTADOR DE JOGADORES === */
.counter {
    text-align: center;
    margin: 2rem 0;
    padding: 1rem;
}

.counter h2 {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.pulsing-circle {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #1bd96b;
    display: inline-block;
    animation: pulse 2s infinite;
    box-shadow: #1bd96b;
}

@keyframes pulse {
    0%, 100% { 
        opacity: 1; 
        transform: scale(1);
    }
    50% { 
        opacity: 0.3; 
        transform: scale(1.1);
    }
}

/* === GRID DE JOGOS === */
.games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    padding: 2rem;
    max-width: 1400px;
    margin: 0 auto;
}

.game-item {
    background: var(--card-bg);
    backdrop-filter: blur(20px);
    border: 1px solid #1dd169;
    border-radius: var(--border-radius);
    padding: 1.5rem;
    text-align: center;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.game-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    opacity: 0;
    transition: var(--transition);
    z-index: -1;
}

.game-item:hover {
    transform: translateY(-8px);
    border-color: var(--accent-color);
}

.game-item:hover::before {
    opacity: 0.1;
}

.game-item img {
    width: 100%;
    height: 347px;
    object-fit: cover;
    border-radius: var(--border-radius-small);
    margin-bottom: 1rem;
    transition: var(--transition);
}

.game-item img:hover {
    transform: scale(1.05);
}

.game-item h3 {
    margin-bottom: 1rem;
    color: var(--accent-color);
    font-size: 1.1rem;
    font-weight: 600;
}

.game-item a {
    color: var(--text-primary);
    text-decoration: none;
    transition: var(--transition);
}

.game-item a:hover {
    color: var(--accent-color);
}

/* === BOTÕES === */
button, .btn, #btjogar {
    color: var(--text-primary);
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: var(--border-radius-small);
    font-family: inherit;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: var(--transition);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: var(--shadow-card);
    position: relative;
    overflow: hidden;
    background-color: black!important;
}

button::before, .btn::before, #btjogar::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;
}

button:hover::before, .btn:hover::before, #btjogar:hover::before {
    left: 100%;
}

button:hover, .btn:hover, #btjogar:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px #02451d;
    background: var(--accent-hover);
}

button:active, .btn:active, #btjogar:active {
    transform: translateY(0);
}

/* === BARRAS DE PROGRESSO === */
.progress-container {
    width: 100%;
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    margin: 1rem 0;
    position: relative;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    border-radius: 4px;
    position: relative;
    transition: var(--transition);
    background: var(--gradient-accent);
}

.progress-bar::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    animation: shimmer 2s infinite;
}

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

.progress-text {
    position: absolute;
    top: -25px;
    left: 50%;
    transform: translateX(-50%);
    color: var(--text-primary);
    font-weight: 600;
    font-size: 0.9rem;
}

/* === MULTIPLICADORES === */
.multipliers {
    margin-top: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.multipliers span {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    padding: 0.5rem 1rem;
    border-radius: var(--border-radius-small);
    font-weight: 600;
    font-size: 0.85rem;
    transition: var(--transition);
}

.multipliers span:hover {
    background: rgba(222, 5, 85, 0.1);
    border-color: var(--accent-color);
}

/* === FILTROS DE PROVEDOR === */
.provider-filters {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1rem;
    margin: 2rem 0;
    padding: 1rem;
}

.filter-button {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    color: var(--text-primary);
    padding: 0.75rem 1.5rem;
    border-radius: var(--border-radius-small);
    cursor: pointer;
    transition: var(--transition);
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.filter-button:hover, .filter-button.active {
    background: var(--gradient-accent);
    border-color: var(--accent-color);
    transform: translateY(-2px);
    box-shadow: var(--shadow-card);
}

.filter-button img {
    width: 20px;
    height: 20px;
    border-radius: 4px;
}

/* === BUSCA === */
.search-container {
    position: relative;
    max-width: 400px;
    margin: 2rem auto;
}

.search-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    z-index: 2;
}

.search-bar {
    width: 100%;
    padding: 1rem 1rem 1rem 3rem;
    font-size: 1rem;
    border: 1px solid var(--card-border);
    border-radius: var(--border-radius-small);
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    color: var(--text-primary);
    outline: none;
    transition: var(--transition);
}

.search-bar::placeholder {
    color: var(--text-secondary);
}

.search-bar:focus {
    border-color: var(--accent-color);
    box-shadow: 0 0 20px rgba(222, 5, 85, 0.3);
}

/* === GANHADORES/MARQUEE === */
.divGanhadores {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border-radius: var(--border-radius);
    margin: 2rem auto;
    overflow: hidden;
    padding: 1rem 0;
}

.containerGanhadores {
    color: var(--text-primary);
    font-size: 0.9rem;
    animation: scroll-left 60s linear infinite;
    display: inline-block;
    white-space: nowrap;
}

.classGanhador {
    display: inline-flex;
    align-items: center;
    gap: 1rem;
    margin: 0 1rem;
    padding: 0.75rem 1rem;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: var(--border-radius-small);
    font-size: 0.85rem;
    backdrop-filter: blur(10px);
}

.classGanhador img {
    width: 40px;
    height: 40px;
    object-fit: cover;
}

.textoGanhador {
    display: flex;
    flex-direction: column;
    line-height: 1.3;
    text-align: left;
}

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

/* Garantir direção sempre da direita para esquerda */
.winners-container {
    animation-direction: normal !important;
}

/* Responsividade da animação */
@media (min-width: 769px) {
    .winners-container {
        animation-duration: 60s !important;
    }
}

@media (max-width: 768px) {
    .winners-container {
        animation-duration: 45s !important;
    }
}

/* === SEÇÕES === */
main {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem;
}

section {
    margin: 3rem 0;
}

section h2 {
    text-align: center;
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 2rem;
    background: var(--gradient-accent);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

section h2 i {
    color: var(--accent-color);
    font-size: 1.5rem;
}

/* === MODAIS === */
.modal, .modal3 {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
}

/* Login Modal Specific - Removido overlay problemático */

.modal-content, .modal3-content, .login-card {
    background: var(--card-bg);
    backdrop-filter: blur(20px);
    border: 1px solid rgb(10 222 5 / 20%);
    margin: 0;
    padding: 2rem;
    border-radius: var(--border-radius);
    width: 90%;
    max-width: 500px;
    color: var(--text-primary);
    position: relative;
    animation: modalSlideIn 0.3s ease-out;
}

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

/* === FORMULÁRIOS === */
.form-control {
    width: 100%;
    padding: 1rem;
    border: 1px solid var(--card-border);
    border-radius: var(--border-radius-small);
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    color: var(--text-primary);
    font-size: 1rem;
    transition: var(--transition);
    margin-bottom: 1rem;
}

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

.form-control:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 20px rgba(222, 5, 85, 0.3);
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--text-primary);
}

/* === BOTÃO FLUTUANTE === */
.floating-button {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    z-index: 1000;
    background: var(--gradient-accent);
    border: none;
    padding: 1rem;
    border-radius: 50%;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: var(--shadow-primary);
}

.floating-button img {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    transition: var(--transition);
}

.floating-button:hover {
    transform: scale(1.1) rotate(5deg);
    box-shadow: 0 12px 40px rgba(222, 5, 85, 0.5);
}

/* === MENU INFERIOR === */
.menu-inferior {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    background: var(--card-bg);
    backdrop-filter: blur(20px);
    border: 1px solid var(--card-border);
    border-radius: var(--border-radius) var(--border-radius) 0 0;
    z-index: 1000;
    display: flex;
    justify-content: center;
    gap: 2rem;
    padding: 1rem 2rem;
    max-width: fit-content;
}

.menu-item {
    text-align: center;
    color: var(--text-primary);
    text-decoration: none;
    transition: var(--transition);
    padding: 0.5rem;
    border-radius: var(--border-radius-small);
}

.menu-item:hover {
    color: var(--accent-color);
    background: rgba(222, 5, 85, 0.1);
    transform: translateY(-2px);
}

.menu-item i {
    font-size: 1.5rem;
    display: block;
    margin-bottom: 0.25rem;
    color: var(--accent-color);
}

/* === FOOTER === */
footer {
    padding: 3rem 2rem;
    text-align: center;
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border-top: 1px solid var(--card-border);
    margin-top: 4rem;
    color: var(--text-secondary);
}

/* === RESPONSIVIDADE === */
@media (max-width: 1200px) {
    .games-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 1.5rem;
        padding: 1.5rem;
    }
}

@media (max-width: 768px) {
    nav {
        padding: 0 1rem;
    }
    
    nav .logo img {
        width: 150px;
    }
    
    .slider {
        margin: 1rem;
        border-radius: var(--border-radius-small);
    }
    
    .slider img {
        height: 250px;
    }
    
    .games-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        gap: 1rem;
        padding: 1rem;
    }
    
    .game-item {
        padding: 1rem;
    }
    
    .game-item img {
        height: 150px;
    }
    
    section h2 {
        font-size: 1.5rem;
    }
    
    .provider-filters {
        gap: 0.5rem;
        padding: 0.5rem;
    }
    
    .filter-button {
        padding: 0.5rem 1rem;
        font-size: 0.85rem;
    }
    
    .menu-inferior {
        gap: 1rem;
        padding: 0.75rem 1rem;
        left: 1rem;
        right: 1rem;
        transform: none;
        border-radius: var(--border-radius-small) var(--border-radius-small) 0 0;
    }
    
    .floating-button {
        bottom: 100px;
        right: 1rem;
    }
    
    .modal-content, .modal3-content, .login-card {
        margin: 10% auto;
        padding: 1.5rem;
    }
}

@media (max-width: 480px) {
    body {
        font-size: 14px;
    }
    
    .games-grid {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
        gap: 0.75rem;
        padding: 0.75rem;
    }
    
    .game-item {
        padding: 0.75rem;
    }
    
    .game-item img {
        height: 120px;
    }
    
    button, .btn, #btjogar {
        padding: 0.5rem 1rem;
        font-size: 0.8rem;
    }
    
    section h2 {
        font-size: 1.25rem;
    }
    
    .modal-content, .modal3-content, .login-card {
        width: 95%;
        padding: 1rem;
    }
}

/* === ANIMAÇÕES DE ENTRADA === */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.game-item {
    animation: fadeInUp 0.6s ease-out forwards;
}

.game-item:nth-child(even) {
    animation-delay: 0.1s;
}

.game-item:nth-child(3n) {
    animation-delay: 0.2s;
}

/* === UTILITÁRIOS === */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }

.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }

.p-1 { padding: 0.5rem; }
.p-2 { padding: 1rem; }
.p-3 { padding: 1.5rem; }
.p-4 { padding: 2rem; }

/* === LOADER === */
#loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--primary-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10001;
}

.spinner {
    width: 60px;
    height: 60px;
    border: 4px solid rgb(90 222 5 / 20%);
    border-top: 4px solid #1bd96b;
    border-radius: 50%;
    animation: spin 1s 
linear infinite;
}

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

/* === MAIN CONTENT === */
#main-content {
    min-height: 100vh;
    opacity: 0;
    animation: fadeIn 0.5s ease-out 0.3s forwards;
}

@keyframes fadeIn {
    to {
        opacity: 1;
    }
}

/* === ALERTAS === */
.alert {
    padding: 1rem 1.5rem;
    border-radius: var(--border-radius-small);
    margin-bottom: 1rem;
    border: 1px solid;
    backdrop-filter: blur(10px);
}

.alert-success {
    background: rgba(34, 197, 94, 0.1);
    border-color: #22c55e;
    color: #22c55e;
}

.alert-danger {
    background: rgba(239, 68, 68, 0.1);
    border-color: #ef4444;
    color: #ef4444;
}

.alert-warning {
    background: rgba(251, 191, 36, 0.1);
    border-color: #fbbf24;
    color: #fbbf24;
}

.alert-info {
    background: rgba(59, 130, 246, 0.1);
    border-color: #3b82f6;
    color: #3b82f6;
}

/* === OVERLAY === */
#overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    z-index: 9999;
}

/* === PERFORMANCE === */
.game-item img, .slider img {
    will-change: transform;
}

button, .btn, .filter-button, .menu-item {
    will-change: transform;
}

/* === DARK MODE SUPPORT === */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}