/* Basic reset and responsive sizing */
html {
  font-size: 16px; /* Base font size for rem units */
  height: 100dvh; /* Fix height to dynamic viewport */
}
/* Styles for the page-intro template */
.page-intro-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  width: 100%;
}

.page-intro-title {
  font-size: clamp(1.6rem, 3.5vw, 2.5rem);
  font-weight: bold;
  margin-bottom: clamp(8px, 1.5vw, 12px);
}

.page-intro-text {
  font-size: clamp(0.95rem, 1.8vw, 1.2rem);
  color: #4a5568; /* Equivalent to text-gray-700 */
  line-height: 1.625; /* Equivalent to leading-relaxed */
  margin-bottom: clamp(8px, 1.5vw, 12px);
  max-width: 90%;
}

.page-intro-image {
  max-width: 100%;
  height: auto;
  object-fit: contain;
  border-radius: 10px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1); /* Equivalent to shadow-md */
  margin-top: clamp(8px, 1.5vw, 12px);
  margin-bottom: clamp(8px, 1.5vw, 12px);
}

body {
  font-family: 'Inter', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  margin: 0;
  padding: env(safe-area-inset-top) 0 env(safe-area-inset-bottom) 0; /* Account for browser chrome */
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  min-height: 100vh; /* Ensures body takes full viewport height */
  height: 100dvh; /* Fix to dynamic viewport height */
  background-color: #f0f2f5;
  color: #333;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-size: clamp(14px, 1.5vw, 18px);
  overflow-y: hidden; /* Prevent scrolling */
  overflow-x: hidden;
  justify-content: center;
  align-items: center;
}

/* Shared container styles for login and register forms */
.register-container,
.login-container {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  min-width: 320px;
  margin: 0 auto;
  position: relative;
  background-color: #fff;
  padding: 48px;
  border-radius: 40px;
  text-align: center;
  width: 100%;
  max-width: 420px;
  height: 100dvh;
  max-height: 846px;
}

.register-container h2,
.login-container h2 {
  margin-top: 45px;
  margin-bottom: 20px;
  font-weight: 500;
  font-size: 22px;
  text-align: center;
  color: var(--heading-color);
}

.login-form {
  margin: auto 0;
}

.input-group {
  margin-bottom: 28px;
  text-align: left;
}

.input-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 400;
  font-size: 18px;
  color: #000;
}

.input-group input {
  width: 100%;
  padding: 18px 11px;
  border: 1px solid #b6b6b6;
  border-radius: 6px;
  font-weight: 500;
  font-size: 18px;
  color: var(--heading-color);
}
.input-group input:focus {
  outline: 2px solid var(--green-light);
  outline-offset: -1px;
}

.register-button.disabled,
.login-button.disabled {
  background-color: var(--light-yellow);
  box-shadow: 0 3px 0 var(--main-yellow);
}

.register-button,
.login-button {
  width: 100%;
  max-width: 260px;
  margin: auto auto 0;
  padding: 10px;
  border-radius: 8px;
  color: white;
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
  background-color: var(--light-yellow);
  box-shadow: 0 3px 0 var(--main-yellow);
  font-family: var(--font-family);
  font-weight: 700;
  font-size: 20px;
  text-align: center;
  color: #fff;
  user-select: none;
}

/* Specific button and link styles */
.register-button {
  background-color: var(--green-light);
  box-shadow: 0 3px 0 var(--main-green);
}

.register-button:not(.disabled):hover {
  background-color: var(--main-green);
  box-shadow: 0 3px 0 var(--main-green);
}

.login-button {
  background-color: var(--green-light);
  box-shadow: 0 3px 0 var(--main-green);
}

.login-button:not(.disabled):hover {
  background-color: var(--main-green);
  box-shadow: 0 3px 0 var(--main-green);
}

.login-link-container,
.register-link-container {
  margin-top: auto;
  text-align: center;
}

.login-link-container p,
.register-link-container p {
  font-weight: 400;
  font-size: 14px;
  text-align: center;
  color: var(--gray-transcriptions);
}

.login-link-container a,
.register-link-container a {
  font-weight: 900;
  text-decoration: underline;
  text-decoration-skip-ink: none;
  color: var(--main-green);
  transition: color 0.3s ease;
}

.login-link-container a:hover,
.register-link-container a:hover {
  color: var(--green-light);
}

#register-feedback,
#login-feedback {
  margin-top: 20px;
  font-weight: bold;
  color: var(--false-color);
}

@media (max-width: 768px) {
  .register-container,
  .login-container {
    padding: 20px;
    padding-bottom: 10px;
  }

  .register-container img,
  .login-container img {
    max-width: 200px;
    margin: 0 auto;
  }

  .register-container h2,
  .login-container h2 {
    margin-top: 20px;
    font-size: 18px;
  }

  .input-group label {
    font-size: 16px;
  }

  .input-group input {
    width: 100%;
    padding: 14px 8px;
  }

  .input-group {
    margin-bottom: 15px;
  }
}

@media (max-width: 375px) {
  .register-container h2,
  .login-container h2 {
    margin-top: 20px;
    font-size: 16px;
  }

  .register-container img,
  .login-container img {
    max-width: 120px;
    margin: 0 auto;
  }

  .input-group input {
    padding: 14px 8px;
    font-size: 16px;
  }

  .input-group label {
    font-size: 14px;
  }

  #register-feedback,
  #login-feedback {
    margin-top: auto;
  }

  .register-button,
  .login-button {
    max-width: unset;
    font-size: 18px;
  }

  .login-link-container p,
  .register-link-container p {
    font-size: 12px;
  }
}

/* Main application container */
#app-container {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: clamp(10px, 2vw, 15px); /* Moderate padding */
  box-sizing: border-box;
  width: 100%;
  max-width: 700px;
  min-width: 320px;
  margin: 0 auto;
  position: relative;
  height: 100dvh; /* Fix to dynamic viewport height */
}

/* Header with flex layout */
/* header {
  background-color: #4a90e2;
  color: white;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: clamp(8px, 1.5vw, 12px) clamp(10px, 3vw, 20px);
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  width: 100%;
  border-top-left-radius: 12px;
  border-top-right-radius: 12px;
  position: relative;
  min-height: clamp(50px, 8vh, 60px);
  box-sizing: border-box;
  flex-shrink: 0;
} */

header h1 {
  margin: 0;
  font-size: clamp(1.2rem, 3vw, 2.5rem);
}

/* Logout button */
#logoutButton {
  position: relative;
  margin: 0;
  background-color: #e74c3c;
  padding: clamp(6px, 1.8vw, 12px) clamp(12px, 3.5vw, 16px); /* Slightly larger */
  font-size: clamp(0.8em, 1.2vw, 1em);
  border-radius: 20px;
  box-shadow: none;
  transition: background-color 0.2s ease;
  max-width: 120px;
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
  height: auto;
}

#logoutButton:hover {
  background-color: #c0392b;
}

/* Left-align the logo */
.header-left {
  justify-content: flex-start;
}

/* Right-align the logout */
.header-right {
  justify-content: flex-end;
}

/* Course select styling */
#courseSelect {
  width: clamp(80px, 20vw, 140px); /* wider box */
  padding: clamp(4px, 1vw, 8px);
  font-size: clamp(0.95rem, 1.5vw, 1.1rem);
  border-radius: 8px;
  border: none;
  background-color: white;
  color: #333;
  cursor: pointer;
  box-shadow: 0 0 4px rgba(0, 0, 0, 0.1);
  appearance: none;
  margin-left: 6px;
}

#courseSelect:focus {
  outline: none;
  box-shadow: 0 0 0 2px #4a90e2;
}

.header-center label {
  font-size: clamp(0.8rem, 1.2vw, 0.9rem);
  color: white;
}
/* Wrapper to position arrow */
.select-wrapper {
  position: relative;
  display: inline-block;
}

/* Style the select */
.select-wrapper select {
  padding: clamp(4px, 1vw, 8px) clamp(30px, 2.5vw, 40px) clamp(4px, 1vw, 8px) clamp(8px, 1.5vw, 12px);
  font-size: clamp(0.9rem, 1.2vw, 1rem);
  border-radius: 8px;
  border: none;
  background-color: white;
  color: #333;
  cursor: pointer;
  box-shadow: 0 0 4px rgba(0, 0, 0, 0.1);
  appearance: none; /* removes default arrow */
  -webkit-appearance: none;
  -moz-appearance: none;
}

