/* Components CSS - Specific component styles */

/* Card Styles */
.card {
    background: var(--bg-surface) !important;
    border: 1px solid var(--border-dark) !important;
    border-radius: 0.75rem;
    overflow: hidden;
    margin-bottom: 1.5rem;
    box-shadow: 0 0.125rem 0.5rem rgba(0, 0, 0, 0.05);
    transition: transform 0.2s, box-shadow 0.2s;
}

.card:hover {
    transform: none !important;
    transition: none !important;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.1);
}

.card-header {
    background-color: transparent !important;
    border-bottom: 1px solid var(--border-dark) !important;
    padding: 1.5rem;
}

.card-body {
    padding: 1.5rem;
}

/* Form Styles */
.form-control, .form-select, input {
    background-color: var(--bg-main) !important;
    color: var(--text-primary) !important;
    border: 1px solid var(--border-dark) !important;
}

.form-control:focus, .form-select:focus, input:focus {
    border-color: #22c55e !important;
    box-shadow: 0 0 0 0.25rem rgba(34, 197, 94, 0.25) !important;
}

/* Button Styles */
.btn {
    font-weight: 500;
    padding: 0.5rem 1.25rem;
    border-radius: 0.5rem;
    transition: all 0.2s;
}

.btn i {
    margin-right: 0.5rem;
}

/* Restringe estilo de botão primário apenas em auth */
.auth-form .btn-primary,
.auth-header + .auth-form .btn-primary {
    background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%) !important;
    color: #ffffff !important;
    border: none !important;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.2) !important;
}

.auth-form .btn-primary:hover,
.auth-header + .auth-form .btn-primary:hover {
    background: linear-gradient(135deg, #4ade80 0%, #22c55e 100%) !important;
    transform: translateY(-2px);
}

.btn-outline-secondary:hover {
    background-color: var(--gray-800) !important;
    border-color: var(--border-dark) !important;
    color: var(--text-primary) !important;
}

/* Modal Styles */
.modal-content {
    background: var(--bg-surface) !important;
    border: 1px solid var(--border-dark) !important;
    border-radius: 0.75rem;
    overflow: hidden;
}

.modal-header {
    background-color: transparent !important;
    border-bottom: 1px solid var(--border-dark) !important;
    padding: 1.25rem 1.5rem;
}

.modal-footer {
    border-top: 1px solid var(--border-dark) !important;
    padding: 1.25rem 1.5rem;
}

/* Layout Styles */
html, body {
    height: 100%;
}

body {
    display: flex;
    flex-direction: column;
}

main {
    flex: 1 0 auto;
    display: flex;
    flex-direction: column;
}

/* Modern Navigation  */
.navbar {
    background-color: var(--bg-surface) !important;
    border-bottom: 1px solid var(--border-dark) !important;
    box-shadow: none !important;
    padding: 0.5rem 0;
    position: relative;
    z-index: 1030;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.navbar > .container {
    padding: 0 1.5rem;
    max-width: 1440px;
}

.navbar-brand {
    font-weight: 700;
    font-size: 1.5rem;
    color: white !important;
    padding: 0.5rem 0;
    margin-right: 2rem;
    display: flex;
    align-items: center;
    transition: transform 0.3s ease;
}

.navbar-brand:hover {
    transform: translateY(-1px);
}

.navbar-brand img {
    height: 36px;
    width: auto;
    transition: transform 0.3s ease;
}

.navbar-nav {
    gap: 0.25rem;
}

.nav-link {
    font-weight: 500;
    padding: 0.6rem 1rem !important;
    border-radius: var(--radius-md);
    transition: all 0.2s ease-in-out;
    display: flex;
    align-items: center;
    color: rgba(255, 255, 255, 0.9) !important;
    margin: 0 0.25rem;
    position: relative;
    font-size: 0.95rem;
}

.nav-link i {
    font-size: 1.1em;
    margin-right: 0.5rem;
    transition: transform 0.2s ease;
}

.nav-link:hover, 
.nav-link:focus, 
.nav-link.active {
    color: #fff !important;
    background-color: rgba(255, 255, 255, 0.15);
    transform: translateY(-1px);
}

.nav-link:hover i {
    transform: translateX(2px);
}

.nav-link.dropdown-toggle:hover i {
    transform: none !important;
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 20px;
    height: 3px;
    background: white;
    border-radius: 3px;
}

.brand-title { 
    color: var(--text-primary); 
    font-weight: 700; 
    font-size: 1.4rem; 
    line-height: 1; 
    margin: 0; 
}

.brand-subtitle { 
    color: var(--text-secondary); 
    font-size: 0.65rem; 
    text-transform: uppercase; 
    letter-spacing: 0.5px; 
}

.dropdown-menu {
    border: none;
    border-radius: 0.75rem !important;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    padding: 0.5rem 0;
    margin-top: 0.5rem;
    min-width: 220px;
    background: var(--bg-surface) !important;
    border: 1px solid var(--border-dark) !important;
    transform-origin: top center;
    animation: fadeIn 0.2s ease-out;
}

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

.dropdown-item {
    padding: 0.6rem 1.5rem;
    color: var(--text-primary) !important;
    font-weight: 500;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    font-size: 0.9rem;
}

.dropdown-item i {
    margin-right: 0.75rem;
    color: var(--gray-400);
    width: 18px;
    text-align: center;
}

.dropdown-item:hover, 
.dropdown-item:focus {
    background-color: var(--border-dark) !important;
    color: var(--text-primary) !important;
}

.dropdown-divider {
    border-color: var(--border-dark) !important;
    margin: 0.5rem 0;
}

.nav-link-pro {
    background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%) !important;
    color: #1a365d !important;
    border-radius: 50px;
    padding: 0.6rem 1.25rem !important;
    margin-left: 0.5rem;
    font-weight: 600 !important;
    letter-spacing: 0.3px;
    border: none;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    position: relative;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-link-pro::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.2) 0%, rgba(255, 255, 255, 0) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.nav-link-pro:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    color: #1a1a2e !important;
}

