/* Main CSS - Base styles and layout */

/* CSS Variables for consistent theming */
:root {
    /* Paleta principal já existente */
    --primary-blue: #0E203F;
    --primary-indigo: #4f46e5;
    --secondary-blue: #3b82f6;
    --light-blue: #eff6ff;
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;
    --green-50: #f0fdf4;
    --green-200: #bbf7d0;
    --green-600: #16a34a;
    --green-700: #15803d;
    --green-800: #166534;
    --amber-50: #fffbeb;
    --amber-200: #fde68a;
    --amber-600: #d97706;
    --amber-800: #92400e;
    --purple-50: #faf5ff;
    --purple-100: #f3e8ff;
    --purple-600: #9333ea;
    --purple-800: #6b21a8;
    --blue-50: #eff6ff;
    --blue-200: #bfdbfe;
    --blue-600: #2563eb;
    --blue-800: #1e40af;
    --emerald-600: #059669;
    --emerald-700: #047857;
    --bg-main: #0F182B;
    --bg-surface: #1B2638;
    --text-primary: #FFFFFF;
    --text-secondary: #8B98A9;
    --accent-gold: #F5A623;
    --border-dark: #2A3B54;

    /* Spacing */
    --spacing-1: 0.25rem;
    --spacing-2: 0.5rem;
    --spacing-3: 0.75rem;
    --spacing-4: 1rem;
    --spacing-5: 1.25rem;
    --spacing-6: 1.5rem;
    --spacing-8: 2rem;
    --spacing-12: 3rem;
    --spacing-16: 4rem;

    /* Border radius */
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
    --radius-full: 9999px;

    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);

    /* Transitions */
    --transition-fast: 150ms ease-in-out;
    --transition-normal: 200ms ease-in-out;
    --transition-slow: 300ms ease-in-out;

    /* Variáveis adicionadas para compatibilidade */
    --primary: var(--primary-blue);
    --primary-dark: #1d4ed8;         
    --primary-rgb: 37, 99, 235;      
}

/* Reset and base styles */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', sans-serif;
    line-height: 1.6;
    color: var(--text-primary) !important;
    background-color: var(--bg-main);
    min-height: 100vh;
}

/* -------------------------------------------------------------
   FORÇAR VISIBILIDADE DE TEXTOS (LAST MILE)
------------------------------------------------------------- */
.card-body p, .card-body h1, .card-body h2, .card-body h3, .card-body h4, .card-body h5, .card-body h6, .card-body span, .card-body label, .card-body div,
.form-label, .help-block, .accordion-title, .accordion-body {
    color: var(--text-primary) !important;
}

.text-muted, .help-block, .card-description {
    color: var(--text-secondary) !important;
}

/* Loading Screen */
.loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--light-blue) 0%, #e0e7ff 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.loading-content {
    text-align: center;
}

.spinner {
    width: 48px;
    height: 48px;
    border: 2px solid var(--gray-200);
    border-top: 2px solid var(--primary-blue);
    border-radius: var(--radius-full);
    animation: spin 1s linear infinite;
    margin: 0 auto var(--spacing-4);
}

.loading-text {
    color: var(--gray-600);
    font-size: 0.875rem;
    margin: 0;
}

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

/* App container & view containers */
.app-container {
    padding: var(--spacing-4);
    width: 100%;
    height: 100%;
}
.view-container {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Main Card (State Selection) */
.main-card {
    width: 100%;
    max-width: 28rem;
    background: var(--bg-surface) !important;
    border: 1px solid var(--border-dark) !important;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl);
    overflow: hidden;
}

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

.card-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary) !important; 
    margin-bottom: var(--spacing-2);
}

.card-description {
    color: var(--text-secondary) !important; 
    font-size: 0.875rem;
    margin: 0;
}

.card-content {
    padding: var(--spacing-6);
    display: flex;
    flex-direction: column;
    gap: var(--spacing-6);
}

/* Form Elements & Dark Inputs (LAST MILE) */
.form-group {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-2);
}