/* Custom dropdown arrow */
.select-wrapper::after {
  content: '▼';
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
  font-size: 0.8em;
  color: #555;
}
/* Main content frame */
#centralFrame {
  /* background-color: white;
  border-radius: 12px;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
  padding: clamp(12px, 2.5vw, 18px);
  margin-top: clamp(8px, 1.5vw, 10px);
  margin-bottom: clamp(8px, 1.5vw, 10px); */
  /* padding-bottom: 40px; */
  width: 100%;
  max-width: 420px;
  max-height: 660px;
  margin: 0 auto;
  padding-left: 20px;
  padding-right: 20px;
  box-sizing: border-box;
  background: #fff;
  flex-grow: 1;
  /* max-height: calc(100% - clamp(50px, 8vh, 60px) - clamp(8px, 1.5vw, 10px) - clamp(8px, 1.5vw, 10px)); */
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  /* text-align: center; */
  transition: none;
}

/* #centralFrame:hover {
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
} */

/* #centralFrame h2 {
  color: #333;
  margin-top: 0;
  font-size: clamp(1.5rem, 3.5vw, 2rem);
  margin-bottom: clamp(8px, 1.5vw, 12px);
  flex-shrink: 1;
  min-height: 0;
} */

/* #centralFrame p {
  font-size: clamp(0.95rem, 1.8vw, 1.2rem);
  line-height: 1.6;
  margin-bottom: clamp(8px, 1.5vw, 12px);
  max-width: 90%;
  flex-shrink: 1;
  min-height: 0;
} */

#centralFrame img,
#centralFrame video,
#centralFrame audio {
  max-width: 100%;
  height: auto;
  max-height: clamp(200px, 50vh, 495px); /* Constrain media height */
  object-fit: contain;
}

@media (max-width: 375px) {
  #centralFrame img,
  #centralFrame video,
  #centralFrame audio {
    max-width: 100%;
    height: auto;
    max-height: 200px;
    object-fit: contain;
  }
}

/* Footer */
footer {
  width: 100%;
  display: flex;
  justify-content: center;
  gap: clamp(8px, 1.5vw, 12px);
  padding-top: clamp(8px, 3.5vw, 40px);
  padding-bottom: clamp(8px, 1.5vw, 10px);
  flex-shrink: 0;
}

@media (min-height: 1024px) {
}

/* General buttons */
/* button {
  padding: clamp(10px, 2.5vw, 15px) clamp(20px, 4vw, 30px);
  font-size: clamp(1rem, 1.8vw, 1.2rem);
  background-color: #5cb85c;
  color: white;
  border: none;
  border-radius: 35px;
  cursor: pointer;
  transition: background-color 0.3s ease;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
  font-weight: 600;
  min-width: clamp(100px, 20vw, 140px);
  flex-shrink: 1;
} */

/* button:hover {
  background-color: #4cae4c;
  box-shadow: 0 5px 10px rgba(0, 0, 0, 0.15);
} */

/* Disabled buttons */
/* button:disabled {
  background-color: #cccccc;
  cursor: not-allowed;
  box-shadow: none;
} */

/* Prev/Next slide */
#prevSlide {
  background-color: #f0ad4e;
}
#prevSlide:hover {
  background-color: #ec971f;
}
#nextSlide {
  background-color: #5cb85c;
}
#nextSlide:hover {
  background-color: #4cae4c;
}

/* Status text */
#status {
  text-align: center;
  margin-top: clamp(8px, 1.5vw, 10px);
  font-size: clamp(0.85em, 1.1vw, 0.95em);
  color: #666;
  font-style: italic;
  flex-shrink: 1;
  min-height: 0;
}

/* Slide content container */
.slide-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  box-sizing: border-box;
  flex: 1 1 0%;
  min-height: 0;
  overflow: hidden;
  justify-content: center;
  padding-bottom: 0;
}
.slide-content > * {
  flex-shrink: 1;
  max-width: 100%;
  min-height: 0;
}

/* Audio recording slide */
.slide-content.exercise-audio-record h2 {
  margin-bottom: clamp(15px, 3vw, 20px);
  font-size: clamp(1.5rem, 3.5vw, 2.2rem); /* Adjusted size */
  flex-shrink: 1;
  min-height: 0;
}

/* Drawing controls */
.drawing-controls {
  flex-shrink: 1;
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: nowrap; /* Prevent wrapping to save space */
  gap: clamp(12px, 2vw, 15px); /* Increased gap for better spacing */
  margin-top: clamp(8px, 1.5vw, 10px);
  margin-bottom: clamp(8px, 1.5vw, 10px);
  max-height: 20vh; /* Increased to accommodate larger buttons */
  overflow: hidden;
}

/* Drawing feedback */
#drawing-feedback {
  flex-shrink: 1;
  width: 100%;
  min-height: 0;
}

/* Audio controls */
.audio-controls {
  display: flex;
  justify-content: center;
  flex-wrap: nowrap; /* Prevent wrapping to save space */
  gap: clamp(12px, 2vw, 15px); /* Increased gap for better spacing */
  margin-top: clamp(8px, 1.5vw, 10px);
  margin-bottom: clamp(8px, 1.5vw, 10px);
  max-height: 20vh; /* Increased to accommodate larger buttons */
  overflow: hidden;
  flex-shrink: 1;
  min-height: 0;
}

.audio-button,
.drawing-button {
  /* Combined common styles */
  padding: clamp(10px, 2.5vw, 15px) clamp(20px, 4vw, 30px); /* Restored larger padding */
  font-size: clamp(1rem, 1.8vw, 1.2rem); /* Restored larger font */
  border-radius: 10px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
  transition: background-color 0.2s ease, box-shadow 0.2s ease;
  flex-shrink: 1;
  min-height: 0;
  min-width: clamp(100px, 20vw, 140px); /* Ensure consistent width */
}
.audio-button:hover,
.drawing-button:hover {
  box-shadow: 0 5px 10px rgba(0, 0, 0, 0.15);
}

.start-button {
  background-color: #28a745;
}
.start-button:hover {
  background-color: #218838;
}
.stop-button {
  background-color: #dc3545;
}
.stop-button:hover {
  background-color: #c82333;
}
.play-button {
  background-color: #007bff;
}
.play-button:hover {
  background-color: #0056b3;
}

/* Audio player container */
.audio-player-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: clamp(8px, 1.5vw, 10px);
  width: 100%;
  max-width: clamp(250px, 80vw, 400px);
  flex-shrink: 1;
  min-height: 0;
}

.audio-player-status {
  margin-top: clamp(8px, 1.5vw, 10px);
  font-size: clamp(0.9em, 1.2vw, 1em);
  color: #666;
  padding: clamp(6px, 1.5vw, 8px) clamp(8px, 2vw, 12px);
  border-radius: 8px;
  background-color: #e9ecef;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  box-sizing: border-box;
  flex-shrink: 1;
  min-height: 0;
}

/* Drawing canvas */
.canvas-container {
  width: 100%;
  aspect-ratio: 16/9;
  min-height: 20vh;
  max-height: clamp(250px, 45vh, 350px); /* Adjusted to save space */
  margin: clamp(8px, 1.5vw, 10px) 0;
  display: flex;
  justify-content: center;
  align-items: center;
  border: 1px solid #ddd;
  border-radius: 8px;
  overflow: hidden;
  background-color: #fcfcfc;
  flex-shrink: 1;
}

#drawingCanvas {
  display: block;
  width: 100%;
  height: 100%;
  box-sizing: border-box;
  cursor: crosshair;
  touch-action: none;
}

.clear-button {
  background-color: #f0ad4e;
}
.clear-button:hover {
  background-color: #ec971f;
}
.submit-button {
  background-color: #007bff;
}
.submit-button:hover {
  background-color: #0056b3;
}

/* Media Queries */

