/* ========== 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;
}

/* Стили основаны на реальном проекте Lexoverse */
:root {
  --lex-dark-blue: #043c5f;
  --lex-light-blue: #1195ad;
  --lex-orange: #f0763e;
  --lex-white: #fffaf2;
}

.lexoverse-demo {
  max-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;
  padding: 30px 24px;
  background: linear-gradient(135deg, rgba(147, 51, 234, 0.1) 0%, rgba(98, 0, 128, 0.15) 100%);
  border-radius: 20px;
  margin-bottom: 30px;
}

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

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

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

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

/* Информационный блок */
.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: 24px;
  display: flex;
  gap: 16px;
  align-items: flex-start;
}

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

.info-content h3 {
  font-size: 1.1rem;
  color: #620080;
  margin-bottom: 10px;
  font-weight: 700;
}

.info-content p {
  color: #620080;
  line-height: 1.6;
  margin-bottom: 10px;
  font-size: 0.95rem;
}

.info-note {
  background: rgba(98, 0, 128, 0.15);
  padding: 10px 14px;
  border-radius: 8px;
  border-left: 3px solid rgba(147, 51, 234, 0.5);
  margin-top: 10px;
}

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

/* Hero секция */
.hero-section {
  width: 100%;
  color: white;
}

.hero-title {
  width: 100%;
  height: 60px;
  display: flex;
  align-items: center;
  background-color: var(--lex-light-blue);
  justify-content: space-around;
  flex-wrap: wrap;
  padding: 10px 20px;
  font-weight: 600;
}

.hero-image-area {
  width: 100%;
  padding-bottom: 40px;
  background-color: var(--lex-dark-blue);
  position: relative;
}

.search-area {
  position: relative;
  width: 100%;
  top: 20px;
  padding: 0 20px;
}

