/* ===== AUTH PAGE ===== */
.auth-section {
  min-height: calc(100vh - 130px);
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #f5f7fa 0%, #e8ecf1 100%);
  padding: 40px 15px;
}

.auth-card {
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 10px 40px rgba(0,0,0,0.1);
  width: 100%;
  max-width: 460px;
  overflow: hidden;
}

.auth-tabs {
  display: flex;
  border-bottom: 2px solid #f0f0f0;
}

.auth-tab {
  flex: 1;
  padding: 16px;
  border: none;
  background: none;
  font-family: "Cairo", sans-serif;
  font-size: 16px;
  font-weight: 600;
  color: #888;
  cursor: pointer;
  transition: all 0.3s;
  position: relative;
}

.auth-tab.active {
  color: var(--main-color);
}

.auth-tab.active::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--main-color);
}

.auth-form {
  padding: 30px 35px 35px;
}

.auth-form.hidden {
  display: none;
}

.auth-logo {
  text-align: center;
  margin-bottom: 25px;
}

.auth-logo img {
  height: 55px;
  margin-bottom: 12px;
}

.auth-logo h2 {
  font-size: 20px;
  font-weight: 700;
  color: #222;
  margin: 0 0 6px;
}

.auth-logo p {
  font-size: 14px;
  color: #888;
  margin: 0;
}

.google-btn {
  width: 100%;
  padding: 11px;
  border: 1.5px solid #e0e0e0;
  border-radius: 10px;
  background: #fff;
  font-family: "Cairo", sans-serif;
  font-size: 14px;
  color: #333;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: all 0.2s;
  margin-bottom: 18px;
}

.google-btn:hover {
  border-color: #bbb;
  background: #f9f9f9;
}

.divider {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
}

.divider hr {
  flex: 1;
  border: none;
  border-top: 1px solid #eee;
}

.divider span {
  font-size: 13px;
  color: #aaa;
}

.field-group {
  margin-bottom: 16px;
}

.field-group label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: #555;
  margin-bottom: 6px;
}

.field-group input {
  width: 100%;
  padding: 11px 14px;
  border: 1.5px solid #e8e8e8;
  border-radius: 10px;
  font-family: "Cairo", sans-serif;
  font-size: 14px;
  color: #333;
  transition: border-color 0.2s;
  outline: none;
  background: #fafafa;
}

.field-group input:focus {
  border-color: var(--main-color);
  background: #fff;
}

.forgot-link {
  display: block;
  text-align: left;
  font-size: 12px;
  color: var(--main-color);
  margin-top: 5px;
  text-decoration: none;
}

.auth-msg {
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 13px;
  margin-bottom: 14px;
  display: none;
}

.auth-msg.error {
  display: block;
  background: #fff0f0;
  color: #e53e3e;
  border: 1px solid #fed7d7;
}

.auth-msg.success {
  display: block;
  background: #f0fff4;
  color: #2f855a;
  border: 1px solid #c6f6d5;
}

.auth-submit {
  width: 100%;
  padding: 13px;
  background: var(--main-color);
  color: #fff;
  border: none;
  border-radius: 10px;
  font-family: "Cairo", sans-serif;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s, transform 0.1s;
  margin-bottom: 16px;
}

.auth-submit:hover {
  background: #0288d1;
  transform: translateY(-1px);
}

.auth-submit:active {
  transform: translateY(0);
}

.auth-switch {
  text-align: center;
  font-size: 14px;
  color: #777;
  margin: 0;
}

.auth-switch a {
  color: var(--main-color);
  cursor: pointer;
  font-weight: 600;
  text-decoration: none;
}

/* ===== COURSES PAGE ===== */
.courses-hero {
  background: linear-gradient(135deg, #0288d1 0%, #03A9F4 100%);
  color: #fff;
  padding: 60px 0 50px;
  text-align: center;
}

.courses-hero h1 {
  font-size: 36px;
  font-weight: 700;
  margin-bottom: 12px;
}

.courses-hero p {
  font-size: 17px;
  opacity: 0.88;
  margin: 0;
}

.courses-filter {
  background: #fff;
  border-bottom: 1px solid #eee;
  padding: 16px 0;
  position: sticky;
  top: 72px;
  z-index: 50;
}

.filter-bar {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}

.filter-btn {
  padding: 7px 18px;
  border-radius: 20px;
  border: 1.5px solid #ddd;
  background: #fff;
  font-family: "Cairo", sans-serif;
  font-size: 13px;
  color: #555;
  cursor: pointer;
  transition: all 0.2s;
}

.filter-btn:hover,
.filter-btn.active {
  border-color: var(--main-color);
  background: var(--main-color);
  color: #fff;
}

.courses-main {
  padding: 50px 0 80px;
  background: #f7f9fc;
  min-height: 60vh;
}

.courses-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
}

.course-card {
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.07);
  overflow: hidden;
  transition: all 0.25s;
  cursor: pointer;
}

.course-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 28px rgba(3,169,244,0.15);
}

.course-card .thumb {
  height: 160px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 52px;
  position: relative;
}

