/* ==========================================================================
   MentisBox Modern Design System (CSS)
   Engineered for Top-Tier Mobile & Desktop Experience
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&family=Inter:wght@400;500;600;700&family=JetBrains+Mono:wght@500;700&display=swap');

:root {
    --bg-base: #020617;
    --bg-surface: #0b1329;
    --bg-card: #0f172a;
    --bg-elevated: #1e293b;
    
    --primary: #22c55e;
    --primary-light: #4ade80;
    --primary-dark: #16a34a;
    --primary-glow: rgba(34, 197, 94, 0.28);
    
    --cyan: #38bdf8;
    --cyan-glow: rgba(56, 189, 248, 0.25);
    
    --border: #1e293b;
    --border-subtle: rgba(255, 255, 255, 0.08);
    --border-glow: rgba(34, 197, 94, 0.4);
    
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --text-dim: #64748b;
    
    --danger: #ef4444;
    --warning: #f59e0b;
    --success: #22c55e;
    
    --font-heading: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
    
    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 20px;
    --radius-xl: 28px;
    --radius-full: 9999px;
    
    --shadow-card: 0 10px 30px -10px rgba(0, 0, 0, 0.5);
    --shadow-glow: 0 0 25px var(--primary-glow);
    --shadow-dropdown: 0 20px 40px -15px rgba(0, 0, 0, 0.7);
    
    --nav-height: 72px;
    --mobile-nav-height: 68px;
}

/* Reset & Box Sizing */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    background-color: var(--bg-base);
    color: var(--text-main);
    font-family: var(--font-body);
    font-size: 15px;
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
::-webkit-scrollbar-track {
    background: var(--bg-base);
}
::-webkit-scrollbar-thumb {
    background: var(--bg-elevated);
    border-radius: var(--radius-full);
}
::-webkit-scrollbar-thumb:hover {
    background: var(--primary-dark);
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    color: var(--text-main);
    font-weight: 800;
    line-height: 1.25;
    letter-spacing: -0.02em;
}

p {
    color: var(--text-muted);
}

a {
    color: inherit;
    text-decoration: none;
    transition: all 0.2s ease;
}

/* Layout Containers */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.container-narrow {
    max-width: 840px;
}

.container-fluid {
    max-width: 100%;
    padding: 0 24px;
}

/* Background Atmospheric Glows */
.ambient-glow {
    position: fixed;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 800px;
    height: 400px;
    background: radial-gradient(circle, rgba(34, 197, 94, 0.08) 0%, rgba(56, 189, 248, 0.04) 40%, transparent 70%);
    pointer-events: none;
    z-index: 0;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: var(--radius-md);
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 0.95rem;
    cursor: pointer;
    border: 1px solid transparent;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
    line-height: 1;
}

.btn-primary {
    background: var(--primary);
    color: #020617 !important;
    box-shadow: 0 4px 18px var(--primary-glow);
}
.btn-primary:hover {
    background: var(--primary-light);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px var(--primary-glow);
}
.btn-primary:active {
    transform: scale(0.97);
}

.btn-secondary {
    background: var(--bg-elevated);
    color: var(--text-main);
    border: 1px solid var(--border-subtle);
}
.btn-secondary:hover {
    background: #283548;
    color: var(--text-main);
    border-color: var(--primary);
}

.btn-outline {
    background: transparent;
    color: var(--primary);
    border: 1px solid var(--primary);
}
.btn-outline:hover {
    background: rgba(34, 197, 94, 0.1);
}

.btn-danger {
    background: rgba(239, 68, 68, 0.15);
    color: #f87171;
    border: 1px solid rgba(239, 68, 68, 0.3);
}
.btn-danger:hover {
    background: var(--danger);
    color: #fff;
}

.btn-sm {
    padding: 8px 14px;
    font-size: 0.82rem;
    border-radius: var(--radius-sm);
}
.btn-lg {
    padding: 16px 32px;
    font-size: 1.05rem;
    border-radius: var(--radius-lg);
}
.btn-block {
    width: 100%;
}

/* Badges & Tags */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: var(--radius-full);
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    line-height: 1.2;
}

.badge-primary {
    background: rgba(34, 197, 94, 0.15);
    color: var(--primary-light);
    border: 1px solid rgba(34, 197, 94, 0.3);
}

.badge-free {
    background: var(--primary);
    color: #020617;
    font-weight: 900;
}

.badge-locked {
    background: rgba(100, 116, 139, 0.2);
    color: var(--text-muted);
    border: 1px solid var(--border);
}

