/* ========== BODY - BACKGROUND ========== */
body {
  background-color: #130617;
  background-image: 
    linear-gradient(135deg, rgba(19, 6, 23, 0.8) 0%, rgba(26, 6, 37, 0.8) 50%, rgba(37, 5, 43, 0.8) 75%, rgba(42, 6, 44, 0.8) 100%),
    url('../../img/coverBlockhero.png');
  background-size: cover, cover;
  background-position: center, center;
  background-repeat: no-repeat, no-repeat;
  background-attachment: fixed, fixed;
  background-blend-mode: normal, normal;
  color: #ffffff;
  padding-top: 80px;
  min-height: 100vh;
}

/* ========== DEMO CONTAINER ========== */
.demo-container {
  width: 100%;
  margin: 0;
  padding: 40px 24px 80px;
  min-height: calc(100vh - 80px);
  display: flex;
  justify-content: center;
}

.demo-content-wrapper {
  max-width: 900px;
  width: 100%;
  margin: 0 auto;
  background-color: white;
  border-radius: 20px;
  padding: 40px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
  color: #620080; /* Фиолетовый цвет по умолчанию для всего текста на белом фоне */
}

.demo-header {
  text-align: center;
  margin-bottom: 50px;
}

.back-link {
  display: inline-block;
  color: #620080;
  text-decoration: none;
  font-weight: 500;
  margin-bottom: 20px;
  transition: color 0.3s;
}

.back-link:hover {
  color: #9333ea;
}

.demo-header h1 {
  font-size: 2.5rem;
  color: #620080;
  margin-bottom: 10px;
  font-weight: 700;
}

.demo-subtitle {
  font-size: 1.1rem;
  color: #620080;
  opacity: 0.9;
  font-weight: 500;
}

/* ========== DEMO INFO BOX ========== */
.demo-info-box {
  background: linear-gradient(135deg, rgba(147, 51, 234, 0.15) 0%, rgba(98, 0, 128, 0.2) 100%);
  border: 2px solid rgba(147, 51, 234, 0.3);
  border-radius: 20px;
  padding: 24px;
  margin-bottom: 30px;
  display: flex;
  gap: 20px;
  align-items: flex-start;
}

.info-icon {
  font-size: 2rem;
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgba(147, 51, 234, 0.15) 0%, rgba(98, 0, 128, 0.2) 100%);
  border-radius: 12px;
  padding: 8px;
}

.info-icon svg {
  width: 32px;
  height: 32px;
  color: #620080;
}

.info-content h3 {
  font-size: 1.2rem;
  color: #620080;
  margin-bottom: 12px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
}

.inline-icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  color: #620080;
}

.info-content p {
  color: #620080;
  line-height: 1.7;
  margin-bottom: 12px;
  font-size: 1rem;
}

.info-content p:last-child {
  margin-bottom: 0;
}

.info-note {
  background: rgba(98, 0, 128, 0.15);
  padding: 12px 16px;
  border-radius: 12px;
  border-left: 3px solid rgba(147, 51, 234, 0.5);
  margin-top: 12px;
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.inline-icon-small {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  color: #620080;
  margin-top: 2px;
}

.info-note strong {
  color: #620080;
}

/* ========== DEMO SECTION ========== */
.demo-section {
  background: white;
  border-radius: 24px;
  padding: 40px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}

.demo-section.hidden {
  display: none;
}

.demo-section h2 {
  font-size: 1.8rem;
  color: #620080;
  margin-bottom: 15px;
  text-align: center;
  font-weight: 700;
}

.section-instruction {
  text-align: center;
  color: #620080;
  opacity: 0.9;
  font-size: 1rem;
  margin-bottom: 30px;
  line-height: 1.6;
  font-weight: 500;
}

/* ========== CATEGORIES ========== */
.categories-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 24px;
  margin-top: 30px;
}