.nav-link-pro:hover::before {
    opacity: 1;
}

.nav-link-pro:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px -1px rgba(0, 0, 0, 0.1);
}

.nav-link-pro svg {
    transition: all 0.3s ease;
    margin-right: 0.5rem;
    filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.1));
}

.nav-link-pro:hover svg {
    transform: rotate(15deg) scale(1.1);
    filter: drop-shadow(0 2px 2px rgba(0, 0, 0, 0.15));
}

.navbar-toggler {
    border: none;
    padding: 0.5rem;
    color: white !important;
    transition: all 0.2s ease;
}

.navbar-toggler:focus {
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.2);
    outline: none;
}

.navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28255, 255, 255, 0.9%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e") !important;
    width: 1.5em;
    height: 1.5em;
}

@media (max-width: 991.98px) {
    .navbar-collapse {
        padding: 1rem;
        background: var(--bg-surface) !important;
        border: 1px solid var(--border-dark) !important;
        border-radius: 0.75rem;
        margin-top: 0.5rem;
        box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    }

    .navbar-nav {
        gap: 0.5rem;
    }

    .nav-link {
        padding: 0.75rem 1rem !important;
        margin: 0.25rem 0;
    }

    .nav-link-pro {
        margin: 0.5rem 0 0;
        width: 100%;
        justify-content: center;
    }
}

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

.navbar-nav > * {
    animation: slideIn 0.3s ease-out forwards;
    opacity: 0;
}

@keyframes pulse-gold {
    0% { box-shadow: 0 0 0 0 rgba(245, 166, 35, 0.4); }
    70% { box-shadow: 0 0 0 8px rgba(245, 166, 35, 0); }
    100% { box-shadow: 0 0 0 0 rgba(245, 166, 35, 0); }
}

.tier-pulsing {
    border-radius: 50%;
    animation: pulse-gold 2s infinite;
    color: var(--accent-gold);
}

.navbar-nav > *:nth-child(1) { animation-delay: 0.1s; }
.navbar-nav > *:nth-child(2) { animation-delay: 0.15s; }
.navbar-nav > *:nth-child(3) { animation-delay: 0.2s; }
.navbar-nav > *:nth-child(4) { animation-delay: 0.25s; }
.navbar-nav > *:nth-child(5) { animation-delay: 0.3s; }
.navbar-nav > *:nth-child(6) { animation-delay: 0.35s; }

