/* Dark Mode Study Materials Stylesheet */
:root {
  --primary: #6366f1;
  --primary-light: #818cf8;
  --success: #10b981;
  --error: #ef4444;
  --warning: #f59e0b;
  --background: #0f172a;
  --surface: #1e293b;
  --surface-elevated: #334155;
  --text-primary: #f1f5f9;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --border: #334155;
  --shadow: 0 4px 6px -1px rgb(0 0 0 / 0.3), 0 2px 4px -2px rgb(0 0 0 / 0.3);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.5),
    0 4px 6px -4px rgb(0 0 0 / 0.5);
  --radius: 12px;
  --accent-french: #4f46e5;
  --accent-english: #06b6d4;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Inter",
    sans-serif;
  background: var(--background);
  color: var(--text-primary);
  line-height: 1.7;
  font-size: 17px;
  min-height: 100vh;
  padding: 20px;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 12px;
}

::-webkit-scrollbar-track {
  background: var(--surface);
  border-radius: 10px;
}

::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 10px;
  border: 2px solid var(--surface);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--primary);
}

/* Container */
.container {
  max-width: 1200px;
  margin: 0 auto;
}

/* Header */
.h1_header {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 24px 32px;
  margin-bottom: 24px;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border);
}

.breadcrumbs {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
  font-size: 14px;
  color: var(--text-secondary);
  flex-wrap: wrap;
}

.breadcrumbs a {
  color: var(--primary-light);
  text-decoration: none;
  transition: color 0.2s;
}

.breadcrumbs a:hover {
  color: var(--primary);
  text-decoration: underline;
}

.breadcrumbs_current_item {
  color: var(--text-primary);
  font-weight: 600;
}

.arrow {
  color: var(--text-muted);
}

h1 {
  font-size: 36px;
  font-weight: 800;
  color: var(--text-primary);
  margin: 0;
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, var(--primary-light), var(--primary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Card with Tabs */
.card {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border);
  overflow: hidden;
}

.box_tabs {
  display: flex;
  gap: 0;
  background: var(--surface-elevated);
  border-bottom: 2px solid var(--border);
  padding: 0 16px;
}

.tab {
  padding: 16px 24px;
  cursor: pointer;
  transition: all 0.3s;
  border-bottom: 3px solid transparent;
}

.tab a {
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: 600;
  font-size: 15px;
  text-transform: capitalize;
  transition: color 0.2s;
}

.tab:hover a {
  color: var(--text-primary);
}

.tab.active_tab {
  border-bottom-color: var(--primary);
}

.tab.active_tab a {
  color: var(--primary-light);
}

/* Main Content */
.row {
  display: flex;
  gap: 32px;
  padding: 32px;
}

.lesson {
  flex: 1;
  min-width: 0;
}

h2 {
  font-size: 28px;
  font-weight: 700;
  color: var(--text-primary);
  margin: 32px 0 20px 0;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--border);
}

h3 {
  font-size: 22px;
  font-weight: 700;
  color: var(--primary-light);
  margin: 24px 0 16px 0;
}

/* Vocabulary Lists */
.voca-list {
  list-style: none;
  padding: 0;
  margin: 0 0 32px 0;
}

.voca-list li {
  background: var(--surface-elevated);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 24px;
  margin-bottom: 16px;
  transition: all 0.3s;
  line-height: 1.8;
}

