/* ==========================================================================
   FGI Academy LMS — Main Stylesheet
   ========================================================================== */

:root {
    --primary: #4f46e5;
    --primary-light: #6366f1;
    --primary-dark: #3730a3;
    --accent: #f59e0b;
    --accent-hover: #d97706;
    --dark: #0f172a;
    --dark-card: #1e293b;
    --dark-surface: #162033;
    --text-primary: #f1f5f9;
    --text-secondary: #94a3b8;
    --success: #22c55e;
    --danger: #ef4444;
    --gradient-hero: linear-gradient(135deg, #0f172a 0%, #1e1b4b 50%, #312e81 100%);
    --gradient-card: linear-gradient(145deg, #1e293b 0%, #162033 100%);
    --glass: rgba(255,255,255,0.06);
    --glass-border: rgba(255,255,255,0.1);
    --radius: 16px;
    --shadow: 0 8px 32px rgba(0,0,0,0.3);
}

*,*::before,*::after { box-sizing: border-box; }

body {
    font-family: 'Inter', system-ui, sans-serif;
    background: var(--dark);
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    margin: 0;
}

/* ---------- Navbar ---------- */
#mainNav {
    background: rgba(15,23,42,0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--glass-border);
    padding: .75rem 0;
    transition: background .3s;
}
#mainNav .navbar-brand { font-size: 1.35rem; letter-spacing: -0.5px; }
#mainNav .nav-link {
    color: var(--text-secondary);
    font-weight: 500;
    font-size: .9rem;
    transition: color .2s;
    padding: .5rem .85rem;
}
#mainNav .nav-link:hover,
#mainNav .nav-link.active { color: #fff; }

.btn-accent {
    background: var(--accent);
    color: #000;
    font-weight: 600;
    border: none;
}
.btn-accent:hover { background: var(--accent-hover); color: #000; }

/* ---------- Hero Slider ---------- */
.hero-slider-section { margin-top: -1px; }
.hero-slide {
    background-size: cover;
    background-position: center;
    position: relative;
    min-height: 520px;
    display: flex;
    align-items: center;
}
.hero-slide-overlay {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(to right, rgba(0,0,0,0.92) 0%, rgba(0,0,0,0.5) 100%);
    z-index: 1;
}
.hero-slide-title {
    font-size: 3.5rem;
    font-weight: 900;
    letter-spacing: -1.5px;
    line-height: 1.1;
    color: #fff;
    text-shadow: 0 4px 40px rgba(0,0,0,1);
}

/* About Section Enhancements */
.about-image-wrapper {
    position: relative;
    border-radius: 1.5rem;
}
.experience-badge {
    position: absolute;
    bottom: -20px;
    right: -20px;
    background: var(--primary);
    color: #fff;
    padding: 20px 30px;
    border-radius: 1rem;
    box-shadow: 0 20px 40px rgba(99, 102, 241, 0.4);
    text-align: center;
    border: 4px solid var(--dark-bg);
}
.experience-badge .num {
    display: block;
    font-size: 2.2rem;
    font-weight: 800;
    line-height: 1;
}
.experience-badge .txt {
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}
.feature-item {
    transition: all 0.3s ease;
}
.feature-item:hover {
    transform: translateY(-5px);
    background: rgba(255,255,255,0.06) !important;
    border-color: rgba(255,255,255,0.1) !important;
}
#heroCarousel .carousel-indicators button {
    width: 12px; height: 12px;
    border-radius: 50%;
    border: 2px solid rgba(255,255,255,0.5);
    background: transparent;
    opacity: 0.6;
    transition: all .3s;
}
#heroCarousel .carousel-indicators button.active {
    background: var(--accent);
    border-color: var(--accent);
    opacity: 1;
    transform: scale(1.2);
}
#heroCarousel .carousel-control-prev,
#heroCarousel .carousel-control-next {
    width: 50px; height: 50px;
    background: rgba(255,255,255,0.1);
    border-radius: 50%;
    top: 50%; transform: translateY(-50%);
    margin: 0 1rem;
    opacity: 0;
    transition: opacity .3s;
}
#heroCarousel:hover .carousel-control-prev,
#heroCarousel:hover .carousel-control-next { opacity: 1; }
.carousel-item { transition: transform .8s ease-in-out; }

/* ---------- Stats Bar ---------- */
.stats-bar {
    background: var(--dark-surface);
    border-top: 1px solid var(--glass-border);
    border-bottom: 1px solid var(--glass-border);
    padding: 1.5rem 0;
}
.stat-mini { padding: .5rem; }