.form-label {
    font-size: 0.875rem;
    font-weight: 500;
    margin: 0;
}

.custom-select-wrapper {
    position: relative;
}

.form-control, .form-select, .custom-select, input {
    width: 100%;
    padding: var(--spacing-3) var(--spacing-4);
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    transition: all var(--transition-fast);
    
    /* Escurecer Inputs */
    background-color: var(--bg-main) !important;
    color: var(--text-primary) !important;
    border: 1px solid var(--border-dark) !important;
    appearance: none;
    cursor: pointer;
}

.form-control:focus, .form-select:focus, .custom-select:focus, input:focus {
    outline: none !important;
    border-color: #3b82f6 !important;
    box-shadow: 0 0 0 0.25rem rgba(59, 130, 246, 0.25) !important;
}

.custom-select:disabled {
    background-color: var(--bg-surface) !important;
    color: var(--text-secondary) !important;
    cursor: not-allowed;
}

.select-arrow {
    position: absolute;
    right: var(--spacing-3);
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    color: var(--text-secondary);
}

/* Alert Container */
.alert-container {
    padding: var(--spacing-4);
    border-radius: var(--radius-lg);
    background: var(--bg-surface) !important; 
    border: 1px solid var(--border-dark) !important; 
    display: flex;
    align-items: flex-start;
    gap: var(--spacing-3);
}

.alert-no-lottery {
    background-color: rgba(217, 119, 6, 0.1); /* Suavizado para Dark Theme */
    border-color: var(--amber-600);
    color: var(--amber-500);
}

.alert-has-lottery {
    background-color: rgba(22, 163, 74, 0.1); /* Suavizado para Dark Theme */
    border-color: var(--green-600);
    color: var(--green-500);
}

.alert-icon {
    width: 16px;
    height: 16px;
    margin-top: 2px;
    flex-shrink: 0;
}

.alert-content {
    flex: 1;
}

.alert-title {
    font-weight: 500;
    margin-bottom: var(--spacing-2);
}

.alert-text {
    font-size: 0.875rem;
    margin-bottom: var(--spacing-2);
}

.alert-link {
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-1);
    color: #3b82f6;
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    transition: color var(--transition-fast);
}

.alert-link:hover {
    color: #60a5fa;
    text-decoration: underline;
}

/* Buttons - Padrão Azul Apollo (LAST MILE) */
.btn-primary, .btn-generate {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%) !important;
    color: #ffffff !important;
    border: none !important;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.2) !important;
    border-radius: var(--radius-md);
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-normal);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-2);
}

.btn-primary {
    padding: var(--spacing-3) var(--spacing-6);
    font-size: 0.875rem;
}

.btn-generate {
    padding: var(--spacing-4) var(--spacing-8);
    font-size: 1rem;
    text-align: center;
}

.btn-primary:hover:not(:disabled), .btn-generate:hover:not(:disabled) {
    background: linear-gradient(135deg, #60a5fa 0%, #3b82f6 100%) !important;
    transform: translateY(-2px);
}

.btn-primary:disabled, .btn-generate:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.btn-full {
    width: 100%;
}

.btn-outline {
    background: transparent;
    color: var(--text-primary);
    border: 1px solid var(--border-dark);
    padding: var(--spacing-2) var(--spacing-4);
    border-radius: var(--radius-md);
    font-weight: 500;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all var(--transition-fast);
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-2);
}

.btn-outline:hover {
    background-color: var(--border-dark);
    border-color: var(--gray-500);
}

.btn-sm {
    padding: var(--spacing-2) var(--spacing-3);
    font-size: 0.75rem;
}

.btn-icon {
    width: 16px;
    height: 16px;
}

/* Footer Info */
.footer-info {
    padding-top: var(--spacing-4);
    border-top: 1px solid var(--border-dark);
    text-align: center;
}

/* Recommendation Container */
.recommendation-container {
    width: 100%;
    max-width: 64rem;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: var(--spacing-6);
}

