/* =====================================================
   TCG BÍBLIA - Estilos Principais do Jogo
   Dedicado à <Next-Aid/>
   ===================================================== */

:root {
    --primary-gold: #ffd700;
    --secondary-gold: #ffed4e;
    --dark-blue: #1a237e;
    --light-blue: #3f51b5;
    --divine-white: #ffffff;
    --holy-gray: #f5f5f5;
    --shadow-dark: #000000;
    --success-green: #4caf50;
    --error-red: #f44336;
    --warning-orange: #ff9800;
    --info-blue: #2196f3;
    --card-common: #9e9e9e;
    --card-rare: #2196f3;
    --card-epic: #9c27b0;
    --card-legendary: #ff9800;
}

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

body {
    font-family: 'Open Sans', sans-serif;
    line-height: 1.6;
    color: var(--divine-white);
    background: linear-gradient(135deg, var(--dark-blue) 0%, #283593 50%, var(--light-blue) 100%);
    min-height: 100vh;
}

/* Utilitários */
.btn-primary {
    background: linear-gradient(135deg, var(--primary-gold) 0%, var(--secondary-gold) 100%);
    color: var(--dark-blue);
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 215, 0, 0.4);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: var(--divine-white);
    border: 1px solid rgba(255, 215, 0, 0.3);
    padding: 8px 16px;
    border-radius: 6px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.85rem;
}

.btn-secondary:hover {
    background: rgba(255, 215, 0, 0.1);
    border-color: var(--primary-gold);
}

.btn-premium {
    background: linear-gradient(135deg, #9c27b0 0%, #e91e63 100%);
    color: var(--divine-white);
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-premium:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(156, 39, 176, 0.4);
}

/* Header Principal */
.game-header {
    background: rgba(26, 35, 126, 0.9);
    backdrop-filter: blur(10px);
    border-bottom: 2px solid rgba(255, 215, 0, 0.2);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 1rem;
}

.logo-section h1 {
    font-family: 'Cinzel', serif;
    font-size: 1.8rem;
    color: var(--primary-gold);
    margin-bottom: 0.2rem;
}

.dedication {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.7);
    font-style: italic;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    position: relative;
}

.user-stats {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    background: rgba(255, 255, 255, 0.1);
    padding: 0.5rem 0.8rem;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
}

.stat-icon {
    font-size: 1.1rem;
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.1);
    padding: 0.5rem 1rem;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.user-profile:hover {
    background: rgba(255, 215, 0, 0.1);
}

.avatar {
    width: 32px;
    height: 32px;
    background: var(--primary-gold);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: var(--dark-blue);
}

.dropdown-arrow {
    font-size: 0.8rem;
    transition: transform 0.3s ease;
}

.user-profile.active .dropdown-arrow {
    transform: rotate(180deg);
}

/* Menu do Perfil */
.profile-menu {
    position: absolute;
    top: 100%;
    right: 0;
    background: rgba(26, 35, 126, 0.95);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 215, 0, 0.2);
    border-radius: 10px;
    padding: 0.5rem 0;
    min-width: 200px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
    animation: fadeInDown 0.3s ease-out;
}

.profile-menu a {
    display: block;
    padding: 0.8rem 1rem;
    color: var(--divine-white);
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.profile-menu a:hover {
    background: rgba(255, 215, 0, 0.1);
    color: var(--primary-gold);
}

.menu-separator {
    height: 1px;
    background: rgba(255, 215, 0, 0.2);
    margin: 0.5rem 0;
}

.logout-btn {
    color: #ff5252 !important;
}

.logout-btn:hover {
    background: rgba(255, 82, 82, 0.1) !important;
}

.admin-btn {
    color: #9c27b0 !important;
    font-weight: 600 !important;
}

.admin-btn:hover {
    background: rgba(156, 39, 176, 0.1) !important;
}

/* Navegação Principal */
.main-nav {
    background: rgba(63, 81, 181, 0.9);
    backdrop-filter: blur(5px);
    border-bottom: 1px solid rgba(255, 215, 0, 0.1);
    padding: 0.5rem 0;
    position: sticky;
    top: 80px;
    z-index: 90;
}

.nav-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    padding: 0 1rem;
}

.nav-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.3rem;
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.7);
    padding: 0.8rem 1.2rem;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 80px;
}

.nav-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--divine-white);
}

.nav-btn.active {
    background: rgba(255, 215, 0, 0.2);
    color: var(--primary-gold);
    border: 1px solid rgba(255, 215, 0, 0.3);
}

.nav-icon {
    font-size: 1.4rem;
}

.nav-text {
    font-size: 0.8rem;
    font-weight: 500;
}

/* Conteúdo Principal */
.game-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

.content-section {
    display: none;
    animation: fadeIn 0.5s ease-out;
}

.content-section.active {
    display: block;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.section-header h2 {
    font-family: 'Cinzel', serif;
    font-size: 2rem;
    color: var(--primary-gold);
}

/* Banner de Boas-vindas */
.welcome-banner {
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.1) 0%, rgba(255, 215, 0, 0.05) 100%);
    border: 1px solid rgba(255, 215, 0, 0.2);
    border-radius: 15px;
    padding: 2rem;
    text-align: center;
    margin-bottom: 2rem;
}

