* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Quicksand", sans-serif;
}

:root {
  --primary: #ff9800;
  --primary-light: linear-gradient(135deg, #ffe0a2, #fbc02d);
  --primary-dark: #f57c00;
  --accent: #e74c3c;
  --success: #6c8b47;
  --text: #5a4a3a;
  --text-light: #7a5c40;
  --bg: linear-gradient(135deg, #fef3c7, #fcd34d);
  --bg-secondary: #fbc16b;
  --border: #e8d5b5;
  --white: #ffffff;
  --shadow: 0 4px 8px rgba(0, 0, 0, 0.2);

  --dark-primary: #8c6b4f;
  --dark-primary-light: #3a2e21;
  --dark-primary-dark: #5a4a3a;
  --dark-accent: #b05a4a;
  --dark-success: #7a9c5a;
  --dark-text: #f5e6d3;
  --dark-text-light: #e8d5b5;
  --dark-bg: linear-gradient(135deg, #2a2118, #3a2e21);
  --dark-bg-secondary: #3a2e21;
  --dark-border: #5a4a3a;
}

[data-theme="dark"] {
  --primary: var(--dark-primary);
  --primary-light: var(--dark-primary-light);
  --primary-dark: var(--dark-primary-dark);
  --accent: var(--dark-accent);
  --success: var(--dark-success);
  --text: var(--dark-text);
  --text-light: var(--dark-text-light);
  --bg: var(--dark-bg);
  --bg-secondary: var(--dark-bg-secondary);
  --border: var(--dark-border);
}

body {
  background: var(--bg);
  color: var(--text);
  text-align: center;
  min-height: 100vh;
  transition: background 0.3s ease, color 0.3s ease;
}

header {
  background: var(--primary);
  padding: 30px;
  text-align: center;
  color: var(--text-light);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  position: relative;
}

.logo {
  font-size: 70px;
  color: var(--white);
  font-weight: bold;
}

nav {
  background: var(--primary-dark);
  padding: 15px 0;
  margin-top: 20px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.nav-list {
  display: flex;
  justify-content: center;
  list-style-type: none;
  padding: 0;
  margin: 0;
}

.nav-list li {
  margin: 0 20px;
}

.nav-list li a {
  color: var(--white);
  text-decoration: none;
  font-size: 18px;
  font-weight: bold;
  transition: color 0.3s;
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-list li a:hover {
  color: var(--primary-light);
}

.nav-badge {
  background-color: var(--accent);
  color: var(--white);
  padding: 4px 8px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: bold;
  margin-left: 8px;
  animation: pulse 1s infinite;
}

@keyframes pulse {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.1);
  }
  100% {
    transform: scale(1);
  }
}

.container {
  margin-top: 50px;
  padding: 0 20px;
}

.intro {
  margin: 40px 0;
  color: var(--text-light);
  padding: 20px;
  background-color: var(--bg-secondary);
  border-radius: 6px;
  border: 2px solid var(--border);
  font-weight: 400;
  transition: border 0.3s ease;
}

h2 {
  font-size: 40px;
  margin-bottom: 30px;
  color: var(--text-light);
}

.intro p {
  font-size: 20px;
  font-weight: bold;
  line-height: 2;
}

.language-selector-container {
  background-color: var(--bg-secondary);
  padding: 1.5rem;
  border-radius: 0.5rem;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  margin-bottom: 1.5rem;
  transition: all 0.3s ease;
}

.language-selector-container.visible {
  display: block;
}

.language-icon {
  display: flex;
  justify-content: center;
  margin-bottom: 1rem;
}

.language-icon svg {
  color: var(--primary-light);
}

.language-selector-container label {
  font-size: 1.125rem;
  font-weight: bold;
  margin-bottom: 1.25rem;
  margin-top: 0.625rem;
  display: block;
  color: var(--primary-light);
  text-align: center;
}

.language-selector {
  width: 30%;
  padding: 0.625rem;
  font-size: 1rem;
  margin-bottom: 1.25rem;
  border-radius: 0.375rem;
  border: 2px solid var(--primary-dark);
  background: var(--primary-light);
  color: var(--text);
  transition: all 0.3s;
  cursor: pointer;
}

.language-selector:focus {
  border-color: var(--primary);
  outline: none;
  box-shadow: 0 0 0 3px rgba(66, 153, 225, 0.5);
}

.language-selector:hover {
  border-color: var(--primary);
}

form {
  background: var(--bg-secondary);
  border-radius: 10px;
  padding: 25px;
  width: 100%;
  max-width: 400px;
  margin: 0 auto 70px auto;
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
  transition: transform 0.3s ease-in-out;
}

form:hover {
  transform: scale(1.02);
}

form input {
  width: 100%;
  padding: 12px;
  margin: 10px 0;
  border: 2px solid var(--primary);
  border-radius: 6px;
  font-size: 16px;
  color: var(--text);
  background: var(--bg);
}

form button {
  background: var(--primary);
  color: var(--white);
  border: none;
  padding: 14px;
  font-size: 16px;
  border-radius: 6px;
  cursor: pointer;
  font-weight: bold;
  transition: background 0.3s;
}

form button:hover {
  background: var(--primary-dark);
}

.form-buttons {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  margin-top: 20px;
}

.or-text {
  font-size: 18px;
  color: var(--text);
  margin: 0 10px;
  font-weight: bold;
}

.form-buttons button {
  background: var(--primary);
  color: var(--white);
  padding: 12px 20px;
  font-size: 16px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.3s;
  font-weight: bold;
}

.form-buttons button:hover {
  background: var(--primary-dark);
}

.user-info {
  font-size: 1.5rem;
  font-weight: bold;
  color: var(--text);
  text-transform: uppercase;
  margin-top: 30px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  gap: 10px;
}

.user-info h2 {
  font-size: 24px;
  color: var(--primary);
}

#logoutBtn {
  background: var(--primary);
  color: var(--white);
  margin: 0 auto;
  padding: 10px 20px;
  font-size: 16px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-weight: bold;
  transition: background 0.3s;
}

#logoutBtn:hover {
  background: var(--bg);
  color: var(--text);
}

#contactForm {
  max-width: 50%;
  margin: 50px auto;
  background: var(--primary);
  padding: 25px;
  border-radius: 10px;
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
  transition: transform 0.3s ease-in-out;
}

