/* ===== RESET E CONFIGURAÇÕES GLOBAIS ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #0a0a0a;
    color: #ffffff;
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
}

/* ===== CABEÇALHO - DESIGN MODERNO E MINIMALISTA ===== */

/* Reset básico para o header */
.header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(15, 15, 15, 0.95);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 70px;
    gap: 20px;
}

/* Logo */
.logo {
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    color: #ffffff;
    font-weight: 700;
    font-size: 1.25rem;
    transition: all 0.3s ease;
    flex-shrink: 0; /* Garante que a logo não encolha */
    white-space: nowrap; /* Impede quebra de linha no texto da logo */
    min-width: 120px; /* Garante um espaço mínimo para a logo */
}

.logo i {
    width: 24px;
    height: 24px;
    color: #10b981;
    transition: all 0.3s ease;
}

.logo:hover {
    color: #10b981;
    transform: translateY(-1px);
}

.logo:hover i {
    transform: rotate(15deg);
}

/* Navegação Desktop */
.nav-menu {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
    justify-content: center;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 16px;
    border-radius: 12px;
    text-decoration: none;
    color: rgba(255, 255, 255, 0.7);
    font-weight: 500;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.nav-link i {
    width: 18px;
    height: 18px;
    transition: all 0.3s ease;
}

.nav-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(16, 185, 129, 0.1), transparent);
    transition: left 0.5s ease;
}

.nav-link:hover::before {
    left: 100%;
}

.nav-link:hover {
    color: #ffffff;
    background: rgba(16, 185, 129, 0.1);
    transform: translateY(-1px);
}

.nav-link.active {
    color: #10b981;
    background: rgba(16, 185, 129, 0.15);
}

.nav-link.active i {
    color: #10b981;
}

/* Seção de Autenticação */
.auth-section {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.balance-display {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.balance-item {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 0.85rem;
    font-weight: 600;
}

.balance-item i {
    width: 14px;
    height: 14px;
    color: #10b981;
}

.balance-item.bonus i {
    color: #f59e0b;
}

.balance-value {
    color: #ffffff;
}

.balance-separator {
    width: 1px;
    height: 16px;
    background: rgba(255, 255, 255, 0.2);
}

/* Botões */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 16px;
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.9rem;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    white-space: nowrap;
}

.btn i {
    transition: all 0.3s ease;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: left 0.5s ease;
}

.btn:hover::before {
    left: 100%;
}

.btn-primary {
    background: linear-gradient(135deg, #10b981 0%, #34d399 100%);
    color: #ffffff;
    border: 1px solid transparent;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #047857 0%, #10b981 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 20px rgba(16, 185, 129, 0.3);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
    transform: translateY(-1px);
}

/* ===== CONTEÚDO PRINCIPAL ===== */
.main-content {
    margin-top: 0;
    min-height: calc(100vh - 70px);
    background: linear-gradient(135deg, #0a0a0a 0%, #1a1a1a 50%, #0a0a0a 100%);
}

/* Seções de Informação */
.info-section {
    padding: 2rem;
    max-width: 1200px;
    margin: 0 auto;
    margin-bottom: -80px !important;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 4rem;
}

.info-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 30px;
    text-align: center;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.info-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, #10b981, #34d399);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.info-card:hover::before {
    transform: scaleX(1);
}

.info-card:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(16, 185, 129, 0.3);
    transform: translateY(-5px);
}

.info-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #10b981 0%, #34d399 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    color: #ffffff;
    font-size: 1.5rem;
    transition: all 0.3s ease;
}

.info-card:hover .info-icon {
    transform: scale(1.1);
}

.info-title {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: #ffffff;
    transition: color 0.3s ease;
}

.info-card:hover .info-title {
    color: #10b981;
}

/* Grid de Jogos */
.games-section {
    padding: 1rem;
    max-width: 1200px;
    margin: 0 auto;
}

.games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.game-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.3s ease;
    position: relative;
}

.game-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, #10b981, #34d399);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.game-card:hover::before {
    transform: scaleX(1);
}

.game-card:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(16, 185, 129, 0.3);
    transform: translateY(-5px);
}

