@import url("https://fonts.googleapis.com/css2?family=Inter:ital,opsz,wght@0,14..32,100..900;1,14..32,100..900&family=Plus+Jakarta+Sans:ital,wght@0,200..800;1,200..800&display=swap");
@import url("https://fonts.googleapis.com/css2?family=Bitter:ital,wght@0,100..900;1,100..900&display=swap");

:root {
  --lwb-app-header-height: 104px;

  --course-image-height: 250px;

  --student-primary-color: #3b424b;
  --student-secondary-color: #8cb6d9;

  --student-accent-color: #068eca;
  --student-accent-hover-color: #c5daeb;

  --student-dark-color: #1b315d;
  --student-dark-hover-color: #182134;

  --student-light-color: #e6e7e8;
}

header {
  border: 0;
}

.header-link {
  font-family: "Plus Jakarta Sans", sans-serif;
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  color: #000;
  padding: 8px 22px;
  cursor: pointer;
  transition: 0.3s;
}

.header-list {
  list-style: none;
  display: flex;
}

.header-link:hover {
  text-decoration: underline;
  color: var(--student-dark-color);
}

.text-student-primary {
  font-family: "Plus Jakarta Sans", sans-serif;
}

.text-student-secondary {
  font-family: Bitter, sans-serif;
}

.dropdown-content {
  width: 230px;
  box-shadow: 0px 4px 16px rgba(0, 0, 0, 0.1);
  background: #fff;
  list-style-type: none;
  left: 22px;
  top: 36px;
  padding: 8px 0;
  flex-direction: column;
}

.header-title {
  font-family: "Plus Jakarta Sans", sans-serif;
  color: var(--student-primary-color);
  font-size: 35px;
  font-weight: 700;
}