/* Smaller phones */
@media (max-width: 480px) {
  #centralFrame,
  .canvas-container {
    min-height: 0;
    max-height: calc(100% - clamp(50px, 8vh, 60px) - clamp(8px, 1.5vw, 10px) - clamp(8px, 1.5vw, 10px));
  }

  #app-container {
    padding: clamp(8px, 2vw, 10px);
    height: 100dvh;
  }

  button {
    /* padding: clamp(8px, 2vw, 12px) clamp(15px, 3.5vw, 25px); Slightly smaller for small screens */
    /* font-size: clamp(0.9rem, 1.6vw, 1.1rem); */
    /* min-width: clamp(90px, 18vw, 120px); */
  }

  .drawing-controls,
  .audio-controls {
    flex-direction: row; /* Restore horizontal layout for better spacing */
    flex-wrap: nowrap;
    gap: clamp(10px, 1.8vw, 12px); /* Slightly smaller gap */
    margin-top: clamp(6px, 1.2vw, 8px);
    margin-bottom: clamp(6px, 1.2vw, 8px);
    max-height: 18vh; /* Slightly reduced to fit */
  }

  .drawing-controls button,
  .audio-controls button,
  .choices button {
    /* Combined common styles */
    padding: clamp(8px, 2vw, 12px) clamp(15px, 3.5vw, 25px); /* Slightly smaller */
    font-size: clamp(0.9rem, 1.6vw, 1.1rem);
    min-width: clamp(80px, 15vw, 100px); /* Adjusted for small screens */
  }

  #quiz-feedback,
  #drawing-feedback,
  #record-feedback {
    max-width: 95%;
    padding: clamp(6px, 1.5vw, 8px) clamp(8px, 2vw, 12px);
    font-size: clamp(0.9em, 1.2vw, 1em);
  }

  #logoutButton {
    font-size: 0.75em;
    padding: 5px 10px;
  }

  .canvas-container {
    max-height: clamp(200px, 40vh, 300px); /* Further reduced */
  }
}
/* roboto-regular - cyrillic_latin_symbols */
@font-face {
  font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */
  font-family: 'Roboto';
  font-style: normal;
  font-weight: 400;
  src: url('../fonts/roboto-v48-cyrillic_latin_symbols-regular.woff2') format('woff2'); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */
}

/* roboto-500 - cyrillic_latin */
@font-face {
  font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */
  font-family: 'Roboto';
  font-style: normal;
  font-weight: 500;
  src: url('../fonts/roboto-v49-cyrillic_latin-500.woff2') format('woff2'); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */
}

/* roboto-700 - cyrillic_latin_symbols */
@font-face {
  font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */
  font-family: 'Roboto';
  font-style: normal;
  font-weight: 700;
  src: url('../fonts/roboto-v48-cyrillic_latin_symbols-700.woff2') format('woff2'); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */
}

/* noto-sans-arabic-regular - arabic_latin */
@font-face {
  font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */
  font-family: 'Noto Sans Arabic';
  font-style: normal;
  font-weight: 400;
  src: url('../fonts/noto-sans-arabic-v29-arabic_latin-regular.woff2') format('woff2'); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */
}
/* noto-sans-arabic-500 - arabic_latin */
@font-face {
  font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */
  font-family: 'Noto Sans Arabic';
  font-style: normal;
  font-weight: 500;
  src: url('../fonts/noto-sans-arabic-v29-arabic_latin-500.woff2') format('woff2'); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */
}

:root {
  --radius: 8px;
  --main-yellow: #eda139;
  --main-green: #00937b;
  --light-yellow: #ffb044;
  --light-grey: #f9f6ef;
  --green-light: #00b98e;
  --gray-transcriptions: #8a8a8a;
  --heading-color: #1b1b1b;
  --false-color: #ff5c3f;
  --second-family: 'Noto Sans Arabic';
  --black: #000;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  height: 100%;
}

body {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  min-height: 100%;
  display: flex;
  flex-direction: column;
  margin: 0;
  font-family: 'Roboto', sans-serif;
  background-color: #fff;
}

@media (min-width: 768px) {
  body {
    padding-top: 50px;
    padding-bottom: 50px;
    background-color: #214d4d;
  }
}

img {
  max-width: 100%;
  height: auto;
}

/* iOS Safari специфичные стили */
@supports (-webkit-touch-callout: none) {
  body {
    height: -webkit-fill-available;
  }
}

/* Для устройств с "бровью" (notch) */
@supports (padding: max(0px)) {
  .header,
  .footer {
    padding-left: max(1rem, env(safe-area-inset-left));
    padding-right: max(1rem, env(safe-area-inset-right));
  }

  .header {
    padding-top: max(1rem, env(safe-area-inset-top));
  }

  .footer {
    padding-bottom: max(1rem, env(safe-area-inset-bottom));
  }
}

/* Портретная ориентация */
@media (orientation: portrait) {
  .app-container {
    /* Дополнительные стили для портретного режима */
  }
}

/* Ландшафтная ориентация */
@media (orientation: landscape) {
  .header,
  .footer {
    min-height: 50px;
  }
}

/* Для очень маленьких экранов */
@media (max-height: 500px) {
  .header,
  .footer {
    padding: 0.5rem;
    min-height: 40px;
  }

  .main-content {
    padding: 0.5rem;
  }
}

#navSame {
  display: none;
}

.scroll-lock-ios {
  position: fixed;
  width: 100vw;
  overflow: hidden;
}

.scroll-lock {
  overflow: hidden;
}

