/* =============================================
   SINUCA PRO - Tema Escuro com Azul
   ============================================= */

:root {
    --bg-primary: #0a0e1a;
    --bg-secondary: #111827;
    --bg-card: #1a1f35;
    --bg-card-hover: #222842;
    --border-color: #2a3050;
    --text-primary: #e8eaf0;
    --text-secondary: #8b92a8;
    --text-muted: #5a6178;
    --accent: #3b82f6;
    --accent-hover: #2563eb;
    --highlight: #e94560;
    --highlight-hover: #d63851;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --gradient-primary: linear-gradient(135deg, #3b82f6, #8b5cf6);
    --gradient-highlight: linear-gradient(135deg, #e94560, #f97316);
    --gradient-success: linear-gradient(135deg, #10b981, #3b82f6);
    --glass-bg: rgba(26, 31, 53, 0.85);
    --glass-border: rgba(255, 255, 255, 0.08);
    --shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 16px 48px rgba(0, 0, 0, 0.4);
    --radius: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body.dark-theme {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
}

body.dark-theme::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        radial-gradient(ellipse at 20% 50%, rgba(59, 130, 246, 0.08) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 20%, rgba(139, 92, 246, 0.06) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 80%, rgba(233, 69, 96, 0.04) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
}

/* ---- Navbar ---- */
.glass-nav {
    background: var(--glass-bg) !important;
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--glass-border);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    z-index: 1050;
}

.glass-nav .navbar-brand {
    font-size: 1.3rem;
    letter-spacing: -0.5px;
}

.balance-badge {
    background: var(--gradient-success);
    padding: 6px 16px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.85rem;
    color: #fff;
    white-space: nowrap;
}

/* ---- Main Content ---- */
.main-content {
    padding-top: 80px;
    min-height: 100vh;
    position: relative;
    z-index: 1;
}

/* ---- Cards ---- */
.card-dark {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
}

.card-dark:hover {
    background: var(--bg-card-hover);
    border-color: rgba(59, 130, 246, 0.3);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.card-dark .card-body {
    padding: 1.5rem;
}

.card-glass {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
}

/* ---- Buttons ---- */
.btn-accent {
    background: var(--gradient-primary);
    border: none;
    color: #fff;
    font-weight: 600;
    padding: 10px 24px;
    border-radius: var(--radius);
    transition: all 0.3s ease;
}

.btn-accent:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(59, 130, 246, 0.4);
    color: #fff;
}

.btn-highlight {
    background: var(--gradient-highlight);
    border: none;
    color: #fff;
    font-weight: 600;
    padding: 10px 24px;
    border-radius: var(--radius);
    transition: all 0.3s ease;
}

.btn-highlight:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(233, 69, 96, 0.4);
    color: #fff;
}

.btn-success-custom {
    background: var(--gradient-success);
    border: none;
    color: #fff;
    font-weight: 600;
    padding: 10px 24px;
    border-radius: var(--radius);
}

.btn-outline-accent {
    border: 2px solid var(--accent);
    color: var(--accent);
    background: transparent;
    font-weight: 600;
    padding: 10px 24px;
    border-radius: var(--radius);
    transition: all 0.3s ease;
}

.btn-outline-accent:hover {
    background: var(--accent);
    color: #fff;
}

/* ---- Forms ---- */
.form-dark .form-control,
.form-dark .form-select {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    border-radius: var(--radius);
    padding: 12px 16px;
    font-size: 0.95rem;
    transition: all 0.3s ease;
}

.form-dark .form-control:focus,
.form-dark .form-select:focus {
    background: var(--bg-secondary);
    border-color: var(--accent);
    color: var(--text-primary);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

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

.form-dark .form-label {
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 0.9rem;
    margin-bottom: 6px;
}

/* ---- Auth Pages ---- */
.auth-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    position: relative;
    z-index: 1;
}

.auth-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
    padding: 2.5rem;
    width: 100%;
    max-width: 440px;
}

.auth-card h2 {
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.auth-card .subtitle {
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

/* ---- Dashboard ---- */
.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    text-align: center;
    transition: all 0.3s ease;
}

.stat-card:hover {
    border-color: var(--accent);
    transform: translateY(-3px);
}

.stat-card .stat-icon {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    font-size: 1.4rem;
}

.stat-card .stat-value {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.stat-card .stat-label {
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-weight: 500;
}

/* ---- Game Action Buttons ---- */
.game-action-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem 1.5rem;
    border-radius: var(--radius-xl);
    border: 2px solid transparent;
    text-decoration: none;
    color: #fff;
    font-weight: 600;
    transition: all 0.3s ease;
    min-height: 180px;
}

.game-action-btn i {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.game-action-btn span {
    font-size: 1.1rem;
}

.game-action-btn small {
    color: rgba(255,255,255,0.7);
    font-weight: 400;
    margin-top: 0.5rem;
}

.game-action-btn.online {
    background: linear-gradient(135deg, #10b981, #059669);
    border-color: rgba(16, 185, 129, 0.3);
}

.game-action-btn.online:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 35px rgba(16, 185, 129, 0.3);
}

.game-action-btn.custom {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    border-color: rgba(245, 158, 11, 0.3);
}

.game-action-btn.custom:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 35px rgba(245, 158, 11, 0.3);
}

.game-action-btn.offline {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    border-color: rgba(239, 68, 68, 0.3);
}

.game-action-btn.offline:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 35px rgba(239, 68, 68, 0.3);
}