.welcome-banner h2 {
    font-family: 'Cinzel', serif;
    font-size: 1.8rem;
    color: var(--primary-gold);
    margin-bottom: 0.5rem;
}

.welcome-banner p {
    color: rgba(255, 255, 255, 0.8);
    font-size: 1.1rem;
}

/* Grid do Menu */
.menu-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

.menu-card {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 215, 0, 0.1);
    border-radius: 15px;
    padding: 1.5rem;
    transition: all 0.3s ease;
}

.menu-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    border-color: rgba(255, 215, 0, 0.3);
}

.big-card {
    grid-column: span 2;
}

.card-header {
    margin-bottom: 1.5rem;
}

.card-header h3 {
    font-family: 'Cinzel', serif;
    color: var(--primary-gold);
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
}

.card-header p {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
}

/* Modos de Jogo */
.game-modes {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.mode-btn {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    color: var(--divine-white);
}

.mode-btn:hover {
    background: rgba(255, 215, 0, 0.1);
    border-color: var(--primary-gold);
    transform: translateY(-2px);
}

.mode-icon {
    font-size: 2rem;
    flex-shrink: 0;
}

.mode-info h4 {
    color: var(--primary-gold);
    margin-bottom: 0.3rem;
    font-size: 1rem;
}

.mode-info p {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.7);
}

/* Estatísticas Rápidas */
.stats-quick {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.stat-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.stat-row:last-child {
    border-bottom: none;
}

/* Progresso do Passe */
.season-progress {
    text-align: center;
}

.level-info {
    display: flex;
    justify-content: space-between;
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

.progress-bar {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    height: 8px;
    margin-bottom: 1rem;
    overflow: hidden;
}

.progress-fill {
    background: linear-gradient(90deg, var(--primary-gold), var(--secondary-gold));
    height: 100%;
    border-radius: 10px;
    transition: width 0.5s ease;
}

/* Atividades Recentes */
.recent-activities {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.activity-item {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 0.8rem;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 8px;
    border-left: 3px solid var(--primary-gold);
}

.activity-icon {
    font-size: 1.2rem;
    flex-shrink: 0;
}

.activity-text {
    flex: 1;
}

.activity-text p {
    margin-bottom: 0.2rem;
    font-size: 0.9rem;
}

.activity-text small {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.8rem;
}

/* Filtros de Coleção */
.collection-filters {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.collection-filters select {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 215, 0, 0.3);
    border-radius: 6px;
    padding: 0.5rem 1rem;
    color: var(--divine-white);
    font-size: 0.9rem;
}

.collection-filters select option {
    background: var(--dark-blue);
    color: var(--divine-white);
}

/* Estatísticas da Coleção */
.collection-stats {
    display: flex;
    gap: 2rem;
    margin-bottom: 2rem;
    justify-content: center;
}

.stat-badge {
    text-align: center;
    background: rgba(255, 215, 0, 0.1);
    border: 1px solid rgba(255, 215, 0, 0.2);
    border-radius: 10px;
    padding: 1rem 1.5rem;
}

.badge-number {
    display: block;
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-gold);
    font-family: 'Cinzel', serif;
}

.badge-label {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.8);
}

/* Grid de Cartas */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
    min-height: 400px;
}

.loading-cards {
    grid-column: 1 / -1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    padding: 3rem;
    color: rgba(255, 255, 255, 0.7);
}

/* Spinner de Loading */
.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(255, 215, 0, 0.3);
    border-top: 4px solid var(--primary-gold);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Animações */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

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

/* Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: var(--divine-white);
    border-radius: 15px;
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    animation: fadeIn 0.3s ease-out;
}

.modal-content.large {
    max-width: 800px;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    background: var(--light-blue);
    color: var(--divine-white);
    border-radius: 15px 15px 0 0;
}

.modal-header h3 {
    font-family: 'Cinzel', serif;
    font-size: 1.3rem;
}

.modal-close {
    font-size: 1.5rem;
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.3s ease;
}

.modal-close:hover {
    opacity: 1;
}

.modal-body {
    padding: 1.5rem;
    color: var(--dark-blue);
}

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

.loading-spinner {
    text-align: center;
    color: var(--divine-white);
}

.loading-spinner .spinner {
    margin: 0 auto 1rem;
}

/* Responsividade */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        gap: 1rem;
    }
    
    .user-stats {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .nav-content {
        flex-wrap: wrap;
        gap: 0.3rem;
    }
    
    .nav-btn {
        min-width: 60px;
        padding: 0.6rem 0.8rem;
    }
    
    .nav-text {
        font-size: 0.7rem;
    }
    
    .menu-grid {
        grid-template-columns: 1fr;
    }
    
    .big-card {
        grid-column: span 1;
    }
    
    .game-modes {
        grid-template-columns: 1fr;
    }
    
    .collection-filters {
        justify-content: center;
    }
    
    .collection-stats {
        flex-direction: column;
        align-items: center;
        gap: 1rem;
    }
    
    .cards-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }
}

@media (max-width: 480px) {
    .game-content {
        padding: 1rem 0.5rem;
    }
    
    .section-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .section-header h2 {
        font-size: 1.5rem;
    }
    
    .welcome-banner {
        padding: 1.5rem;
    }
    
    .welcome-banner h2 {
        font-size: 1.4rem;
    }
    
    .menu-card {
        padding: 1rem;
    }
    
    .modal-content {
        margin: 1rem;
    }
}