.content {
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.content__slides {
  display: flex;
  flex-direction: column;
  /* flex-grow: 1; */
  flex: 1;
  width: 100%;
  min-height: 0;
  min-height: -webkit-fill-available;
  margin: 0 auto;
}

.header {
  width: 100%;
  max-width: 420px;
  margin: 0 auto;
  border-top-left-radius: 40px;
  border-top-right-radius: 40px;
  background-color: #fff;
}

.footer {
  width: 100%;
  max-width: 420px;
  margin: 0 auto;
  border-bottom-left-radius: 40px;
  border-bottom-right-radius: 40px;
  background-color: #fff;
}

@media (max-width: 375px) {
  .footer {
    padding-bottom: 0;
  }
}

@media (min-width: 768px) {
  .header {
    padding-top: 44px;
    padding-left: 32px;
    padding-right: 32px;
  }

  .footer {
    padding-left: 32px;
    padding-right: 32px;
  }
}

.header__nav {
  display: flex;
  justify-content: space-between;
  /* padding-top: 20px;
  padding-left: 20px;
  padding-right: 22px;
  padding-bottom: 14px; */
  max-width: 394px;
  margin: 0 auto;
}

.header__score {
  display: flex;
  align-items: center;
  gap: 5px;
}

.header__score span {
  display: flex;
  align-items: center;
  height: 28px;
  padding-left: 5px;
  padding-right: 5px;
  /* background-color: #faf4e4;
  border-radius: 4px;
  font-size: 15px;
  text-align: center;
  color: #343434; */
  font-weight: 900;
  font-size: 17px;
  text-align: center;
  color: var(--main-green);
}

.nav__toggle {
  display: block;
  padding: 0;
  width: 38px;
  height: 28px;
  background-color: transparent;
  background-image: url('../images/menu.svg');
  background-repeat: no-repeat;
  background-size: contain;
  border: none;
  outline: none;
  position: relative;
  z-index: 20;
}

.nav {
  overflow: hidden;
}

.nav__toggle.active {
  background-image: url('../images/cross.svg');
}

.nav__menu {
  display: none;
  position: fixed;
  top: 0;
  left: -1000vw;
  display: flex;
  flex-direction: column;
  transition: left 0.3s ease-in-out;
}

.nav__menu.active {
  left: 0;
  width: 100%;
  height: 100vh;
  padding-top: 100px;
  padding-bottom: 100px;
  background: linear-gradient(180deg, #00b994 0%, #006859 61.54%);
  z-index: 10;
}

.nav__menu-list {
  margin: 0;
  padding: 0;
  padding-left: 70px;
  list-style: none;
  display: flex;
  flex-direction: column;
  max-width: max-content;
  margin: auto;
  gap: 20px;
}

.nav__menu-list a {
  display: flex;
  gap: 35px;
  font-weight: 400;
  font-size: 26px;
  color: #fff;
  text-decoration: none;
}

.logo {
  display: block;
  margin: auto auto 0;
}

.score-counter {
  display: none;
}

.slide {
  display: flex;
  flex-direction: column;
  flex-grow: 1;
  width: 100%;
  max-width: 394px;
  max-height: calc(100dvh - 160px);
  margin: 0 auto;
  padding-top: 50px;
  font-weight: 400;
  font-size: 20px;
  color: var(--black);
  font-size: clamp(14px, 3.5vw, 20px);
}

@media (min-width: 768px) {
  .slide {
    padding-top: 60px;
    max-height: 100%;
  }
}

@media (max-width: 375px) {
  .slide {
    padding-top: 25px;
  }
}

@media (max-height: 760px) {
  .slide {
    padding-top: 20px;
  }
}

.slide--text-center {
  text-align: center;
}

.slide__title {
  margin: auto 0;
  font-weight: 700;
  font-size: 54px;
  text-align: center;
  color: var(--main-green);
}

@media (max-width: 375px) {
  .slide__title {
    margin: auto 0;
    font-weight: 700;
    font-size: 40px;
    text-align: center;
    color: var(--main-green);
  }
}

.slide__title--small {
  font-weight: 500;
  font-size: 30px;
}

.slide__audio-btn {
  width: 82px !important;
  height: 82px !important;
  box-shadow: 0 3px 12px 0 rgba(197, 176, 153, 0.4) !important;
}

@media (max-width: 375px) {
  .slide__title--small {
    font-size: 24px;
  }

  .slide__audio-btn {
    width: 64px !important;
    height: 64px !important;
  }
}

.slide__audio-btn--center {
  margin: 0 auto;
}
.slide__audio-btn--center svg {
  width: 42px;
  height: 34px;
}

.slide__audio-btn--small {
  width: 64px !important;
  height: 64px !important;
  box-shadow: 0 3px 12px 0 rgba(197, 176, 153, 0.4) !important;
}

@media (max-width: 375px) {
  .slide__audio-btn--small {
    width: 52px !important;
    height: 52px !important;
  }
}

.slide__audio-btn--small svg {
  width: 23px;
  height: 24px;
}

.slide h2 {
  margin: 0;
  margin-bottom: 30px;
  font-size: clamp(16px, 6.5vw, 24px);
  text-align: center;
  color: var(--heading-color);
}

@media (max-width: 375px) {
  .slide h2 {
    margin-bottom: 20px;
  }
}

@media (min-width: 768px) {
  .slide h2 {
    margin-bottom: 20px;
  }
}

@media (max-height: 760px) {
  .slide h2 {
    margin-bottom: 20px;
  }
}

.slide__text-content {
  /* scrollbar-color: transparent transparent; */
  scrollbar-width: thin;
  /* max-height: 495px; */
  flex-grow: 1;
  overflow-y: auto;
  padding-left: 20px;
  padding-right: 20px;
}

@media (max-width: 375px) {
  .slide__text-content {
    padding-left: 10px;
    padding-right: 10px;
  }
}

.slide__text-content p,
.slide__text-content ol,
.slide__text-content ul {
  margin: 0;
  font-weight: 400;
  font-size: clamp(12px, 4.5vw, 20px);
  line-height: 1.15;
  /* font-size: 20px; */
  color: var(--black);
}

.slide p:not(:last-of-type),
.slide ol:not(:last-of-type),
.slide ul:not(:last-of-type) {
  margin-bottom: 20px;
}

.slide p + ol,
.slide p + ul {
  margin-top: 20px;
}

.slide ol li {
  margin-bottom: 20px;
}

p.slide__symbol {
  /* min-height: 170px; */
  margin: 0;
  font-weight: 500;
  font-size: 70px;
  line-height: 1.5;
  text-align: center;
  color: var(--black);
}

p.slide__symbol--large {
  margin-bottom: auto !important;
  /* font-size: 160px; */
  font-size: clamp(110px, 40.2vw, 160px);
  line-height: 1;
}

@media (max-height: 760px) {
  p.slide__symbol {
    min-height: unset;
    font-size: 56px;
    line-height: 1.4;
  }
}

@media (max-width: 374px) {
  p.slide__symbol {
    min-height: unset;
    font-size: 36px;
    line-height: 1.2;
  }
}

.slide__pic-with-icon {
  /* position: relative; */
}

.slide__pic-with-icon img {
  display: block;
  margin: 0 auto;
}

@media (max-width: 375px) {
  #centralFrame .slide__pic-with-icon img,
  #centralFrame .slide__pic-with-icon video,
  #centralFrame .slide__pic-with-icon audio {
    max-height: 150px;
  }
}

@media (max-height: 560px) {
  #centralFrame .slide__pic-with-icon img,
  #centralFrame .slide__pic-with-icon video,
  #centralFrame .slide__pic-with-icon audio {
    max-height: 110px;
  }

  #centralFrame img.slide__image {
    max-height: 120px;
  }
}

.slide__pic-with-icon button {
  width: 48px;
  height: 48px;
  margin: 10px auto 0;
  /* padding: 0;
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateY(50%) translateX(-50%);
  background-color: #fff;
  z-index: 2; */
}

.slide__pic-with-icon button svg {
  width: 24px;
  height: 24px;
}

/* .slide__pic-with-icon::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateY(50%) translateX(-50%);
  display: block;
  width: 110px;
  height: 110px;
  border-radius: 100%;
  background-color: #fff;
  z-index: 1;
} */

p.slide__symbol-transcription {
  margin-bottom: 25px;
  font-weight: 500;
  font-size: 25px;
  text-align: center;
  color: var(--gray-transcriptions);
}

p.slide__symbol-transcription--word {
  font-size: 20px;
}

p.slide__symbol + p.slide__symbol-transcription {
  margin-top: 0;
}

@media (max-width: 375px) {
  p.slide__symbol-transcription {
    margin-bottom: 10px;
    font-size: 14px;
  }
}

.slide__symbol-transcription + .slide__audio-btn {
  margin-bottom: auto;
}

.slide__image {
  display: block;
  margin-bottom: 35px;
}

@media (max-width: 375px) {
  .slide__image {
    margin-bottom: 15px;
  }
}

.slide__image + .slide__text-content {
  height: 220px;
  max-height: unset;
}

.slide__list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 17px;
}

.slide__list li {
  min-height: 108px;
  padding-top: 20px;
  padding-bottom: 20px;
  padding-left: 19px;
  padding-right: 22px;
  font-size: 20px;
}

@media (max-width: 375px) {
  .slide__list li {
    padding: 10px;
    font-size: 12px;
  }

  .slide__list {
    overflow-y: scroll;
    gap: 10px;
  }
}

.slide__list li:nth-child(odd) {
  background-color: var(--light-grey);
  border-radius: var(--radius);
}

.slide__list--audio li {
  /* display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap; */
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  align-items: center;
  min-height: 80px;
  padding-top: 8px;
  padding-bottom: 8px;
  background-color: var(--light-grey);
  border-radius: var(--radius);
}

.slide__list--audio .play-btn {
  width: 48px;
  height: 48px;
}

.slide__list--audio .slide__word {
  font-weight: 500;
}

.slide__list--long li {
  display: grid;
  grid-template-columns: 1fr 64px;
  font-weight: 500;
}

.slide__list--long .slide__word {
  font-size: 17px;

  text-align: center;
  grid-column: 1 / 2;
}

.slide__list--long .slide__symbol {
  font-size: 17px;
  text-align: center;
  grid-column: 1 / 2;
  grid-row: 1 / 2;
  font-size: 30px;
  line-height: 20px;
}

@media (max-width: 375px) {
  .slide__list--long .slide__symbol {
    font-size: 20px;
  }

  .slide__list--long .slide__word {
    font-size: 14px;
  }
}

.slide__list--long .slide__media {
  grid-column: 2 / 3;
  grid-row: 1 / 3;
}

.slide__list--audio li .play-btn {
  margin-left: auto;
}

.slide__symbol {
  font-weight: 400;
  font-size: 44px;
  line-height: 1.2;
  text-align: center;
  color: var(--black);
  font-family: var(--second-family);
  direction: rtl;
}

.slide__symbol.slide__phrase {
  margin-bottom: auto;
}

@media (max-height: 760px) {
  .slide__list--audio li {
    min-height: 60px;
  }

  .slide__list li {
    min-height: unset;
    font-size: 14px;
  }

  .slide__symbol {
    font-size: 46px;
  }
}

@media (min-width: 768px) {
  .slide__list {
    gap: 20px;
  }
}