.navbar-scrolled {
    background: var(--bg-surface) !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    padding: 0.3rem 0;
}

/* Authentication Styles */
.auth-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: calc(100vh - 200px);
    padding: 2rem 1rem;
    background-color: var(--bg-main);
}

.auth-card {
    background: var(--bg-surface) !important;
    border: 1px solid var(--border-dark) !important;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
    width: 100%;
    max-width: 400px;
    overflow: hidden;
}

.auth-header {
    background-color: transparent !important;
    border-bottom: 1px solid var(--border-dark) !important;
    padding: 2rem;
    text-align: center;
    color: var(--text-primary);
}

.auth-header h2 {
    margin: 0;
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-primary) !important; 
}

.auth-header p {
    margin: 0.5rem 0 0;
    opacity: 0.9;
    font-size: 1rem;
    color: var(--text-secondary) !important; 
}

.auth-form {
    padding: 2rem;
}

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

.auth-footer {
    text-align: center;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-dark) !important;
}

.auth-footer a {
    color: #22c55e;
    font-weight: 500;
    text-decoration: none;
}

.auth-footer a:hover {
    text-decoration: underline;
}

/* Profile Styles */
.profile-container {
    max-width: 800px;
    margin: 2rem auto;
    padding: 0 1rem;
}

.profile-card {
    background: var(--bg-surface) !important;
    border: 1px solid var(--border-dark) !important;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
}

.profile-header {
    background-color: transparent !important;
    border-bottom: 1px solid var(--border-dark) !important;
    display: flex;
    align-items: center;
    padding: 2rem;
    color: var(--text-primary);
}

.profile-avatar {
    position: relative;
    margin-right: 1.5rem;
}

.profile-img {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid var(--border-dark);
}

.profile-img-placeholder {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: #22c55e;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 2.5rem;
    font-weight: 600;
    border: 4px solid var(--border-dark);
}

.profile-info h2 {
    margin: 0 0 0.25rem;
    font-size: 1.75rem;
}

.profile-details {
    padding: 2rem;
}

@media (max-width: 640px) {
    .auth-card {
        margin: 1rem;
    }
    
    .profile-header {
        flex-direction: column;
        text-align: center;
    }
    
    .profile-avatar {
        margin: 0 0 1rem 0;
    }
}

/* Custom Select Enhancements */
.custom-select option {
    padding: var(--spacing-2);
    background: var(--bg-surface);
    color: var(--text-primary);
}

.custom-select option:hover {
    background-color: var(--border-dark);
}

/* Progress Bar Component */
.progress {
    width: 100%;
    height: 8px;
    background-color: var(--border-dark);
    border-radius: var(--radius-full);
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
    border-radius: var(--radius-full);
    transition: width var(--transition-slow);
}

/* Accordion Component */
.accordion-item {
    border: 1px solid var(--border-dark);
    border-radius: var(--radius-md);
    margin-bottom: var(--spacing-2);
    overflow: hidden;
    background: var(--bg-surface);
}

.accordion-header {
    background: var(--bg-surface);
    padding: var(--spacing-4);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: background-color var(--transition-fast);
}

.accordion-header:hover {
    background-color: var(--border-dark);
}

.accordion-title {
    font-weight: 500;
    margin: 0;
}

.accordion-icon {
    transition: transform var(--transition-fast);
}

.accordion-item.active .accordion-icon {
    transform: rotate(180deg);
}

.accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height var(--transition-slow);
}

.accordion-item.active .accordion-content {
    max-height: 500px;
}

.accordion-body {
    padding: var(--spacing-4);
    border-top: 1px solid var(--border-dark);
}