.category-btn {
  background: linear-gradient(135deg, #f9f6fc 0%, #ffffff 100%);
  border: 2px solid rgba(98, 0, 128, 0.1);
  border-radius: 20px;
  padding: 30px 20px;
  cursor: pointer;
  transition: all 0.3s ease;
  text-align: center;
}

.category-btn:hover {
  transform: translateY(-5px);
  border-color: #ec4899;
  background: linear-gradient(135deg, rgba(98, 0, 128, 0.05) 0%, rgba(236, 72, 153, 0.05) 100%);
  box-shadow: 0 8px 20px rgba(236, 72, 153, 0.3);
}

.category-icon {
  font-size: 3rem;
  display: block;
  margin-bottom: 15px;
}

.category-btn h3 {
  font-size: 1.4rem;
  color: #620080;
  margin-bottom: 10px;
}

.category-btn p {
  color: #620080;
  opacity: 0.7;
  font-size: 0.95rem;
  margin-bottom: 15px;
}

.category-details {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 15px;
}

.detail-item {
  background: rgba(98, 0, 128, 0.1);
  color: var(--purple);
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 0.85rem;
  font-weight: 500;
}

/* ========== TEST CONTAINER ========== */
.test-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 30px;
  flex-wrap: wrap;
  gap: 15px;
}

.test-progress {
  flex: 1;
  min-width: 200px;
}

.progress-bar {
  width: 100%;
  height: 8px;
  background: rgba(98, 0, 128, 0.1);
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 8px;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--purple), var(--pink));
  border-radius: 10px;
  transition: width 0.3s ease;
  width: 0%;
}

.progress-text {
  font-size: 0.9rem;
  color: var(--purple);
  opacity: 0.8;
}

.exit-btn {
  background: rgba(98, 0, 128, 0.1);
  border: none;
  color: #620080;
  padding: 8px 16px;
  border-radius: 20px;
  cursor: pointer;
  font-weight: 500;
  transition: all 0.3s;
}