.course {
  border-radius: 8px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.course-cover-link {
  display: block;
  height: var(--course-image-height);
  width: 100%;
}

.course-cover-image {
  width: 100%;
  height: var(--course-image-height);
  object-fit: contain;
  background-color: #eee;
}

.course-body {
  padding: 2em 10%;
  background-color: var(--student-dark-color);
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.course-desc {
  margin: 1.5rem 0;
}

.course-buy-now-btn {
  font-weight: 700;
  padding: 16px;
  outline: none;
  border-radius: 8px;
  border: 0;
  text-transform: uppercase;
  font-family: Bitter, sans-serif;
  cursor: pointer;
  transition: 0.3s;
  text-decoration: none;
}

.course-buy-now-btn-primary {
  background-color: var(--student-accent-color);
  color: var(--student-light-color);
}

.course-buy-now-btn-primary:hover {
  background-color: var(--student-accent-hover-color);
  color: #000;
}

.course-buy-now-btn-secondary {
  background: none;
  color: #fff;
}

.course-buy-now-btn-secondary:hover {
  background-color: var(--student-dark-hover-color);
}

.course-buy-now-btn-ternary {
  background: var(--student-dark-hover-color);
  color: var(--lwb-primary-bg);
}

.course-buy-now-btn-ternary:hover {
  background-color: var(--student-accent-hover-color);
  color: #000;
}

.course-detail-page-container {
  width: 100%;
}

.course-detail-page-header {
  background: var(--student-dark-color);
}

.course-detail-page-info {
  padding: 150px var(--lwb-body-x-padding) !important;
}

.input-secondary {
  height: 60px;
  border-radius: 0 !important;
  border: 1px solid var(--student-light-color) !important;
  padding-right: 112px !important;
  color: var(--lwb-app-link-color);
  font-weight: 400;
  font-family: "Plus Jakarta Sans", sans-serif;
}

.input-secondary::placeholder {
  color: var(--lwb-app-link-color);
  font-weight: 400;
  outline: none;
  font-family: "Plus Jakarta Sans", sans-serif !important;
}

.input-secondary-button {
  position: absolute;
  right: 0;
  top: 0;
  background: var(--student-dark-color);
  height: calc(100% - 4px);
  top: 2px;
  bottom: 2px;
  border: 0;
  right: 2px;
  padding: 0 20px;
  color: #fff;
  font-family: "Plus Jakarta Sans", sans-serif !important;
  cursor: pointer;
  transition: 0.3s;
}

.input-secondary-button:hover {
  opacity: 0.7;
}

.dropdown-content {
  display: None;
}

/* Mobile Navigation Toggle */
.mobile-nav-toggle {
  display: none;
  flex-direction: column;
  cursor: pointer;
  padding: 8px;
  gap: 4px;
}

.mobile-nav-toggle span {
  width: 25px;
  height: 3px;
  background-color: var(--student-primary-color);
  transition: 0.3s;
}

/* Show mobile nav toggle on smaller screens */
@media (max-width: 768px) {
  .course-detail-page-info {
    padding: 50px var(--lwb-body-x-padding) !important;
  }
  .header-title {
    font-size: 28px;
  }
  .mobile-nav-toggle {
    display: flex;
  }

  .student-lower-menu {
    display: none;
  }

  /* Mobile student-lower-menu styling */
  .student-lower-menu.mobile-visible {
    display: block !important;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background-color: #fff;
    z-index: 1000;
    padding: 0;
    margin: 0;
    height: calc(100vh - 104px);
    overflow-y: auto;
  }

  .student-lower-menu.mobile-visible .dropdown-content {
    position: static;
    width: 100%;
    box-shadow: none;
    background: #f8f9fa;
    margin: 0;
    padding: 0;
    display: flex !important;
    top: 0;
    left: 0;
    gap: 0;
  }

  .header-list {
    flex-direction: column;
    display: flex;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
  }

  .header-list li {
    line-height: 42px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  }

  .header-list li:last-child {
    border-bottom: none;
  }

  .dropdown-content li {
    padding-left: 16px;
  }

  .upper-menu-right {
    display: flex;
    align-items: center;
  }
}

@media (min-width: 769px) {
  .dropdown-content li {
    padding: 12px 24px;
  }

  .dropdown-content .header-link {
    padding: 0;
  }
}

/* Course Detail Styles */
.course-detail-container {
  display: flex;
  min-height: calc(100dvh - 94px);
  background-color: #f8f9fa;
  position: relative;
}

.course-detail-page-content {
  padding: 0 var(--lwb-body-x-padding);
}

/* Left Sidebar */
.course-sidebar {
  width: 350px;
  background: var(--student-dark-color);
  color: white;
  padding: 40px 30px;
  position: fixed;
  min-height: calc(100vh - 112px) !important;
  overflow-y: auto;
}

.course-image-container {
  text-align: center;
  margin-bottom: 30px;
}

.course-image {
  width: 200px;
  height: 200px;
  border-radius: 20px;
  object-fit: cover;
}

.course-image-placeholder {
  width: 200px;
  height: 200px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
  border: 4px solid rgba(255, 255, 255, 0.2);
}

.course-image-placeholder i {
  font-size: 60px;
  color: rgba(255, 255, 255, 0.7);
}

.course-info {
  text-align: center;
}

.course-title {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 15px;
  line-height: 1.3;
}

.course-title-large {
  font-size: 32px;
}

.course-meta {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-bottom: 30px;
}

.lesson-count {
  background: rgba(255, 255, 255, 0.2);
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 14px;
  font-weight: 500;
}

.lesson-count-large {
  font-size: 18px;
}

.buy-cta {
  margin-top: 20px;
}

/* Right Content Area */
.course-content {
  flex: 1;
  margin-left: 350px;
  padding: 40px;
}

.course-detail-page-header {
  position: relative;
  min-height: 400px;
  background-size: contain;
  display: flex;
  align-items: center;
}

.course-detail-page-header::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(27, 49, 93, 0.6);
  border-radius: inherit;
}

.course-detail-page-info {
  position: relative;
  z-index: 1;
}

.section-title {
  font-size: 28px;
  font-weight: 700;
  color: #2d3748;
  margin-bottom: 20px;
}

.course-description-section {
  margin-bottom: 30px;
}

.course-description {
  font-size: 16px;
  line-height: 1.7;
  color: #4a5568;
  margin-bottom: 30px;
}

.video-container {
  margin-top: 30px;
}

.video-title {
  font-size: 20px;
  font-weight: 600;
  color: #2d3748;
  margin-bottom: 15px;
}

.video-wrapper {
  position: relative;
  width: 100%;
  height: 0;
  padding-bottom: 56.25%; /* 16:9 aspect ratio */
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.video-wrapper iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

/* Lessons Section */
.lessons-section {
  margin-top: 30px;
}

.lessons-accordion {
  margin-top: 20px;
}

.lesson-item {
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  margin-bottom: 15px;
  overflow: hidden;
  transition: all 0.3s ease;
}

.lesson-item:hover {
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.lesson-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  cursor: pointer;
  background: #f8f9fa;
  transition: background-color 0.3s ease;
}

.lesson-header:hover {
  background: #e9ecef;
}

.lesson-info {
  flex: 1;
}

.lesson-title {
  font-size: 18px;
  font-weight: 600;
  color: #2d3748;
  margin-bottom: 5px;
  font-family: "Plus Jakarta Sans", sans-serif;
}

.lesson-preview {
  font-size: 14px;
  color: #718096;
  margin: 0;
}

.lesson-actions {
  display: flex;
  align-items: center;
  gap: 15px;
}

.lesson-number {
  background: var(--student-dark-color);
  color: white;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 14px;
}

.expand-icon {
  font-size: 20px;
  color: var(--student-dark-color);
  font-weight: bold;
  transition: transform 0.3s ease;
}

.lesson-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}

.lesson-content.active {
  max-height: 300px;
}

.lesson-details {
  padding: 20px;
}

.lesson-description {
  font-size: 14px;
  color: #4a5568;
  line-height: 1.6;
  margin: 0;
}

.lesson-actions-bottom {
  margin-top: 15px;
  text-align: right;
}

.lesson-actions-bottom .course-buy-now-btn {
  font-size: 14px;
  padding: 10px 20px;
  text-decoration: none;
  display: inline-block;
}

.no-lessons {
  text-align: center;
  padding: 60px 20px;
  color: #718096;
}

.no-lessons i {
  font-size: 48px;
  margin-bottom: 15px;
  display: block;
}

/* Responsive Design for Course Detail */
@media (max-width: 1024px) {
  .course-sidebar {
    width: 300px;
  }

  .modal-content {
    max-width: 100vw;
    width: 100vw;
  }

  .close-modal-btn {
    right: 0 !important;
  }
}


.course-detail-container-page {
  flex-direction: column;
}

/* Mobile Fixed Buy Button */
.mobile-buy-button {
  display: none;
  position: sticky;
  bottom: 0;
  left: 0;
  right: 0;
  background: white;
  padding: 15px 20px;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.15);
  z-index: 1000;
  border-top: 1px solid #e2e8f0;
}

