/* ============================================
   Mini Cassino de Testes - Estilos Customizados
   Usa Bootstrap 5 via CDN
   ============================================ */

/* Tema Dark Global */
body {
    background-color: #1a1a2e;
    color: #dee2e6;
    min-height: 100vh;
}

/* Sobrescreve as variaveis CSS do Bootstrap 5.3 que controlam cores de texto */
:root {
    --bs-body-color: #dee2e6;
    --bs-secondary-color: #adb5bd;
    --bs-tertiary-color: #6c757d;
    --bs-emphasis-color: #ffffff;
    --bs-link-color: #0dcaf0;
    --bs-heading-color: #ffffff;
}

/* Cards */
.card {
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    border-radius: 8px;
}

.card-header {
    border-radius: 8px 8px 0 0 !important;
}

/* ============================================
   Layout do Painel Admin (Sidebar + Content)
   ============================================ */
.admin-wrapper {
    min-height: 100vh;
}

.admin-sidebar {
    width: 260px;
    min-width: 260px;
    min-height: 100vh;
    position: sticky;
    top: 0;
    z-index: 100;
}

.admin-content {
    min-width: 0;
}

.sidebar-link {
    color: #adb5bd;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 0.9rem;
    transition: all 0.15s ease;
    margin-bottom: 2px;
}

.sidebar-link:hover {
    background-color: rgba(13, 202, 240, 0.1);
    color: #0dcaf0;
}

.sidebar-link.active {
    background-color: rgba(13, 202, 240, 0.2);
    color: #0dcaf0;
    font-weight: 600;
}

.sidebar-section-title {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: #6c757d;
    padding: 4px 12px;
    font-weight: 700;
}

/* Mobile sidebar */
@media (max-width: 991.98px) {
    .admin-sidebar {
        position: fixed;
        left: -280px;
        top: 0;
        z-index: 1050;
        transition: left 0.3s ease;
        height: 100vh;
        overflow-y: auto;
    }
    .admin-sidebar.show {
        left: 0;
    }
}

/* ============================================
   Dashboard do Jogador - Game Cards
   ============================================ */
.game-card {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    cursor: pointer;
}

.game-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.5);
    border-color: #ffc107 !important;
}

.game-card .card-img-top {
    border-radius: 6px 6px 0 0;
}

/* ============================================
   Iframe de Jogo (Tela Cheia)
   ============================================ */
.game-toolbar {
    background: rgba(0, 0, 0, 0.9) !important;
    backdrop-filter: blur(10px);
}

.game-iframe-container iframe {
    background: #000;
}

/* ============================================
   Tabelas
   ============================================ */
.table-dark {
    --bs-table-bg: transparent;
    --bs-table-striped-bg: rgba(255, 255, 255, 0.03);
    --bs-table-hover-bg: rgba(13, 202, 240, 0.05);
}

.table-striped > tbody > tr:nth-of-type(odd) {
    --bs-table-accent-bg: rgba(255, 255, 255, 0.03);
}

/* ============================================
   Formulários - TUDO visível em fundo escuro
   ============================================ */

/* FORÇA todos os labels e textos a ficarem claros.
   Bootstrap 5.3 usa variáveis CSS customizadas, 
   entao precisamos sobrescrever TANTO a variavel QUANTO a classe. */
:root {
    --bs-secondary-color: #adb5bd;
}

.text-muted {
    color: #adb5bd !important;
    --bs-text-opacity: 1 !important;
}

.text-white-50 {
    color: #dee2e6 !important;
}

.form-label,
.form-label strong,
label {
    color: #e0e0e0 !important;
}

.card label,
form label {
    color: #e0e0e0 !important;
}

small {
    color: #adb5bd !important;
}

small.text-muted {
    color: #adb5bd !important;
}

.card-text,
.card-text.text-muted {
    color: #adb5bd !important;
}

.table td.text-muted,
.table-dark td.text-muted,
.table th.text-muted {
    color: #adb5bd !important;
}

p.text-muted {
    color: #adb5bd !important;
}

.alert .text-muted {
    color: #adb5bd !important;
}

p, li, span, td, th, dd, dt {
    color: #dee2e6;
}

h1, h2, h3, h4, h5, h6 {
    color: #ffffff;
}

/* Força placeholders a ficarem visíveis */
.form-control::placeholder {
    color: #999 !important;
    opacity: 1 !important;
}

.form-control:focus,
.form-select:focus {
    border-color: #0dcaf0;
    box-shadow: 0 0 0 0.2rem rgba(13, 202, 240, 0.15);
}

/* Input group */
.input-group-text {
    font-size: 0.9rem;
}

/* ============================================
   Badges
   ============================================ */
.badge {
    font-weight: 500;
}

/* ============================================
   Navegação
   ============================================ */
.navbar {
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

/* ============================================
   Modais
   ============================================ */
.modal-content {
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6);
}

/* ============================================
   Scrollbar
   ============================================ */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: #1a1a2e;
}

::-webkit-scrollbar-thumb {
    background: #444;
    border-radius: 3px;
}

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

/* ============================================
   Utilidades
   ============================================ */
pre {
    border-radius: 8px;
    font-size: 0.8rem;
    line-height: 1.4;
}

code {
    font-size: 0.85rem;
    word-break: break-all;
}

details summary {
    user-select: none;
}

/* Animação de carregamento */
@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

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

/* Página inicial (index) */
.min-vh-100.d-flex {
    min-height: 100vh;
}

/* Dropdown menu dark */
.dropdown-menu-dark {
    border: 1px solid #333;
}
