/* Ghi đè thông số và hỗ trợ Glassmorphism cùng Bootstrap 5 */
:root {
    --bg-gradient-start: #f8f9fa;
    --bg-gradient-end: #e9ecef;
    --card-bg: rgba(255, 255, 255, 0.7);
    --card-border: rgba(0, 0, 0, 0.1);
}

.login-bg-style {
    background: #f8f9fa;
    position: relative;
    color: #212529;
}

body {
    font-family: 'Outfit', sans-serif;
    min-height: 100vh;
    background-color: var(--body-bg);
    color: var(--text-main);
}

.text-muted {
    color: #6c757d !important;
}

/* Glass UI Elements */
.blur-nav {
    background: var(--bg-nav) !important;
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
    z-index: 1050 !important;
    transition: all 0.3s ease;
}

.blur-nav .nav-link {
    color: rgba(255, 255, 255, 0.8) !important;
    font-weight: 500;
    padding: 0.5rem 1rem;
    transition: all 0.3s ease;
    position: relative;
}

.blur-nav .nav-link:hover,
.blur-nav .nav-link.active {
    color: var(--primary-color) !important;
}

.blur-nav .nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 1rem;
    background-color: var(--primary-color);
    transition: width 0.3s ease;
}

.blur-nav .nav-link:hover::after {
    width: calc(100% - 2rem);
}

.blur-nav .navbar-brand {
    color: #fff !important;
}

.blur-nav .dropdown-menu {
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
    border-radius: 12px;
    padding: 0.5rem;
}

.blur-nav .dropdown-item {
    color: rgba(255, 255, 255, 0.8) !important;
    border-radius: 8px;
    transition: all 0.2s;
}

.blur-nav .dropdown-item:hover {
    background: rgba(13, 202, 240, 0.15);
    /* Keep semi-transparent for now, or use a variable if needed */
    color: var(--primary-color) !important;
}

.blur-nav .dropdown-divider {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.blur-footer {
    background: var(--bg-footer) !important;
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.7) !important;
}

#block-global-footer {
    background-color: var(--bg-footer) !important;
    color: rgba(255, 255, 255, 0.7) !important;
    padding: 3rem 0;
    margin-top: 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

#block-global-footer a {
    color: rgba(255, 255, 255, 0.8) !important;
    text-decoration: none;
    transition: all 0.3s ease;
}

#block-global-footer a:hover {
    color: var(--primary-color) !important;
}

#block-global-footer h5,
#block-global-footer h4 {
    color: #fff !important;
    font-weight: 600;
    margin-bottom: 1.5rem;
}

#block-global-footer .text-muted {
    color: rgba(255, 255, 255, 0.5) !important;
}

/* Glass Cards */
.auth-wrapper {
    background: #f8f9fa;
    position: relative;
    z-index: 1;
}