.mobile-buy-button a {
  text-decoration: none;
}

.mobile-buy-button .course-buy-now-btn {
  width: 100%;
  font-size: 16px;
  padding: 16px;
  text-align: center;
  text-decoration: none;
  display: block;
}

@media (max-width: 768px) {
  .mobile-buy-button {
    display: block;
  }

  /* Hide desktop buy button on mobile */
  .course-sidebar .buy-cta {
    display: none;
  }
}
.close-modal-btn {
  border: none;
  font-size: 2.2rem;
  cursor: pointer;
  line-height: 1;
  z-index: 10;
  transition: color 0.2s;
  position: absolute;
  top: 5vh;
  right: 10vw;
  background: #000;
  color: #fff;
  width: 50px;
  height: 50px;
}
.close-modal-btn:hover {
  color: #e74c3c;
}

/* Lesson Card Styles */
.lession-card {
  background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
  border-radius: 16px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  border: 1px solid #e2e8f0;
  overflow: hidden;
  transition: all 0.3s ease;
  position: relative;
}

.lession-card-body {
  padding: 15px;
}

.lession-card:hover {
  border-color: var(--student-accent-color);
}

.lession-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--student-dark-color);
}

/* Block Header Styling */
.lession-card .font-semibold {
  background: #f8fafc;
  color: #64748b;
  padding: 1rem;
  font-family: "Plus Jakarta Sans", sans-serif;
  font-size: 14px;
  font-weight: 500;
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Content Type Specific Styles */
.lession-card .prose {
  font-family: "Bitter", serif;
  font-size: 16px;
  line-height: 1.7;
  color: #374151;
  max-width: none;
  padding: 15px;
}

.lession-card img {
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease;
  border: 2px solid #f1f5f9;
}

.lession-card img:hover {
  /* Hover removed */
}

.lession-card audio {
  border-radius: 8px;
  filter: sepia(20%) saturate(70%) hue-rotate(200deg);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.lession-card iframe {
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  border: 2px solid #f1f5f9;
}

/* Dialog Styles */
.lession-card .dialog-turn {
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 1rem;
  margin-bottom: 0.75rem;
  transition: all 0.3s ease;
  position: relative;
  max-width: 80%;
  clear: both;
}

/* Odd turns (1st, 3rd, 5th...) - align left */
.lession-card .dialog-turn:nth-child(odd) {
  float: left;
  margin-right: auto;
  background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
  border-color: #93c5fd;
  border-radius: 18px 18px 18px 4px;
}

/* Even turns (2nd, 4th, 6th...) - align right */
.lession-card .dialog-turn:nth-child(even) {
  float: right;
  margin-left: auto;
  background: linear-gradient(135deg, #dcfce7 0%, #bbf7d0 100%);
  border-color: #86efac;
  border-radius: 18px 18px 4px 18px;
}

.lession-card .dialog-turn:hover {
  /* Hover removed */
}

/* Clear floats after dialog container */
.lession-card [id^="dialog-"] {
  overflow: hidden;
  padding: 15px;
}

.lession-card [id^="dialog-"]::after {
  content: "";
  display: table;
  clear: both;
}

.lession-card-body {
  padding: 15px;
}

.lession-card .dialog-turn .text-sm {
  font-family: "Plus Jakarta Sans", sans-serif;
  font-weight: 600;
  color: var(--student-accent-color);
  text-transform: uppercase;
  font-size: 12px;
  letter-spacing: 0.5px;
}

.lession-card .dialog-turn .text-base {
  font-family: "Bitter", serif;
  color: #374151;
  font-size: 15px;
  line-height: 1.6;
}

/* Navigation Buttons */
.next-btn {
  background: var(--student-accent-color);
  color: white;
  font-family: "Plus Jakarta Sans", sans-serif;
  font-weight: 600;
  font-size: 14px;
  padding: 12px 24px;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  box-shadow: 0 4px 15px rgba(6, 142, 202, 0.3);
  margin: 15px auto;
  display: block;
  width: fit-content;
}

/* Primary Button (Final Test) */
.btn.primary {
  background: linear-gradient(135deg, #10b981, #059669);
  color: white;
  font-family: "Plus Jakarta Sans", sans-serif;
  font-weight: 700;
  font-size: 16px;
  padding: 16px 32px;
  border: none;
  border-radius: 12px;
  text-decoration: none;
  display: block;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 20px rgba(16, 185, 129, 0.3);
  margin: 2rem auto;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  position: relative;
  overflow: hidden;
  width: fit-content;
}

.btn.primary:hover {
  background: linear-gradient(135deg, #059669, #047857);
  text-decoration: none;
  color: white;
}

.btn.primary::before {
  content: "🎯";
  margin-right: 8px;
  font-size: 18px;
}

/* Dialog Play Button */
.dialog-play.btn {
  background: linear-gradient(135deg, #8b5cf6, #7c3aed);
  color: white;
  font-family: "Plus Jakarta Sans", sans-serif;
  font-weight: 600;
  font-size: 14px;
  padding: 12px 20px;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.3s ease;
  box-shadow: 0 2px 8px rgba(139, 92, 246, 0.3);
  margin: 1rem auto 0;
  display: block;
  width: fit-content;
}

.dialog-play.btn:hover {
  background: linear-gradient(135deg, #7c3aed, #6d28d9);
}

.dialog-play:disabled {
  background: #eee;
  color: #000;
  box-shadow: none;
}

/* Test Block Styling */
.lession-card #test-block-wrapper-* {
  background: linear-gradient(135deg, #eff6ff, #dbeafe);
  border: 2px solid #bfdbfe;
  border-radius: 12px;
  padding: 1.5rem;
  position: relative;
  overflow: hidden;
}

.lession-card #test-block-wrapper-*::before {
  content: "📝";
  position: absolute;
  top: 1rem;
  right: 1rem;
  font-size: 24px;
  opacity: 0.3;
}

@media (max-width: 1024px) {
  .close-modal-btn {
    top: 0 ;
  }
  .modal-content {
    height: 100vh;
    padding: 0;
    max-height: 100vh;
  }
  .course-detail-container {
    flex: 1;
      overflow-y: auto;
      display: flex;
      flex-direction: column;
  }

  .course-detail-page-header {
    width: 100% !important;
    position: relative !important;
    flex: 1;
  }

  .course-content {
    width: 100%;
    margin-left: 0;
  }

    .mobile-buy-button {
    display: block !important;
  }


  /* Hide desktop buy button on mobile */
  .course-sidebar .buy-cta {
    display: none;
  }
}

@media (max-width: 768px) {
  .course-detail-container {
    flex: 1;
      overflow-y: auto;
      display: flex;
      flex-direction: column;
  }

  .course-sidebar {
    position: static;
    width: 100%;
    height: auto;
    padding: 0;
    height: fit-content;
    min-height: fit-content;
  }

  .course-content {
    margin-left: 0;
    padding: 20px;
    flex: 1;
  }

  .course-image {
    width: 100%;
    border-radius: 0;
    height: 300px;
    object-position: center;
  }

  .course-image-placeholder {
    width: 150px;
    height: 150px;
  }

  .section-title {
    font-size: 24px;
  }

  .course-description-section,
  .lessons-section {
    padding: 0;
  }
}


/* Responsive Design */
@media (max-width: 768px) {
  .lession-card {
    border-radius: 12px;
    margin-bottom: 1rem;
  }

  .lession-card .font-semibold {
    font-size: 14px;
    padding: 0.75rem;
  }

  .next-btn {
    width: 90%;
    margin: 1rem auto;
  }

  .btn.primary {
    width: 90%;
    margin: 1.5rem auto;
  }

  .lession-card img {
    max-width: 100% !important;
  }

  .lession-card iframe {
    height: 250px;
  }

  /* Dialog responsive styles */
  .lession-card .dialog-turn {
    max-width: 95%;
    float: none !important;
    margin: 0 0 0.75rem 0 !important;
  }

  .lession-card .dialog-turn:nth-child(odd) {
    border-radius: 12px 18px 18px 4px;
  }

  .lession-card .dialog-turn:nth-child(even) {
    border-radius: 18px 12px 4px 18px;
    margin-left: auto !important;
  }
}

/* Animation for lesson card entrance */
@keyframes slideInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.lession-card {
  animation: slideInUp 0.6s ease-out;
}

/* Matching Task Styles */
.matching-task-container {
  background: var(--student-dark-color);
  color: white;
  padding: 1.5rem;
  border-radius: 10px;
  margin-bottom: 1rem;
}

.matching-task-title {
  font-family: "Plus Jakarta Sans", sans-serif;
  font-size: 1.25rem;
  font-weight: 600;
  margin: 0;
}

.matching-task-description {
  font-family: "Bitter", serif;
  color: #f3f4f6;
  margin-bottom: 1.5rem;
  line-height: 1.6;
}

.matching-side-header {
  font-family: "Plus Jakarta Sans", sans-serif;
  font-weight: 700;
  font-size: 1.1rem;
  color: #374151;
  margin-bottom: 1rem;
  padding: 0.75rem 1rem;
  background: #f1f5f9;
  border-radius: 8px;
  text-align: center;
}

[data-left],
[data-right-id] {
  display: block;
  padding: 1rem 1.25rem;
  margin: 0.75rem 0;
  border: 2px solid #e2e8f0;
  border-radius: 8px;
  background: white;
  cursor: pointer;
  transition: all 0.3s ease;
  user-select: none;
  font-family: "Bitter", serif;
  font-size: 0.95rem;
  line-height: 1.5;
}

[data-left]:hover,
[data-right-id]:hover {
  border-color: #cbd5e1;
}

[data-left] {
  border-left: 4px solid #3b82f6;
}

[data-right-id] {
  border-left: 4px solid #10b981;
}

[data-left][data-state="blue"],
[data-right-id][data-state="blue"] {
  background: #3b82f6 !important;
  color: white !important;
  border-color: #1e40af !important;
}

[data-left][data-state="green"],
[data-right-id][data-state="green"] {
  background: #10b981 !important;
  color: white !important;
  border-color: #059669 !important;
  opacity: 0.8 !important;
  pointer-events: none;
}

[data-left][data-state="red"],
[data-right-id][data-state="red"] {
  background: #ef4444 !important;
  color: white !important;
  border-color: #dc2626 !important;
}

.play-btn {
  background: var(--student-accent-color);
  color: white;
  border: none;
  border-radius: 6px;
  padding: 0.5rem 0.75rem;
  font-size: 1rem;
  cursor: pointer;
  margin-right: 0.75rem;
}

.text-write-text {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
}

.text-write-text input {
  height: 30px;
  width: 57px;
  min-width: 20px;
  margin: 0 3px;
  padding: 0 4px;
  flex: none;
}

.play-btn:hover {
  background: var(--student-dark-color);
}

.matching-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

/* Matching Task Container */
.matching-task-container {
  background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
  border-radius: 16px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  border: 1px solid #e2e8f0;
  overflow: hidden;
}

.matching-task-header {
  background: linear-gradient(135deg, #1e40af, #3b82f6);
  color: white;
  padding: 1.5rem;
  margin: -1.5rem -1.5rem 1.5rem -1.5rem;
}

.matching-task-title {
  font-family: "Plus Jakarta Sans", sans-serif;
  font-size: 1.25rem;
  font-weight: 600;
  margin: 0;
}

.matching-task-description {
  font-family: "Bitter", serif;
  color: #374151;
  margin-bottom: 1.5rem;
  line-height: 1.6;
}

/* Side Headers */
.matching-side-header {
  font-family: "Plus Jakarta Sans", sans-serif;
  font-weight: 700;
  font-size: 1.1rem;
  color: #374151;
  margin-bottom: 1rem;
  padding: 0.75rem 1rem;
  background: linear-gradient(135deg, #f1f5f9, #e2e8f0);
  border-radius: 10px;
  text-align: center;
  position: relative;
}

.matching-side-header::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  border-radius: 10px 10px 0 0;
}

.matching-left .matching-side-header::before {
  background: linear-gradient(90deg, #3b82f6, #1d4ed8);
}

.matching-right .matching-side-header::before {
  background: linear-gradient(90deg, #10b981, #059669);
}

/* Matching Items */
[data-left],
[data-right-id] {
  display: block;
  padding: 1rem 1.25rem;
  margin: 0.75rem 0;
  border: 2px solid #e2e8f0;
  border-radius: 12px;
  background: linear-gradient(135deg, #ffffff, #f8fafc);
  cursor: pointer;
  transition: all 0.3s ease;
  user-select: none;
  font-family: "Bitter", serif;
  font-size: 0.95rem;
  line-height: 1.5;
  position: relative;
  overflow: hidden;
  color: #000;
}

/* Hover Effects */
[data-left]:hover,
[data-right-id]:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  border-color: #cbd5e1;
}

/* Left Side Styling */
[data-left] {
  border-left: 4px solid #3b82f6;
}

[data-left]:hover {
  border-left-color: #1d4ed8;
  background: linear-gradient(135deg, #eff6ff, #dbeafe);
}

/* Right Side Styling */
[data-right-id] {
  border-left: 4px solid #10b981;
}

[data-right-id]:hover {
  border-left-color: #059669;
  background: linear-gradient(135deg, #ecfdf5, #d1fae5);
}

/* Selection State (Blue) */
[data-left][data-state="blue"],
[data-right-id][data-state="blue"] {
  background: linear-gradient(135deg, #3b82f6, #1e40af) !important;
  color: white !important;
  border-color: #1e40af !important;
  box-shadow: 0 4px 20px rgba(59, 130, 246, 0.4) !important;
  transform: translateY(-2px) !important;
}

/* Correct State (Green) */
[data-left][data-state="green"],
[data-right-id][data-state="green"] {
  background: linear-gradient(135deg, #10b981, #059669) !important;
  color: white !important;
  border-color: #059669 !important;
  box-shadow: 0 4px 20px rgba(16, 185, 129, 0.4) !important;
  opacity: 0.9 !important;
  pointer-events: none;
  position: relative;
}

[data-left][data-state="green"]::after,
[data-right-id][data-state="green"]::after {
  content: "✓";
  position: absolute;
  top: calc(50% - 0.6125rem);
  right: 0.75rem;
  font-size: 1.25rem;
  font-weight: bold;
  line-height: 1.25rem;
}

/* Incorrect State (Red) */
[data-left][data-state="red"],
[data-right-id][data-state="red"] {
  background: linear-gradient(135deg, #ef4444, #dc2626) !important;
  color: white !important;
  border-color: #dc2626 !important;
  box-shadow: 0 4px 20px rgba(239, 68, 68, 0.4) !important;
  animation: shake 0.5s ease-in-out;
}

/* Audio Play Button */
.play-btn {
  background: linear-gradient(135deg, #8b5cf6, #7c3aed);
  color: white;
  border: none;
  border-radius: 8px;
  padding: 0.5rem 0.75rem;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.3s ease;
  margin-right: 0.75rem;
  box-shadow: 0 2px 8px rgba(139, 92, 246, 0.3);
}

.play-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 12px rgba(139, 92, 246, 0.4);
  background: linear-gradient(135deg, #7c3aed, #6d28d9);
}

/* Shake Animation for Incorrect */
@keyframes shake {
  0%,
  100% {
    transform: translateX(0);
  }
  25% {
    transform: translateX(-5px);
  }
  75% {
    transform: translateX(5px);
  }
}

/* Responsive Design */
@media (max-width: 768px) {
  .matching-grid {
    grid-template-columns: 1fr !important;
    gap: 1.5rem !important;
  }

  .matching-task-container {
    margin: 0.5rem;
    padding: 1rem !important;
  }

  .matching-task-header {
    margin: -1rem -1rem 1rem -1rem;
    padding: 1rem;
  }

  [data-left],
  [data-right-id] {
    padding: 0.875rem 1rem;
    margin: 0.5rem 0;
  }
}