/* Recommendation Header */
.recommendation-header {
    display: flex;
    align-items: center;
    gap: var(--spacing-4);
    flex-wrap: wrap;
}

.header-info {
    flex: 1;
}

.state-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary) !important; 
    margin: 0;
}

.game-subtitle {
    color: var(--text-secondary);
    margin: 0;
}

/* Game Info Card */
.game-info-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;
}

.game-header-content {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: var(--spacing-4);
}

.game-logo {
    height: 48px;
    width: auto;
    max-width: 150px;
    object-fit: contain;
    border-radius: var(--radius-sm);
}

.game-title-section {
    flex: 1;
}

.game-name {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary) !important; 
    margin: 0;
}

.game-type {
    color: var(--text-secondary) !important; 
    margin: 0;
}

.special-features {
    display: flex;
    gap: var(--spacing-2);
    flex-wrap: wrap;
}

/* Game Stats Grid */
.game-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--spacing-4);
}

.stat-item {
    display: flex;
    align-items: center;
    gap: var(--spacing-3);
    padding: var(--spacing-3);
    border-radius: var(--radius-lg);
    background-color: var(--bg-surface);
    border: 1px solid var(--border-dark);
}

.stat-icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.stat-frequency .stat-icon {
    color: #3b82f6;
}

.stat-site .stat-icon {
    color: var(--purple-600);
}

.stat-content {
    flex: 1;
}

.stat-label {
    font-size: 0.875rem;
    font-weight: 500;
    margin: 0 0 var(--spacing-1);
    color: var(--text-secondary) !important;
}

.stat-value {
    font-weight: 700;
    margin: 0;
    color: var(--text-primary) !important;
}

.stat-link {
    color: #3b82f6;
    text-decoration: none;
    font-weight: 700;
    font-size: 0.875rem;
    transition: all var(--transition-fast);
}

.stat-link:hover {
    text-decoration: underline;
}

/* Number Recommendation Card */
.number-recommendation-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;
}

.recommendation-title {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-2);
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.title-icon {
    width: 24px;
    height: 24px;
}

.recommendation-description {
    color: var(--text-secondary);
    margin: var(--spacing-2) 0 0;
}

/* Numbers Display */
.numbers-display {
    display: flex;
    justify-content: center;
    gap: var(--spacing-3);
    flex-wrap: wrap;
}

.number-digit {
    min-width: 64px;       
    width: auto;           
    height: 64px;          
    padding: 0 16px;       
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%) !important;
    color: #ffffff !important;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.5rem;     
    box-shadow: var(--shadow-lg);
    white-space: nowrap;   
    box-sizing: border-box;
    flex-shrink: 0;
}

.number-placeholder {
    width: 64px;
    height: 64px;
    background-color: var(--bg-main) !important;
    color: var(--text-secondary) !important;
    border: 2px dashed var(--border-dark) !important;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.125rem;
}

/* Número especial — última bola (Powerball / Mega Millions) */
.number-digit-special {
    background: linear-gradient(135deg, #f5a623 0%, #d97706 100%) !important;
    box-shadow: 0 0 16px rgba(245, 166, 35, 0.5), var(--shadow-lg) !important;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.number-placeholder-special {
    border-color: #f5a623 !important;
    color: #f5a623 !important;
    border-style: solid !important;
    box-shadow: 0 0 10px rgba(245, 166, 35, 0.2);
}

/* Generate Section */
.generate-section {
    text-align: center;
}

/* Loading Section */
.loading-section {
    text-align: center;
}

.loading-message {
    color: var(--text-secondary);
    font-size: 0.875rem;
    margin-bottom: var(--spacing-4);
}

/* Skeleton Loading */
.skeleton-container {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-3);
    align-items: center;
}

.skeleton {
    background: linear-gradient(90deg, var(--border-dark) 25%, var(--bg-surface) 50%, var(--border-dark) 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
    border-radius: var(--radius-sm);
}

.skeleton-line {
    height: 16px;
}

.skeleton-75 {
    width: 75%;
}

.skeleton-50 {
    width: 50%;
}

.skeleton-66 {
    width: 66%;
}

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

/* Results Section */
.results-section {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-6);
    animation: fadeIn 0.5s ease-in-out;
}

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

.main-recommendation {
    text-align: center;
}

.section-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: var(--spacing-4);
}

