/* ══════════════════════════════════════════════════════════════════════════
   ECLYPSE APP - Main CSS Entry Point
   Modular CSS Architecture
   ══════════════════════════════════════════════════════════════════════════

   CSS Modules:
   1. base.css      - Variables, reset, background
   2. navbar.css    - Navigation bar
   3. login.css     - Login page
   4. homepage.css  - Hero, stage cards, progress
   5. tahap1.css    - Climate news
   6. tahap2.css    - Video & eco cards
   7. tahap3.css    - Groups
   8. tahap4.css    - Debate
   9. tahap5.css    - Reflection
   10. modal.css    - Modals & toast
   11. admin.css     - Admin & thank you

   ══════════════════════════════════════════════════════════════════════════ */

/* Import all CSS modules */
@import url('modules/base.css');
@import url('modules/navbar.css');
@import url('modules/login.css');
@import url('modules/homepage.css');
@import url('modules/tahap1.css');
@import url('modules/tahap2.css');
@import url('modules/tahap3.css');
@import url('modules/tahap4.css');
@import url('modules/tahap5.css');
@import url('modules/modal.css');
@import url('modules/admin.css');

/* ── PAGE HEADERS ── */
.page-header h2, .section-title { text-shadow: 0 1px 2px rgba(255,255,255,0.8); }

/* ── HERO BANNER UPGRADE ── */
.hero-banner {
  background: linear-gradient(135deg, #0d3320 0%, #1B4332 40%, #2D6A4F 100%) !important;
  box-shadow: 0 12px 40px rgba(13,51,32,0.35) !important;
  overflow: hidden;
  position: relative;
}
.hero-banner::before {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(ellipse 60% 80% at 85% 50%, rgba(82,183,136,0.18) 0%, transparent 100%);
  pointer-events: none;
  z-index: 0;
}
.hero-banner > * { position: relative; z-index: 1; }

/* ── WELCOME MSG ── */
.welcome-msg {
  background: rgba(255,243,176,0.75) !important;
  backdrop-filter: blur(6px);
  border: 1px solid rgba(244,196,48,0.35) !important;
  border-left: 4px solid var(--yellow) !important;
}

/* ── PROGRESS BAR SISWA ── */
.progress-wrap {
  margin-top: 1.25rem;
  background: rgba(255,255,255,0.1);
  border-radius: 14px;
  padding: 1rem 1.25rem;
  backdrop-filter: blur(4px);
}
.progress-label-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
  font-size: 0.85rem;
  font-weight: 700;
  color: white;
}
.progress-bar-track {
  width: 100%;
  height: 12px;
  background: rgba(255,255,255,0.18);
  border-radius: 99px;
  overflow: hidden;
}
.progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--yellow), #ffe27a);
  border-radius: 99px;
  transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}
.navbar-progress-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: 12px;
  padding: 4px 10px;
  background: rgba(255,255,255,0.08);
  border-radius: 99px;
}
.navbar-progress-track {
  width: 70px;
  height: 6px;
  background: rgba(255,255,255,0.2);
  border-radius: 99px;
  overflow: hidden;
}
.navbar-progress-fill {
  height: 100%;
  background: var(--yellow);
  border-radius: 99px;
  transition: width 0.4s ease;
}
.navbar-progress-text {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--yellow);
  white-space: nowrap;
}

/* ══════════════════════════════════════════════════════════════════════════
   SPIN WHEEL ANIMATIONS
   ══════════════════════════════════════════════════════════════════════════ */

@keyframes popIn {
  0% {
    transform: scale(0.5);
    opacity: 0;
  }
  70% {
    transform: scale(1.1);
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-5px); }
  75% { transform: translateX(5px); }
}

.spin-wheel-winning {
  animation: bounce 0.5s ease-in-out 3;
}

/* ══════════════════════════════════════════════════════════════════════════
   RICH TEXT EDITOR - Tujuan Pembelajaran
   ══════════════════════════════════════════════════════════════════════════ */

.rich-text-editor {
  border: 2px solid var(--green-pale);
  border-radius: 8px;
  overflow: hidden;
  background: white;
  font-family: 'Nunito', sans-serif;
}

.rich-text-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  padding: 8px;
  background: #f8f9fa;
  border-bottom: 1px solid #e9ecef;
}

.rich-text-toolbar button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 1px solid #dee2e6;
  border-radius: 4px;
  background: white;
  cursor: pointer;
  font-size: 0.85rem;
  color: #495057;
  transition: all 0.15s ease;
}

.rich-text-toolbar button:hover {
  background: #e9ecef;
  border-color: #adb5bd;
}

.rich-text-toolbar button.active {
  background: var(--green-pale);
  border-color: var(--green);
  color: var(--green-deep);
}

.rich-text-toolbar button[data-command="insertUnorderedList"],
.rich-text-toolbar button[data-command="insertOrderedList"] {
  font-size: 0.9rem;
}

.rich-text-toolbar .toolbar-divider {
  width: 1px;
  height: 24px;
  background: #dee2e6;
  margin: 4px 4px;
}

.rich-text-content {
  min-height: 120px;
  max-height: 300px;
  overflow-y: auto;
  padding: 12px;
  font-size: 0.9rem;
  line-height: 1.6;
  outline: none;
}

.rich-text-content:empty:before {
  content: attr(data-placeholder);
  color: #adb5bd;
  pointer-events: none;
}

.rich-text-content:focus {
  background: #fffef8;
}

/* Formatting display in list */
.objective-item .formatted-text {
  line-height: 1.7;
}

.objective-item .formatted-text p {
  margin: 0 0 8px 0;
}

.objective-item .formatted-text p:last-child {
  margin-bottom: 0;
}

.objective-item .formatted-text ul,
.objective-item .formatted-text ol {
  margin: 8px 0;
  padding-left: 20px;
}

.objective-item .formatted-text li {
  margin-bottom: 4px;
}

.objective-item .formatted-text strong {
  font-weight: 700;
}

.objective-item .formatted-text em {
  font-style: italic;
}

.objective-item .formatted-text u {
  text-decoration: underline;
}

.objective-item .formatted-text s {
  text-decoration: line-through;
}