.slide__compare-symbol {
  font-weight: 400;
  font-size: 94px;
  text-align: center;
  color: var(--main-green);
  font-family: var(--second-family);
  direction: rtl;
}

.slide__answers-list {
  margin: auto;
  padding: 0;
  /* padding-top: 133px !important; */
  list-style: none;
  display: grid;
  grid-template-columns: minmax(120px, 160px) minmax(120px, 160px);
  gap: 14px;
}

.slide__answers-list--full {
  display: flex;
  flex-direction: column;
  width: 100%;
  gap: 30px;
  /* padding-top: 28px !important; */
}

@media (max-height: 760px) {
  .slide__answers-list--full {
    gap: 20px;
  }
}

@media (max-height: 560px) {
  .slide__answers-list--full {
    gap: 10px;
  }
}

.slide__answers-list--full-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  gap: 30px;
}

@media (max-height: 760px) {
  .slide__answers-list--full {
    gap: 20px;
  }

  .slide__answers-list--full-center {
    gap: 20px;
  }

  .slide__answers-list--full-center li {
    min-width: 120px;
  }

  .slide__answer-btn--ar {
    line-height: 1;
  }
}

.slide__answers-list--mt-auto {
  margin-top: auto !important;
  padding-bottom: 90px;
}

@media (max-width: 375px) {
  .slide__answers-list--mt-auto {
    padding-bottom: 0;
  }
}

.slide__answers-list--flex {
  display: flex;
  justify-content: center;
  gap: 12px;
}

/* .play-btn + .slide__answers-list {
  padding-top: 54px !important;
} */

ul.slide__answers-list--select-option {
  margin-top: auto;
  /* padding-bottom: 97px; */
}

.slide__answer-btn {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  max-width: 160px;
  padding: 10% 10%;
  /* min-height: 80px; */
  box-shadow: 0 3px 12px 0 rgba(197, 176, 153, 0.4);
  background: #fff;
  border: none;
  border-radius: 12px;
  font-weight: 500;
  font-size: clamp(16px, 5vw, 22px);
  text-align: center;
  color: var(--black);
  font-family: inherit;
  transition: all 0.3s ease;
}

.slide__answer-btn--symbol {
  width: 160px;
  font-size: 48px;
  line-height: 1.6;
  font-weight: 400;
  font-family: var(--second-family);
  direction: rtl;
}

.slide__answer-btn--pic {
  position: relative;
  width: 110px;
  height: 140px;
  padding: 0;
  font-weight: 400;
  font-size: 94px;
  line-height: 1.6;
  font-family: var(--second-family);
  direction: rtl;
  color: var(--main-green);
}

@media (max-width: 375px) {
  .slide__answers-list--flex li {
    width: 33.3%;
  }

  .slide__answers-list--flex li .slide__answer-btn {
    width: 100%;
  }

  .slide__answers-list--flex {
    width: 100%;
  }
}

.slide__answer-btn--long {
  max-width: unset;
  padding: 28px 10%;
  font-size: 36px;
  font-weight: 400;
}

@media (max-height: 760px) {
  .slide__answer-btn--long {
    padding: 16px 5%;
  }
}

.slide__answer-btn--pic::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: block;
  width: 58px;
  height: 58px;
  background-repeat: no-repeat;
  border-radius: 100%;
  border: 2px dashed rgba(197, 176, 153, 0.87);
}

.slide__answer-btn.wrong {
  outline: 1px solid var(--false-color);
  box-shadow: none;
}

.slide__answer-btn.correct {
  color: var(--main-green);
  outline: 1px solid var(--green-light);
  box-shadow: none;
}

.slide__answer-btn--ar {
  font-family: var(--second-family);
  font-weight: 400;
  font-size: 48px;
  line-height: 1;
}

@media (max-width: 375px) {
  .slide__answer-btn--symbol {
    width: 100%;
    padding: 5px;
    font-size: 24px;
  }

  .slide__answer-btn--ar {
    font-size: 40px;
  }

  .slide__answer-btn--long {
    font-size: 32px;
    padding: 10px 5%;
  }
}

@media (max-height: 560px) {
  .slide__answer-btn--long {
    font-size: 24px;
    padding: 5px 5%;
  }
}

.slide__var {
  margin: 0 auto;
  font-weight: 500;
  font-size: 54px;
  text-align: center;
  color: var(--main-green);
}

@media (max-height: 560px) {
  .slide__var--transcription {
    font-size: 40px;
  }
}

.slide__cards {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-bottom: auto;
}

.slide__card {
  display: flex;
  flex-direction: column;
  align-items: center;
  background-color: var(--light-grey);
  border-radius: 8px;
  font-weight: 500;
  font-size: 20px;
  text-align: center;
  color: #000;
  width: 110px;
  min-height: 140px;
}

.slide__card span {
  font-family: var(--second-family);
  font-weight: 400;
  font-size: 60px;
  line-height: 1.2;
  text-align: center;
}

.slide__var--symbol {
  display: flex;
  align-items: baseline;
  justify-content: center;
  /* min-height: 170px; */
  font-size: 70px;
  font-family: var(--second-family);
  direction: rtl;
}

@media (max-width: 375px) {
  .slide__var--symbol {
    min-height: unset;
    font-size: 48px;
  }
}

.slide__var--black {
  color: var(--black);
}

.slide__var--symbol-small {
  align-items: center;
  min-height: unset;
  font-size: clamp(28px, 5vw, 36px);
  line-height: 3;
}

.slide__var--symbol-large {
  font-size: 100px;
  text-align: center;
}

@media (max-height: 760px) {
  .slide__var--symbol-large {
    font-size: 80px;
  }
}

@media (max-height: 560px) {
  .slide__var--symbol-large {
    font-size: 44px;
  }
}

.slide__compare {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin: auto;
}

.slide__compare-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 110px;
}

.slide__compare-item .slide__symbol-transcription {
  margin-bottom: 10px;
  padding: 0;
}

.slide__compare-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 110px;
  height: 140px;
  margin-bottom: 38px;
  background-color: var(--light-grey);
  border-radius: 8px;
  overflow: hidden;
  font-weight: 500;
  font-size: 20px;
  text-align: center;
  color: var(--dark-green);
}

@media (max-width: 375px) {
  .slide__compare {
    width: 100%;
  }

  .slide__compare-item {
    width: 33.3%;
  }

  .slide__compare-card {
    width: 100%;
    height: 115px;
  }
}

.slide__compare-card--symbol::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: block;
  width: 58px;
  height: 58px;
  background-repeat: no-repeat;
  border-radius: 100%;
  border: 2px dashed rgba(197, 176, 153, 0.87);
}

.slide__compare-card-symbol {
  font-family: var(--second-family);
  font-weight: 400;
  font-size: 64px;
  line-height: 1;
  text-align: center;
  color: #000;
}

.slide__symbol-letter {
  margin-bottom: 26px;
  font-family: var(--second-family);
  font-weight: 400;
  font-size: 48px;
  line-height: 60px;
  text-align: center;
  color: var(--main-green);
}

@media (max-width: 375px) {
  .slide__compare-card-symbol {
    font-size: 48px;
  }

  .slide__cards {
    width: 100%;
  }

  .slide__card {
    width: 30%;
    min-height: 100px;
    font-size: 16px;
  }

  .slide__card span {
    margin-bottom: 10px;
    font-size: 36px;
  }
}

.slide__letters-grid {
  display: grid;
  grid-template-columns: repeat(4, 80px);
  border-radius: 12px;
  border: 1px solid var(--main-yellow);
  overflow: hidden;
  max-width: max-content;
  margin: 0 auto;
}

.slide__letters-grid-btn {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 81px;
  height: 70px;
  margin-top: -1px;
  font-family: var(--second-family);
  font-weight: 400;
  font-size: 44px;
  line-height: 1.2;
  text-align: center;
  color: #000;
  border: 1px solid var(--main-yellow);
  background-color: transparent;
  margin-left: -1px;
}

@media (max-width: 375px) {
  .slide__letters-grid {
    display: grid;
    grid-template-columns: repeat(4, 65px);
  }

  .slide__letters-grid-btn {
    width: 66px;
    height: 50px;
    font-size: 32px;
  }
}

