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

:root {
  --primary-color: #4f46e5;
  --secondary-color: #6366f1;
  --bg-color: #f8fafc;
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --card-bg: #ffffff;
  --border-color: #e2e8f0;
  --input-bg: #f1f5f9;
  --transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

body.auth-page {
  font-family: 'Plus Jakarta Sans', sans-serif;
  background-color: var(--bg-color);
  color: var(--text-primary);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  margin: 0;
  padding: 0;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
}

/* Mesh Gradient Background */
.mesh-bg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: -1;
  background-color: #eef2ff;
  background-image:
    radial-gradient(at 40% 20%, hsla(238, 100%, 84%, 1) 0px, transparent 50%),
    radial-gradient(at 80% 0%, hsla(245, 100%, 76%, 1) 0px, transparent 50%),
    radial-gradient(at 0% 50%, hsla(220, 100%, 93%, 1) 0px, transparent 50%),
    radial-gradient(at 80% 50%, hsla(230, 100%, 86%, 1) 0px, transparent 50%),
    radial-gradient(at 0% 100%, hsla(212, 100%, 87%, 1) 0px, transparent 50%),
    radial-gradient(at 80% 100%, hsla(242, 100%, 80%, 1) 0px, transparent 50%),
    radial-gradient(at 0% 0%, hsla(233, 100%, 86%, 1) 0px, transparent 50%);
  animation: bg-shift 20s infinite alternate ease-in-out;
}

@keyframes bg-shift {
  0% { transform: scale(1); }
  100% { transform: scale(1.1); }
}

/* Container Layout */
.app-container {
  display: flex;
  flex: 1;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  width: 100%;
}

.login-wrapper {
  display: flex;
  width: 100%;
  max-width: 1300px;
  min-height: 750px;
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: 32px;
  overflow: hidden;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.15),
    0 0 0 1px rgba(255, 255, 255, 0.5) inset;
}

/* Left Panel - Branding */
.brand-panel {
  flex: 1.2;
  padding: 4rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  color: var(--text-primary);
  position: relative;
}