#contactForm:hover {
  transform: scale(1.02);
}

#contactForm h2 {
  font-size: 24px;
  color: var(--text);
}

#contactForm input,
#contactForm textarea {
  width: 100%;
  padding: 12px;
  margin: 10px 0;
  border: 2px solid var(--primary);
  border-radius: 6px;
  font-size: 16px;
  color: var(--text);
  background: var(--bg);
}

#contactForm button {
  background: var(--bg);
  color: var(--text);
  padding: 12px 20px;
  border: none;
  font-size: 16px;
  border-radius: 6px;
  cursor: pointer;
  font-weight: bold;
  transition: background 0.3s;
}

#contactForm button:hover {
  background: var(--primary-dark);
}

#logoutLink {
  margin-top: 20px;
  display: none;
  font-size: 18px;
  color: var(--primary);
  text-decoration: none;
  font-weight: bold;
}

#logoutLink:hover {
  text-decoration: underline;
}

#footer {
  text-align: center;
  margin-top: 50px;
  padding: 10px;
  background: var(--primary);
  color: var(--text);
  font-weight: bold;
}

.theme-toggle {
  position: absolute;
  top: 20px;
  right: 20px;
  background: var(--bg);
  color: var(--white);
  border: none;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  transition: all 0.3s ease;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.theme-toggle:hover {
  background: var(--primary-dark);
  transform: scale(1.1);
}

.testimonials {
  padding: 60px 20px;
  background: var(--bg-secondary);
  text-align: center;
}

.testimonial-carousel {
  position: relative;
  max-width: 800px;
  margin: 40px auto;
  overflow: hidden;
}

.carousel-container {
  position: relative;
  height: 300px;
}
.testimonial-slide p {
  margin: 20px 0;
  max-height: 150px;
  overflow-y: auto;
  padding: 0 20px;
}
.testimonial-slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  padding: 30px;
  box-sizing: border-box;
  text-align: center;
  background: var(--bg);
  border-radius: 10px;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.testimonial-slide.active {
  opacity: 1;
}

.testimonial-img {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  object-fit: cover;
  margin-bottom: 20px;
  border: 3px solid var(--primary);
}

.testimonial-author {
  display: block;
  margin-top: 15px;
  font-weight: bold;
  color: var(--primary-dark);
}

.carousel-prev,
.carousel-next {
  position: absolute;
  top: 30%;
  transform: translateY(-50%);
  background: var(--primary);
  color: white;
  border: none;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  cursor: pointer;
  font-size: 18px;
  z-index: 10;
  transition: all 0.3s;
}

.carousel-prev:hover,
.carousel-next:hover {
  background: var(--primary-dark);
  transform: translateY(-50%) scale(1.1);
}

.carousel-prev {
  left: 10px;
}

.carousel-next {
  right: 10px;
}

.carousel-dots {
  display: flex;
  justify-content: center;
  margin-top: 20px;
  gap: 10px;
}

.dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--primary);
  cursor: pointer;
  transition: all 0.3s;
}