.selectors {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 40px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.selector-btn {
  cursor: pointer;
  width: 100px;
  height: 30px;
  display: flex;
  border-radius: 4px;
  align-items: center;
  background-color: var(--lex-orange);
  justify-content: center;
  color: white;
  font-weight: 500;
  transition: all 0.3s;
}

.selector-btn:hover {
  background-color: #d8652e;
  transform: translateY(-2px);
}

.selector-btn.active {
  box-shadow: 0px 0px 0px 4px rgba(92, 103, 255, 0.3);
}

/* Daily Word */
.daily-word {
  color: white;
  position: relative;
}

.daily-word-btn {
  cursor: pointer;
  width: 100px;
  height: 30px;
  display: flex;
  border-radius: 4px;
  align-items: center;
  background-color: var(--lex-orange);
  justify-content: center;
  box-shadow: 0px 0px 0px 4px rgba(92, 103, 255, 0.3);
  border: none;
  color: #fff;
  position: relative;
  z-index: 2;
  transition: 0.2s ease-in;
}

.daily-word-btn:hover {
  animation: onePulse 0.6s forwards linear;
}

.daily-word-list {
  background-color: #fff;
  border-radius: 8px;
  width: 200px;
  box-shadow: 0px 0px 4px 4px rgba(150, 157, 249, 0.16);
  padding: 2px;
  position: absolute;
  left: 100px;
  bottom: 0;
  opacity: 0;
  transform: scale(0);
  transform-origin: bottom left;
  transition: all 0.3s ease 0.1s;
  pointer-events: none;
}

.daily-word.active .daily-word-list {
  opacity: 1;
  transform: scale(1);
  pointer-events: auto;
}

.daily-word .wordList {
  width: 100%;
  min-height: 150px;
  background: var(--lex-dark-blue);
  border-radius: 8px;
  padding: 10px;
}

.daily-word .wordList ul {
  list-style: none;
  height: 100%;
  overflow-y: auto;
}

.daily-word .wordList ul li {
  display: flex;
  color: var(--lex-dark-blue);
  flex-wrap: wrap;
  align-items: start;
  justify-content: center;
}

.daily-word .wordList ul li > span {
  text-overflow: ellipsis;
  overflow: hidden;
  white-space: nowrap;
  color: white;
  line-height: 24px;
}

.daily-word .wordList ul li > span.likes {
  position: relative;
  width: 24px;
  height: 24px;
}

.daily-word .wordList ul li > span.likes i {
  color: var(--lex-orange);
  position: absolute;
  font-size: 18px;
  z-index: 1;
}

.daily-word .wordList ul li > span.likes span {
  position: absolute;
  top: 2px;
  left: 9px;
  color: white;
  z-index: 2;
  font-size: 11px;
}

.daily-word .wordList ul li > span.translate {
  width: 100%;
  padding: 0 10px;
  text-align: right;
  direction: rtl;
}

.daily-word .wordList ul li a {
  width: calc(100% - 24px);
  padding: 0 10px;
  min-width: 100px;
  color: white;
  text-decoration: none;
}

@keyframes onePulse {
  0% {
    box-shadow: 0px 0px 0px 0px rgba(92, 103, 255, 0.3);
  }
  50% {
    box-shadow: 0px 0px 0px 12px rgba(92, 103, 255, 0.1);
  }
  100% {
    box-shadow: 0px 0px 0px 4px rgba(92, 103, 255, 0.3);
  }
}

/* Search Panel */
.search-filter {
  position: relative;
}

.search {
  display: none;
  position: relative;
  justify-content: center;
  align-items: center;
  flex-direction: column;
}

.search.show {
  display: flex;
}

.search input {
  width: 60%;
  min-width: 300px;
  background-color: white;
  border-radius: 8px;
  height: 35px;
  padding: 0 10px;
  border: none;
  font-size: 1rem;
}

.search .wordList {
  position: relative;
  display: none;
  width: 60%;
  min-width: 300px;
  margin-top: 10px;
  background: var(--lex-white);
  border-radius: 0 0 8px 8px;
  padding: 10px;
  max-height: 300px;
  overflow-y: auto;
}

.search .wordList.show {
  display: block;
}

.search .wordList ul {
  list-style: none;
}

.search .wordList ul li {
  margin-bottom: 15px;
  display: flex;
  color: var(--lex-dark-blue);
  align-items: center;
  flex-wrap: wrap;
  padding: 8px;
  border-radius: 4px;
  transition: background 0.2s;
}

.search .wordList ul li:hover {
  background: rgba(4, 60, 95, 0.1);
}

.search .wordList ul li > span {
  text-overflow: ellipsis;
  overflow: hidden;
  white-space: nowrap;
  line-height: 24px;
}

.search .wordList ul li > span.likes {
  position: relative;
  width: 24px;
  height: 24px;
  margin-right: 8px;
}

.search .wordList ul li > span.likes i {
  color: var(--lex-orange);
  position: absolute;
  font-size: 18px;
  z-index: 1;
}

.search .wordList ul li > span.likes span {
  position: absolute;
  top: 2px;
  left: 9px;
  color: white;
  z-index: 2;
  font-size: 11px;
}

.search .wordList ul li > span.translate {
  width: 25%;
  padding: 0 10px;
  min-width: 150px;
  direction: rtl;
  text-align: right;
}

.search .wordList ul li > span.category {
  width: 20%;
  padding: 0 10px;
  min-width: 120px;
  font-size: 0.9rem;
}

.search .wordList ul li > span.dictionary {
  width: calc(30% - 16px);
  min-width: 200px;
  padding: 0 10px;
  text-overflow: ellipsis;
  overflow: hidden;
  white-space: nowrap;
  font-size: 0.85rem;
}

.search .wordList ul li a {
  width: 15%;
  padding: 0 10px;
  min-width: 80px;
  color: var(--lex-dark-blue);
  text-decoration: none;
  font-weight: 500;
}

.search .wordList ul li a:hover {
  color: var(--lex-orange);
}

/* Filter Panel */
.filter {
  display: none;
  padding: 20px 60px;
  background-color: var(--lex-dark-blue);
  width: 90%;
  min-width: 300px;
  max-width: 900px;
  border-radius: 8px;
  margin: 0 auto;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.filter.show {
  display: flex;
}

.filter .row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  width: 100%;
  margin-bottom: 10px;
}

.filter .row.first {
  justify-content: space-between;
}

.filter .row.first .search-bar {
  width: 60%;
  min-width: 200px;
  position: relative;
}

.filter .row.first .search-bar > input {
  width: 100%;
  background-color: white;
  border-radius: 8px;
  height: 35px;
  padding: 0 10px;
  border: none;
}

.filter .row.first .search-bar > button {
  position: absolute;
  right: 0;
  top: 0;
  cursor: pointer;
  width: 100px;
  height: 100%;
  display: flex;
  border-radius: 0 4px 4px 0;
  align-items: center;
  background-color: var(--lex-orange);
  justify-content: center;
  color: white;
  font-weight: 500;
}

.filter .row.first .filters {
  display: flex;
  gap: 15px;
}

.filter .row.first .filters > div {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
}

.filter .row.first .filters > div > .title {
  color: white;
  margin-right: 8px;
}

.filter .row.first .filters > div .switchCtrl {
  margin: 0;
  padding: 0;
  height: 18px;
  cursor: pointer;
}

.filter .row.first .filters > div .switchCtrl input {
  display: none;
}

.filter .row.first .filters > div .switchCtrl input:checked + .toggle::before {
  background-color: var(--lex-orange);
}

.filter .row.first .filters > div .switchCtrl input:checked + .toggle::after {
  transform: translateX(20px);
  background-color: var(--lex-orange);
}

.filter .row.first .filters > div .switchCtrl .toggle {
  position: relative;
  border-radius: 3px;
  display: inline-block;
  width: 40px;
  height: 20px;
  overflow: hidden;
  vertical-align: top;
}

.filter .row.first .filters > div .switchCtrl .toggle::after {
  content: "";
  position: absolute;
  width: 12px;
  top: 4px;
  left: 4px;
  bottom: 4px;
  display: inline-block;
  transition: 0.3s ease-in-out;
  box-sizing: border-box;
  border: 3px solid white;
  background-color: var(--lex-light-blue);
  border-radius: 50%;
}

.filter .row.first .filters > div .switchCtrl .toggle::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  overflow: hidden;
  background-color: var(--lex-light-blue);
  display: inline-block;
  transition: 0.3s;
  border-radius: 3px;
}