.section-subtitle {
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: var(--spacing-3);
}

/* Alternatives Grid */
.alternatives-grid {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--spacing-3);
}

.alternative-item {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: var(--spacing-2);
    padding: var(--spacing-3);
    background-color: var(--bg-surface) !important;
    border: 1px solid var(--border-dark) !important;
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 450px;     
}

.alternative-item .number-digit {
    min-width: 46px; 
    width: auto;
    height: 46px;   
    padding: 0 12px;
    font-size: 1.15rem;
}

/* Analysis Section */
.analysis-section {
    padding: var(--spacing-4);
    background-color: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.3);
    border-radius: var(--radius-lg);
}

.analysis-title {
    font-weight: 500;
    color: #60a5fa;
    margin-bottom: var(--spacing-2);
}

.analysis-text {
    font-size: 0.875rem;
    color: var(--text-primary);
    margin: 0;
}

/* Generate Again Section */
.generate-again-section {
    text-align: center;
}

/* Responsive Design */
@media (max-width: 768px) {
    .app-container {
        padding: var(--spacing-2);
    }
    
    .recommendation-header {
        flex-direction: column;
        align-items: flex-start;
        gap: var(--spacing-3);
    }
    
    .game-header-content {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .game-stats-grid {
        grid-template-columns: 1fr;
    }
    
    .alternatives-grid {
        grid-template-columns: 1fr;
    }
    
    .numbers-display {
        gap: var(--spacing-2);
    }
    
    .number-digit {
        min-width: 54px;     
        width: auto;
        height: 54px;
        font-size: 1.25rem;
        padding: 0 12px;
    }

    .number-placeholder {
        width: 54px;
        height: 54px;
    }

    .alternative-item .number-digit {
        min-width: 38px;
        width: auto;
        height: 38px;
        font-size: 1rem;
        padding: 0 10px;
    }
}

@media (max-width: 480px) {
    .card-header,
    .card-content {
        padding: var(--spacing-4);
    }
    
    .recommendation-container {
        gap: var(--spacing-4);
    }
    
    .state-title {
        font-size: 1.25rem;
    }
    
    .game-name {
        font-size: 1.125rem;
    }

    .number-digit {
        min-width: 48px;
        width: auto;
        height: 48px;
        font-size: 1.1rem;
        padding: 0 8px;
    }

    .number-placeholder {
        width: 48px;
        height: 48px;
    }

    .alternative-item .number-digit {
        min-width: 32px;
        width: auto;
        height: 32px;
        font-size: 0.85rem;
        padding: 0 6px;
    }
}

/* App Footer */
.app-footer {
    padding: var(--spacing-6) 0;
    text-align: center;
    background-color: transparent;
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.app-footer .footer-links {
    margin-bottom: var(--spacing-2);
}

.app-footer .footer-links a {
    color: var(--text-secondary);
    text-decoration: none;
    margin: 0 var(--spacing-2);
    transition: color var(--transition-fast);
}

.app-footer .footer-links a:hover {
    color: #3b82f6;
    text-decoration: underline;
}

.app-footer .copyright {
    margin: 0;
    color: var(--text-secondary);
    font-size: 0.75rem;
}

#login-logo {
    max-width: 180px;
    height: auto;
    margin: 0 auto 1.5rem;
    display: block;
}

#nav-logo {
    max-width: 140px;
    height: auto;
    transition: transform 0.3s ease;
}

.navbar-brand:hover #nav-logo {
    transform: scale(1.05);
}

/* Container onde os números são adicionados */
#pro-numbers-display {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
    padding: 1rem 0;
    min-height: 80px; 
}