/* Força a Navbar em apenas 1 linha no Mobile e ajusta dimensões */
@media (max-width: 767.98px) {
    .navbar > .container {
        flex-wrap: nowrap !important;
        padding: 0 0.75rem; /* Reduz o padding lateral da tela */
        gap: 0.5rem;
    }

    .navbar-brand {
        margin-right: auto !important; /* Empurra o menu do usuário para o canto */
        flex-shrink: 1; 
        min-width: 0; /* Evita que o texto empurre a tela */
    }

    /* Redução proporcional das fontes da Brand no mobile */
    .navbar-brand .brand-title {
        font-size: 1.1rem !important;
    }
    
    .navbar-brand .brand-subtitle {
        font-size: 0.55rem !important;
    }

    /* Ajuste da Badge Ultra VIP para ocupar menos espaço */
    .navbar-brand .tier-pulsing {
        padding: 0.3rem 0.6rem !important;
        font-size: 0.6rem !important;
    }
    
    /* Garante que a área do ícone do usuário não encolha e quebre */
    .nav-item.dropdown {
        flex-shrink: 0;
    }
    
    /* Remove a margem extra do ícone de refresh no mobile para ganhar espaço */
    .nav-item.dropdown .bi-arrow-repeat.me-3 {
        margin-right: 0.5rem !important;
    }
}

/* Fixação e Estilo do Banner de Upsell */
.sticky-upsell-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: rgba(10, 26, 15, 0.98); /* var(--bg-main) com opacidade */
    border-top: 1px solid var(--border-dark);
    padding: 1rem 0;
    z-index: 9999;
    box-shadow: 0 -4px 10px rgba(0, 0, 0, 0.3);
    color: var(--text-primary);
}

.sticky-upsell-banner .container {
    max-width: 1000px;
}

/* Força a cor do texto do Privacy Policy/Terms */
.text-content p, .text-content li { 
    color: var(--text-secondary) !important; 
}
.text-content strong { 
    color: var(--text-primary) !important; 
}

/* Garante o card de destaque do Est. Prize com cor escura no tema Dark */
.stat-bg-highlight {
    background: var(--bg-surface) !important;
    border: 1px solid var(--green-600, #198754) !important;
}

/* Passo 2: Fundo das Logos de Categoria */
.category-card-icon, .category-card-pro {
    background-color: #F1F7FF !important; /* Branco puro alinhado com app.apollointeligence.com */
    border: none !important;
    padding: 10px; /* Garante o respiro interno do logo */
}

/* Passo 4: Refatoração dos Cards de Status (CORRIGIDO) */

/* 1. Card Est. Withdrawal Available (Todo Verde) */
.stat-item.stat-prize.stat-bg-highlight {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%) !important; /* Fundo verde com gradiente */
    border: 1px solid #047857 !important; /* Borda verde escuro */
}

/* Força os textos e ícones do card verde a ficarem bem mais escuros e destacados */
.stat-item.stat-prize .stat-label, 
.stat-item.stat-prize .text-muted, 
.stat-item.stat-prize i.stat-icon, 
.stat-item.stat-prize .stat-value,
.stat-item.stat-prize .text-success {
    color: #022c22 !important; /* Tom de verde quase preto para máximo contraste */
}

/* Deixa o título (Est. Withdrawal Available) um pouco mais forte */
.stat-item.stat-prize .stat-label {
    font-weight: 600 !important;
}

/* Garante que o valor principal ($87,000,000) tenha peso máximo */
.stat-item.stat-prize .stat-value {
    font-weight: 800 !important; 
}

/* Remove a cor do text-success nativo do Bootstrap para não conflitar */
.stat-item.stat-prize .text-success {
    color: #064e3b !important; 
}


/* 2. Cards Frequency e Official Site (Bordas e Textos Brancos) */
.stat-frequency, .stat-site {
    background-color: transparent !important; /* Remove qualquer fundo branco/sólido */
    border: 1px solid #ffffff !important; /* Borda branca */
}

/* Força todos os textos e ícones desses cards a ficarem brancos */
.stat-frequency .stat-label, 
.stat-site .stat-label,
.stat-frequency .stat-value, 
.stat-site .stat-link,
.stat-frequency .stat-icon, 
.stat-site .stat-icon {
    color: #ffffff !important; /* Branco puro */
}

/* Ajuste de hover para o link do Official Site não sumir */
.stat-site .stat-link:hover {
    color: rgba(255, 255, 255, 0.8) !important;
}

