/* ===================================================
   MU Huyền Thoại - Custom CSS (Bootstrap Override)
   Theme: Light / White  |  Primary: #2563eb
   =================================================== */

/* ========== GLOBAL ========== */
:root {
    --mu-primary: #2563eb;
    --mu-primary-dark: #1d4ed8;
    --mu-dark: #0f172a;
}

@media (min-width: 1200px) {
    .container {
        max-width: 1680px !important;
    }
}

body {
    font-family: 'Plus Jakarta Sans', sans-serif;
    background-color: #f1f5f9;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

main {
    flex: 1;
}



/* ========== NAVBAR ========== */
.navbar {
    font-size: 0.95rem;
    letter-spacing: 0.5px;
    background-color: #0b111e !important;
    border-bottom: 1px solid #1e293b;
}

.navbar .nav-link {
    font-weight: 700;
    padding: 0.6rem 1.2rem !important;
    font-size: 0.92rem;
    letter-spacing: 0.5px;
    color: #94a3b8 !important;
    transition: all 0.25s ease;
}

.navbar .nav-link:hover {
    color: #38bdf8 !important;
    text-shadow: 0 0 10px rgba(56, 189, 248, 0.5);
}

.navbar .nav-link.active {
    color: #fff !important;
    background: #2563eb !important;
    box-shadow: 0 0 15px rgba(37, 99, 235, 0.5);
    border-radius: 8px;
}

/* Pulse dot */
.pulse-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    background: #22c55e;
    border-radius: 50%;
    animation: pulse 2s infinite;
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.3;
    }
}

/* ========== HERO BANNER ========== */


/* ========== FEATURED NEWS ========== */
.featured-news {
    height: 200px;
    background: url('../images/news-banner.png') center/cover no-repeat;
    cursor: pointer;
    border-radius: 0.75rem;
    transition: transform 0.2s ease;
    position: relative;
}

.featured-news:hover {
    transform: translateY(-2px);
}

.featured-overlay {
    position: absolute;
    inset: 0;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8) 0%, rgba(0, 0, 0, 0.3) 50%, transparent 100%);
    border-radius: 0.75rem;
    z-index: 1;
}

/* ========== MU CUSTOM SLIDER ========== */
.mu-slider {
    position: relative;
    perspective: 1000px;
}

.mu-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    z-index: 0;
    visibility: hidden;
}

.mu-slide.active {
    opacity: 1;
    z-index: 2;
    visibility: visible;
}

.mu-slide.last-active {
    opacity: 1;
    z-index: 1;
    visibility: visible;
}

.mu-slide-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
    transform: scale(1.0);
}

.mu-slide.active .mu-slide-bg {
    animation: kenBurns 12s ease-out forwards;
}

.mu-slider-indicators {
    position: absolute;
    bottom: 10px;
    left: 0;
    right: 0;
    z-index: 3;
    display: flex;
    justify-content: center;
    gap: 6px;
}

.mu-slider-indicators .indicator {
    width: 20px;
    height: 4px;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 2px;
    cursor: pointer;
    transition: background 0.3s ease;
}

.mu-slider-indicators .indicator.active {
    background: #fff;
    width: 30px;
}

/* In-Out Animations */
@keyframes effFadeIn {
    0% {
        opacity: 0;
    }

    100% {
        opacity: 1;
    }
}

@keyframes effSlideUpIn {
    0% {
        transform: translateY(100%);
    }

    100% {
        transform: translateY(0);
    }
}

@keyframes effSlideLeftIn {
    0% {
        transform: translateX(100%);
    }

    100% {
        transform: translateX(0);
    }
}

@keyframes effSlideLeftOut {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-30%);
        opacity: 0.5;
    }
}

@keyframes effZoomInFade {
    0% {
        transform: scale(1.3);
        opacity: 0;
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

@keyframes effFlipIn {
    0% {
        transform: rotateY(-90deg);
        opacity: 0;
    }

    100% {
        transform: rotateY(0);
        opacity: 1;
    }
}

@keyframes effFlipOut {
    0% {
        transform: rotateY(0);
        opacity: 1;
    }

    100% {
        transform: rotateY(90deg);
        opacity: 0;
    }
}

/* Effect Classes */
.eff-fade .active {
    animation: effFadeIn 0.8s ease-in-out;
}

.eff-slide-up .active {
    animation: effSlideUpIn 0.8s cubic-bezier(0.25, 1, 0.5, 1);
}

.eff-slide-left .active {
    animation: effSlideLeftIn 0.8s cubic-bezier(0.25, 1, 0.5, 1);
}

.eff-slide-left .last-active {
    animation: effSlideLeftOut 0.8s cubic-bezier(0.25, 1, 0.5, 1);
}

.eff-zoom .active {
    animation: effZoomInFade 0.8s ease-out;
}

.eff-flip .active {
    animation: effFlipIn 0.8s ease-out;
    backface-visibility: hidden;
}

.eff-flip .last-active {
    animation: effFlipOut 0.8s ease-out;
    backface-visibility: hidden;
}

@keyframes kenBurns {
    0% {
        transform: scale(1.0);
    }

    100% {
        transform: scale(1.15);
    }
}

/* ========== NEWS LIST ========== */
.list-group-item-action:hover {
    background-color: #f8fafc;
}

/* ========== INFO CARDS ========== */
.info-card {
    cursor: pointer;
    transition: all 0.2s ease;
    border-radius: 0.75rem;
}

.info-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1) !important;
    border-color: var(--mu-primary) !important;
}