.glass-card {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 24px;
    box-shadow: 0 10px 30px -12px rgba(0, 0, 0, 0.1);
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.card-title {
    color: #212529 !important;
}

.card-title a {
    color: #212529 !important;
}

.mesh-gradient {
    background-color: #f8f9fa;
    background-image:
        radial-gradient(at 0% 0%, hsla(253, 16%, 95%, 1) 0, transparent 50%),
        radial-gradient(at 50% 0%, hsla(225, 39%, 90%, 1) 0, transparent 50%),
        radial-gradient(at 100% 0%, hsla(339, 49%, 90%, 1) 0, transparent 50%);
    background-attachment: fixed;
}

.hero-glass-box {
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(10px);
    border-radius: 30px;
    border: 1px solid rgba(0, 0, 0, 0.05);
    padding: 3rem;
}

.card-hover-glow:hover {
    transform: translateY(-10px);
    border-color: rgba(13, 202, 240, 0.5) !important;
    box-shadow: 0 0 30px rgba(13, 202, 240, 0.2);
}

.title-gradient {
    background: linear-gradient(135deg, var(--text-main) 30%, var(--primary-color) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Premium Section Titles */
.section-header-premium {
    position: relative;
    padding-bottom: 1.25rem;
    margin-bottom: 1rem;
    font-weight: 500;
    letter-spacing: 0.01em;
    display: inline-block;
}

.section-header-premium.text-white,
.section-header-premium:not(.text-white) {
    background: none !important;
    -webkit-background-clip: initial !important;
    background-clip: initial !important;
    -webkit-text-fill-color: initial !important;
    color: var(--primary-color) !important;
}

.section-header-premium::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 3px;
    background: var(--primary-color);
    border-radius: 10px;
}

.section-header-premium.text-center {
    left: 50%;
    transform: translateX(-50%);
}

.section-header-premium.text-center::after {
    left: 50%;
    transform: translateX(-50%);
}

/* Glass Accordion */
.glass-accordion {
    --bs-accordion-bg: transparent !important;
    --bs-accordion-btn-bg: transparent !important;
    --bs-accordion-active-bg: rgba(13, 202, 240, 0.1) !important;
    --bs-accordion-btn-color: #212529 !important;
    --bs-accordion-active-color: var(--primary-color) !important;
    --bs-accordion-color: #212529 !important;
    background: transparent !important;
    border: 1px solid rgba(0, 0, 0, 0.1) !important;
    border-radius: 16px !important;
    overflow: hidden;
}

.glass-accordion .accordion-item {
    background: transparent !important;
    border: none !important;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05) !important;
}

.glass-accordion .accordion-collapse {
    background: transparent !important;
}

.glass-accordion .accordion-body {
    background: rgba(255, 255, 255, 0.5) !important;
    color: #212529 !important;
}

.glass-accordion .accordion-button {
    background: rgba(0, 0, 0, 0.01) !important;
    color: #212529 !important;
    padding: 1.25rem 1.5rem;
    box-shadow: none !important;
    font-weight: 600;
}

.glass-accordion .accordion-button:not(.collapsed) {
    background: linear-gradient(90deg, rgba(13, 202, 240, 0.1), transparent) !important;
    color: #0dcaf0 !important;
}

.glass-accordion .accordion-button::after {
    filter: none;
}

.lesson-row {
    transition: all 0.3s ease;
    border-radius: 12px;
    margin: 4px 12px;
}

.lesson-row:hover {
    background: rgba(0, 0, 0, 0.05);
    padding-left: 20px !important;
    color: #212529 !important;
}

.description-content h4,
.description-content h5 {
    color: #0dcaf0;
    margin-top: 1.5rem;
    margin-bottom: 1rem;
    font-weight: 600;
}

.description-content ul {
    padding-left: 1.2rem;
    margin-bottom: 1.5rem;
}

.description-content li {
    margin-bottom: 0.5rem;
    position: relative;
}

.description-content li::marker {
    color: #0dcaf0;
}

.auth-title {
    background: linear-gradient(to right, var(--text-main), var(--primary-color));
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 700;
}

/* Inputs & Buttons overriden */
.form-control:focus {
    background-color: #fff !important;
    color: #212529 !important;
    box-shadow: 0 0 0 .25rem rgba(13, 202, 240, 0.25) !important;
    border-color: #0dcaf0 !important;
}

.action-btn {
    background: var(--primary-gradient);
    border: none;
    transition: transform 0.3s, box-shadow 0.3s;
}

.action-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(13, 202, 240, 0.4);
    background: linear-gradient(135deg, #00a8cc, #0dcaf0);
}

.social-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.3s;
}

.transition-link {
    transition: all 0.3s;
}

.transition-link:hover {
    color: #000 !important;
    text-shadow: 0 0 8px rgba(13, 202, 240, 0.2);
}

/* --- LESSON PLAYER & SIDEBAR --- */
.learning-workspace {
    min-height: calc(100vh - 80px);
}

.player-container {
    box-shadow: 0 15px 40px -12px rgba(0, 0, 0, 0.2);
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.custom-scrollbar::-webkit-scrollbar {
    width: 6px;
}

.custom-scrollbar::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.05);
}

.custom-scrollbar::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.1);
    border-radius: 10px;
}

.custom-scrollbar::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, 0.2);
}

.active-lesson {
    background: rgba(13, 202, 240, 0.1) !important;
    border-left: 4px solid #0dcaf0 !important;
}

.active-lesson .lesson-title-text {
    color: #0dcaf0 !important;
    font-weight: 600;
}

.playlist-item {
    transition: all 0.2s ease;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05) !important;
}

.playlist-item:hover {
    background: rgba(0, 0, 0, 0.02) !important;
}

.lesson-nav-btn {
    background: rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(0, 0, 0, 0.1);
    color: #212529;
    padding: 8px 16px;
    border-radius: 10px;
    transition: all 0.3s;
}

.lesson-nav-btn:hover {
    background: rgba(0, 0, 0, 0.08);
    color: #0dcaf0;
    border-color: #0dcaf0;
}

.mt-5 {
    margin-top: 5rem !important;
}

.lesson-history-block {
    background: rgba(0, 0, 0, 0.03);
    border: 1px solid rgba(0, 0, 0, 0.05);
    color: #212529;
    padding: 8px 16px;
    border-radius: 10px;
    transition: all 0.3s;
}

.article-content {
    background-color: #fff;
}

.main-block-header {
    padding: 20px 0;
    margin: 0;
    color: #212529;
}

/* Custom override for global-footer spacing to remove mb-4 margins */
#block-global-footer .mb-4 {
    margin-bottom: 0 !important;
}

.widget-container-breadcrumb {
    margin-bottom: 0 !important;
}

/* Responsive Slider Adjustments */
@media (max-width: 767.98px) {
    .widget-slider.slider-fixed-height .carousel-item {
        height: 350px !important;
        /* Slightly shorter on mobile to be more balanced only if fixed */
    }

    .widget-slider .display-5 {
        font-size: 1.75rem;
    }

    .widget-slider .lead {
        font-size: 0.9rem;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

    .widget-slider .carousel-caption {
        background: rgba(0, 0, 0, 0.3);
        /* Darken caption area on mobile for readability */
        left: 0 !important;
        right: 0 !important;
        bottom: 0 !important;
        width: 100% !important;
    }
}