/* ========================================
   DENTAL GAMES LAB - MAIN STYLES
   ======================================== */

/* CSS Variables */
:root {
    --navy-dark: #001529;
    --navy-medium: #002140;
    --cyan-primary: #00b4d8;
    --cyan-light: #0096c7;
    --cyan-bright: #48cae4;
    --success-green: #52c41a;
    --warning-yellow: #faad14;
}

/* Global Styles */
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif !important;
    background: linear-gradient(180deg, var(--navy-dark) 0%, var(--navy-medium) 50%, var(--cyan-light) 100%) !important;
    background-attachment: fixed;
    color: white !important;
    min-height: 100vh;
}

/* Header Styles */
.main-header {
    text-align: center;
    padding: 2rem 0 3rem;
}

.main-header .logo-img {
    max-width: 400px;
    height: auto;
}

.tagline {
    font-size: clamp(1rem, 2vw, 1.2rem);
    font-style: italic;
    font-weight: 300;
    letter-spacing: 0.5px;
    opacity: 0.9;
}

/* Game Cards with Glassmorphism */
.game-card {
    background: linear-gradient(135deg, rgba(0, 180, 216, 0.2) 0%, rgba(72, 202, 228, 0.15) 100%);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 2px solid rgba(255, 255, 255, 0.15) !important;
    border-radius: 1.5rem !important;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    overflow: hidden;
}

.game-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 16px 48px rgba(0, 180, 216, 0.3) !important;
    border-color: rgba(72, 202, 228, 0.5) !important;
}

/* Status Badges */
.status-badge {
    position: absolute;
    top: 1rem;
    left: 1rem;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    z-index: 10;
}

.status-badge.available {
    background: var(--success-green);
    color: white;
}

.status-badge.coming-soon {
    background: var(--warning-yellow);
    color: var(--navy-dark);
}

/* Game Logo */
.game-logo {
    width: 100%;
    height: auto;
    max-width: 280px;
    margin: 2.5rem auto 1.5rem;
    display: block;
}

/* Game Title (for coming soon) */
.game-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-top: 0;
    margin-bottom: 0.75rem;
    color: var(--cyan-bright);
}

/* Game Description */
.game-description {
    font-size: 0.95rem;
    line-height: 1.6;
    opacity: 0.9;
    margin-bottom: 1rem;
    flex-grow: 1;
}

/* Game Meta Icons */
.game-meta {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-bottom: 0;
}

.meta-item {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.85rem;
    padding: 0.4rem 0.75rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 0.5rem;
    white-space: nowrap;
}

/* Play Button */
.btn-play {
    background: white;
    color: var(--navy-dark);
    font-weight: 700;
    border: none;
    padding: 0.75rem 2.5rem;
    border-radius: 0.75rem;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    font-size: 1rem;
}

.btn-play:hover {
    background: var(--cyan-bright) !important;
    color: white !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 180, 216, 0.4);
}

.btn-play.disabled {
    background: rgba(255, 255, 255, 0.3) !important;
    color: rgba(255, 255, 255, 0.6) !important;
    cursor: not-allowed;
    pointer-events: none;
}

.btn-play.disabled:hover {
    transform: none;
    box-shadow: none;
}

/* Stats Section */
.stats-box {
    background: linear-gradient(135deg, rgba(0, 180, 216, 0.15) 0%, rgba(72, 202, 228, 0.15) 100%);
    backdrop-filter: blur(20px);
    border: 2px solid rgba(255, 255, 255, 0.15);
    border-radius: 1.5rem;
    padding: 2rem;
}

.stat-item {
    border-right: 1px solid rgba(255, 255, 255, 0.15);
    padding: 1.5rem 0;
}

.stat-item:last-child {
    border-right: none;
}

.stat-number {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 900;
    line-height: 1;
    color: var(--cyan-bright);
}

.stat-label {
    font-size: 0.95rem;
    opacity: 0.75;
    margin-top: 0.5rem;
}

