/* Mega Sena Analyzer - Custom Styles */

:root {
    --primary-color: #0d6efd;
    --success-color: #198754;
    --warning-color: #ffc107;
    --danger-color: #dc3545;
    --info-color: #0dcaf0;
    --dark-color: #212529;
    --light-color: #f8f9fa;
}

/* Global Styles */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f8f9fa;
}

/* Navigation */
.navbar-brand {
    font-weight: bold;
    font-size: 1.5rem;
}

.navbar-nav .nav-link {
    font-weight: 500;
    transition: color 0.3s ease;
}

.navbar-nav .nav-link:hover {
    color: rgba(255, 255, 255, 0.8) !important;
}

/* Cards */
.card {
    border: none;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    transition: box-shadow 0.15s ease-in-out;
}

.card:hover {
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

.card-header {
    border-bottom: 1px solid rgba(0, 0, 0, 0.125);
    font-weight: 600;
}

/* Buttons */
.btn {
    border-radius: 0.375rem;
    font-weight: 500;
    transition: all 0.15s ease-in-out;
}

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

/* Loading Overlay */
#loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
}

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

.loading-content .spinner-border {
    width: 3rem;
    height: 3rem;
}

/* Alerts */
.alert {
    border: none;
    border-radius: 0.5rem;
}

.alert-dismissible .btn-close {
    padding: 1.25rem 1rem;
}

/* Jumbotron */
.jumbotron {
    background: linear-gradient(135deg, var(--primary-color), #6610f2);
}

/* Number Display */
.number-display, .number-ball {
    display: inline-block;
    width: 40px;
    height: 40px;
    line-height: 40px;
    text-align: center;
    background-color: var(--primary-color);
    color: white;
    border-radius: 50%;
    font-weight: bold;
    margin: 2px;
    font-size: 14px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
    transition: transform 0.2s ease;
}

.number-ball:hover {
    transform: scale(1.1);
}

.number-display.hot {
    background-color: var(--danger-color);
}

.number-display.cold {
    background-color: var(--info-color);
}

.number-display.balanced {
    background-color: var(--success-color);
}

/* Game Display */
.game-card {
    border-left: 4px solid var(--primary-color);
}

.game-card.hot {
    border-left-color: var(--danger-color);
}

.game-card.cold {
    border-left-color: var(--info-color);
}

.game-card.balanced {
    border-left-color: var(--success-color);
}

/* Chart Containers */
.chart-container {
    position: relative;
    height: 400px;
    margin: 20px 0;
}

.chart-container canvas {
    max-height: 100%;
}

/* Progress Bars */
.progress {
    height: 1.5rem;
    border-radius: 0.5rem;
}

.progress-bar {
    font-weight: 600;
}

/* Form Controls */
.form-control, .form-select {
    border-radius: 0.375rem;
    border: 1px solid #ced4da;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.form-control:focus, .form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
}

/* Tables */
.table {
    border-radius: 0.5rem;
    overflow: hidden;
}

.table th {
    background-color: var(--light-color);
    font-weight: 600;
    border-top: none;
}

/* Statistics Cards */
.stat-card {
    background: linear-gradient(135deg, #fff, #f8f9fa);
    border: 1px solid #dee2e6;
    border-radius: 0.5rem;
    padding: 1.5rem;
    text-align: center;
    transition: transform 0.2s ease;
}

.stat-card:hover {
    transform: translateY(-2px);
}

.stat-value {
    font-size: 2rem;
    font-weight: bold;
    color: var(--primary-color);
}

.stat-label {
    color: #6c757d;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Monte Carlo Results */
.monte-carlo-result {
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    border: 1px solid #dee2e6;
    border-radius: 0.5rem;
    padding: 1rem;
    margin: 0.5rem 0;
}

.monte-carlo-result.winning {
    background: linear-gradient(135deg, #d1ecf1, #b8daff);
    border-color: var(--info-color);
}

/* Responsive Improvements */
@media (max-width: 768px) {
    .jumbotron {
        padding: 2rem 1rem;
    }
    
    .jumbotron h1 {
        font-size: 2rem;
    }
    
    .number-display {
        width: 35px;
        height: 35px;
        line-height: 35px;
        font-size: 12px;
    }
    
    .chart-container {
        height: 300px;
    }
}

/* Animation Classes */
.fade-in {
    animation: fadeIn 0.5s ease-in;
}

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

.slide-in {
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from { transform: translateX(-100%); }
    to { transform: translateX(0); }
}

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

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

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

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

/* Font Awesome Fallbacks - Icons with Unicode symbols */
.fas.fa-crystal-ball:before,
.fa-crystal-ball:before {
    content: "🔮";
    font-family: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif !important;
    font-size: inherit;
}

.fas.fa-home:before,
.fa-home:before {
    content: "🏠";
    font-family: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif !important;
}

.fas.fa-chart-line:before,
.fa-chart-line:before {
    content: "📈";
    font-family: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif !important;
}

.fas.fa-dice-d20:before,
.fa-dice-d20:before {
    content: "🎲";
    font-family: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif !important;
}

.fas.fa-database:before,
.fa-database:before {
    content: "💾";
    font-family: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif !important;
}

.fas.fa-chess:before,
.fa-chess:before {
    content: "♟️";
    font-family: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif !important;
}

.fas.fa-clock:before,
.fa-clock:before {
    content: "⏰";
    font-family: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif !important;
}

.fas.fa-book:before,
.fa-book:before {
    content: "📚";
    font-family: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif !important;
}

.fas.fa-dice:before,
.fa-dice:before {
    content: "🎯";
    font-family: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif !important;
}

.fas.fa-arrow-right:before,
.fa-arrow-right:before {
    content: "→";
    font-family: sans-serif !important;
}

/* Ensure fallback icons are visible when Font Awesome fails to load */
@font-face {
    font-family: 'FontAwesome';
    src: url('data:application/font-woff2;charset=utf-8;base64,') format('woff2');
    font-weight: normal;
    font-style: normal;
}