/* Thunder Developers LMS — Brand Stylesheet */
:root {
  --orange: #F7941D;
  --blue: #1C75BC;
  --blue-dark: #155a91;
  --orange-dark: #d97d10;
  --bg: #f8f9fa;
  --card-bg: #fff;
  --text: #2d3748;
  --text-light: #718096;
  --border: #e2e8f0;
  --radius: 10px;
  --shadow: 0 2px 12px rgba(0,0,0,0.08);
  --shadow-lg: 0 8px 30px rgba(0,0,0,0.12);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { font-family: 'Segoe UI', system-ui, sans-serif; background: var(--bg); color: var(--text); line-height: 1.6; }
img { max-width: 100%; }
a { text-decoration: none; color: inherit; }

/* ─── Buttons ─────────────────────────────────────────────────── */
.btn { display: inline-flex; align-items: center; gap: 6px; padding: 10px 22px; border: none; border-radius: var(--radius); font-size: 0.95rem; font-weight: 600; cursor: pointer; transition: all .2s; }
.btn-primary { background: var(--orange); color: #fff; }
.btn-primary:hover { background: var(--orange-dark); transform: translateY(-1px); }
.btn-secondary { background: var(--blue); color: #fff; }
.btn-secondary:hover { background: var(--blue-dark); transform: translateY(-1px); }
.btn-outline { background: transparent; border: 2px solid var(--orange); color: var(--orange); }
.btn-outline:hover { background: var(--orange); color: #fff; }
.btn-danger { background: #e53e3e; color: #fff; }
.btn-danger:hover { background: #c53030; }
.btn-sm { padding: 6px 14px; font-size: 0.83rem; }
.btn-lg { padding: 14px 32px; font-size: 1.1rem; }

/* ─── Navbar ─────────────────────────────────────────────────── */
.navbar { background: #fff; box-shadow: 0 2px 8px rgba(0,0,0,0.08); position: sticky; top: 0; z-index: 100; }
.navbar-inner { max-width: 1200px; margin: 0 auto; padding: 0 20px; display: flex; align-items: center; justify-content: space-between; height: 68px; }
.navbar-brand { display: flex; align-items: center; gap: 12px; }
.navbar-brand img { height: 44px; width: auto; }
.navbar-brand span { font-size: 1.15rem; font-weight: 700; color: var(--blue); }
.nav-links { display: flex; align-items: center; gap: 6px; }
.nav-links a { padding: 8px 14px; border-radius: 8px; font-weight: 500; color: var(--text); transition: all .2s; }
.nav-links a:hover, .nav-links a.active { color: var(--orange); background: #fff8f0; }
.nav-links .btn { margin-left: 6px; }
.nav-toggle { display: none; flex-direction: column; gap: 4px; cursor: pointer; padding: 8px; }
.nav-toggle span { display: block; width: 24px; height: 2px; background: var(--text); border-radius: 2px; transition: all .3s; }

/* ─── Hero ─────────────────────────────────────────────────── */
.hero { background: linear-gradient(135deg, var(--blue) 0%, var(--blue-dark) 50%, #0f3d6e 100%); color: #fff; padding: 80px 20px; text-align: center; position: relative; overflow: hidden; }
.hero::before { content: ''; position: absolute; inset: 0; background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E"); }
.hero-content { position: relative; max-width: 800px; margin: 0 auto; }
.hero-badge { display: inline-block; background: rgba(247,148,29,0.25); border: 1px solid rgba(247,148,29,0.5); color: var(--orange); padding: 6px 18px; border-radius: 50px; font-size: 0.85rem; font-weight: 600; margin-bottom: 20px; }
.hero h1 { font-size: clamp(2rem, 5vw, 3.2rem); font-weight: 800; line-height: 1.2; margin-bottom: 16px; }
.hero h1 span { color: var(--orange); }
.hero p { font-size: 1.15rem; opacity: 0.9; margin-bottom: 32px; max-width: 600px; margin-left: auto; margin-right: auto; }
.hero-buttons { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.hero-stats { display: flex; gap: 40px; justify-content: center; margin-top: 48px; flex-wrap: wrap; }
.hero-stat { text-align: center; }
.hero-stat .num { font-size: 2rem; font-weight: 800; color: var(--orange); }
.hero-stat .label { font-size: 0.85rem; opacity: 0.8; }

/* ─── Section ─────────────────────────────────────────────────── */
.section { padding: 60px 20px; }
.section-header { text-align: center; margin-bottom: 40px; }
.section-header h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); font-weight: 800; color: var(--blue); margin-bottom: 8px; }
.section-header p { color: var(--text-light); font-size: 1.05rem; }
.container { max-width: 1200px; margin: 0 auto; }

/* ─── Course Cards ─────────────────────────────────────────────── */
.courses-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 24px; }
.course-card { background: var(--card-bg); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; transition: all .2s; display: flex; flex-direction: column; }
.course-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.course-thumb { width: 100%; height: 180px; object-fit: cover; background: linear-gradient(135deg, var(--blue) 0%, var(--blue-dark) 100%); display: flex; align-items: center; justify-content: center; color: #fff; font-size: 3rem; }
.course-thumb img { width: 100%; height: 100%; object-fit: cover; }
.course-body { padding: 20px; flex: 1; display: flex; flex-direction: column; }
.course-badge { display: inline-block; padding: 3px 10px; border-radius: 50px; font-size: 0.75rem; font-weight: 700; margin-bottom: 10px; }
.badge-free { background: #e6fffa; color: #2c7a6c; }
.badge-paid { background: #fff8f0; color: var(--orange-dark); }
.badge-featured { background: linear-gradient(90deg, var(--orange), var(--orange-dark)); color: #fff; }
.badge-enrolled { background: #e8f4fd; color: var(--blue); }
.course-card h3 { font-size: 1.05rem; font-weight: 700; margin-bottom: 8px; color: var(--text); line-height: 1.3; }
.course-card p { font-size: 0.88rem; color: var(--text-light); flex: 1; margin-bottom: 14px; }
.course-meta { display: flex; align-items: center; gap: 16px; font-size: 0.82rem; color: var(--text-light); margin-bottom: 14px; }
.course-meta span { display: flex; align-items: center; gap: 4px; }
.course-price { font-size: 1.2rem; font-weight: 800; color: var(--blue); margin-bottom: 14px; }
.course-price.free { color: #2c7a6c; }

/* ─── Auth Forms ─────────────────────────────────────────────── */
.auth-wrapper { min-height: calc(100vh - 68px); display: flex; align-items: center; justify-content: center; padding: 40px 20px; }
.auth-card { background: var(--card-bg); border-radius: 16px; box-shadow: var(--shadow-lg); padding: 40px; width: 100%; max-width: 460px; }
.auth-card .logo { text-align: center; margin-bottom: 28px; }
.auth-card .logo img { height: 56px; }
.auth-card h2 { font-size: 1.6rem; font-weight: 800; color: var(--blue); text-align: center; margin-bottom: 6px; }
.auth-card .subtitle { text-align: center; color: var(--text-light); margin-bottom: 28px; font-size: 0.92rem; }

/* ─── Forms ─────────────────────────────────────────────────── */
.form-group { margin-bottom: 18px; }
.form-group label { display: block; font-weight: 600; font-size: 0.88rem; color: var(--text); margin-bottom: 6px; }
.form-control { width: 100%; padding: 10px 14px; border: 2px solid var(--border); border-radius: 8px; font-size: 0.95rem; transition: border-color .2s; background: #fff; color: var(--text); }
.form-control:focus { outline: none; border-color: var(--blue); }
.form-control:invalid:not(:placeholder-shown) { border-color: #e53e3e; }
textarea.form-control { resize: vertical; min-height: 90px; }
.form-hint { font-size: 0.78rem; color: var(--text-light); margin-top: 4px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

/* ─── Alerts ─────────────────────────────────────────────────── */
.alert { padding: 12px 16px; border-radius: 8px; font-size: 0.9rem; margin-bottom: 18px; display: flex; align-items: flex-start; gap: 10px; }
.alert-success { background: #e6fffa; border-left: 4px solid #38a169; color: #276749; }
.alert-error { background: #fff5f5; border-left: 4px solid #e53e3e; color: #c53030; }
.alert-info { background: #e8f4fd; border-left: 4px solid var(--blue); color: var(--blue-dark); }
.alert-warning { background: #fffbf0; border-left: 4px solid var(--orange); color: var(--orange-dark); }

/* ─── Page Header ─────────────────────────────────────────────── */
.page-header { background: linear-gradient(135deg, var(--blue) 0%, var(--blue-dark) 100%); color: #fff; padding: 40px 20px; }
.page-header h1 { font-size: clamp(1.5rem, 4vw, 2.2rem); font-weight: 800; margin-bottom: 6px; }
.page-header p { opacity: 0.85; }
.breadcrumb { font-size: 0.85rem; opacity: 0.75; margin-bottom: 10px; }
.breadcrumb a { color: #fff; opacity: 0.8; }
.breadcrumb a:hover { opacity: 1; }
.breadcrumb span { margin: 0 6px; }

/* ─── Curriculum / Lesson Player ─────────────────────────────── */
.lesson-layout { display: grid; grid-template-columns: 1fr 340px; gap: 0; min-height: calc(100vh - 68px); }
.lesson-main { padding: 0; }
.video-container { background: #000; position: relative; padding-top: 56.25%; }
.video-container iframe { position: absolute; top: 0; left: 0; width: 100%; height: 100%; border: 0; }
.lesson-info { padding: 24px; border-bottom: 1px solid var(--border); }
.lesson-info h1 { font-size: 1.3rem; font-weight: 700; margin-bottom: 6px; }
.lesson-sidebar { background: var(--card-bg); border-left: 1px solid var(--border); overflow-y: auto; max-height: calc(100vh - 68px); }
.sidebar-header { padding: 18px 20px; border-bottom: 1px solid var(--border); font-weight: 700; color: var(--blue); font-size: 0.95rem; }
.curriculum-section { border-bottom: 1px solid var(--border); }
.curriculum-section-title { padding: 12px 20px; font-weight: 700; font-size: 0.88rem; color: var(--text); background: #f8f9fa; display: flex; align-items: center; gap: 8px; cursor: pointer; }
.curriculum-lesson { display: flex; align-items: center; gap: 10px; padding: 10px 20px 10px 36px; font-size: 0.85rem; color: var(--text); border-bottom: 1px solid #f0f0f0; transition: background .15s; }
.curriculum-lesson:hover { background: #f8f9fa; }
.curriculum-lesson.active { background: #fff8f0; color: var(--orange); font-weight: 600; }
.curriculum-lesson.completed { color: #38a169; }
.lesson-check { width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--border); flex-shrink: 0; display: flex; align-items: center; justify-content: center; font-size: 10px; }
.lesson-check.done { background: #38a169; border-color: #38a169; color: #fff; }

/* ─── Dashboard / Cards ─────────────────────────────────────────── */
.stat-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 20px; margin-bottom: 32px; }
.stat-card { background: var(--card-bg); border-radius: var(--radius); box-shadow: var(--shadow); padding: 24px; border-top: 4px solid var(--blue); }
.stat-card.orange { border-top-color: var(--orange); }
.stat-card.green { border-top-color: #38a169; }
.stat-card.purple { border-top-color: #805ad5; }
.stat-card .stat-value { font-size: 2rem; font-weight: 800; color: var(--blue); }
.stat-card.orange .stat-value { color: var(--orange); }
.stat-card .stat-label { font-size: 0.85rem; color: var(--text-light); margin-top: 4px; }
.stat-card .stat-icon { font-size: 1.8rem; float: right; opacity: 0.15; margin-top: -36px; }

/* ─── Tables ─────────────────────────────────────────────────── */
.table-wrapper { background: var(--card-bg); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.data-table { width: 100%; border-collapse: collapse; }
.data-table th { background: var(--blue); color: #fff; padding: 12px 16px; text-align: left; font-size: 0.85rem; font-weight: 600; }
.data-table td { padding: 12px 16px; border-bottom: 1px solid var(--border); font-size: 0.88rem; vertical-align: middle; }
.data-table tr:hover td { background: #f8f9fa; }
.data-table tr:last-child td { border-bottom: none; }
.actions { display: flex; gap: 6px; flex-wrap: wrap; }

/* ─── Admin Layout ─────────────────────────────────────────────── */
.admin-layout { display: grid; grid-template-columns: 240px 1fr; min-height: 100vh; }
.admin-sidebar { background: var(--blue-dark); color: #fff; padding: 0; display: flex; flex-direction: column; }
.admin-sidebar-brand { padding: 20px; border-bottom: 1px solid rgba(255,255,255,0.1); display: flex; align-items: center; gap: 12px; }
.admin-sidebar-brand img { height: 36px; }
.admin-sidebar-brand span { font-weight: 700; font-size: 0.9rem; line-height: 1.2; }
.admin-nav { padding: 12px 0; flex: 1; }
.admin-nav a { display: flex; align-items: center; gap: 12px; padding: 11px 20px; color: rgba(255,255,255,0.75); font-size: 0.9rem; transition: all .2s; border-left: 3px solid transparent; }
.admin-nav a:hover, .admin-nav a.active { color: #fff; background: rgba(255,255,255,0.1); border-left-color: var(--orange); }
.admin-nav a .icon { width: 20px; text-align: center; }
.admin-nav .nav-section { padding: 16px 20px 6px; font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: rgba(255,255,255,0.4); }
.admin-content { padding: 28px; background: var(--bg); overflow-y: auto; }
.admin-topbar { display: flex; align-items: center; justify-content: space-between; margin-bottom: 24px; }
.admin-topbar h1 { font-size: 1.5rem; font-weight: 800; color: var(--blue); }
.admin-card { background: var(--card-bg); border-radius: var(--radius); box-shadow: var(--shadow); padding: 24px; margin-bottom: 24px; }
.admin-card h3 { font-size: 1rem; font-weight: 700; color: var(--blue); margin-bottom: 16px; border-bottom: 2px solid var(--border); padding-bottom: 10px; }

/* ─── Course Detail ─────────────────────────────────────────────── */
.course-detail-layout { display: grid; grid-template-columns: 1fr 340px; gap: 28px; align-items: start; }
.course-sidebar-card { background: var(--card-bg); border-radius: var(--radius); box-shadow: var(--shadow-lg); overflow: hidden; position: sticky; top: 88px; }
.course-sidebar-thumb { width: 100%; height: 200px; object-fit: cover; background: linear-gradient(135deg, var(--blue), var(--blue-dark)); display: flex; align-items: center; justify-content: center; font-size: 4rem; }
.course-sidebar-body { padding: 22px; }
.course-sidebar-price { font-size: 2rem; font-weight: 800; color: var(--blue); margin-bottom: 16px; }
.curriculum-list { border: 1px solid var(--border); border-radius: 8px; overflow: hidden; }
.curriculum-item-section { background: #f8f9fa; padding: 10px 14px; font-weight: 700; font-size: 0.88rem; color: var(--text); border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; }
.curriculum-item-lesson { padding: 9px 14px 9px 28px; font-size: 0.85rem; color: var(--text-light); border-bottom: 1px solid var(--border); display: flex; align-items: center; gap: 8px; }
.curriculum-item-lesson:last-child { border-bottom: none; }
.lock-icon { color: var(--text-light); opacity: 0.5; }

/* ─── Course includes list ─────────────────────────────────────── */
.includes-list { list-style: none; padding: 0; }
.includes-list li { padding: 6px 0; font-size: 0.9rem; display: flex; align-items: center; gap: 8px; }
.includes-list li::before { content: '✓'; color: #38a169; font-weight: 700; }

/* ─── Footer ─────────────────────────────────────────────────── */
.footer { background: #1a202c; color: rgba(255,255,255,0.8); padding: 40px 20px 20px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 40px; max-width: 1200px; margin: 0 auto 32px; }
.footer-brand img { height: 44px; margin-bottom: 12px; }
.footer-brand p { font-size: 0.88rem; opacity: 0.7; line-height: 1.7; }
.footer h4 { font-weight: 700; color: #fff; margin-bottom: 14px; font-size: 0.9rem; }
.footer ul { list-style: none; }
.footer ul li { margin-bottom: 8px; }
.footer ul li a { font-size: 0.85rem; opacity: 0.7; transition: opacity .2s; }
.footer ul li a:hover { opacity: 1; color: var(--orange); }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.1); padding-top: 20px; text-align: center; font-size: 0.82rem; opacity: 0.5; max-width: 1200px; margin: 0 auto; }

/* ─── Misc ─────────────────────────────────────────────────── */
.pill { display: inline-block; padding: 3px 10px; border-radius: 50px; font-size: 0.75rem; font-weight: 600; }
.pill-green { background: #e6fffa; color: #276749; }
.pill-red { background: #fff5f5; color: #c53030; }
.pill-blue { background: #e8f4fd; color: var(--blue-dark); }
.pill-orange { background: #fff8f0; color: var(--orange-dark); }
.text-center { text-align: center; }
.mt-8 { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mb-24 { margin-bottom: 24px; }
.empty-state { text-align: center; padding: 60px 20px; color: var(--text-light); }
.empty-state .icon { font-size: 3rem; margin-bottom: 14px; }
.empty-state h3 { font-size: 1.1rem; font-weight: 700; color: var(--text); margin-bottom: 8px; }
.search-bar { display: flex; gap: 10px; margin-bottom: 20px; }
.search-bar .form-control { flex: 1; }

/* ─── Responsive ─────────────────────────────────────────────── */
@media (max-width: 900px) {
  .lesson-layout { grid-template-columns: 1fr; }
  .lesson-sidebar { max-height: none; border-left: none; border-top: 1px solid var(--border); }
  .course-detail-layout { grid-template-columns: 1fr; }
  .course-sidebar-card { position: static; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .admin-layout { grid-template-columns: 1fr; }
  .admin-sidebar { display: none; }
  .form-row { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .hero { padding: 50px 16px; }
  .hero-stats { gap: 24px; }
  .courses-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 24px; }
  .nav-links { display: none; }
  .nav-links.open { display: flex; flex-direction: column; position: absolute; top: 68px; left: 0; right: 0; background: #fff; padding: 16px; box-shadow: var(--shadow); z-index: 99; }
  .nav-toggle { display: flex; }
  .stat-cards { grid-template-columns: 1fr 1fr; }
}