/* Ranking CTA */
.ranking-cta {
    text-align: center;
    margin: 2rem 0;
}

.btn-ranking {
    background: white;
    color: var(--navy-dark);
    font-weight: 700;
    border: none;
    padding: 0.875rem 2rem;
    border-radius: 2rem;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1rem;
}

.btn-ranking:hover {
    background: var(--cyan-bright) !important;
    color: white !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 180, 216, 0.4);
}

/* Footer */
.main-footer {
    border-top: 1px solid rgba(255, 255, 255, 0.15);
    padding-top: 3rem;
    margin-top: 4rem;
    text-align: center;
}

.footer-tagline {
    font-size: 1.5rem;
    font-style: italic;
    font-weight: 300;
    margin-bottom: 1.5rem;
    opacity: 0.9;
}

.footer-content {
    max-width: 800px;
    margin: 0 auto;
}

.footer-description {
    opacity: 0.75;
    line-height: 1.7;
    margin-bottom: 2rem;
}

.footer-copy {
    font-size: 0.85rem;
    opacity: 0.5;
    margin-top: 2rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .stat-item {
        border-right: none;
        border-bottom: 1px solid rgba(255, 255, 255, 0.15);
        padding: 1.5rem 1rem;
    }
    
    .stat-item:last-child {
        border-bottom: none;
    }

    .main-header .logo-img {
        max-width: 280px;
    }
}

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

::-webkit-scrollbar-track {
    background: var(--navy-dark);
}

::-webkit-scrollbar-thumb {
    background: var(--cyan-primary);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--cyan-bright);
}

/* Selection */
::selection {
    background: var(--cyan-primary);
    color: white;
}

/* ==================== NAVBAR STYLES ==================== */