/* Estilo e animação para as bolas de números */
#pro-numbers-display .number-ball-pro {
    width: 64px;
    height: 64px;
    font-size: 2rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    box-shadow: var(--shadow-lg);
    border: 3px solid var(--border-dark);
    color: #ffffff;
    opacity: 0; 
    animation-name: pop-in;
    animation-duration: 0.5s;
    animation-fill-mode: forwards; 
    animation-timing-function: cubic-bezier(0.68, -0.55, 0.27, 1.55);
}

#pro-numbers-display .special-ball-pro {
    background: linear-gradient(145deg, var(--amber-600), #f8b500);
    color: var(--bg-main);
    border-color: var(--accent-gold);
}

@keyframes pop-in {
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

/* Pro Generator Card */
.pro-generator-card {
    max-width: 42rem; 
}

.pro-generator-card .card-content {
    gap: var(--spacing-8); 
}

.pro-generator-card .stat-item {
    padding: var(--spacing-4); 
}

.pro-generator-card .stat-label {
    font-size: 1rem; 
}

.pro-generator-card .stat-value {
    font-size: 1.25rem; 
}

/* Play Now Wrapper */
.play-now-wrapper {
    width: 100%;
    display: flex;
    justify-content: center;
    margin-top: var(--spacing-4);
}

.stat-play-now {
    background: linear-gradient(135deg, var(--green-600) 0%, var(--emerald-600) 100%);
    max-width: 400px;
    width: 100%;
    transition: all var(--transition-normal);
}

.stat-play-now:hover {
    transform: scale(1.02);
    background: linear-gradient(135deg, var(--green-700) 0%, var(--emerald-700) 100%);
}

.stat-play-now .stat-icon {
    color: white;
}

.stat-play-now .stat-label {
    color: rgba(255, 255, 255, 0.8);
    font-size: 1rem; 
}

.stat-play-now .stat-link {
    color: white;
    font-weight: 700;
    text-decoration: none;
    transition: transform 0.2s ease;
    display: inline-block; 
}

.stat-play-now .stat-link:hover {
    color: white; 
    text-decoration: underline;
    transform: scale(1.05); 
}

.next-draw-info {
    color: var(--text-secondary);
    font-size: 0.875rem;
    font-weight: 500;
    margin-top: var(--spacing-4);
    text-align: center;
}

.cache-info-text {
    color: var(--gray-500);
    font-size: 0.75rem;
    margin-top: var(--spacing-3);
    padding: 0 var(--spacing-4);
    text-align: center;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
}

/* Category Grid */
.category-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}

.category-card {
    background: var(--bg-surface) !important;
    border: 1px solid var(--border-dark) !important;
    color: var(--text-primary) !important; 
    border-radius: var(--radius-lg);
    padding: 1.25rem;
    cursor: pointer;
    transition: all var(--transition-normal);
    display: flex;
    align-items: center;
    gap: 1.5rem;
    text-align: left;
    text-decoration: none;
    font-weight: 600 !important;
}

.category-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: #3b82f6 !important;
}

.category-card-icon, .category-card-pro {
    width: 200px;
    height: 100px;
    background-color: var(--bg-main);
    border: 1px solid var(--border-dark);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    flex-shrink: 0;
}

.category-icon {
    width: 80%;
    height: 80%;
    object-fit: contain;
    display: block;
}

@media (max-width: 768px) {
    .category-card {
        padding: 1rem;
        gap: 1rem;
    }
    
    .category-card-icon, .category-card-pro {
        width: 56px;
        height: 56px;
    }
}

/* Botão de Voltar */
.btn-back {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: var(--spacing-2);
    padding: 0;
    margin-bottom: var(--spacing-4);
}

.btn-back:hover {
    color: #3b82f6;
}

/* Locked category styles */
.category-card.locked {
    position: relative;
    opacity: 0.7;
    cursor: not-allowed;
    background-color: var(--bg-main) !important;
    border: 1px dashed var(--border-dark) !important;
    transition: all 0.3s ease;
}