.info-icon-circle {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: #eff6ff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: var(--mu-primary);
}

/* ========== USER AVATAR ========== */
.user-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: #f1f5f9;
    border: 2px solid var(--mu-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--mu-primary);
}

/* ========== EVENT ITEMS ========== */
.event-item {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #f1f5f9;
}

.event-item:last-child {
    border-bottom: none;
}

.event-name {
    font-weight: 600;
    font-size: 0.85rem;
}

.event-countdown {
    font-size: 0.78rem;
    color: var(--mu-primary);
    font-weight: 600;
}

/* ========== ZALO FLOAT & RADAR PULSE ========== */
.zalo-float {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.zalo-float a {
    position: relative;
    z-index: 3;
}

/* Radar pulse glowing waves */
.zalo-float::before,
.zalo-float::after {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: 50rem;
    /* matches the pill shape of the button */
    background-color: #2563eb;
    opacity: 0;
    z-index: 1;
    pointer-events: none;
}

.zalo-float::before {
    animation: radarPulse 2.0s ease-out infinite;
}

.zalo-float::after {
    animation: radarPulse 2.0s ease-out infinite;
    animation-delay: 0.5s;
    /* Ting 2 starts exactly 0.5s after Ting 1 */
}

@keyframes radarPulse {
    0% {
        transform: scale(1);
        opacity: 0.8;
        box-shadow: 0 0 10px rgba(37, 99, 235, 0.55);
    }

    50% {
        opacity: 0.45;
        /* Fades out more gradually and stays visible longer */
    }

    75% {
        transform: scale(1.35);
        /* Expands and disappears completely at 75% (1.5s) */
        opacity: 0;
        box-shadow: 0 0 30px rgba(37, 99, 235, 0);
    }

    100% {
        transform: scale(1.35);
        /* Remains completely invisible during the 0.5s pause (1.5s to 2.0s) */
        opacity: 0;
        box-shadow: 0 0 30px rgba(37, 99, 235, 0);
    }
}

/* ========== CARD HEADERS ========== */
.card-header.bg-dark {
    background-color: var(--mu-dark) !important;
    font-size: 0.85rem;
    letter-spacing: 0.5px;
}

.card-header .text-primary,
.card-header i.text-primary {
    color: #3b82f6 !important;
}

/* ========== MODAL HEADER ========== */
.modal-header.bg-dark {
    background-color: var(--mu-dark) !important;
}

.modal-header .text-primary {
    color: #3b82f6 !important;
}

/* ========== RESPONSIVE ========== */
@media (max-width: 767.98px) {
    .hero-banner .display-5 {
        font-size: 1.8rem;
    }

    .featured-news {
        height: 160px;
    }

    .intro-title {
        font-size: 2rem;
    }
}

/* ========== PREMIUM DARK MODE OVERRIDES ========== */
body {
    background-color: #080d16 !important;
    color: #e2e8f0 !important;
}

.hero-banner {
    background: radial-gradient(circle at center, rgba(30, 41, 59, 0.4) 0%, rgba(8, 13, 22, 0.95) 100%) !important;
}

.hero-banner h1 {
    color: #f8fafc !important;
    text-shadow: 0 0 15px rgba(56, 189, 248, 0.3) !important;
}

.hero-banner p {
    color: #94a3b8 !important;
}

.card {
    background-color: #0f1726 !important;
    border: 1px solid #1e293b !important;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4) !important;
}

.card-header {
    background-color: #1e293b !important;
    border-bottom: 1px solid #334155 !important;
    color: #f8fafc !important;
}

.card-footer {
    background-color: #0f1726 !important;
    border-top: 1px solid #1e293b !important;
}

.card-footer a {
    color: #38bdf8 !important;
}

.list-group-item {
    background-color: #0f1726 !important;
    color: #e2e8f0 !important;
    border-color: #1e293b !important;
}

.list-group-item-action:hover {
    background-color: #1e293b !important;
    color: #38bdf8 !important;
}

.bg-light {
    background-color: #1e293b !important;
}

.border-light-subtle {
    border-color: #334155 !important;
}

.text-dark {
    color: #f8fafc !important;
}

.border-end {
    border-color: #334155 !important;
}

.bg-white {
    background-color: #0f1726 !important;
}

.modal-content {
    background-color: #0f1726 !important;
    color: #f8fafc !important;
    border: 1px solid #334155 !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6) !important;
}

.modal-header {
    border-bottom: 1px solid #334155 !important;
}

.modal-footer {
    border-top: 1px solid #334155 !important;
}

.form-control {
    background-color: #1e293b !important;
    border: 1px solid #334155 !important;
    color: #f8fafc !important;
}

.form-control::placeholder {
    color: #64748b !important;
}

.form-control:focus {
    background-color: #1e293b !important;
    border-color: #38bdf8 !important;
    color: #f8fafc !important;
    box-shadow: 0 0 0 0.25rem rgba(56, 189, 248, 0.25) !important;
}

.input-group-text {
    background-color: #334155 !important;
    border-color: #334155 !important;
    color: #cbd5e1 !important;
}

.alert-success {
    background-color: rgba(22, 163, 74, 0.2) !important;
    border-color: rgba(22, 163, 74, 0.4) !important;
    color: #4ade80 !important;
}

.alert-danger {
    background-color: rgba(220, 38, 38, 0.2) !important;
    border-color: rgba(220, 38, 38, 0.4) !important;
    color: #f87171 !important;
}

.btn-outline-primary {
    color: #38bdf8 !important;
    border-color: #2563eb !important;
}

.btn-outline-primary:hover {
    background-color: #2563eb !important;
    color: #fff !important;
}

.btn-outline-danger {
    color: #f87171 !important;
    border-color: #dc3545 !important;
}

.btn-outline-danger:hover {
    background-color: #dc3545 !important;
    color: #fff !important;
}

.text-muted {
    color: #94a3b8 !important;
}

.news-date {
    color: #64748b !important;
}

/* Custom indicator border color */
.indicator {
    border: 1px solid rgba(255, 255, 255, 0.15) !important;
}

/* Global Headings color override for dark theme visibility */
h1,
h2,
h3,
h4,
h5,
h6 {
    color: #f8fafc !important;
}

/* Custom Table Overrides for Premium Dark Theme */
.table {
    --bs-table-bg: transparent !important;
    --bs-table-color: #e2e8f0 !important;
    --bs-table-border-color: #2c3034 !important;
    color: #e2e8f0 !important;
}

.table th,
.table td {
    background-color: transparent !important;
    color: #e2e8f0 !important;
    border-color: #2c3034 !important;
}

.table th {
    font-weight: 700 !important;
    color: #f8fafc !important;
}

.table-striped tbody tr:nth-of-type(odd) {
    background-color: rgba(255, 255, 255, 0.03) !important;
}

/* Force light/readable colors in news content area and modal contents, overriding rich-editor dark inline styles */
.news-content, 
.news-content *, 
#newsModalContent, 
#newsModalContent *:not(.badge) {
    color: #e2e8f0 !important;
}