@media (max-width: 767.98px) {
    .hero-slide { min-height: 420px; }
    .hero-slide-title { font-size: 2rem; }
}

.hero-badge {
    display: inline-block;
    background: var(--glass);
    border: 1px solid var(--glass-border);
    border-radius: 50px;
    padding: .4rem 1rem;
    font-size: .8rem;
    color: var(--accent);
    font-weight: 600;
    margin-bottom: 1rem;
    letter-spacing: 1px;
    text-transform: uppercase;
}

/* ---------- Section Titles ---------- */
.section-title {
    font-size: 2rem;
    font-weight: 700;
    letter-spacing: -0.5px;
    margin-bottom: .5rem;
}
.section-subtitle {
    color: var(--text-secondary);
    max-width: 540px;
    margin: 0 auto 2.5rem;
}

/* ---------- Course Cards ---------- */
.course-card {
    background: var(--gradient-card);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius);
    overflow: hidden;
    transition: transform .3s, box-shadow .3s;
    height: 100%;
    display: flex;
    flex-direction: column;
}
.course-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 16px 48px rgba(79,70,229,0.15);
}
.course-card .card-thumb {
    height: 200px;
    background: var(--dark);
    overflow: hidden;
    position: relative;
}
.course-card .card-thumb img {
    width: 100%; height: 100%;
    object-fit: cover;
    transition: transform .4s;
}
.course-card:hover .card-thumb img { transform: scale(1.06); }
.course-card .card-body {
    padding: 1.25rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}
.course-card .card-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: .5rem;
}
.course-card .card-text {
    color: var(--text-secondary);
    font-size: .88rem;
    flex: 1;
}
.course-card .card-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1rem;
    padding-top: .75rem;
    border-top: 1px solid var(--glass-border);
}
.course-card .course-price {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--accent);
}
.course-card .course-duration {
    font-size: .82rem;
    color: var(--text-secondary);
}
.course-card .badge-overlay {
    position: absolute;
    top: 12px; right: 12px;
    background: var(--accent);
    color: #000;
    font-size: .72rem;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 50px;
}

/* ---------- Glass Card ---------- */
.glass-card {
    background: var(--glass);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius);
    padding: 1.5rem;
    backdrop-filter: blur(12px);
}

/* ---------- Stats ---------- */
.stat-card {
    background: var(--gradient-card);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius);
    padding: 1.5rem;
    text-align: center;
    transition: transform .2s;
}
.stat-card:hover { transform: translateY(-4px); }
.stat-card .stat-icon {
    width: 56px; height: 56px;
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: .75rem;
}
.stat-card .stat-value {
    font-size: 1.8rem;
    font-weight: 800;
    letter-spacing: -1px;
}
.stat-card .stat-label {
    color: var(--text-secondary);
    font-size: .82rem;
    font-weight: 500;
}

/* ---------- Auth forms ---------- */
.auth-wrapper {
    min-height: calc(100vh - 72px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}
.auth-card {
    background: var(--gradient-card);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius);
    padding: 2.5rem;
    width: 100%;
    max-width: 460px;
    box-shadow: var(--shadow);
}
.auth-card h2 {
    font-weight: 700;
    margin-bottom: 1.5rem;
    text-align: center;
}
.form-control, .form-select {
    background: var(--dark);
    border: 1px solid var(--glass-border);
    color: var(--text-primary);
    border-radius: 10px;
    padding: .65rem 1rem;
}
.form-control:focus, .form-select:focus {
    background: var(--dark);
    border-color: var(--primary-light);
    color: var(--text-primary);
    box-shadow: 0 0 0 3px rgba(99,102,241,0.2);
}
.form-label { font-weight: 500; font-size: .9rem; color: var(--text-secondary); }

.btn-primary {
    background: var(--primary);
    border-color: var(--primary);
    font-weight: 600;
    border-radius: 10px;
    padding: .65rem 1.5rem;
}
.btn-primary:hover { background: var(--primary-dark); border-color: var(--primary-dark); }

/* ---------- Dashboard ---------- */
.dashboard-header {
    background: var(--gradient-hero);
    padding: 3rem 0 2rem;
    border-bottom: 1px solid var(--glass-border);
}
.dashboard-header h1 { font-weight: 700; }

.my-course-card {
    background: var(--gradient-card);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius);
    overflow: hidden;
    transition: transform .2s;
}
.my-course-card:hover { transform: translateY(-4px); }