.dot.active {
  background: var(--bg);
  transform: scale(1.2);
}

.video-lessons {
  padding: 50px 20px;
  background: var(--bg);
  text-align: center;
}

.language-tabs {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-bottom: 30px;
  flex-wrap: wrap;
}

.language-tab {
  margin-top: 20px;
  padding: 10px 20px;
  background: var(--primary-light);
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.3s;
  font-size: 16px;
  font-weight: bold;
  color: var(--text);
}

.language-tab:hover {
  cursor: pointer;
  background: var(--primary);
  color: var(--white);
}

.language-tab.active {
  background: var(--primary);
  color: var(--white);
}

.video-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 30px;
  margin: 0 auto;
  max-width: 1200px;
}

.video-grid iframe {
  display: block;
  width: 100%;
  height: 100%;
  grid-column: span 1;
}

.video-card {
  background: var(--bg-secondary);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  transition: transform 0.3s, box-shadow 0.3s;
}

.video-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
}

.video-container {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  overflow: hidden;
}

.video-container iframe,
.video-placeholder {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
}

.video-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--primary-light);
  cursor: pointer;
}

.video-placeholder img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.play-button {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(255, 255, 255, 0.9);
  border: none;
  width: 70px;
  height: 70px;
  border-radius: 50%;
  font-size: 24px;
  color: var(--primary);
  cursor: pointer;
  transition: all 0.3s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.play-button:hover {
  background: var(--primary);
  color: var(--white);
  transform: translate(-50%, -50%) scale(1.1);
}

.video-info {
  padding: 20px;
  text-align: left;
}

.video-info h3 {
  margin: 0 0 10px;
  color: var(--text);
  font-size: 1.5rem;
}

.video-info p {
  margin: 0;
  color: var(--text-light);
  font-weight: bold;
  font-size: 1rem;
  line-height: 1.5;
}

.main-footer {
  background-color: var(--bg-secondary);
  color: var(--text);
  padding: 30px 20px;
  text-align: center;
  margin-top: 50px;
}

.back-to-top {
  position: fixed;
  bottom: 1.25rem;
  right: 1.25rem;
  background: var(--primary);
  color: white;
  width: 3.125rem;
  height: 3.125rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s;
  z-index: 999;
  box-shadow: 0 0.125rem 0.625rem rgba(0, 0, 0, 0.2);
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
}

.back-to-top:hover {
  background: var(--primary-dark);
  transform: translateY(-0.1875rem);
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
}

.footer-logo {
  font-size: 24px;
  font-weight: bold;
  margin-bottom: 20px;
}

.footer-logo i {
  margin-right: 10px;
  color: var(--text);
}

.footer-links {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 20px;
  margin-bottom: 20px;
}

.footer-links a {
  color: var(--text);
  text-decoration: none;
  transition: color 0.3s;
}

.footer-links a:hover {
  color: var(--primary);
}

.social-links {
  display: flex;
  justify-content: center;
  gap: 15px;
  margin-bottom: 20px;
}

.social-links a {
  color: var(--text);
  font-size: 20px;
  transition: color 0.3s;
}

.social-links a:hover {
  color: var(--primary);
}

.copyright {
  font-size: 14px;
  color: var(--text-light);
}

#adminLink {
  color: var(--text-light);
}
.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  align-items: center;
  justify-content: center;
}