.course-card .thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.badge {
  position: absolute;
  top: 12px;
  right: 12px;
  font-size: 11px;
  padding: 3px 12px;
  border-radius: 20px;
  font-weight: 600;
}

.badge-free { background: #e8f5e9; color: #2e7d32; }
.badge-paid { background: #fff8e1; color: #e65100; }

.course-card .card-body {
  padding: 18px;
}

.course-card .card-title {
  font-size: 16px;
  font-weight: 700;
  color: #222;
  margin-bottom: 8px;
  line-height: 1.4;
}

.course-card .card-meta {
  display: flex;
  gap: 16px;
  font-size: 13px;
  color: #888;
  margin-bottom: 14px;
}

.course-card .card-meta span {
  display: flex;
  align-items: center;
  gap: 4px;
}

.course-card .progress-wrap {
  margin-bottom: 10px;
}

.course-card .progress-bar-bg {
  background: #f0f0f0;
  border-radius: 4px;
  height: 5px;
  overflow: hidden;
  margin-bottom: 4px;
}

.course-card .progress-bar-fill {
  height: 100%;
  background: var(--main-color);
  border-radius: 4px;
  transition: width 0.4s;
}

.course-card .progress-text {
  font-size: 11px;
  color: #aaa;
}

.card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid #f3f3f3;
  padding-top: 12px;
}

.card-price {
  font-size: 17px;
  font-weight: 700;
  color: var(--main-color);
}

.card-price.free { color: #2e7d32; }

.enroll-btn {
  padding: 7px 18px;
  background: var(--main-color);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-family: "Cairo", sans-serif;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}

.enroll-btn:hover { background: #0288d1; }

.enrolled-tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  background: #e8f5e9;
  color: #2e7d32;
  padding: 4px 12px;
  border-radius: 20px;
}

/* ===== COURSE DETAIL PAGE ===== */
.course-detail-hero {
  background: linear-gradient(135deg, #0277bd 0%, #03A9F4 100%);
  color: #fff;
  padding: 50px 0 40px;
}

.course-detail-inner {
  display: flex;
  gap: 30px;
  align-items: flex-start;
  flex-wrap: wrap;
}

.course-detail-thumb {
  width: 100px;
  height: 85px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 42px;
  background: rgba(255,255,255,0.15);
  flex-shrink: 0;
}

.course-detail-info h2 {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 8px;
}

.course-detail-info p {
  font-size: 15px;
  opacity: 0.88;
  line-height: 1.6;
  margin-bottom: 14px;
}

.detail-tags span {
  display: inline-block;
  font-size: 12px;
  background: rgba(255,255,255,0.15);
  border: 1px solid rgba(255,255,255,0.25);
  border-radius: 20px;
  padding: 3px 14px;
  margin-left: 6px;
  margin-bottom: 6px;
}

.course-detail-body {
  padding: 40px 0 80px;
  background: #f7f9fc;
}

.detail-progress {
  background: #fff;
  border-radius: 12px;
  padding: 20px 24px;
  margin-bottom: 24px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.detail-progress .prog-label {
  font-size: 14px;
  color: #666;
  margin-bottom: 10px;
}

.detail-progress .prog-bg {
  background: #f0f0f0;
  border-radius: 6px;
  height: 8px;
  overflow: hidden;
}

.detail-progress .prog-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--main-color), #29b6f6);
  border-radius: 6px;
  transition: width 0.5s;
}

.lessons-container {
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
  overflow: hidden;
}

.lessons-header {
  padding: 18px 24px;
  border-bottom: 1px solid #f0f0f0;
  font-size: 16px;
  font-weight: 700;
  color: #333;
}

.lesson-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 24px;
  border-bottom: 1px solid #f7f7f7;
  cursor: pointer;
  transition: background 0.15s;
}

.lesson-item:last-child { border-bottom: none; }

.lesson-item:hover:not(.locked) { background: #f0faff; }

.lesson-item.locked { cursor: not-allowed; opacity: 0.5; }

.lesson-item.done { background: #f0fff4; }

.lesson-item.current { background: #e3f5ff; }

.lesson-num {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  flex-shrink: 0;
}

.ln-done { background: #e8f5e9; color: #2e7d32; border: 2px solid #a5d6a7; }
.ln-current { background: #e3f5ff; color: var(--main-color); border: 2px solid #81d4fa; }
.ln-open { background: #f7f7f7; color: #555; border: 2px solid #e0e0e0; }
.ln-locked { background: #f7f7f7; color: #bbb; border: 2px solid #eee; }

.lesson-info { flex: 1; }
.lesson-name { font-size: 14px; font-weight: 600; color: #333; }
.lesson-dur { font-size: 12px; color: #aaa; margin-top: 2px; }

/* ===== VIDEO / QUIZ PAGE ===== */
.video-page-wrap {
  background: #f7f9fc;
  min-height: calc(100vh - 130px);
}

.video-container {
  max-width: 860px;
  margin: 0 auto;
  padding: 30px 15px 60px;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--main-color);
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 20px;
  text-decoration: none;
  transition: gap 0.2s;
}

.back-link:hover { gap: 10px; }

.video-player-wrap {
  background: #111;
  border-radius: 14px;
  overflow: hidden;
  margin-bottom: 24px;
  aspect-ratio: 16/9;
  position: relative;
}

.video-player-wrap iframe {
  width: 100%;
  height: 100%;
  border: none;
}

.video-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: rgba(255,255,255,0.6);
  gap: 16px;
}

.play-icon {
  width: 70px;
  height: 70px;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  color: rgba(255,255,255,0.8);
}

.video-info {
  background: #fff;
  border-radius: 14px;
  padding: 22px 24px;
  margin-bottom: 20px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.video-info h3 {
  font-size: 18px;
  font-weight: 700;
  color: #222;
  margin-bottom: 6px;
}

.video-info p {
  font-size: 14px;
  color: #888;
  margin: 0;
}

/* ===== QUIZ ===== */
.quiz-wrap {
  background: #fff;
  border-radius: 14px;
  padding: 28px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.07);
  border-top: 4px solid var(--main-color);
}

.quiz-label {
  font-size: 11px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--main-color);
  font-weight: 700;
  margin-bottom: 10px;
}

.quiz-question {
  font-size: 17px;
  font-weight: 700;
  color: #222;
  margin-bottom: 20px;
  line-height: 1.5;
}

.quiz-options {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.quiz-opt {
  padding: 13px 18px;
  border: 1.5px solid #e8e8e8;
  border-radius: 10px;
  font-size: 15px;
  cursor: pointer;
  background: #fafafa;
  color: #333;
  font-family: "Cairo", sans-serif;
  text-align: right;
  transition: all 0.18s;
}

.quiz-opt:hover:not(:disabled) {
  border-color: var(--main-color);
  background: #e3f5ff;
  color: #0277bd;
}

.quiz-opt.correct {
  border-color: #2e7d32;
  background: #e8f5e9;
  color: #2e7d32;
  font-weight: 700;
}

.quiz-opt.wrong {
  border-color: #c62828;
  background: #ffebee;
  color: #c62828;
}

.quiz-result {
  margin-top: 16px;
  padding: 14px 18px;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 600;
  display: none;
}

.quiz-result.success {
  display: block;
  background: #e8f5e9;
  color: #2e7d32;
  border: 1px solid #a5d6a7;
}

.quiz-result.error {
  display: block;
  background: #ffebee;
  color: #c62828;
  border: 1px solid #ef9a9a;
}

.next-btn {
  margin-top: 16px;
  padding: 12px 28px;
  background: var(--main-color);
  color: #fff;
  border: none;
  border-radius: 10px;
  font-family: "Cairo", sans-serif;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s;
  display: none;
}

.next-btn:hover { background: #0288d1; }

/* ===== NAV UPDATES ===== */
.nav-auth-btns {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-right: auto;
}

.nav-user-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: #555;
  padding: 6px 14px;
  border-radius: 20px;
  background: #f0f0f0;
  cursor: pointer;
}

.nav-user-pill:hover { background: #e0e0e0; }

.btn-login-nav {
  padding: 7px 20px;
  border: 1.5px solid var(--main-color);
  border-radius: 8px;
  color: var(--main-color);
  background: #fff;
  font-family: "Cairo", sans-serif;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.2s;
}

.btn-login-nav:hover {
  background: var(--main-color);
  color: #fff;
}

.btn-signup-nav {
  padding: 7px 20px;
  border: none;
  border-radius: 8px;
  color: #fff;
  background: var(--main-color);
  font-family: "Cairo", sans-serif;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.2s;
}

.btn-signup-nav:hover { background: #0288d1; }

@media (max-width: 767px) {
  .auth-form { padding: 20px; }
  .courses-grid { grid-template-columns: 1fr; }
  .course-detail-inner { flex-direction: column; }
}

/* landing override removed - keeps original homepage design */

/* Show quiz number badge */
.quiz-wrap .quiz-label {
  display: inline-block;
  background: #e3f5ff;
  color: var(--main-color);
  border-radius: 20px;
  padding: 3px 14px;
  margin-bottom: 14px;
}

/* ===== Fix: Nav auth buttons visibility ===== */
.header .container {
  flex-wrap: nowrap;
}
#nav-auth-area {
  display: flex !important;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  margin-right: 8px;
}
#nav-auth-area a, #nav-auth-area button {
  white-space: nowrap;
  font-family: "Cairo", sans-serif;
}
@media (max-width: 767px) {
  .header .container { flex-wrap: wrap; }
  #nav-auth-area { 
    width: 100%; 
    justify-content: center; 
    padding: 8px 0; 
    border-top: 1px solid #eee;
  }
}

/* ===== Unified RTL Nav - logo right, auth buttons left ===== */
.header .container {
  direction: rtl;
}
.header .main-nav > li > a {
  font-size: 16px;
}
#nav-auth-area {
  margin-right: auto;
  margin-left: 0;
  direction: ltr;
}