/* ---------- Course Detail ---------- */
.course-detail-hero {
    background: var(--gradient-hero);
    padding: 4rem 0 3rem;
    border-bottom: 1px solid var(--glass-border);
}
.price-tag {
    font-size: 2rem;
    font-weight: 800;
    color: var(--accent);
}
.detail-meta {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
    margin-top: 1rem;
}
.detail-meta span {
    color: var(--text-secondary);
    font-size: .9rem;
}
.detail-meta i { color: var(--primary-light); margin-right: .35rem; }

.video-list .list-group-item {
    background: var(--dark-card);
    border-color: var(--glass-border);
    color: var(--text-primary);
    padding: .85rem 1.25rem;
    transition: background .2s;
}
.video-list .list-group-item:hover {
    background: var(--dark-surface);
}
.video-list .list-group-item i {
    color: var(--primary-light);
    margin-right: .5rem;
}
.locked-icon { color: var(--text-secondary) !important; }

/* ---------- Player Page ---------- */
.player-wrapper {
    position: relative;
    padding-top: 56.25%;
    background: #000;
    border-radius: var(--radius);
    overflow: hidden;
}
.player-wrapper iframe,
.player-wrapper video {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
}

/* ---------- Footer ---------- */
.site-footer {
    background: var(--dark-surface);
    padding: 3rem 0 1.5rem;
    border-top: 1px solid var(--glass-border);
}
.footer-links li { margin-bottom: .4rem; }
.footer-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: .9rem;
    transition: color .2s;
}
.footer-links a:hover { color: #fff; }

/* ---------- Why Us / Features ---------- */
.feature-icon {
    width: 64px; height: 64px;
    border-radius: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    margin-bottom: 1rem;
}

/* ---------- Tables (admin) ---------- */
.table-dark-custom {
    --bs-table-bg: var(--dark-card);
    --bs-table-color: var(--text-primary);
    --bs-table-border-color: var(--glass-border);
    --bs-table-hover-bg: var(--dark-surface);
    --bs-table-hover-color: #fff;
}
.table-dark-custom thead {
    background: var(--dark);
    color: var(--text-secondary);
    font-size: .82rem;
    text-transform: uppercase;
    letter-spacing: .5px;
}
.badge-success { background: rgba(34,197,94,0.15); color: var(--success); }
.badge-danger { background: rgba(239,68,68,0.15); color: var(--danger); }
.badge-warning { background: rgba(245,158,11,0.15); color: var(--accent); }

/* ---------- Admin Sidebar ---------- */
.admin-sidebar {
    width: 260px;
    min-height: 100vh;
    background: var(--dark-surface);
    border-right: 1px solid var(--glass-border);
    position: fixed;
    top: 0; left: 0;
    z-index: 1040;
    padding-top: 1rem;
    transition: transform .3s;
}
.admin-sidebar .brand {
    padding: 1rem 1.25rem;
    font-size: 1.15rem;
    font-weight: 700;
    color: #fff;
    border-bottom: 1px solid var(--glass-border);
    margin-bottom: .5rem;
}
.admin-sidebar .nav-link {
    color: var(--text-secondary);
    padding: .7rem 1.25rem;
    font-size: .9rem;
    font-weight: 500;
    border-radius: 10px;
    margin: 2px 10px;
    transition: all .2s;
}
.admin-sidebar .nav-link:hover,
.admin-sidebar .nav-link.active {
    color: #fff;
    background: rgba(99,102,241,0.12);
}
.admin-sidebar .nav-link i { width: 24px; text-align: center; margin-right: .5rem; }
.admin-content {
    margin-left: 260px;
    padding: 1.5rem 2rem;
    min-height: 100vh;
}

@media (max-width: 991.98px) {
    .admin-sidebar { transform: translateX(-100%); }
    .admin-sidebar.show { transform: translateX(0); }
    .admin-content { margin-left: 0; }
}

/* ---------- Misc ---------- */
.text-gradient {
    background: linear-gradient(135deg, var(--primary-light), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.animate-float {
    animation: floaty 3s ease-in-out infinite;
}
@keyframes floaty {
    0%,100% { transform: translateY(0); }
    50%     { transform: translateY(-10px); }
}
.thumbnail-placeholder {
    background: linear-gradient(135deg, var(--primary-dark), var(--dark-card));
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    font-size: 2.5rem;
}
a.text-decoration-none { color: inherit; }
a.text-decoration-none:hover { color: inherit; }

/* Scrollbar */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--dark); }
::-webkit-scrollbar-thumb { background: var(--dark-card); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--primary-dark); }