.filter .row.second .alphabets {
  display: flex;
  flex-wrap: wrap;
  width: 100%;
  justify-content: space-between;
}

.filter .row.second .alphabets1,
.filter .row.second .alphabets2,
.filter .row.second .alphabets3 {
  display: flex;
  flex-wrap: wrap;
  width: 33%;
  max-width: 240px;
}

.filter .row.second .alphabet-label {
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 5px;
  cursor: pointer;
  padding: 7px;
  border: 2px solid var(--lex-light-blue);
  border-radius: 5px;
  transition: all 0.3s;
  color: white;
}

.filter .row.second .alphabet-label:hover {
  background-color: rgba(17, 149, 173, 0.3);
}

.filter .row.second .alphabet-label.selected {
  background-color: var(--lex-orange);
  border-color: var(--lex-orange);
}

.filter .row.second .alphabet-label input {
  display: none;
}

.filter .row.third .options {
  display: flex;
  flex-wrap: wrap;
  width: 100%;
  justify-content: space-between;
  gap: 10px;
}

.filter .row.third .styled-select {
  flex: 1;
  min-width: 200px;
  background-color: var(--lex-light-blue);
  color: white;
  border: 2px solid var(--lex-dark-blue);
  border-radius: 5px;
  padding: 10px;
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='white' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  padding-right: 35px;
}

.filter .row.third .styled-select:focus {
  outline: none;
  border-color: var(--lex-orange);
}

.filter .row.third .styled-select option {
  background-color: var(--lex-light-blue);
  color: white;
}

.filter .wordList {
  display: none;
  width: 100%;
  color: white;
  min-width: 300px;
  background: var(--lex-dark-blue);
  border-radius: 8px;
  border: 2px solid var(--lex-light-blue);
  padding: 10px;
  margin-top: 20px;
  max-height: 300px;
  overflow-y: auto;
}

.filter .wordList.show {
  display: block;
}

.filter .wordList ul {
  list-style: none;
}

.filter .wordList ul li {
  margin-bottom: 15px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  padding: 8px;
  border-radius: 4px;
  transition: background 0.2s;
}

.filter .wordList ul li:hover {
  background: rgba(17, 149, 173, 0.2);
}

.filter .wordList ul li > span {
  text-overflow: ellipsis;
  overflow: hidden;
  white-space: nowrap;
  line-height: 24px;
  font-size: 14px;
}

.filter .wordList ul li > span.likes {
  position: relative;
  width: 24px;
  height: 24px;
  margin-right: 8px;
}

.filter .wordList ul li > span.likes i {
  color: var(--lex-orange);
  position: absolute;
  font-size: 18px;
  z-index: 1;
}

.filter .wordList ul li > span.likes span {
  position: absolute;
  top: 2px;
  left: 9px;
  color: white;
  z-index: 2;
  font-size: 11px;
}

.filter .wordList ul li > span.translate {
  width: 35%;
  padding: 0 10px;
  min-width: 150px;
  direction: rtl;
  text-align: right;
}

.filter .wordList ul li > span.dictionary {
  width: calc(45% - 16px);
  min-width: 200px;
  padding: 0 10px;
}

.filter .wordList ul li a {
  width: 15%;
  padding: 0 10px;
  min-width: 80px;
  font-size: 14px;
  color: white;
  text-decoration: none;
}

.filter .wordList ul li a:hover {
  color: var(--lex-orange);
}

/* Адаптивность */
@media (max-width: 768px) {
  .filter {
    padding: 15px 20px;
  }

  .filter .row.first .search-bar {
    width: 100%;
    margin-bottom: 10px;
  }

  .filter .row.first .filters {
    width: 100%;
    justify-content: center;
  }

  .filter .row.second .alphabets1,
  .filter .row.second .alphabets2,
  .filter .row.second .alphabets3 {
    width: 100%;
    max-width: 100%;
  }

  .filter .row.third .styled-select {
    width: 100%;
  }

  .search input,
  .search .wordList {
    width: 90%;
    min-width: 250px;
  }
}