/* Container branco para a Logo do Game na tela de recomendação */
.game-logo-container {
    background-color: #ffffff !important;
    padding: 10px 20px;
    border-radius: 0.5rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.game-logo {
    max-height: 45px; /* Mantém a logo num tamanho elegante */
    object-fit: contain;
}

/* Wheel of Fortune Styling */
.wheel-container { width: 250px; height: 250px; margin: 1rem auto; border-radius: 50%; border: 5px solid var(--gray-200); box-shadow: var(--shadow-lg); overflow: hidden; }
.wheel-pointer { position: absolute; top: -10px; left: 50%; transform: translateX(-50%); width: 0; height: 0; border-left: 15px solid transparent; border-right: 15px solid transparent; border-top: 25px solid #dc2626; z-index: 10; filter: drop-shadow(0 2px 2px rgba(0,0,0,0.3)); }
.wheel { width: 100%; height: 100%; border-radius: 50%; position: relative; transition: transform 4s cubic-bezier(0.175, 0.885, 0.32, 1.275); background: #fff; }
.wheel-slice { position: absolute; top: 0; left: 0; width: 50%; height: 50%; transform-origin: 100% 100%; color: white; }
.wheel-slice span { position: absolute; left: 100%; top: 100%; width: 80px; height: 30px; margin-left: -40px; margin-top: -15px; transform: skewY(-30deg) rotate(-120deg) translateX(85px) rotate(90deg); font-size: 0.85rem; font-weight: 800; text-align: center; line-height: 30px; text-shadow: 0 1px 3px rgba(0,0,0,0.4); color: inherit; white-space: nowrap; }
.slice-1 { background-color: var(--primary-blue); transform: rotate(0deg) skewY(30deg); }
.slice-2 { background-color: #FFA500; transform: rotate(60deg) skewY(30deg); color: #1a365d; }
.slice-3 { background-color: var(--primary-indigo); transform: rotate(120deg) skewY(30deg); }
.slice-4 { background-color: var(--purple-800); transform: rotate(180deg) skewY(30deg); }
.slice-5 { background-color: var(--green-600); transform: rotate(240deg) skewY(30deg); }
.slice-6 { background-color: var(--amber-600); transform: rotate(300deg) skewY(30deg); }

/* =========================================================
   NOTIFICATION TOAST COMPONENT
========================================================= */
.notification {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    z-index: 10000;
    min-width: 300px;
    max-width: 400px;
    background: var(--bg-surface);
    border: 1px solid var(--border-dark);
    border-radius: 0.75rem;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.5), 0 4px 10px -2px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    opacity: 0;
    transform: translateY(0.75rem);
    transition: opacity 0.3s ease, transform 0.3s ease;
    pointer-events: none;
}

.notification.show {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.notification-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.875rem 1rem 0.5rem;
    gap: 0.5rem;
}

.notification-title {
    font-size: 0.9rem;
    font-weight: 700;
    margin: 0;
    color: var(--text-primary);
    flex: 1;
}

.notification-close {
    background: none;
    border: none;
    padding: 0.2rem;
    cursor: pointer;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.375rem;
    transition: color 0.2s ease, background-color 0.2s ease;
    flex-shrink: 0;
    line-height: 1;
}

.notification-close:hover {
    color: var(--text-primary);
    background-color: var(--border-dark);
}

.notification-body {
    padding: 0 1rem 1rem;
    font-size: 0.825rem;
    color: var(--text-secondary);
    line-height: 1.55;
}

/* Accent left-border + title color per type */
.notification-info {
    border-left: 3px solid #22c55e;
}

.notification-info .notification-title {
    color: #4ade80 !important;
}

.notification-warning {
    border-left: 3px solid var(--amber-600);
}

.notification-warning .notification-title {
    color: #fbbf24 !important;
}

.notification-error {
    border-left: 3px solid #ef4444;
}

.notification-error .notification-title {
    color: #fca5a5 !important;
}

/* Stack multiple toasts vertically */
.notification:nth-last-of-type(2) { bottom: calc(1.5rem + 5.5rem); }
.notification:nth-last-of-type(3) { bottom: calc(1.5rem + 11rem); }