/* ========== PREMIUM GAMING MODALS ========== */
.modal-content {
    background: rgba(11, 17, 30, 0.98) !important;
    backdrop-filter: blur(15px);
    border: 1px solid rgba(37, 99, 235, 0.3) !important;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.65), 0 0 25px rgba(37, 99, 235, 0.2) !important;
    border-radius: 16px !important;
    overflow: hidden;
}

.modal-header {
    border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
    padding: 1.25rem 1.6rem !important;
    background: linear-gradient(90deg, rgba(37, 99, 235, 0.18), rgba(11, 17, 30, 0)) !important;
}

.modal-header .modal-title {
    font-size: 1.2rem !important;
    font-weight: 800 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    color: #f8fafc !important;
    text-shadow: 0 0 15px rgba(37, 99, 235, 0.7) !important;
}

.modal-body {
    padding: 2rem !important;
    font-size: 0.98rem !important;
    line-height: 1.75 !important;
    color: #cbd5e1 !important;
}

/* Custom styling inside news content & general modal body */
.modal-body p, .news-content p, #newsModalContent p {
    margin-bottom: 1.3rem !important;
    line-height: 1.8 !important;
    font-size: 0.98rem !important;
}

/* Close button custom styling */
.modal-header .btn-close {
    background-color: rgba(255, 255, 255, 0.15) !important;
    opacity: 0.85 !important;
    border-radius: 50% !important;
    padding: 0.55rem !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    border: 1px solid rgba(255, 255, 255, 0.15) !important;
}

.modal-header .btn-close:hover {
    background-color: rgba(239, 68, 68, 0.25) !important;
    border-color: rgba(239, 68, 68, 0.5) !important;
    transform: rotate(90deg) scale(1.15) !important;
    opacity: 1 !important;
}

/* Modal entrance scaling elastic animation */
.modal.fade .modal-dialog {
    transform: scale(0.92) !important;
    transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1) !important;
}

.modal.show .modal-dialog {
    transform: scale(1) !important;
}

/* Premium text color bridge matching C# Admin selections perfectly! */
#infoModalContent .text-danger, #newsModalContent .text-danger { color: #ef4444 !important; }
#infoModalContent .text-warning, #newsModalContent .text-warning { color: #f59e0b !important; }
#infoModalContent .text-success, #newsModalContent .text-success { color: #10b981 !important; }
#infoModalContent .text-primary, #newsModalContent .text-primary { color: #3b82f6 !important; }
#infoModalContent .text-white, #newsModalContent .text-white { color: #ffffff !important; }