@media (max-height: 760px) {
  .slide__letters-grid {
    flex-grow: 1;
  }

  .slide__letters-grid-btn {
    height: calc(100% + 1px);
    font-size: 28px;
  }
}

@media (max-width: 370px) {
  .slide__letters-grid {
    display: grid;
    grid-template-columns: repeat(4, 60px);
    flex-grow: 1;
  }

  .slide__letters-grid-btn {
    width: 61px;
    height: calc(100% + 1px);
    font-size: 24px;
  }

  .slide__symbol-letter {
    margin-bottom: 16px;
    font-size: 44px;
    line-height: 1.2;
  }
}

.slide__letters-grid-btn:nth-child(4n + 4) {
  border-right: none;
}

.slide__letters-grid-btn:nth-last-child(-n + 5) {
  border-bottom: none;
}

.slide__letters-grid-btn.correct {
  color: #fff;
  transition: background-color 0.5s ease;
  background-color: var(--main-green);
}

.slide__letters-grid-btn.wrong {
  color: var(--false-color);
  transition: color 0.5s ease;
}

.play-btn {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 64px;
  height: 64px;
  padding: 0;
  background-color: #fff;
  box-shadow: 0 3px 12px 0 rgba(197, 176, 153, 0.4);
  border-radius: 100%;
  border: none;
}

.play-btn:disabled svg path {
  fill: #e7e7e7 !important;
}

.slide-controls {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  max-width: 394px;
  margin: 0 auto;
  /* padding-left: 20px;
  padding-right: 20px; */
  padding-bottom: 20px;
}

@media (max-width: 375px) {
  .slide-controls {
    padding-bottom: 16px;
  }
}

.slide-controls__btn {
  display: block;
  padding: 0;
  background-color: transparent;
  border: none;
  outline: none;
  background-repeat: no-repeat;
  font-family: var(--font-family);
  font-weight: 700;
  font-size: 20px;
  color: #fff;
  background-color: var(--light-yellow);
  position: relative;
  transition: background-color 0.5s ease;
  cursor: pointer;
  box-shadow: 0 3px 0 var(--main-yellow);
  user-select: none;
}

.slide-controls__btn--prev {
  border-radius: 8px;
  width: 80px;
  height: 45px;
  background-image: url('../images/prev.svg');
  background-position: center;
  background-size: 22px;
  box-shadow: 0 3px 0 var(--main-yellow);
}

.slide-controls__btn--next {
  border-radius: 8px;
  display: inline-flex;
  justify-content: flex-start;
  align-items: center;
  /* width: 260px; */
  flex-grow: 1;
  height: 45px;
  padding-left: 22%;
  background-color: var(--green-light);
  background-image: url('../images/next.svg');
  background-position-y: center;
  background-position-x: 90%;
  background-size: 22px;
  box-shadow: 0 3px 0 var(--main-green);
}

.slide-controls__btn--skip {
  border-radius: 8px;
  display: inline-flex;
  justify-content: flex-start;
  align-items: center;
  /* width: 260px; */
  flex-grow: 1;
  height: 45px;
  padding-left: 78px;
  background-image: url('../images/next.svg');
  background-position-y: center;
  background-position-x: 90%;
  background-size: 22px;
  box-shadow: 0 3px 0 var(--main-yellow);
}

@media (hover: hover) {
  .slide-controls__btn--next:hover {
    background-color: var(--main-green);
  }

  .slide-controls__btn--prev:hover,
  .slide-controls__btn--skip:hover {
    background-color: var(--main-yellow);
  }
}

@media (max-width: 375px) {
  .slide-controls__btn {
    font-size: 16px;
    height: 36px;
  }

  .slide-controls__btn--next {
    height: 36px;
    padding-left: 20%;
  }

  .slide-controls__btn--skip {
    height: 36px;
    padding-left: 20%;
  }
}

/* .slide-controls__btn--next:hover {
  background-color: var(--main-green);
} */

/* make your author stylesheet respect the hidden attribute */
[hidden] {
  display: none !important;
}

/* or scope it just to these buttons */
.slide-controls__btn--next[hidden],
.slide-controls__btn--skip[hidden],
.slide-controls__btn--prev[hidden] {
  display: none !important;
}

.slide--dragdrop {
  padding-left: 20px;
  padding-right: 20px;
}

.dragdrop {
  display: flex;
  justify-content: space-between;
  gap: 34px;
  width: 100%;
  /* padding-top: 80px; */
}

.dragdrop__col {
  flex: 1;
  display: grid;
  grid-template-rows: repeat(4, 80px);
  gap: 34px;
}

@media (max-width: 375px) {
  .dragdrop {
    gap: 20px;
  }
  .dragdrop__col {
    gap: 20px;

    grid-template-rows: repeat(4, 60px);
  }
}

@media (max-height: 760px) {
  .dragdrop {
    padding-top: 0;
    margin: auto;
  }

  .dragdrop__col {
    gap: 10px;
  }

  .dragdrop__item {
    font-size: 40px;
  }
}

@media (max-height: 560px) {
  .dragdrop__col {
    grid-template-rows: repeat(4, 40px);
  }
}

.dragdrop__placeholder {
  height: 0 !important;
}

.dragdrop__col .dragdrop__item:nth-child(1) {
  grid-row: 1 / 2;
}
.dragdrop__col .dragdrop__item:nth-child(2) {
  grid-row: 2 / 3;
}
.dragdrop__col .dragdrop__item:nth-child(3) {
  grid-row: 3 / 4;
}
.dragdrop__col .dragdrop__item:nth-child(4) {
  grid-row: 4 / 5;
}

.dragdrop__item {
  /* min-width: 160px; */
  width: 100%;
  max-width: 160px;
  padding: 5px 10px;
  box-shadow: 0 3px 12px 0 rgba(197, 176, 153, 0.4);
  background: #fff;
  border-radius: 12px;
  min-height: 80px;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: grab;
  transition: background 0.3s;
  font-family: var(--second-family);
  font-weight: 400;
  font-size: 48px;
  line-height: 1.25;
  color: var(--black);
  border: 1px solid transparent;
}

/* .dragdrop__item.dragging {
  opacity: 0;
} */

.dragdrop__item.active {
  border: 1px solid var(--main-yellow);
  box-shadow: 0 3px 14px 0 rgba(197, 176, 153, 0.81);
}

.dragdrop__item.correct {
  background: #4caf50;
  color: #fff;
  cursor: default;
}

.dragdrop__item.wrong {
  border-color: var(--false-color);
}

.dragdrop__slot {
  padding: 5px 10px;
  border: 1px dashed var(--light-yellow);
  border-radius: 12px;
  min-height: 80px;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  user-select: none;
  transition: border-color 0.5s ease;
}

@media (max-width: 375px) {
  .dragdrop__item {
    font-size: 24px;
    line-height: 1;
    padding: 5px;
    min-height: 60px;
  }

  .dragdrop__slot {
    padding: 5px;
    min-height: 60px;
  }
}

@media (max-height: 560px) {
  .dragdrop__item,
  .dragdrop__slot {
    min-height: 40px;
  }
}

.dragdrop__slot .dragdrop__item {
  min-width: unset;
  min-height: unset;
  font-size: 29px;
  line-height: 1;
  margin: 0 auto;
  color: var(--main-green);
  order: -1;
  background-color: #fff;
  box-shadow: none;
  padding: 0;
}

.dragdrop__slot.wrong {
  border: 1px solid var(--false-color);
  font-size: 0;
}

.dragdrop__slot.wrong .dragdrop__item {
  font-size: 48px;
}

.dragdrop__slot.correct {
  border: 1px solid var(--green-light);
  font-weight: 500;
  font-size: 16px;
  color: var(--main-green);
}

.dragdrop__slot.highlight {
  border-color: var(--gray-transcriptions);
}

@keyframes bounceBack {
  0% {
    transform: translateX(0);
  }
  30% {
    transform: translateX(-15px);
  }
  60% {
    transform: translateX(10px);
  }
  80% {
    transform: translateX(-5px);
  }
  100% {
    transform: translateX(0);
  }
}

.bounce-back {
  animation: bounceBack 0.4s ease;
}

.drag-letters-slide .play-btn {
  margin: 0 auto;
}

.drag-letters-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex-grow: 1;
}