.voca-list li:hover {
  border-color: var(--primary);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.main-color {
  color: var(--primary-light);
  font-size: 19px;
}

.main-color b {
  font-weight: 800;
}

.grey-text {
  color: var(--text-secondary);
  font-style: italic;
  display: block;
  margin-top: 8px;
  padding: 12px;
  background: rgba(99, 102, 241, 0.1);
  border-left: 3px solid var(--primary);
  border-radius: 4px;
}

.grey-text i {
  font-style: italic;
}

/* Grammar Examples */
.example,
.exemple {
  background: var(--surface-elevated);
  border-left: 4px solid var(--accent-french);
  padding: 16px 20px;
  margin: 16px 0;
  border-radius: 0 8px 8px 0;
}

.example i,
.exemple i {
  font-style: italic;
  color: var(--text-secondary);
}

/* Tables */
table {
  width: 100%;
  border-collapse: collapse;
  margin: 20px 0;
  background: var(--surface-elevated);
  border-radius: var(--radius);
  overflow: hidden;
}

th,
td {
  padding: 14px 18px;
  text-align: left;
  border: 1px solid var(--border);
}

th {
  background: var(--primary);
  color: white;
  font-weight: 700;
  text-transform: uppercase;
  font-size: 14px;
  letter-spacing: 0.5px;
}

tr:hover td {
  background: rgba(99, 102, 241, 0.1);
}

/* Culture Box */
.culture {
  background: linear-gradient(
    135deg,
    rgba(99, 102, 241, 0.15),
    rgba(129, 140, 248, 0.1)
  );
  border: 2px solid var(--primary);
  border-radius: var(--radius);
  padding: 24px;
  margin: 32px 0;
  display: flex;
  gap: 20px;
  align-items: flex-start;
}

.culture i {
  color: var(--primary-light);
  flex-shrink: 0;
}

.culture p {
  margin: 0;
  line-height: 1.7;
}

/* Sidebar Navigation */
.col-lg-3 {
  width: 300px;
  flex-shrink: 0;
}

.lesson-nav-item {
  background: var(--surface-elevated);
  border: 2px solid var(--border);
  border-radius: 8px;
  padding: 14px 18px;
  margin-bottom: 12px;
  transition: all 0.3s;
  cursor: pointer;
}

.lesson-nav-item:hover {
  border-color: var(--primary-light);
  transform: translateX(4px);
  box-shadow: var(--shadow);
}

.lesson-nav-item a {
  color: var(--text-primary);
  text-decoration: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.lesson-nav-item a:hover {
  color: var(--primary-light);
}

.lesson-nav-item i {
  color: var(--primary);
}

/* Paragraphs and Text */
p {
  margin: 16px 0;
  line-height: 1.8;
}

strong,
b {
  color: var(--primary-light);
  font-weight: 700;
}

u {
  text-decoration-color: var(--primary);
  text-decoration-thickness: 2px;
}

/* Links */
a {
  color: var(--primary-light);
  transition: color 0.2s;
}

a:hover {
  color: var(--primary);
}

/* Back to Top Button */
.back-to-top {
  position: fixed;
  bottom: 32px;
  right: 32px;
  background: var(--primary);
  color: white;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  box-shadow: var(--shadow-lg);
  transition: all 0.3s;
  opacity: 0;
  visibility: hidden;
}

.back-to-top.show {
  opacity: 1;
  visibility: visible;
}

.back-to-top:hover {
  transform: translateY(-4px);
  background: var(--primary-light);
}

/* Responsive */
@media (max-width: 968px) {
  .row {
    flex-direction: column;
  }

  .col-lg-3 {
    width: 100%;
  }

  h1 {
    font-size: 28px;
  }

  h2 {
    font-size: 24px;
  }
}

@media (max-width: 768px) {
  body {
    padding: 12px;
  }

  .row {
    padding: 20px;
  }

  h1 {
    font-size: 24px;
  }

  .voca-list li {
    padding: 16px;
  }
}

/* Navigation Buttons */
.nav-buttons {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin: 40px 0 20px 0;
  padding: 24px;
  background: var(--surface);
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

.nav-btn {
  padding: 14px 28px;
  background: var(--primary);
  color: white;
  text-decoration: none;
  border-radius: 8px;
  font-weight: 600;
  transition: all 0.3s;
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-btn:hover {
  background: var(--primary-light);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.nav-btn.disabled {
  opacity: 0.4;
  pointer-events: none;
}

.home-btn {
  padding: 14px 28px;
  background: var(--surface-elevated);
  border: 2px solid var(--primary);
  color: var(--primary-light);
  text-decoration: none;
  border-radius: 8px;
  font-weight: 600;
  transition: all 0.3s;
  text-align: center;
}

.home-btn:hover {
  background: var(--primary);
  color: white;
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}