.category-card.locked .category-icon {
    filter: grayscale(100%);
    opacity: 0.6;
}

.category-card.locked .lock-icon {
    position: absolute;
    top: 10px;
    right: 10px;
    color: var(--text-secondary);
    font-size: 1.2rem;
}

.pro-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    background: linear-gradient(45deg, #ffc107, #ff9800);
    color: #000;
    font-size: 10px;
    font-weight: bold;
    padding: 2px 6px;
    border-radius: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.upgrade-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 24, 43, 0.7); /* Atualizado para tom escuro da paleta */
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-lg);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.category-card.locked:hover .upgrade-overlay {
    opacity: 1;
}

.upgrade-btn {
    background: linear-gradient(45deg, #ffc107, #ff9800);
    color: #000;
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: 600;
    text-decoration: none;
    font-size: 0.85rem;
    transition: all 0.3s ease;
}

.upgrade-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.5);
}

.category-card.locked:hover {
    transform: none;
    box-shadow: none;
}


/* =========================================================
   AJUSTES DE CONTRASTE PARA O DARK THEME (LAST MILE FIXES)
========================================================= */

/* 1. Ajuste de Placeholders e Textareas */
.form-control::placeholder, 
input::placeholder, 
textarea::placeholder {
    color: var(--text-secondary) !important;
    opacity: 0.7 !important;
}

textarea.form-control {
    background-color: var(--bg-main) !important;
    color: var(--text-primary) !important;
    border: 1px solid var(--border-dark) !important;
}

/* 2. Correção de Cores de Links (Need help, Forgot password) */
.text-primary, 
a.text-primary {
    color: #60a5fa !important; /* Azul mais claro para melhor leitura no fundo escuro */
}

a.text-primary:hover {
    color: #93c5fd !important;
}

a.text-muted:hover {
    color: var(--text-primary) !important;
}

/* 3. Adaptação dos Alertas/Toasts do Bootstrap para o Dark Theme */
.alert-success {
    background-color: rgba(22, 163, 74, 0.15) !important;
    border: 1px solid var(--green-600) !important;
    color: var(--green-200) !important;
}

.alert-danger {
    background-color: rgba(220, 38, 38, 0.15) !important;
    border: 1px solid #dc2626 !important;
    color: #fca5a5 !important;
}

.alert-warning, .alert-info {
    background-color: rgba(59, 130, 246, 0.15) !important;
    border: 1px solid #3b82f6 !important;
    color: #bfdbfe !important;
}

/* 4. Forçar cor branca em textos fora do card-body (ex: títulos) */
h1, h2, h3, h4, h5, h6 {
    color: var(--text-primary) !important;
}

.input-group-text {
    background-color: var(--bg-surface) !important;
    color: var(--text-secondary) !important;
    border: 1px solid var(--border-dark) !important;
}


.btn-outline:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background-color: transparent;
    border-color: var(--border-dark);
    color: var(--text-secondary);
}

/* 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;
}

/* ============================================================
   Calculating Probabilities — modal de análise (theater premium)
   ============================================================ */
.calc-modal {
    position: fixed;
    inset: 0;
    z-index: 1080;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.25rem;
    background: rgba(7, 14, 26, 0.72);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    animation: calc-fade 220ms ease-out;
}

@keyframes calc-fade { from { opacity: 0; } to { opacity: 1; } }

.calc-card {
    width: 100%;
    max-width: 340px;
    background: linear-gradient(180deg, #1B2638 0%, #131D2D 100%);
    border: 1px solid var(--border-dark);
    border-radius: 18px;
    padding: 2rem 1.5rem 1.5rem;
    text-align: center;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.55);
    animation: calc-pop 260ms cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes calc-pop {
    from { transform: translateY(14px) scale(0.96); opacity: 0; }
    to   { transform: translateY(0) scale(1); opacity: 1; }
}

/* Cabeçalho do engine */
.calc-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.4rem;
    padding-bottom: 0.85rem;
    border-bottom: 1px solid var(--border-dark);
}
.calc-brand {
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--accent-gold);
}
.calc-target {
    font-size: 0.72rem;
    color: var(--text-secondary);
    font-variant-numeric: tabular-nums;
}