.drag-letters-container .dropzone {
  width: 66px;
  height: 66px;
  position: relative;
  border-radius: 12px;
}

.drag-letters-container .draggable {
  width: 64px;
  height: 64px;
  border-radius: 12px;
  position: relative;
}

.drag-letters-container .draggable.wrong {
  color: var(--false-color);
  box-shadow: none;
}

.drag-letters-slide-3-col .dropzone {
  width: 110px;
  height: 100px;
}

.drag-letters-slide-3-col .draggable {
  width: 109px;
  height: 98px;
}

@media (max-width: 375px) {
  .drag-letters-slide-3-col .dropzone {
    width: 90px;
    height: 80px;
  }

  .drag-letters-slide-3-col .draggable {
    width: 89px;
    height: 78px;
  }
}

@media (max-width: 375px) {
  .drag-letters-container .dropzone {
    width: 48px;
    height: 48px;
    border-radius: 8px;
  }

  .drag-letters-container .draggable {
    width: 44px;
    height: 44px;
    border-radius: 8px;
    font-size: 28px !important;
  }
}

.dropzone-wrapper {
  display: flex;
  gap: 10px;
  margin-top: 70px;
  margin-bottom: auto;
}

@media (max-height: 760px) {
  .dropzone-wrapper {
    margin-top: auto;
  }
}