.game-banner {
    height: 200px;
    background: linear-gradient(45deg, #10b981, #34d399);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: #ffffff;
    font-weight: bold;
    position: relative;
    overflow: hidden;
}

.game-banner img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.game-card:hover .game-banner img {
    transform: scale(1.05);
}

.game-info {
    padding: 1.5rem;
}

.game-title {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: #ffffff;
    transition: color 0.3s ease;
}

.game-card:hover .game-title {
    color: #10b981;
}

.game-subtitle {
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 1rem;
    line-height: 1.5;
}

.game-price {
    font-size: 1.1rem;
    font-weight: 600;
    color: #10b981;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 5px;
}

/* Formulários */
.form-container {
    max-width: 400px;
    margin: 2rem auto;
    padding: 30px;
    background: rgba(15, 15, 15, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    position: relative;
    backdrop-filter: blur(20px);
}

.form-title {
    font-size: 1.8rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 0.5rem;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.form-subtitle {
    text-align: center;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 2rem;
    font-size: 0.9rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 600;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 5px;
}

.form-input {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.05);
    color: #ffffff;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    outline: none;
}

.form-input:focus {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(16, 185, 129, 0.5);
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
}

.form-input::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

/* Modal */
.modal-close-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.6);
    font-size: 1.5rem;
    cursor: pointer;
    z-index: 10;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.modal-close-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
}

/* ===== MENU MOBILE FLUTUANTE ===== */
.mobile-menu {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
    display: none;
    width: calc(100% - 40px);
    max-width: 400px;
}

.mobile-menu-container {
    background: rgba(15, 15, 15, 0.95);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 15px;
    display: flex;
    justify-content: space-around;
    align-items: center;
    gap: 10px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    position: relative;
    overflow: hidden;
}

.mobile-menu-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, #10b981, #34d399, #10b981);
    background-size: 200% 100%;
    animation: gradientMove 3s ease-in-out infinite;
}

@keyframes gradientMove {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.mobile-menu-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 12px 8px;
    border-radius: 14px;
    text-decoration: none;
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.75rem;
    font-weight: 600;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    flex: 1;
    min-width: 0;
}

.mobile-menu-item i {
    font-size: 1.2rem;
    transition: all 0.3s ease;
}

.mobile-menu-item span {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
    text-align: center;
}

.mobile-menu-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(16, 185, 129, 0.1), transparent);
    transition: left 0.5s ease;
}

.mobile-menu-item:hover::before {
    left: 100%;
}

.mobile-menu-item:hover {
    color: rgba(255, 255, 255, 0.9);
    background: rgba(255, 255, 255, 0.05);
    transform: translateY(-2px);
}

.mobile-menu-item:active {
    transform: translateY(0);
}

.mobile-menu-item.active {
    color: #10b981;
    background: rgba(16, 185, 129, 0.15);
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.mobile-menu-item.active i {
    color: #10b981;
    transform: scale(1.1);
}

.mobile-menu-item.active::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 50%;
    transform: translateX(-50%);
    width: 20px;
    height: 2px;
    background: #10b981;
    border-radius: 1px;
}

/* Footer */
.footer {
    background: rgba(15, 15, 15, 0.95);
    padding: 3rem 2rem 1rem;
    margin-top: 4rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
}

.footer-logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.footer-description {
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 2rem;
}

/* Animações */
@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(100px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

.mobile-menu {
    animation: slideUp 0.5s ease-out;
}

@keyframes pulse {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.4);
    }
    50% {
        box-shadow: 0 0 0 8px rgba(16, 185, 129, 0);
    }
}

.mobile-menu-item.active {
    animation: pulse 2s infinite;
}

/* Loading Animation */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top-color: #10b981;
    border-radius: 50%;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Alert Messages */
.alert {
    padding: 1rem;
    border-radius: 10px;
    margin-bottom: 1rem;
    border: 1px solid;
    display: flex;
    align-items: center;
    gap: 8px;
}

.alert-success {
    background: rgba(16, 185, 129, 0.1);
    color: #10b981;
    border-color: #10b981;
}

.alert-error {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
    border-color: #ef4444;
}

.alert-warning {
    background: rgba(245, 158, 11, 0.1);
    color: #f59e0b;
    border-color: #f59e0b;
}

/* Scratch Game Styles */
.scratch-game {
    max-width: 600px;
    margin: 2rem auto;
    padding: 2rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
}

.scratch-area {
    position: relative;
    width: 100%;
    height: 400px;
    margin: 2rem 0;
    border-radius: 15px;
    overflow: hidden;
}

.scratch-canvas {
    position: absolute;
    top: 0;
    left: 0;
    cursor: crosshair;
    border-radius: 15px;
}