.badge-danger {
    background: rgba(239, 68, 68, 0.15);
    color: #fca5a5;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

/* Glass & Card Components */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    padding: 24px;
    position: relative;
    box-shadow: var(--shadow-card);
    transition: all 0.3s ease;
}
.card:hover {
    border-color: rgba(34, 197, 94, 0.3);
}

.card-glass {
    background: rgba(15, 23, 42, 0.75);
    backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

/* Course Cards Grid */
.course-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 28px;
}

.course-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}
.course-card:hover {
    transform: translateY(-8px);
    border-color: var(--primary);
    box-shadow: 0 20px 40px -15px rgba(0, 0, 0, 0.7), 0 0 20px var(--primary-glow);
}

.course-thumb-box {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: #000;
}
.course-thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}
.course-card:hover .course-thumb {
    transform: scale(1.06);
}

.course-body {
    padding: 22px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}
.course-title {
    font-size: 1.15rem;
    margin-bottom: 8px;
    color: var(--text-main);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.course-desc {
    font-size: 0.88rem;
    color: var(--text-muted);
    margin-bottom: 18px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex-grow: 1;
}
.course-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 15px;
    border-top: 1px solid var(--border);
    margin-top: auto;
}
.course-price {
    font-family: var(--font-heading);
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--primary);
}

/* Bento Stats Grid */
.bento-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 18px;
    margin-bottom: 35px;
}
.bento-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 22px;
    position: relative;
    overflow: hidden;
    transition: transform 0.3s ease, border-color 0.3s ease;
}
.bento-card:hover {
    transform: translateY(-4px);
    border-color: var(--primary);
}
.bento-label {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-dim);
}
.bento-value {
    font-size: 2rem;
    font-weight: 800;
    color: var(--text-main);
    margin-top: 6px;
    font-family: var(--font-heading);
}

/* Header & Top Navigation */
.header-glass {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(2, 6, 23, 0.85);
    backdrop-filter: blur(18px);
    border-bottom: 1px solid var(--border);
    padding: 14px 0;
    transition: background 0.3s;
}

.nav-wrapper {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.brand-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
}
.brand-logo img {
    height: 40px;
    width: auto;
    object-fit: contain;
    border-radius: var(--radius-sm);
}
.brand-logo span {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--text-main);
    letter-spacing: -0.03em;
}
.brand-logo span b {
    color: var(--primary);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 26px;
    list-style: none;
}
.nav-link {
    font-size: 0.92rem;
    font-weight: 600;
    color: var(--text-muted);
    transition: color 0.2s;
}
.nav-link:hover, .nav-link.active {
    color: var(--primary);
}

/* Mobile Bottom App Bar */
.mobile-nav-bar {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: var(--mobile-nav-height);
    background: rgba(11, 19, 41, 0.92);
    backdrop-filter: blur(20px);
    border-top: 1px solid var(--border);
    z-index: 1000;
    justify-content: space-around;
    align-items: center;
    padding: 0 10px;
    padding-bottom: env(safe-area-inset-bottom);
}

.mobile-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    color: var(--text-dim);
    font-size: 0.72rem;
    font-weight: 600;
    text-decoration: none;
    transition: color 0.2s, transform 0.2s;
    padding: 6px 12px;
    border-radius: var(--radius-sm);
}
.mobile-nav-item i {
    font-size: 1.25rem;
}
.mobile-nav-item.active, .mobile-nav-item:hover {
    color: var(--primary);
    transform: translateY(-2px);
}

/* Forms & Inputs */
.form-group {
    margin-bottom: 20px;
}
.form-label {
    display: block;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-muted);
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.form-control {
    width: 100%;
    padding: 14px 16px;
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    color: var(--text-main);
    font-family: var(--font-body);
    font-size: 0.95rem;
    transition: all 0.2s;
}
.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-glow);
    background: var(--bg-card);
}

/* Responsive Media Queries */
@media (max-width: 900px) {
    .nav-links {
        display: none;
    }
    .mobile-nav-bar {
        display: flex;
    }
    body {
        padding-bottom: calc(var(--mobile-nav-height) + 15px);
    }
}

@media (max-width: 640px) {
    .container {
        padding: 0 16px;
    }
    .course-grid {
        grid-template-columns: 1fr;
    }
    .bento-grid {
        grid-template-columns: 1fr 1fr;
    }
    h1 {
        font-size: 2rem !important;
    }
    h2 {
        font-size: 1.5rem !important;
    }
}