.logo-container {
  display: flex;
  align-items: center;
  gap: 15px;
  font-size: 2.2rem;
  font-weight: 900;
  background: -webkit-linear-gradient(45deg, #1e1b4b, #4f46e5);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  letter-spacing: -1px;
}

.logo-circle {
  width: 45px;
  height: 45px;
  background: linear-gradient(135deg, #4f46e5, #ec4899);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 15px rgba(236, 72, 153, 0.3);
}

.brand-carousel-item {
  padding: 3rem;
  color: white;
  min-height: 380px;
  position: relative;
  border-radius: 20px;
}

.carousel-badge {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(10px);
  padding: 5px 12px;
  border-radius: 20px;
  font-weight: 700;
  font-size: 0.8rem;
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.carousel-title {
  font-size: 2.8rem;
  font-weight: 800;
  margin-bottom: 1rem;
  line-height: 1.1;
  text-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.carousel-desc {
  font-size: 1.1rem;
  opacity: 0.95;
  margin-bottom: 2rem;
  max-width: 90%;
  line-height: 1.6;
}

.role-selector-group {
  display: flex;
  gap: 10px;
  margin-top: 15px;
  margin-bottom: 10px;
}

.role-btn {
  flex: 1;
  font-size: 0.9rem !important;
  padding: 0.8rem !important;
}

.role-btn.teacher {
  background-color: #3b82f6 !important;
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3) !important;
}

.role-btn.admin {
  background-color: #1e293b !important;
  box-shadow: 0 4px 12px rgba(30, 41, 59, 0.3) !important;
}

.hero-content {
  margin-top: -2rem;
}

.hero-title {
  font-size: 4.5rem;
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -2px;
  margin-bottom: 1.5rem;
  background: linear-gradient(to right, #1e293b, #475569);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-subtitle {
  font-size: 1.2rem;
  color: #334155;
  max-width: 480px;
  line-height: 1.7;
}

.card-stack {
  display: flex;
  gap: 1.5rem;
  margin-top: 3rem;
}

.info-card {
  background: rgba(255, 255, 255, 0.9);
  padding: 1.5rem;
  border-radius: 20px;
  flex: 1;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
  border: 1px solid white;
  transition: var(--transition);
}

.info-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
}

.card-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
}

.card-icon.blue {
  background: #e0f2fe;
  color: #0284c7;
}

.card-icon.rose {
  background: #ffe4e6;
  color: #e11d48;
}

.info-card h4 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.info-card p {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* Right Panel - Form */
.form-panel {
  flex: 1;
  background: var(--card-bg);
  padding: 4rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  border-radius: 32px;
  box-shadow: -10px 0 40px rgba(0, 0, 0, 0.03);
  margin: 1rem;
}

.form-header {
  margin-bottom: 2.5rem;
}

.form-header h2 {
  font-size: 2.2rem;
  font-weight: 800;
  margin-bottom: 0.5rem;
  letter-spacing: -1px;
}

.form-header p {
  color: var(--text-secondary);
  font-size: 1.1rem;
}

.input-wrapper {
  margin-bottom: 1.5rem;
  text-align: left;
}

.input-wrapper label {
  display: block;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.input-element {
  width: 100%;
  padding: 1.1rem 1.25rem;
  padding-right: 3.5rem; /* Increased to accommodate the eye icon */
  border: 2px solid transparent;
  background: var(--input-bg);
  border-radius: 16px;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 500;
  color: var(--text-primary);
  transition: var(--transition);
}

.input-element:focus {
  outline: none;
  border-color: #cbd5e1;
  background: white;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

.input-element::placeholder {
  color: #94a3b8;
  font-weight: 400;
}

/* Password Toggle Style */
.password-field-container {
  position: relative;
  width: 100%;
}

.password-toggle {
  position: absolute;
  right: 1.25rem;
  top: 50%;
  transform: translateY(-50%);
  cursor: pointer;
  color: #94a3b8;
  font-size: 1.25rem;
  transition: var(--transition);
  z-index: 10;
  display: flex;
  align-items: center;
}

.password-toggle:hover {
  color: var(--primary-color);
}

.form-options {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2.5rem;
}

.custom-checkbox {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: 0.95rem;
  color: var(--text-secondary);
  font-weight: 500;
}

.custom-checkbox input {
  width: 18px;
  height: 18px;
  accent-color: var(--primary-color);
}

.forgot-pw {
  color: var(--primary-color);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  transition: var(--transition);
}

.forgot-pw:hover {
  text-decoration: underline;
  color: var(--secondary-color);
}

.submit-btn {
  width: 100%;
  padding: 1.2rem;
  border: none;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  color: white;
  font-family: inherit;
  font-size: 1.1rem;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: 0 10px 25px -5px rgba(79, 70, 229, 0.4);
}

.submit-btn:hover {
  transform: translateY(-3px) scale(1.01);
  box-shadow: 0 15px 30px -5px rgba(79, 70, 229, 0.5);
}

.submit-btn:active {
  transform: translateY(0) scale(0.99);
}

.auth-divider {
  margin: 2rem 0;
  display: flex;
  align-items: center;
  text-align: center;
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 500;
}

.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  border-bottom: 2px solid var(--input-bg);
}

.auth-divider span {
  padding: 0 15px;
}

.create-account {
  text-align: center;
  font-weight: 500;
  color: var(--text-secondary);
}

.create-account a {
  color: var(--primary-color);
  font-weight: 700;
  text-decoration: none;
  margin-left: 5px;
  transition: var(--transition);
}

.create-account a:hover {
  text-decoration: underline;
}

/* Responsive */
@media (max-width: 1024px) {
  .login-wrapper {
    flex-direction: column;
    min-height: auto;
  }

  .brand-panel {
    padding: 3rem;
  }

  .hero-title {
    font-size: 3.5rem;
    margin-top: 2rem;
  }

  .form-panel {
    margin: 0;
    border-radius: 0 0 32px 32px;
    padding: 3rem;
  }
}

@media (max-width: 640px) {
  .app-container {
    padding: 1rem;
  }

  .card-stack {
    flex-direction: column;
  }

  .brand-panel,
  .form-panel {
    padding: 2rem;
  }

  .hero-title {
    font-size: 2.5rem;
  }
}

@media (max-width: 480px) {
  .app-container {
    padding: 0.5rem;
  }
  .brand-panel,
  .form-panel {
    padding: 1.5rem;
  }
  .hero-title {
    font-size: 1.75rem;
  }
  .form-header h2 {
    font-size: 1.6rem;
  }
  .input-element {
    padding: 0.8rem 1rem;
  }
  .carousel-title {
    font-size: 1.5rem !important;
  }
  .carousel-desc {
    font-size: 0.9rem !important;
  }
  .brand-carousel-item {
    padding: 1.5rem !important;
    min-height: 300px !important;
  }
}

/* Flash Messages - Toast Style */
.flash-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none; /* Let clicks pass through the container */
}

.flash-alert {
  pointer-events: auto; /* Re-enable clicks on the alert itself */
  min-width: 300px;
  padding: 1rem 1.5rem;
  border-radius: 12px;
  font-weight: 600;
  box-shadow: 0 10px 25px rgba(0,0,0,0.15);
  animation: slideInRight 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  background: white;
  border-left: 4px solid var(--primary-color);
}

.alert-danger {
  border-left-color: #ef4444;
  color: #ef4444;
}

.alert-success {
  border-left-color: #10b981;
  color: #10b981;
}

.alert-warning {
  border-left-color: #f59e0b;
  color: #d97706;
}

@keyframes slideInRight {
  from { transform: translateX(120%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

/* ---------------------------------------------------
   Landing Page Sections (Login & Register expansions)
------------------------------------------------------ */
.landing-section {
  padding: 6rem 2rem;
  max-width: 1300px;
  margin: 0 auto;
}

.landing-section.bg-light {
  background: var(--card-bg);
  border-radius: 32px;
  box-shadow: 0 15px 35px rgba(0,0,0,0.03);
  margin-top: 2rem;
  margin-bottom: 2rem;
}

@media (min-width: 992px) {
  .landing-section.bg-light {
    padding: 6rem 4rem;
  }
}

@media (max-width: 991px) {
  .landing-section {
    padding: 3rem 1.5rem;
  }
  .landing-section.bg-light {
    padding: 3rem 1.5rem;
  }
  .section-header h2 {
    font-size: 2rem;
  }
}

.section-header {
  text-align: center;
  margin-bottom: 4rem;
}

.section-header h2 {
  font-size: 2.8rem;
  font-weight: 800;
  letter-spacing: -1px;
  color: var(--text-primary);
  margin-bottom: 1rem;
}

.section-header p {
  font-size: 1.15rem;
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto;
}

/* About Team Section */
.team-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
  margin-top: 2rem;
}

@media (max-width: 900px) {
  .team-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 500px) {
  .team-grid {
    grid-template-columns: 1fr;
  }
}

.team-card {
  background: white;
  border-radius: 16px;
  padding: 1.5rem;
  text-align: center;
  box-shadow: 0 4px 15px rgba(0,0,0,0.03);
  border: 1px solid var(--border-color);
  transition: var(--transition);
}

.team-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 40px rgba(0,0,0,0.08);
}

.team-avatar {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  object-fit: cover;
  margin: 0 auto 1.5rem;
  border: 4px solid var(--input-bg);
  box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

.team-role {
  font-size: 0.9rem;
  color: var(--primary-color);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 0.5rem;
}

.team-name {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.team-desc {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

.guide-card {
  background: linear-gradient(135deg, #1e293b, #0f172a);
  color: white;
  margin-top: 3rem;
  padding: 3rem;
  border-radius: 24px;
  display: flex;
  align-items: center;
  gap: 3rem;
  box-shadow: 0 20px 40px rgba(0,0,0,0.15);
}

.guide-avatar {
  width: 150px;
  height: 150px;
  border-radius: 50%;
  border: 4px solid rgba(255,255,255,0.1);
}

.guide-info h3 {
  font-size: 1.8rem;
  font-weight: 800;
  margin-bottom: 0.5rem;
}

.guide-role {
  color: #94a3b8;
  font-size: 1.1rem;
  font-weight: 500;
  margin-bottom: 1rem;
}

/* Landing Courses Grid */
.landing-course-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  padding: 1rem 0;
}

@media (max-width: 768px) {
  .landing-course-grid {
    grid-template-columns: 1fr;
    max-width: 400px;
    margin: 0 auto;
  }
  .lc-card {
    min-height: auto;
  }
}

.lc-card {
  background: white;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 10px 25px rgba(0,0,0,0.05);
  border: 1px solid var(--border-color);
  transition: var(--transition);
}

.lc-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 40px rgba(0,0,0,0.1);
}

.view-all-card {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 400px;
  background: white;
  border: 2px dashed #cbd5e1;
}

.view-all-icon {
  width: 60px;
  height: 60px;
  background: #eff6ff;
  color: #3b82f6;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.5rem auto;
}

.lc-image {
  height: 200px;
  width: 100%;
  object-fit: cover;
  background: #e2e8f0;
}

.lc-body {
  padding: 2rem;
}

.lc-badge {
  background: #e0e7ff;
  color: var(--primary-color);
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  margin-bottom: 1rem;
  display: inline-block;
}

.lc-title {
  font-size: 1.35rem;
  font-weight: 800;
  margin-bottom: 0.5rem;
  line-height: 1.3;
}

.lc-desc {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.6;
  margin-bottom: 1.5rem;
}

.lc-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border-color);
}

.lc-price {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--text-primary);
}

.lc-btn {
  color: var(--primary-color);
  font-weight: 700;
  text-decoration: none;
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  gap: 5px;
}

@media (max-width: 992px) {
  .guide-card {
    flex-direction: column;
    text-align: center;
    gap: 1.5rem;
  }
}

/* Reviews Flex/Grid */
.reviews-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
  padding: 1rem 0;
}

.review-card {
  background: white;
  padding: 1.5rem;
  border-radius: 15px;
  border: 1px solid var(--border-color);
  box-shadow: 0 4px 6px rgba(0,0,0,0.02);
  display: flex;
  flex-direction: column;
  transition: var(--transition);
}

.review-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0,0,0,0.05);
}

@media (max-width: 768px) {
  .reviews-grid {
    grid-template-columns: 1fr;
    max-width: 450px;
    margin: 0 auto;
  }
}

/* Smooth fade on scroll */
.fade-up-element {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}
.fade-up-element.visible {
  opacity: 1;
  transform: translateY(0);
}