.prize-grid {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(3, 1fr);
    gap: 5px;
    padding: 20px;
    background: linear-gradient(135deg, #1a1a1a, #2a2a2a);
    border-radius: 15px;
}

.prize-item {
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid #10b981;
    border-radius: 8px;
    font-weight: 600;
    color: #10b981;
}

.game-result {
    text-align: center;
    margin-top: 2rem;
    padding: 1rem;
    border-radius: 15px;
    font-size: 1.2rem;
    font-weight: 600;
}

.result-win {
    color: #10b981;
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid #10b981;
}

.result-lose {
    color: #ef4444;
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid #ef4444;
}

/* ===== RESPONSIVIDADE ===== */
@media (max-width: 768px) {
    .header-container {
        height: 60px;
        padding: 0 15px;
        gap: 10px;
    }
    
    .logo {
        font-size: 1.1rem;
        flex-shrink: 0;
        min-width: 100px;
    }
    
    .nav-menu {
        display: none;
    }
    
    .auth-section {
        flex-grow: 1;
        justify-content: flex-end;
        gap: 8px;
    }

    .user-info {
        gap: 8px;
        flex-wrap: nowrap;
    }

    .balance-display {
        padding: 6px 8px;
        gap: 4px;
        flex-wrap: nowrap;
        justify-content: flex-start;
        min-width: 0;
    }
    
    .balance-item {
        font-size: 0.75rem;
        white-space: nowrap;
    }
    
    .balance-item i {
        font-size: 0.7rem;
    }
    
    .balance-separator {
        height: 12px;
    }

    .btn {
        padding: 6px 10px;
        font-size: 0.8rem;
    }
    
    .btn span {
        display: none;
    }
    
    .btn i {
        font-size: 1rem;
    }
    
    .mobile-menu {
        display: block;
    }
    
    body {
        padding-bottom: 100px;
    }
    
    .main-content {
        margin-bottom: 80px;
    }
    
    .info-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .games-grid {
        grid-template-columns: 1fr;
    }
    
    .form-container {
        margin: 1rem;
        padding: 25px 20px;
        max-width: calc(100vw - 2rem);
        width: 100%;
    }
    
    .form-container .modal-close-btn {
        position: absolute !important;
        top: 10px !important;
        right: 10px !important;
        width: 35px !important;
        height: 35px !important;
        font-size: 1.8rem !important;
        z-index: 20 !important;
    }
}

@media (max-width: 480px) {
    .header-container {
        padding: 0 10px;
        gap: 8px;
    }
    
    .balance-display {
        flex-direction: row;
        gap: 2px;
        padding: 4px 6px;
    }
    
    .balance-separator {
        display: block;
    }
    
    .balance-item {
        font-size: 0.7rem;
    }
    
    .btn {
        padding: 5px 8px;
        font-size: 0.75rem;
    }
    
    .mobile-menu {
        bottom: 15px;
        width: calc(100% - 30px);
    }
    
    .mobile-menu-container {
        padding: 12px;
        gap: 8px;
    }
    
    .mobile-menu-item {
        padding: 10px 6px;
        gap: 4px;
    }
    
    .mobile-menu-item i {
        font-size: 1.1rem;
    }
    
    .mobile-menu-item span {
        font-size: 0.7rem;
    }
    
    .form-container {
        margin: 0.5rem;
        padding: 20px 15px;
        max-width: calc(100vw - 1rem);
    }
    
    .form-container .modal-close-btn {
        top: 5px !important;
        right: 5px !important;
        width: 40px !important;
        height: 40px !important;
        font-size: 2rem !important;
    }
    
    .form-title {
        font-size: 1.5rem;
        margin-bottom: 0.5rem;
        padding-right: 40px;
    }
}

@media (max-width: 360px) {
    .header-container {
        padding: 0 8px;
        gap: 5px;
    }
    
    .logo {
        font-size: 1rem;
        min-width: 80px;
    }
    
    .balance-display {
        padding: 3px 5px;
        gap: 1px;
    }
    
    .balance-item {
        font-size: 0.6rem;
    }
    
    .btn {
        padding: 4px 6px;
        font-size: 0.7rem;
    }
    
    .mobile-menu {
        bottom: 10px;
        width: calc(100% - 20px);
    }
    
    .mobile-menu-container {
        padding: 10px;
        gap: 5px;
    }
    
    .mobile-menu-item {
        padding: 8px 4px;
        gap: 3px;
    }
    
    .mobile-menu-item i {
        font-size: 1rem;
    }
    
    .mobile-menu-item span {
        font-size: 0.65rem;
    }
}

/* Garantir que o menu não interfira com o scroll */
.mobile-menu {
    pointer-events: auto;
}

.mobile-menu-container {
    pointer-events: auto;
}

/* Evitar problemas de overflow no mobile */
@media (max-width: 768px) {
    html, body {
        overflow-x: hidden;
        width: 100%;
        max-width: 100vw;
    }
    
    .main-content {
        width: 100%;
        max-width: 100vw;
        overflow-x: hidden;
    }
}