.exit-btn:hover {
  background: linear-gradient(90deg, #620080 0%, #ec4899 100%);
  color: white;
  box-shadow: 0 4px 15px rgba(98, 0, 128, 0.3);
}

/* ========== TEST INSTRUCTION ========== */
.test-instruction {
  background: rgba(242, 121, 144, 0.1);
  border-left: 4px solid var(--pink);
  padding: 16px 20px;
  border-radius: 12px;
  margin-bottom: 25px;
}

.test-instruction p {
  color: var(--purple);
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.6;
}

.test-instruction strong {
  color: var(--purple);
}

/* ========== QUESTION ========== */
.question-container {
  margin: 40px 0;
}

.question-title {
  font-size: 1.3rem;
  color: var(--purple);
  margin-bottom: 25px;
  line-height: 1.6;
}

.reading-text {
  background: rgba(98, 0, 128, 0.05);
  border-left: 4px solid var(--purple);
  padding: 20px;
  border-radius: 12px;
  margin-bottom: 25px;
}

.reading-text strong {
  color: var(--purple);
  font-size: 1rem;
  display: block;
  margin-bottom: 10px;
}

.reading-text p {
  color: var(--purple);
  line-height: 1.8;
  font-size: 1.05rem;
  margin: 0;
  font-style: italic;
}

.answers-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.answer-item {
  background: #f9f6fc;
  border: 2px solid rgba(98, 0, 128, 0.1);
  border-radius: 12px;
  padding: 16px 20px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.answer-item:hover {
  border-color: var(--pink);
  background: rgba(242, 121, 144, 0.05);
  transform: translateX(5px);
}

.answer-item.selected {
  border-color: var(--purple);
  background: rgba(98, 0, 128, 0.1);
}

.answer-item.correct {
  border-color: #4caf50;
  background: rgba(76, 175, 80, 0.1);
}

.answer-item.incorrect {
  border-color: #f44336;
  background: rgba(244, 67, 54, 0.1);
}

.answer-item input[type="radio"] {
  margin-right: 12px;
  cursor: pointer;
}

.answer-item label {
  cursor: pointer;
  color: var(--purple);
  font-size: 1rem;
  display: flex;
  align-items: center;
}

/* ========== BUTTONS ========== */
.test-actions {
  display: flex;
  justify-content: space-between;
  gap: 15px;
  margin-top: 30px;
  flex-wrap: wrap;
}

.btn-primary,
.btn-secondary {
  padding: 12px 24px;
  border-radius: 25px;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.3s ease;
  border: none;
  flex: 1;
  min-width: 120px;
}

.btn-primary {
  background: linear-gradient(90deg, #620080 0%, #ec4899 100%);
  color: white;
  box-shadow: 0 4px 15px rgba(98, 0, 128, 0.3);
}

.btn-primary:hover:not(:disabled) {
  background: linear-gradient(90deg, #ec4899 0%, #620080 100%);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(98, 0, 128, 0.5);
}

.btn-primary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-secondary {
  background: white;
  color: #620080;
  border: 2px solid #620080;
}

.btn-secondary:hover:not(:disabled) {
  background: linear-gradient(90deg, #620080 0%, #ec4899 100%);
  color: white;
  border-color: transparent;
  box-shadow: 0 4px 15px rgba(98, 0, 128, 0.3);
}

.btn-secondary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* ========== RESULTS ========== */
.results-card {
  text-align: center;
  padding: 20px;
}

.results-card h2 {
  font-size: 2rem;
  color: var(--purple);
  margin-bottom: 20px;
}

.results-intro {
  color: var(--purple);
  opacity: 0.8;
  text-align: center;
  margin-bottom: 30px;
  line-height: 1.7;
  font-size: 1rem;
}

.results-note {
  margin-top: 30px;
  padding: 20px;
  background: rgba(98, 0, 128, 0.05);
  border-radius: 12px;
  border-left: 4px solid var(--purple);
}

.results-note p {
  color: var(--purple);
  margin: 0;
  line-height: 1.7;
  font-size: 0.95rem;
}

.results-note strong {
  color: var(--purple);
}

.score-circle {
  position: relative;
  width: 200px;
  height: 200px;
  margin: 0 auto 40px;
}

.score-svg {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.score-bg {
  fill: none;
  stroke: rgba(98, 0, 128, 0.1);
  stroke-width: 8;
}

.score-progress {
  fill: none;
  stroke: var(--pink);
  stroke-width: 8;
  stroke-linecap: round;
  stroke-dasharray: 339.292;
  stroke-dashoffset: 339.292;
  transition: stroke-dashoffset 1s ease;
}

.score-text {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
}

.score-percent {
  display: block;
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--purple);
}

.score-label {
  display: block;
  font-size: 0.9rem;
  color: var(--purple);
  opacity: 0.7;
  margin-top: 5px;
}

.results-details {
  display: flex;
  justify-content: center;
  gap: 40px;
  margin: 40px 0;
  flex-wrap: wrap;
}

.result-item {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.result-label {
  font-size: 0.95rem;
  color: var(--purple);
  opacity: 0.7;
}

.result-value {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--purple);
}

.results-actions {
  display: flex;
  justify-content: center;
  gap: 15px;
  margin-top: 40px;
  flex-wrap: wrap;
}

.results-actions .btn-primary,
.results-actions .btn-secondary {
  flex: 0 1 auto;
  min-width: 180px;
}

/* ========== MEDIA QUERIES ========== */
@media (max-width: 768px) {
  .demo-container {
    padding: 20px 16px 60px;
  }

  .demo-section {
    padding: 24px 20px;
  }

  .demo-header h1 {
    font-size: 2rem;
  }

  .categories-grid {
    grid-template-columns: 1fr;
  }

  .test-header {
    flex-direction: column;
    align-items: stretch;
  }

  .test-actions {
    flex-direction: column;
  }

  .test-actions button {
    width: 100%;
  }

  .results-details {
    flex-direction: column;
    gap: 20px;
  }

  .demo-info-box {
    flex-direction: column;
    padding: 20px;
  }

  .info-icon {
    font-size: 1.5rem;
  }
}

/* ========== DICTIONARY DEMO ========== */
.dictionary-search {
  text-align: center;
}

.search-wrapper {
  display: flex;
  gap: 12px;
  max-width: 600px;
  margin: 30px auto;
  flex-wrap: wrap;
}

.search-input-large {
  flex: 1;
  min-width: 250px;
  padding: 16px 20px;
  border: 2px solid rgba(98, 0, 128, 0.2);
  border-radius: 25px;
  font-size: 1.1rem;
  color: var(--purple);
  transition: all 0.3s;
}

.search-input-large:focus {
  outline: none;
  border-color: var(--pink);
  box-shadow: 0 0 0 3px rgba(242, 121, 144, 0.1);
}

.search-btn {
  padding: 16px 32px;
  background: linear-gradient(135deg, var(--purple), var(--pink));
  color: white;
  border: none;
  border-radius: 25px;
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
  display: flex;
  align-items: center;
  gap: 8px;
}

.search-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(98, 0, 128, 0.3);
}

.search-results {
  margin-top: 30px;
  text-align: left;
}

.results-header {
  margin-bottom: 20px;
}

.results-header h3 {
  color: var(--purple);
  font-size: 1.2rem;
}

.results-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.result-item {
  background: #f9f6fc;
  border: 2px solid rgba(98, 0, 128, 0.1);
  border-radius: 16px;
  padding: 20px;
  transition: all 0.3s;
}

.result-item:hover {
  border-color: var(--pink);
  transform: translateX(5px);
}

.result-main h4 {
  font-size: 1.4rem;
  color: var(--purple);
  margin-bottom: 8px;
}

.result-translate {
  font-size: 1.2rem;
  color: var(--purple);
  opacity: 0.8;
  margin-bottom: 12px;
  font-weight: 500;
}

.result-meta {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
}

.no-results {
  text-align: center;
  padding: 40px 20px;
  color: var(--purple);
  opacity: 0.7;
}

.no-results i {
  font-size: 3rem;
  margin-bottom: 15px;
  opacity: 0.5;
}

.no-results-hint {
  font-size: 0.9rem;
  margin-top: 10px;
  opacity: 0.6;
}

/* ========== DAILY WORD ========== */
.daily-word-card {
  background: linear-gradient(135deg, rgba(98, 0, 128, 0.05) 0%, rgba(242, 121, 144, 0.05) 100%);
  border: 2px solid rgba(98, 0, 128, 0.1);
  border-radius: 20px;
  padding: 30px;
  margin-top: 20px;
}

.daily-word-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 10px;
}

.daily-badge {
  background: linear-gradient(135deg, var(--purple), var(--pink));
  color: white;
  padding: 8px 16px;
  border-radius: 20px;
  font-weight: 600;
  font-size: 0.9rem;
}

.daily-likes {
  color: var(--pink);
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
}

.daily-word-main h3 {
  font-size: 2rem;
  color: var(--purple);
  margin-bottom: 10px;
}

.daily-word-translate {
  font-size: 1.5rem;
  color: var(--purple);
  opacity: 0.8;
  margin-bottom: 15px;
  font-weight: 500;
}

.daily-word-meta {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

/* ========== POPULAR WORDS ========== */
.popular-words-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
  margin-top: 30px;
}

.word-card {
  background: white;
  border: 2px solid rgba(98, 0, 128, 0.1);
  border-radius: 16px;
  padding: 20px;
  transition: all 0.3s;
}

.word-card:hover {
  border-color: var(--pink);
  transform: translateY(-5px);
  box-shadow: 0 8px 20px rgba(242, 121, 144, 0.2);
}

.word-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.word-card-header h3 {
  font-size: 1.3rem;
  color: var(--purple);
  margin: 0;
}

.word-likes {
  color: var(--pink);
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 4px;
}

.word-translate {
  font-size: 1.2rem;
  color: var(--purple);
  opacity: 0.8;
  margin-bottom: 12px;
  font-weight: 500;
}

.word-meta {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.word-category,
.word-dictionary {
  background: rgba(98, 0, 128, 0.1);
  color: var(--purple);
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 0.85rem;
  font-weight: 500;
}

@media (max-width: 768px) {
  .search-wrapper {
    flex-direction: column;
  }

  .search-input-large,
  .search-btn {
    width: 100%;
  }

  .popular-words-grid {
    grid-template-columns: 1fr;
  }
}