.dropzone {
  border: 1px dashed var(--light-yellow);
  border-radius: 12px;
  transition: 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.dropzone.drop-target {
  border-color: #666;
}

.dropzone.correct {
  overflow: hidden;
  outline: 2px solid var(--green-light);
  outline-offset: -2px;
  color: var(--green-light);
}

.dropzone.correct .draggable-letter {
  display: inline;
  box-shadow: none;
}

.dropzone.correct .draggable {
  box-shadow: none;
}

.draggables-wrapper {
  display: flex;
  gap: 10px;
  margin-bottom: auto;
}

.draggable {
  width: 66px;
  height: 66px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: grab;
  user-select: none;
  font-family: var(--second-family);
  font-weight: 400;
  font-size: 36px;
  text-align: center;
  color: #000;
  transition: box-shadow 0.2s;
  box-shadow: 0 3px 12px 0 rgba(197, 176, 153, 0.4);
  background: #fff;
  z-index: 10;
}

.drag-letters-slide-3-col .draggable {
  font-size: 48px;
}

.draggable:active {
  cursor: grabbing;
  box-shadow: 0 3px 14px 0 rgba(197, 176, 153, 0.81);
  outline: 1px solid var(--main-yellow);
  z-index: 10;
}

.draggable.placed {
  cursor: default;
}

.v8-slide {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.v8-game-area {
  position: relative;
  width: 100%;
  height: 245px;
  border-radius: 8px;
  overflow: hidden;
  background-color: var(--light-grey);
}

.v8-letter {
  position: absolute;
  font-family: var(--second-family);
  font-weight: 400;
  font-size: 70px;
  line-height: 1;
  text-align: center;
  color: #000;
  transition: top 0.1s linear;
}

.v8-answers {
  width: 100%;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 35px;
  flex-wrap: wrap;
  justify-content: center;
  /* margin-bottom: 35px; */
}

.v8-answer {
  width: 100%;
  height: 80px;
  padding: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  font-family: var(--font-family);
  font-weight: 700;
  font-size: 22px;
  text-align: center;
  color: #000;
  border-radius: 12px;
  box-shadow: 0 3px 12px 0 rgba(197, 176, 153, 0.4);
  background: #fff;
  border: 2px solid transparent;
  transition: all 0.3s ease;
}

@media (max-width: 375px) {
  .v8-answers {
    gap: 20px;
  }

  .v8-answer {
    height: 60px;
  }
}

@media (max-height: 560px) {
  .v8-answer {
    height: 40px;
  }

  .v8-answers {
    gap: 10px;
  }
}

.v8-answer.correct {
  color: var(--green-light);
  border: 2px solid var(--green-light);
  box-shadow: none;
}

.v8-answer.wrong {
  color: var(--false-color);
  border: 2px solid var(--false-color);
}

.v8-letter.locked {
  display: none;
}

.draggable {
  touch-action: none;
  -webkit-user-select: none;
  user-select: none;
}
.dropzone {
  touch-action: none;
}
.v8-slide,
.slide,
.v8-game {
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  touch-action: none;
}

.slide--video {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.video-player {
  width: 100%;
  max-width: 720px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.video-player__video {
  width: 100%;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.video-player__controls {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
}

.video-player__play-btn {
  padding: 0;
  border: none;
  cursor: pointer;
  background-color: transparent;
}

.video-player__progress {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 6px;
  border-radius: 3px;
  background: #e5e5e5; /* серая линия фона */
  outline: none;
  overflow: hidden;
  cursor: pointer;
}

/* Зелёная заливка прогресса */
.video-player__progress::-webkit-slider-runnable-track {
  height: 6px;
  background: #e5e5e5;
  border-radius: 3px;
}

.video-player__progress::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 0; /* убираем кружок */
  height: 4px;
  box-shadow: -1000px 0 0 1000px #07bfa5; /* заливка до ползунка */
  border: none;
}

/* Для Firefox */
.video-player__progress::-moz-range-track {
  height: 4cqh;
  background: #e5e5e5;
  border-radius: 2px;
}

.video-player__progress::-moz-range-progress {
  height: 4px;
  background: #07bfa5;
  border-radius: 2px;
}

.video-player__progress::-moz-range-thumb {
  width: 0;
  height: 4px;
  border: none;
}

.slide__draw-area {
  position: relative;
  display: block;
  /* display: inline-block; */
}

.slide__draw-area img {
  margin: 0 auto;
}

.slide__letter-img {
  display: block;
  max-width: 100%;
  height: auto;
}

.slide__draw-canvas {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 5; /* Поверх изображения */
  pointer-events: all;
}

.slide__clear-btn {
  margin-top: 16px;
  background: #f5f5f5;
  border: 1px solid #ccc;
  border-radius: 8px;
  padding: 8px 14px;
  cursor: pointer;
}

.slide__result.hidden {
  display: none;
}

.slide__check-btn {
  width: 160px;
  height: 80px;
  display: flex;
  justify-content: center;
  align-items: center;
  margin: auto;
  padding: 0;
  font-family: var(--font-family);
  font-weight: 500;
  font-size: 20px;
  text-align: center;
  color: #000;
  box-shadow: 0 3px 12px 0 rgba(197, 176, 153, 0.4);
  background: #fff;
  border-radius: 12px;
  border: none;
  outline: none;
}

.slide__input-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.play-btn + .slide__input-wrapper {
  margin-top: 28px;
}

.slide__input {
  border: 1px solid #b6b6b6;
  border-radius: var(--radius);
  width: 296px;
  height: 58px;
  margin-bottom: 50px;
  background: #fff;
  font-family: var(--font-family);
  font-weight: 400;
  font-size: 26px;
  text-align: center;
  color: #000;
}

@media (max-width: 375px) {
  .slide__input {
    height: 42px;
    width: 100%;
    margin-bottom: auto;
  }

  .play-btn + .slide__input-wrapper {
    margin-top: auto;
  }

  .slide__check-btn {
    height: 60px;
    margin-top: 10px;
  }
}

.slide__input.wrong {
  border-color: var(--false-color);
}

.slide__input.correct {
  border-color: var(--green-light);
}

.slide__answers {
  margin: auto;
  font-family: var(--second-family);
  font-weight: 500;
  font-size: 70px;
  text-align: center;
  color: #000;
}

.slide__word-help-text {
  margin-bottom: 20px;
  text-align: center;
  font-size: 14px;
  text-align: center;
  color: var(--gray-transcriptions);
}

.slide__answers span {
  cursor: pointer;
  transition: color 0.5s ease;
}

.slide__answers .correct {
  color: var(--green-light);
}

.slide__answers .wrong {
  color: var(--false-color);
}

.slide__zones {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
}

.slide__zones .dropzone {
  width: 100%;
  height: 164px;
  font-family: var(--font-family);
  font-weight: 700;
  font-size: 22px;
  text-align: center;
  color: var(--gray-transcriptions);
}

.slide__zones .dropzone.correct .draggable-word {
  color: var(--main-green);
}

.slide__zones .dropzone.wrong {
  border: 1px solid var(--false-color);
}

.slide__words {
  position: relative;
  width: 160px;
  height: 160px;
  margin: auto;
}

.draggable-word {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 160px;
  height: 160px;
  box-shadow: 0 3px 12px 0 rgba(197, 176, 153, 0.4);
  background: #fff;
  border-radius: 12px;
  transition: border 0.5s ease;
  font-family: var(--second-family);
  font-weight: 400;
  font-size: 36px;
  text-align: center;
  color: #000;
}

.draggable-word-small {
  font-size: 60px;
}

@media (max-width: 375px) {
  .draggable-word {
    width: 100px;
    height: 100px;
    font-size: 28px;
  }

  .slide__words {
    width: 100px;
    height: 100px;
  }

  .slide__zones .dropzone {
    height: 104px;
    width: calc(100% - 2px);
    font-size: 18px;
  }

  .slide__zones {
    gap: 20px;
  }

  .draggable-word-small {
    font-size: 48px;
  }
}

.draggable-word.correct {
  color: var(--main-green);
  box-shadow: none;
}

.draggable-word.wrong {
  color: var(--false-color);
  box-shadow: none;
}

.draggable-word.dragging,
.draggable-letter.dragging {
  border: 1px solid var(--main-yellow);
}

.slide__audio-select-list {
  display: flex;
  flex-direction: column;
  gap: 35px;
  margin-bottom: auto;
}

.slide__audio-select-list-item {
  display: grid;
  grid-template-columns: 64px 140px;
  column-gap: 45px;
  justify-content: center;
}

@media (max-width: 375px) {
  .slide__audio-select-list {
    gap: 15px;
    margin-bottom: 0;
  }

  .slide__audio-select-list-item {
    column-gap: 10px;
    grid-template-columns: 64px 1fr;
  }

  .slide__select-btn {
    flex-grow: 1;
  }
}

.slide__select-btn {
  box-shadow: 0 3px 12px 0 rgba(197, 176, 153, 0.4);
  background: #fff;
  border-radius: 12px;
  border: 2px solid transparent;
  font-family: var(--font-family);
  font-weight: 500;
  font-size: 20px;
  text-align: center;
  color: #000;
  transition: all 0.5s ease;
}

.slide__select-btn:disabled {
  opacity: 0.5;
}

.slide__audio-select-list-item.correct .slide__select-btn {
  border-color: var(--green-light);
  box-shadow: none;
}

.slide__audio-select-list-item.correct .slide__select-btn:disabled {
  opacity: 1;
}

.slide__audio-select-list-item.wrong .slide__select-btn {
  border-color: var(--false-color);
}

.slide__forms {
  display: flex;
  justify-content: center;
  align-items: flex-end;
  gap: 17px;
  margin: auto 0;
  flex-grow: 2;
}

.draggable-letter {
  font-family: var(--second-family);
  font-weight: 400;
  font-size: 36px;
  text-align: center;
  color: #000;
  border-radius: 12px;
  width: 76px;
  height: 76px;
  box-shadow: 0 3px 12px 0 rgba(197, 176, 153, 0.4);
  background: #fff;
}

.draggable-letter.correct {
  background-color: transparent;
  box-shadow: none;
}

.slide--c8 .slide__word {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: row-reverse;
  gap: 17px;
  margin: auto 0;
  flex-grow: 1;
}

.slide--c8 .slide__word .dropzone {
  width: 76px;
  height: 76px;
}

.slide__word-wrapper {
  flex-grow: 1;
  margin: auto;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: row-reverse;
  gap: 17px;
  margin: auto 0;
  flex-grow: 1;
}

.slide__word .dropzone.correct {
  outline: 1px solid var(--green-light);
}

.word-letter {
  width: 76px;
  height: 76px;
  border: 1px solid var(--green-light);
  border-radius: 12px;
  font-family: var(--second-family);
  font-weight: 400;
  font-size: 36px;
  text-align: center;
  color: #000;
}

@media (max-width: 375px) {
  .word-letter {
    width: 56px;
    height: 56px;
    font-size: 26px;
  }

  .slide--c8 .slide__word .dropzone {
    width: 56px;
    height: 56px;
    font-size: 26px;
  }

  .draggable-letter {
    width: 56px;
    height: 56px;
    font-size: 26px;
  }
}

.draggable-letter.highlight {
  border: 2px solid #ffa500; /* яркая рамка */
  background-color: #fff3e0; /* легкий фон */
}

.arabic-letter-slide {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 20px;
  font-family: Arial, sans-serif;
  max-width: 600px;
  margin: 0 auto;
}

.svg-wrapper {
  width: 100%;
  max-width: 400px;
  margin: auto;
  background: #fff;
  padding: 20px;
  touch-action: none;
  user-select: none;
  display: flex;
  justify-content: center;
}

.svg-wrapper svg {
  opacity: 0;
}

.arabic-letter {
  width: 100%;
  height: auto;
  display: block;
  cursor: crosshair;
}

.info-panel {
  width: 100%;
  max-width: 400px;
}

.instruction {
  text-align: center;
  margin-bottom: 15px;
  color: #555;
  font-size: 16px;
  transition: all 0.3s ease;
}

.progress {
  width: 100%;
  height: 12px;
  background: #f0f0f0;
  border-radius: 6px;
  overflow: hidden;
}

.progress .bar {
  display: block;
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #17a2b8, #20c997);
  transition: width 0.2s ease;
}

.waveform {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-grow: 1;
  height: 48px;
  gap: 2px;
}

.waveform__bar {
  width: 2px;
  height: 2px;
  border-radius: 2px;
  background-color: #b4b2ab;
  transition: height 0.15s ease, background-color 0.3s ease;
}

.waveform__bar.active {
  background-color: var(--main-green);
}

.slide__recording {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  margin-top: auto;
  padding: 16px;
  background: var(--light-grey);
  border-radius: 8px;
}

.mic-btn,
.replay-btn {
  width: 48px;
  height: 48px;
  display: flex;
  justify-content: center;
  align-items: center;
  border-radius: 100%;
  border: none;
  box-shadow: 0 3px 12px 0 rgba(197, 176, 153, 0.4);
  background-color: #fff;
}

.mic-btn,
.replay-btn {
  & svg path {
    transition: fill 0.5s ease;
  }
}

.mic-btn.recording {
  & svg path {
    fill: red !important;
  }
}

.mic-btn:disabled,
.replay-btn:disabled {
  & svg path {
    fill: #e7e7e7 !important;
  }
}

.btn--mic.recording {
  background-color: #ff4b4b;
}
.slide__record-info-text {
  margin-top: 14px;
  margin-bottom: auto;
  text-align: center;
  font-weight: 400;
  font-size: 14px;
  text-align: center;
  color: var(--gray-transcriptions);
}

.slide__audio-text-animation {
  /* position: relative; */
  direction: rtl;
  font-family: var(--second-family);
  font-weight: 400;
  font-size: 64px;
  line-height: 1;
  text-align: center;
  color: #000;
  /* color: transparent;
  background-clip: text;
  -webkit-background-clip: text;
  background-image: linear-gradient(to right, var(--main-green) 0%, #000 0%); */
  /* background-size: 100% 100%;
  background-repeat: no-repeat;
  background-position: left center;
  transition: background-position linear; */
}

.slide__audio-text-animation span {
  color: var(--main-green);
  /* unicode-bidi: isolate; */
  /* unicode-bidi: bidi-override; */
}

.slide__audio-text-animation-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: var(--light-grey);
  border-radius: 8px;
}

.text-animation-container {
  position: relative;
  display: inline-flex;
  margin: 0 auto;
  color: black;
}

.text-highlight-overlay {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 0%;
  color: var(--main-green);
  overflow: hidden;
  white-space: nowrap;
  direction: rtl;
  text-align: right;
  transition: width var(--animation-duration, 2000ms) linear;
}

.text-highlight-overlay.animate {
  width: 100%;
}

.init-phrase {
  color: #2b4e84;
}

.exact-match {
  color: #3e5902;
}

.quasi-match {
  color: #f29f05;
}

.no-match {
  color: #f83b3c;
}

.raw_result {
  text-align: center;
  font-size: 32px;
}

.voice-feedback {
  text-align: center;
}

.transcribed-text {
  color: #3981fe;
}