/* Matriz de dígitos sendo "computada" */
.calc-matrix {
    position: relative;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
    width: 168px;
    margin: 0 auto 1.5rem;
    padding: 10px;
    border-radius: 12px;
    background: rgba(14, 32, 63, 0.55);
    border: 1px solid var(--border-dark);
    overflow: hidden;
}
.calc-cell {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background: rgba(42, 59, 84, 0.35);
    color: var(--text-primary);
    font-size: 1.5rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    animation: calc-flick 0.9s steps(1) infinite;
}
.calc-cell:nth-child(2) { animation-delay: 0.12s; }
.calc-cell:nth-child(3) { animation-delay: 0.31s; }
.calc-cell:nth-child(4) { animation-delay: 0.07s; }
.calc-cell:nth-child(5) { animation-delay: 0.25s; }
.calc-cell:nth-child(6) { animation-delay: 0.41s; }
.calc-cell:nth-child(7) { animation-delay: 0.18s; }
.calc-cell:nth-child(8) { animation-delay: 0.36s; }
.calc-cell:nth-child(9) { animation-delay: 0.5s; }

@keyframes calc-flick {
    0%   { color: var(--text-primary); }
    50%  { color: var(--accent-gold); }
    100% { color: var(--text-secondary); }
}

.calc-scan-line {
    position: absolute;
    left: 0; right: 0;
    height: 38%;
    top: -38%;
    background: linear-gradient(180deg, rgba(245, 166, 35, 0) 0%, rgba(245, 166, 35, 0.16) 100%);
    border-bottom: 1px solid rgba(245, 166, 35, 0.5);
    animation: calc-scan 1.6s ease-in-out infinite;
}

@keyframes calc-scan {
    0%   { top: -38%; }
    100% { top: 100%; }
}

.calc-status {
    color: var(--text-primary);
    font-size: 1.05rem;
    font-weight: 600;
    letter-spacing: 0.01em;
    margin: 0 0 1.1rem;
    min-height: 1.4em;
}

.calc-meter {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    margin-bottom: 1.25rem;
}
.calc-pct {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--accent-gold);
    font-variant-numeric: tabular-nums;
    min-width: 2.6em;
    text-align: right;
}
.calc-bar {
    flex: 1;
    height: 5px;
    border-radius: 99px;
    background: rgba(42, 59, 84, 0.6);
    overflow: hidden;
}
.calc-bar-fill {
    height: 100%;
    width: 8%;
    border-radius: 99px;
    background: linear-gradient(90deg, var(--accent-gold), #ffce6b);
    transition: width 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

.calc-steps {
    list-style: none;
    margin: 0;
    padding: 0;
    text-align: left;
}
.calc-steps li {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.32rem 0;
    color: var(--text-secondary);
    font-size: 0.85rem;
    opacity: 0.5;
    transition: opacity 0.3s ease, color 0.3s ease;
}
.calc-steps li i { font-size: 0.95rem; color: var(--border-dark); }
.calc-steps li span { flex: 1; }
.calc-steps li b { font-size: 0.78rem; font-weight: 600; color: var(--text-secondary); font-variant-numeric: tabular-nums; }
.calc-steps li.active { opacity: 1; color: var(--text-primary); }
.calc-steps li.active i { color: var(--accent-gold); }
.calc-steps li.done { opacity: 0.85; color: var(--text-secondary); }
.calc-steps li.done i { color: #22c55e; }

@media (prefers-reduced-motion: reduce) {
    .calc-modal, .calc-card { animation: none; }
    .calc-cell, .calc-scan-line { animation: none; }
    .calc-cell { color: var(--text-primary); }
}

/* 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); }