.navbar {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.navbar-brand {
    transition: transform 0.3s ease;
}

.navbar-brand:hover {
    transform: translateY(-2px);
}

.navbar-nav .nav-link {
    color: rgba(255, 255, 255, 0.8) !important;
    transition: color 0.3s ease;
    font-weight: 500;
}

.navbar-nav .nav-link:hover {
    color: var(--cyan-bright) !important;
}

.dropdown-menu {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
    animation: slideDown 0.3s ease;
}

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

.dropdown-item {
    transition: background-color 0.3s ease;
}

.dropdown-item:hover {
    background-color: rgba(96, 165, 250, 0.1) !important;
}

/* Bootstrap Icons Support */
.bi {
    font-family: 'bootstrap-icons' !important;
}

/* ==================== BOOTSTRAP 5 MODAL OVERRIDES ==================== */

/* Modal backdrop - oscuro con blur */
.modal-backdrop {
    background-color: rgba(0, 0, 0, 0.75);
}

.modal-backdrop.show {
    opacity: 1;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

/* Modal container */
.modal {
    z-index: 1055;
}

.modal-backdrop {
    z-index: 1050;
}

.modal.show {
    display: flex !important;
    align-items: center;
}

/* Modal XL - Ancho mayor */
.modal-xl {
    max-width: 900px !important;
}

@media (max-width: 991.98px) {
    .modal-xl {
        max-width: 95% !important;
    }
}

/* Dental Modal Theme */
.dental-modal {
    background: linear-gradient(135deg, #1e3a5f 0%, #0f172a 100%) !important;
    border: 2px solid rgba(96, 165, 250, 0.3) !important;
    box-shadow: 0 25px 70px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(96, 165, 250, 0.1) !important;
    border-radius: 1.5rem !important;
}

/* Modal header */
.dental-modal .modal-header {
    padding: 2rem 2rem 1rem !important;
    border-bottom: none !important;
}

/* Modal body */
.dental-modal .modal-body {
    padding: 0 2rem 2rem !important;
    color: rgba(255, 255, 255, 0.9);
}

/* Modal title with gradient */
.dental-modal-title {
    background: linear-gradient(135deg, #60a5fa 0%, #06b6d4 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 700 !important;
}

/* Close button */
.dental-modal .btn-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    opacity: 0.7;
    filter: brightness(0) invert(1);
    z-index: 10;
}

.dental-modal .btn-close:hover {
    opacity: 1;
    transform: rotate(90deg);
    transition: all 0.3s ease;
}

/* Dental Tabs */
.dental-tabs {
    border-bottom: 2px solid rgba(96, 165, 250, 0.15) !important;
    padding-bottom: 0 !important;
    margin-bottom: 1.5rem !important;
}

.dental-tabs .nav-link {
    background: transparent !important;
    border: none !important;
    border-bottom: 3px solid transparent !important;
    border-radius: 0 !important;
    color: rgba(255, 255, 255, 0.6) !important;
    font-weight: 600 !important;
    padding: 1rem 1.5rem !important;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

.dental-tabs .nav-link:hover {
    color: rgba(255, 255, 255, 0.9) !important;
    background: rgba(96, 165, 250, 0.05) !important;
}

.dental-tabs .nav-link.active {
    color: #60a5fa !important;
    background: transparent !important;
    border-bottom-color: #60a5fa !important;
}

/* Dental Input Fields */
.dental-input {
    background: rgba(255, 255, 255, 0.08) !important;
    border: 2px solid rgba(96, 165, 250, 0.3) !important;
    border-radius: 0.75rem !important;
    color: white !important;
    padding: 0.875rem 1rem !important;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1) !important;
    backdrop-filter: blur(10px);
}

.dental-input:focus {
    background: rgba(255, 255, 255, 0.12) !important;
    border-color: #60a5fa !important;
    box-shadow: 0 0 0 0.25rem rgba(96, 165, 250, 0.3) !important;
    color: white !important;
    outline: none !important;
}

.dental-input::placeholder {
    color: rgba(255, 255, 255, 0.5) !important;
}

/* Dental Buttons */
.dental-btn-primary {
    background: linear-gradient(135deg, #06b6d4 0%, #0891b2 100%) !important;
    border: none !important;
    color: white !important;
    font-weight: 600 !important;
    padding: 0.875rem 1.5rem !important;
    border-radius: 0.75rem !important;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1) !important;
    box-shadow: 0 4px 12px rgba(6, 182, 212, 0.4) !important;
    cursor: pointer;
}

.dental-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(6, 182, 212, 0.6) !important;
    background: linear-gradient(135deg, #0891b2 0%, #0ea5e9 100%) !important;
}

.dental-btn-primary:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(6, 182, 212, 0.4) !important;
}

.dental-btn-outline {
    background: rgba(255, 255, 255, 0.08) !important;
    border: 2px solid rgba(255, 255, 255, 0.3) !important;
    color: white !important;
    font-weight: 600 !important;
    padding: 0.875rem 1.5rem !important;
    border-radius: 0.75rem !important;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1) !important;
    cursor: pointer;
}

.dental-btn-outline:hover {
    background: rgba(255, 255, 255, 0.15) !important;
    border-color: rgba(255, 255, 255, 0.5) !important;
    color: white !important;
    transform: translateY(-1px);
}

.dental-btn-outline:active {
    transform: translateY(0);
}

/* Alert Styles */
.dental-modal .alert {
    border-radius: 0.75rem;
    border: none;
    padding: 1rem;
    margin-bottom: 1rem;
}

.dental-modal .alert-success {
    background: rgba(22, 163, 74, 0.15);
    color: #4ade80;
    border-left: 4px solid #4ade80;
}

.dental-modal .alert-danger {
    background: rgba(220, 38, 38, 0.15);
    color: #f87171;
    border-left: 4px solid #f87171;
}

/* ==================== RESPONSIVE NAVBAR ==================== */

@media (max-width: 991px) {
    .navbar-collapse {
        background: rgba(15, 23, 42, 0.98);
        margin-top: 1rem;
        padding: 1rem;
        border-radius: 0.5rem;
        border: 1px solid rgba(96, 165, 250, 0.2);
    }
    
    .navbar-nav .nav-item {
        margin: 0.25rem 0;
    }
}