.game-action-btn.deposit {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    border-color: rgba(59, 130, 246, 0.3);
}

.game-action-btn.deposit:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 35px rgba(59, 130, 246, 0.3);
}

.game-action-btn.withdraw {
    background: linear-gradient(135deg, #8b5cf6, #7c3aed);
    border-color: rgba(139, 92, 246, 0.3);
}

.game-action-btn.withdraw:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 35px rgba(139, 92, 246, 0.3);
}

/* ---- Lobby ---- */
.player-list-item {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 1rem 1.25rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.75rem;
    transition: all 0.3s ease;
}

.player-list-item:hover {
    border-color: var(--accent);
    background: var(--bg-card-hover);
}

.player-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.player-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--gradient-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.1rem;
}

.player-stats {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.win-badge {
    color: var(--success);
    font-weight: 600;
}

.loss-badge {
    color: var(--danger);
    font-weight: 600;
}

/* ---- Tables (Admin) ---- */
.table-dark-custom {
    background: var(--bg-card);
    border-radius: var(--radius);
    overflow: hidden;
}

.table-dark-custom thead th {
    background: var(--bg-secondary);
    border-bottom: 2px solid var(--border-color);
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 1rem;
}

.table-dark-custom tbody td {
    padding: 0.85rem 1rem;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-primary);
    vertical-align: middle;
}

.table-dark-custom tbody tr:hover {
    background: var(--bg-card-hover);
}

/* ---- Badges ---- */
.badge-status {
    padding: 4px 12px;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 600;
}

.badge-success { background: rgba(16, 185, 129, 0.15); color: var(--success); }
.badge-warning { background: rgba(245, 158, 11, 0.15); color: var(--warning); }
.badge-danger { background: rgba(239, 68, 68, 0.15); color: var(--danger); }
.badge-info { background: rgba(59, 130, 246, 0.15); color: var(--accent); }

/* ---- Alerts ---- */
.alert-dark {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    color: var(--text-primary);
}

.alert-success-dark {
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.3);
    color: var(--success);
    border-radius: var(--radius);
}

.alert-danger-dark {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: var(--danger);
    border-radius: var(--radius);
}

/* ---- Dropdown Dark ---- */
.dropdown-menu-dark {
    background: var(--bg-card) !important;
    border: 1px solid var(--border-color) !important;
    border-radius: var(--radius) !important;
    box-shadow: var(--shadow-lg) !important;
}

.dropdown-menu-dark .dropdown-item {
    color: var(--text-primary) !important;
    padding: 8px 16px;
    transition: all 0.2s;
}

.dropdown-menu-dark .dropdown-item:hover {
    background: var(--bg-card-hover) !important;
}

.dropdown-menu-dark .dropdown-divider {
    border-color: var(--border-color) !important;
}

/* ---- Modal Dark ---- */
.modal-dark .modal-content {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    color: var(--text-primary);
}

.modal-dark .modal-header {
    border-bottom: 1px solid var(--border-color);
}

.modal-dark .modal-footer {
    border-top: 1px solid var(--border-color);
}

.modal-dark .btn-close {
    filter: invert(1);
}

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

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

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

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

/* ---- Animations ---- */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.fade-in-up {
    animation: fadeInUp 0.5s ease forwards;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.pulse { animation: pulse 2s ease-in-out infinite; }

/* ---- Game Container ---- */
.game-container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
    background: #000;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

.game-container iframe {
    width: 100%;
    height: 680px;
    border: none;
}

.game-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    backdrop-filter: blur(5px);
}

/* ---- Responsive ---- */
@media (max-width: 768px) {
    .auth-card {
        padding: 1.5rem;
        margin: 0 10px;
    }

    .stat-card .stat-value {
        font-size: 1.4rem;
    }

    .game-action-btn {
        min-height: 140px;
        padding: 1.5rem 1rem;
    }

    .game-action-btn i {
        font-size: 2rem;
    }

    .game-container iframe {
        height: 400px;
    }

    .balance-badge {
        font-size: 0.75rem;
        padding: 4px 10px;
    }
}

/* ---- Admin Sidebar ---- */
.admin-sidebar {
    background: var(--bg-secondary);
    border-right: 1px solid var(--border-color);
    min-height: 100vh;
    padding-top: 80px;
    width: 260px;
    position: fixed;
    left: 0;
    top: 0;
    z-index: 1040;
    overflow-y: auto;
}

.admin-sidebar .nav-link {
    color: var(--text-secondary);
    padding: 12px 20px;
    font-weight: 500;
    border-radius: 0;
    transition: all 0.2s;
    border-left: 3px solid transparent;
}

.admin-sidebar .nav-link:hover,
.admin-sidebar .nav-link.active {
    color: var(--text-primary);
    background: rgba(59, 130, 246, 0.1);
    border-left-color: var(--accent);
}

.admin-sidebar .nav-link i {
    width: 24px;
    text-align: center;
    margin-right: 10px;
}

.admin-sidebar .sidebar-section {
    padding: 12px 20px 6px;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-muted);
    font-weight: 600;
}

.admin-content {
    margin-left: 260px;
    padding: 100px 30px 30px;
    min-height: 100vh;
}

@media (max-width: 992px) {
    .admin-sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s;
    }

    .admin-sidebar.show {
        transform: translateX(0);
    }

    .admin-content {
        margin-left: 0;
    }
}

/* ---- Loading Spinner ---- */
.spinner-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(10, 14, 26, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.spinner-custom {
    width: 50px;
    height: 50px;
    border: 4px solid var(--border-color);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}