.modal-content {
  background: var(--white);
  padding: 20px;
  border-radius: 10px;
  text-align: center;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

#closeModal {
  background: var(--bg-secondary);
  color: var(--white);
  border: none;
  padding: 10px 20px;
  cursor: pointer;
  margin-top: 10px;
  border-radius: 5px;
  transition: background 0.3s;
}

#closeModal:hover {
  background: var(--primary-dark);
}

@media (max-width: 575.98px) {
  .logo {
    font-size: 2.5rem;
  }

  .nav-list {
    flex-direction: column;
    align-items: center;
  }

  .nav-list li {
    margin: 0.625rem 0;
  }

  .intro p {
    font-size: 1rem;
    line-height: 1.6;
  }

  form,
  #contactForm {
    max-width: 100%;
    padding: 0.9375rem;
  }

  .video-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .testimonial-slide {
    padding: 0.9375rem;
  }

  .testimonial-img {
    width: 4.375rem;
    height: 4.375rem;
  }

  .user-info {
    flex-direction: column;
    text-align: center;
  }

  .footer-links {
    flex-direction: column;
    align-items: center;
  }

  @media (orientation: portrait) {
    header {
      padding: 1.25rem;
    }

    .container {
      padding: 0 0.9375rem;
    }
  }
}

@media (min-width: 576px) and (max-width: 767.98px) {
  .logo {
    font-size: 3.125rem;
  }

  .nav-list {
    flex-wrap: wrap;
  }

  .nav-list li {
    margin: 0.625rem 0.9375rem;
  }

  .language-selector-container {
    padding: 1rem;
  }

  .language-selector-container label {
    font-size: 1rem;
  }
}

.video-grid {
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
}

.testimonial-slide {
  padding: 1.25rem;
}

@media (orientation: landscape) {
  .video-grid {
    grid-template-columns: repeat(4, 1fr);
  }

  .testimonial-carousel {
    max-width: 90%;
  }
}

@media (min-width: 768px) and (max-width: 991.98px) {
  .video-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
  }

  .testimonial-carousel {
    max-width: 43.75rem;
  }

  .intro p {
    font-size: 1.125rem;
  }

  @media (orientation: portrait) {
    .video-grid {
      grid-template-columns: repeat(2, 1fr);
    }
  }
}

@media (min-width: 992px) and (max-width: 1199.98px) {
  .video-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 1.25rem;
  }
}

@media (min-width: 1200px) {
  .video-grid {
    gap: 1.875rem;
  }
}

@media (min-width: 1400px) {
  .container {
    max-width: 82.5rem;
  }
}

@media (max-height: 600px) {
  header {
    padding: 0.9375rem 0;
  }

  .logo {
    font-size: 2.5rem;
  }

  .container {
    margin-top: 1.25rem;
  }

  @media (orientation: landscape) {
    .video-grid {
      grid-template-columns: repeat(4, 1fr);
      gap: 0.9375rem;
    }

    .testimonial-carousel {
      max-width: 90%;
    }
  }
}
