/* ========================================
   Tarot Mini App — Base Styles
   ======================================== */

:root {
  --bg-color: #1a0b2e;
  --bg-gradient: linear-gradient(135deg, #1a0b2e 0%, #2d1f4e 50%, #1a0b2e 100%);
  --gold: #d4af37;
  --gold-light: #f4d06f;
  --text-primary: #f5f5f5;
  --text-secondary: rgba(245, 245, 245, 0.7);
  --card-width: 100px;
  --card-height: 160px;
  --card-radius: 8px;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Georgia, serif;
  background: var(--bg-gradient);
  color: var(--text-primary);
}

#app {
  width: 100%;
  height: 100%;
  position: relative;
  overflow: hidden;
}

/* Canvas фоны */
#stars-canvas,
#particles-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

#particles-canvas {
  z-index: 100;
}

/* ========================================
   Экраны
   ======================================== */

.screen {
  display: none;
  width: 100%;
  height: 100%;
  overflow: hidden;
  padding: 20px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.screen.active {
  display: flex;
  opacity: 1;
}

/* ========================================
   Типографика
   ======================================== */

.title {
  font-family: 'Cormorant Garamond', serif;
  font-size: 48px;
  font-weight: 700;
  color: var(--gold);
  text-shadow: 0 0 20px rgba(212, 175, 55, 0.5);
  margin-bottom: 10px;
  letter-spacing: 4px;
}

/* Golden Tarot - магический древний шрифт */
.golden-title {
  font-family: 'Cinzel', 'Cormorant Garamond', serif;
  font-size: 56px;
  font-weight: 700;
  background: linear-gradient(135deg, var(--gold) 0%, var(--gold-light) 50%, var(--gold) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-shadow: 0 0 30px rgba(212, 175, 55, 0.7), 0 0 60px rgba(212, 175, 55, 0.4);
  letter-spacing: 6px;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.5));
}

.shuffle-hint {
  color: var(--text-secondary);
  font-size: 14px;
  margin-bottom: 20px;
  text-align: center;
  font-style: italic;
}

.shuffle-timer {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-family: 'Cormorant Garamond', serif;
  font-size: 72px;
  font-weight: 700;
  color: var(--gold);
  text-shadow: 0 0 30px rgba(212, 175, 55, 0.8);
  z-index: 100;
  animation: timerPulse 1s ease-in-out infinite;
}

@keyframes timerPulse {
  0%, 100% { opacity: 1; transform: translate(-50%, -50%) scale(1); }
  50% { opacity: 0.7; transform: translate(-50%, -50%) scale(1.1); }
}

.screen-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: 32px;
  font-weight: 600;
  color: var(--gold);
  margin-bottom: 24px;
  text-align: center;
}

.hint {
  color: var(--text-secondary);
  font-size: 14px;
  margin-top: 20px;
  text-align: center;
}

/* ========================================
   Главный экран: колода
   ======================================== */

#screen-main {
  position: relative;
}

#screen-situation {
  padding-bottom: 80px;
  overflow-y: auto;
}

.settings-btn {
  position: absolute;
  top: 20px;
  right: 20px;
  background: none;
  border: none;
  color: var(--gold);
  cursor: pointer;
  padding: 8px;
  opacity: 0.7;
  transition: opacity 0.2s, transform 0.2s;
}

.settings-btn:hover {
  opacity: 1;
  transform: rotate(30deg);
}

.deck-container {
  width: calc(var(--card-width) * 2.5);
  height: calc(var(--card-height) * 2.5);
  position: relative;
  cursor: pointer;
  transition: transform 0.3s ease;
  background-image: url('../assets/card-backs/back.webp');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  border-radius: calc(var(--card-radius) * 2.5);
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.6), 0 0 30px rgba(212, 175, 55, 0.3);
}

.deck-container:hover {
  transform: scale(1.03);
  box-shadow: 0 12px 50px rgba(0, 0, 0, 0.7), 0 0 40px rgba(212, 175, 55, 0.5);
}

.deck-container.shuffling {
  animation: shuffle-shake 0.5s ease-in-out;
}

@keyframes shuffle-shake {
  0%, 100% { transform: translateX(0) rotate(0); }
  25% { transform: translateX(-15px) rotate(-3deg); }
  50% { transform: translateX(15px) rotate(3deg); }
  75% { transform: translateX(-15px) rotate(-3deg); }
}

/* ========================================
   Экран выбора расклада
   ======================================== */

.spread-options {
  display: flex;
  flex-direction: column;
  gap: 16px;
  width: 100%;
  max-width: 300px;
}

.spread-btn {
  background: linear-gradient(135deg, rgba(212, 175, 55, 0.1) 0%, rgba(212, 175, 55, 0.2) 100%);
  border: 1px solid var(--gold);
  border-radius: 12px;
  padding: 20px;
  color: var(--text-primary);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  transition: all 0.3s ease;
}

.spread-btn:hover {
  background: linear-gradient(135deg, rgba(212, 175, 55, 0.2) 0%, rgba(212, 175, 55, 0.3) 100%);
  transform: translateY(-2px);
  box-shadow: 0 4px 20px rgba(212, 175, 55, 0.3);
}

.spread-btn:active {
  transform: translateY(0);
}

.spread-icon {
  font-size: 36px;
}

.spread-name {
  font-family: 'Cormorant Garamond', serif;
  font-size: 20px;
  font-weight: 600;
  color: var(--gold);
}

.spread-desc {
  font-size: 14px;
  color: var(--text-secondary);
}

/* ========================================
   Кнопки навигации
   ======================================== */

.back-btn {
  margin-top: 24px;
  background: none;
  border: 1px solid var(--text-secondary);
  border-radius: 8px;
  padding: 10px 24px;
  color: var(--text-secondary);
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.back-btn:hover {
  border-color: var(--gold);
  color: var(--gold);
}

/* ========================================
   Контейнеры карт
   ======================================== */

.cards-container {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  margin: 20px 0;
  min-height: var(--card-height);
}

/* ========================================
   Расклад на ситуацию — схема «Путь»
   ======================================== */

.situation-layout {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  margin: 10px auto;
  padding: 10px;
  max-width: 450px;
}

/* Ряд с картами */
.situation-cards-row {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  width: 100%;
}

/* Центральная карта в ряду */
.situation-cards-row .situation-card-center {
  margin: 0 8px;
}

.situation-card-slot {
  width: var(--card-width);
  height: calc(var(--card-height) + 20px);
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  overflow: visible;
}

.situation-card-slot .card {
  width: var(--card-width);
  height: var(--card-height);
  flex-shrink: 0;
}

/* Подпись позиции под картой */
.situation-position-label {
  margin-top: 4px;
  text-align: center;
  font-size: 9px;
  color: var(--gold);
  font-weight: 600;
  width: var(--card-width);
  max-width: var(--card-width);
  line-height: 1.2;
  overflow-wrap: break-word;
  word-wrap: break-word;
  hyphens: auto;
  transition: opacity 0.3s ease;
}

/* Скрываем подпись под картой после переворота */
.situation-card-slot.revealed .situation-position-label {
  opacity: 0;
}

/* Адаптивность */
@media (max-width: 360px) {
  .situation-layout {
    gap: 8px;
    padding: 5px 5px 50px 5px;
    transform: scale(0.85);
    margin-top: -10px;
  }
  
  .situation-cards-row {
    gap: 6px;
  }
  
  .situation-position-label {
    font-size: 8px;
  }
}

@media (min-width: 768px) {
  .situation-layout {
    gap: 16px;
  }
  
  .situation-cards-row {
    gap: 14px;
  }
}

/* ========================================
   Карта
   ======================================== */

.card {
  width: var(--card-width);
  height: var(--card-height);
  position: relative;
  cursor: pointer;
  perspective: 1000px;
  transform: translateZ(0);
  will-change: transform;
}

.card-inner {
  width: 100%;
  height: 100%;
  position: relative;
  transform-style: preserve-3d;
  transition: transform 0.7s cubic-bezier(0.4, 0.0, 0.2, 1);
  transform: translateZ(0);
  will-change: transform;
}

.card.flipped .card-inner {
  transform: rotateY(180deg) translateZ(0);
}

/* 3D-тень при перевороте */
.card::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  border-radius: var(--card-radius);
  box-shadow: none;
  transition: box-shadow 0.7s cubic-bezier(0.4, 0.0, 0.2, 1);
  pointer-events: none;
  z-index: -1;
}

.card.flipped::after {
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.5), 0 5px 15px rgba(0, 0, 0, 0.3);
}

.card-face {
  position: absolute;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  border-radius: var(--card-radius);
  overflow: hidden;
}

.card-front {
  background: linear-gradient(135deg, #1a1a3e 0%, #2d1f4e 100%);
  border: 2px solid var(--gold);
  background-image: url('../assets/card-backs/back.webp');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.card-back-face {
  background: #fff;
  transform: rotateY(180deg);
  border: 2px solid var(--gold);
  display: flex;
  flex-direction: column;
  background-image: url('../assets/card-backs/back.webp');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.card-back-face img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.card-glow {
  position: absolute;
  top: -2px;
  left: -2px;
  right: -2px;
  bottom: -2px;
  border-radius: var(--card-radius);
  background: radial-gradient(ellipse at center, rgba(212, 175, 55, 0.4) 0%, transparent 70%);
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
  z-index: -1;
}

.card:hover .card-glow,
.card.revealed .card-glow {
  opacity: 1;
}

.card-meaning {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 6px 8px;
  text-align: center;
  font-size: 10px;
  color: var(--text-primary);
  opacity: 0;
  transition: opacity 0.3s ease;
  line-height: 1.3;
  pointer-events: none;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  background: rgba(26, 11, 46, 0.9);
  overflow: hidden;
  overflow-wrap: break-word;
  word-wrap: break-word;
  hyphens: auto;
  border-radius: var(--card-radius);
}

.card.revealed .card-meaning {
  opacity: 1;
}

/* Расширенная карта (при клике) - ФИКСИРОВАННЫЙ РАЗМЕР (не менять!) */
.card.expanded {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(3.5);
  z-index: 1000;
  cursor: pointer;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.7), 0 0 40px rgba(212, 175, 55, 0.5);
  max-height: 80vh;
  max-width: 400px;
  border: 2px solid var(--gold);
  border-radius: 12px;
  background: transparent;
}

.card.expanded .card-inner {
  background: transparent;
}

.card.expanded .card-face {
  border-radius: 12px;
}

.card.expanded .card-meaning {
  opacity: 1;
  font-size: 5px;
  padding: 6px 8px;
  max-height: 70vh;
  overflow-y: auto;
  background: linear-gradient(135deg, rgba(26, 11, 46, 0.95), rgba(45, 31, 78, 0.95));
  border-radius: 10px;
}

/* Мистическое название карты - золотое, загадочное (МОДАЛЬНОЕ ОКНО) */
.card.expanded .card-meaning .level-name {
  font-size: 7px;
  margin-bottom: 4px;
  display: block;
  font-family: 'Cormorant Garamond', serif;
  font-weight: 600;
  color: rgba(245, 245, 245, 0.7);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  letter-spacing: 0.2px;
}

/* Название карты - крупное, магическое, золотое (МОДАЛЬНОЕ ОКНО) */
.card.expanded .card-meaning .card-name {
  font-size: 12px;
  margin-bottom: 6px;
  display: block;
  font-family: 'Cinzel', 'Cormorant Garamond', serif;
  font-weight: 800;
  background: linear-gradient(135deg, var(--gold) 0%, var(--gold-light) 50%, var(--gold) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-shadow: 0 0 25px rgba(212, 175, 55, 0.9), 0 0 50px rgba(212, 175, 55, 0.5), 0 0 75px rgba(212, 175, 55, 0.3);
  letter-spacing: 0.5px;
  filter: drop-shadow(0 3px 6px rgba(0, 0, 0, 0.9));
}

/* Описание карты - крупное, читаемое, Markdown-стиль (МОДАЛЬНОЕ ОКНО) */
.card.expanded .card-meaning .card-description {
  font-size: 3.5px;
  line-height: 1.4;
  display: block;
  word-break: break-word;
  overflow-wrap: break-word;
  hyphens: auto;
  color: rgba(245, 245, 245, 0.95);
  font-weight: 500;
  padding: 3px 4px;
  background: rgba(212, 175, 55, 0.05);
  border-radius: 4px;
  border-left: 2px solid rgba(212, 175, 55, 0.4);
}

/* Выделение жирным в описании (Markdown **текст**) */
.card.expanded .card-meaning .card-description strong {
  font-weight: 700;
  color: var(--gold-light);
}

/* Текст внутри обычной карты (когда перевёрнута) - НАСТРОЙКИ ДЛЯ iPhone 14 Pro */
.card .card-meaning .level-name {
  font-size: 4px;
  margin-bottom: 2px;
  color: rgba(245, 245, 245, 0.6);
  font-family: 'Cormorant Garamond', serif;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  letter-spacing: 0.1px;
}

/* Название карты - крупное, магическое (ПЕРЕВЁРНУТАЯ КАРТА) */
.card .card-meaning .card-name {
  font-size: 11px;
  margin-bottom: 3px;
  display: block;
  font-family: 'Cinzel', 'Cormorant Garamond', serif;
  font-weight: 700;
  color: var(--gold);
  text-shadow: 0 0 10px rgba(212, 175, 55, 0.7), 0 0 20px rgba(212, 175, 55, 0.4);
  letter-spacing: 0.3px;
}

/* Описание карты - крупное, читаемое, Markdown-стиль (ПЕРЕВЁРНУТАЯ КАРТА) */
.card .card-meaning .card-description {
  font-size: 4px;
  line-height: 1.35;
  display: block;
  word-break: break-word;
  overflow-wrap: break-word;
  hyphens: auto;
  color: rgba(245, 245, 245, 0.9);
  font-weight: 500;
  padding: 2px 3px;
  background: rgba(212, 175, 55, 0.05);
  border-radius: 3px;
  border-left: 2px solid rgba(212, 175, 55, 0.3);
}

/* Выделение жирным в описании (Markdown **текст**) */
.card .card-meaning .card-description strong {
  font-weight: 700;
  color: var(--gold-light);
}

/* Затемнение фона при расширенной карте */
.card-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  z-index: 999;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  backdrop-filter: blur(4px);
}

.card-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.card-meaning strong {
  color: var(--gold);
  font-size: 11px;
  display: block;
  margin-bottom: 4px;
  font-weight: 600;
  overflow-wrap: break-word;
  word-wrap: break-word;
}

.card-meaning span {
  font-size: 9px;
  line-height: 1.2;
  overflow: hidden;
  overflow-wrap: break-word;
  word-wrap: break-word;
  hyphens: auto;
}

/* ========================================
   Экран концентрации
   ======================================== */

.concentration-header {
  width: 100%;
  display: flex;
  justify-content: center;
  margin-bottom: 10px;
}

.description-btn {
  background: linear-gradient(135deg, rgba(212, 175, 55, 0.15) 0%, rgba(212, 175, 55, 0.25) 100%);
  border: 1px solid var(--gold);
  border-radius: 10px;
  padding: 10px 20px;
  color: var(--gold);
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.description-btn:hover {
  background: linear-gradient(135deg, rgba(212, 175, 55, 0.25) 0%, rgba(212, 175, 55, 0.35) 100%);
}

.concentration-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
}

/* Песочные часы */
.hourglass {
  position: relative;
  width: 80px;
  height: 120px;
  animation: flip-hourglass 7s linear forwards;
}

@keyframes flip-hourglass {
  0% { transform: rotate(0deg); }
  50% { transform: rotate(180deg); }
  100% { transform: rotate(360deg); }
}

.hourglass-top,
.hourglass-bottom {
  position: relative;
  width: 80px;
  height: 50px;
  overflow: hidden;
}

.hourglass-top {
  border: 3px solid var(--gold);
  border-bottom: none;
  border-radius: 50% 50% 0 0;
}

.hourglass-bottom {
  border: 3px solid var(--gold);
  border-top: none;
  border-radius: 0 0 50% 50%;
}

.hourglass-middle {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 20px;
  height: 20px;
  background: var(--gold);
  border-radius: 50%;
  z-index: 10;
}

/* Песок */
.sand-top {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 40px;
  background: linear-gradient(to bottom, var(--gold) 0%, var(--gold-light) 100%);
  border-radius: 0 0 50% 50%;
  animation: sand-flow-top 7s linear forwards;
}

@keyframes sand-flow-top {
  0% { height: 40px; opacity: 1; }
  50% { height: 0px; opacity: 0.5; }
  100% { height: 0px; opacity: 0; }
}

.sand-bottom {
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  background: linear-gradient(to top, var(--gold) 0%, var(--gold-light) 100%);
  border-radius: 50% 50% 0 0;
  animation: sand-flow-bottom 7s linear forwards;
}

@keyframes sand-flow-bottom {
  0% { height: 0; width: 0; }
  50% { height: 0; width: 0; }
  100% { height: 35px; width: 50px; }
}

/* Поток песка */
.hourglass::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translateX(-50%);
  width: 3px;
  height: 0;
  background: var(--gold);
  animation: sand-stream 7s linear forwards;
}

@keyframes sand-stream {
  0% { height: 0; opacity: 1; }
  10% { height: 60px; opacity: 1; }
  90% { height: 60px; opacity: 1; }
  100% { height: 0; opacity: 0; }
}

.concentration-text {
  color: var(--text-secondary);
  font-size: 16px;
  text-align: center;
}

.timer-text {
  font-family: 'Cormorant Garamond', serif;
  font-size: 48px;
  font-weight: 700;
  color: var(--gold);
}

/* ========================================
   Экран активации
   ======================================== */

.activation-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  margin-top: 20px;
}

.activation-text {
  color: var(--text-secondary);
  font-size: 16px;
  text-align: center;
  margin-bottom: 10px;
}

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

.activate-btn {
  background: linear-gradient(135deg, var(--gold) 0%, var(--gold-light) 100%);
  border: none;
  border-radius: 12px;
  padding: 16px 40px;
  color: #1a0b2e;
  font-family: 'Cormorant Garamond', serif;
  font-size: 18px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 20px rgba(212, 175, 55, 0.4);
}

.activate-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 6px 30px rgba(212, 175, 55, 0.6);
}

.activate-btn:active {
  transform: scale(0.98);
}

.shake-hint {
  color: var(--text-secondary);
  font-size: 13px;
}

/* ========================================
   Результат и действия
   ======================================== */

.result-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 30px;
  width: 100%;
  max-width: 280px;
}

.share-btn,
.new-spread-btn {
  background: linear-gradient(135deg, rgba(212, 175, 55, 0.15) 0%, rgba(212, 175, 55, 0.25) 100%);
  border: 1px solid var(--gold);
  border-radius: 10px;
  padding: 14px 24px;
  color: var(--text-primary);
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.share-btn:hover,
.new-spread-btn:hover {
  background: linear-gradient(135deg, rgba(212, 175, 55, 0.25) 0%, rgba(212, 175, 55, 0.35) 100%);
  transform: translateY(-1px);
}

.new-spread-btn {
  background: transparent;
  border-color: var(--text-secondary);
  color: var(--text-secondary);
}

.new-spread-btn:hover {
  border-color: var(--gold);
  color: var(--gold);
  background: transparent;
}

/* ========================================
   Модальное окно
   ======================================== */

.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.modal.active {
  display: flex;
  opacity: 1;
}

.modal-content {
  background: linear-gradient(135deg, #1a0b2e 0%, #2d1f4e 100%);
  border: 1px solid var(--gold);
  border-radius: 16px;
  padding: 24px;
  width: 90%;
  max-width: 320px;
}

.modal-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: 24px;
  color: var(--gold);
  text-align: center;
  margin-bottom: 24px;
}

.setting-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid rgba(212, 175, 55, 0.2);
}

.setting-label {
  font-size: 16px;
  color: var(--text-primary);
}

/* Toggle переключатель */
.toggle {
  position: relative;
  width: 50px;
  height: 26px;
  display: inline-block;
}

.toggle input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(255, 255, 255, 0.2);
  transition: 0.3s;
  border-radius: 26px;
}

.slider:before {
  position: absolute;
  content: "";
  height: 20px;
  width: 20px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: 0.3s;
  border-radius: 50%;
}

input:checked + .slider {
  background-color: var(--gold);
}

input:checked + .slider:before {
  transform: translateX(24px);
}

.modal-close {
  width: 100%;
  margin-top: 20px;
  background: transparent;
  border: 1px solid var(--gold);
  border-radius: 8px;
  padding: 12px;
  color: var(--gold);
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.modal-close:hover {
  background: rgba(212, 175, 55, 0.1);
}

/* Модальное окно описания расклада */
.modal-description {
  max-width: 600px;
  max-height: 85vh;
  overflow-y: auto;
}

.modal-body {
  text-align: left;
  margin: 20px 0;
}

.description-intro {
  color: var(--text-primary);
  font-size: 13px;
  line-height: 1.6;
  margin-bottom: 20px;
}

.spread-info {
  display: flex;
  gap: 20px;
  margin-bottom: 20px;
  padding: 12px;
  background: rgba(212, 175, 55, 0.05);
  border-radius: 8px;
}

.info-item {
  display: flex;
  gap: 8px;
}

.info-label {
  color: var(--gold);
  font-size: 12px;
  font-weight: 600;
}

.info-value {
  color: var(--text-primary);
  font-size: 12px;
}

.section-title {
  color: var(--gold);
  font-family: 'Cormorant Garamond', serif;
  font-size: 18px;
  font-weight: 600;
  margin: 24px 0 16px 0;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(212, 175, 55, 0.3);
}

/* Схема расклада */
.layout-diagram {
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: center;
  margin: 20px 0;
  padding: 16px;
  background: rgba(26, 11, 46, 0.5);
  border-radius: 8px;
}

.layout-row {
  display: flex;
  gap: 12px;
}

.layout-cell {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
}

.layout-cell.card-pos {
  background: linear-gradient(135deg, rgba(212, 175, 55, 0.2), rgba(212, 175, 55, 0.3));
  border: 1px solid var(--gold);
  color: var(--gold);
}

.layout-cell.empty {
  background: transparent;
}

.layout-caption {
  color: var(--text-secondary);
  font-size: 11px;
  text-align: center;
  font-style: italic;
  margin-top: 8px;
}

/* Позиции карт */
.positions-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.position-item {
  background: rgba(212, 175, 55, 0.05);
  border-left: 3px solid var(--gold);
  padding: 12px;
  border-radius: 0 8px 8px 0;
}

.position-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.position-number {
  width: 24px;
  height: 24px;
  background: var(--gold);
  color: #1a0b2e;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  flex-shrink: 0;
}

.position-name {
  color: var(--gold);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.3;
}

.position-badges {
  display: flex;
  gap: 6px;
  margin-bottom: 6px;
}

.level-badge,
.side-badge {
  font-size: 9px;
  padding: 2px 6px;
  border-radius: 4px;
  font-weight: 600;
  text-transform: uppercase;
}

.level-ментальный {
  background: rgba(100, 150, 255, 0.2);
  color: #6496ff;
}

.level-астральный {
  background: rgba(180, 100, 255, 0.2);
  color: #b464ff;
}

.level-физический {
  background: rgba(255, 150, 100, 0.2);
  color: #ff9664;
}

.side-прошлое {
  background: rgba(255, 100, 100, 0.15);
  color: #ff6464;
}

.side-будущее {
  background: rgba(100, 255, 150, 0.15);
  color: #64ff96;
}

.position-position {
  color: var(--text-secondary);
  font-size: 11px;
  font-style: italic;
  margin-bottom: 8px;
}

.position-description {
  color: var(--text-primary);
  font-size: 12px;
  line-height: 1.5;
}

/* Три плана бытия */
.levels-description {
  color: var(--text-secondary);
  font-size: 12px;
  line-height: 1.5;
  margin-bottom: 16px;
}

.levels-pairs {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.level-pair {
  background: rgba(212, 175, 55, 0.08);
  border-radius: 8px;
  padding: 12px;
}

.pair-level {
  color: var(--gold);
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 4px;
}

.pair-cards {
  color: var(--text-primary);
  font-size: 12px;
  font-weight: 500;
  margin-bottom: 4px;
}

.pair-description {
  color: var(--text-secondary);
  font-size: 11px;
  line-height: 1.4;
}

/* Рекомендация */
.recommendation-section {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid rgba(212, 175, 55, 0.3);
}

.recommendation-text {
  color: var(--text-primary);
  font-size: 12px;
  line-height: 1.6;
  margin-bottom: 12px;
}

.recommendation-disclaimer {
  color: var(--text-secondary);
  font-size: 11px;
  font-style: italic;
  padding: 12px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 6px;
  text-align: center;
}

/* ========================================
   Адаптивность
   ======================================== */

@media (max-width: 360px) {
  :root {
    --card-width: 90px;
    --card-height: 144px;
  }
  
  .title {
    font-size: 36px;
  }
  
  .screen-title {
    font-size: 26px;
  }
}

@media (min-width: 768px) {
  :root {
    --card-width: 120px;
    --card-height: 192px;
  }
}

/* ========================================
   ЭКРАН ВЫБОРА ТАРОЛОГА
   ======================================== */

.tarologists-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
  width: 100%;
  max-width: 400px;
  padding: 10px;
}

.tarologist-card {
  background: linear-gradient(135deg, rgba(212, 175, 55, 0.1) 0%, rgba(212, 175, 55, 0.15) 100%);
  border: 1px solid rgba(212, 175, 55, 0.3);
  border-radius: 16px;
  padding: 16px;
  display: flex;
  gap: 16px;
  align-items: center;
  transition: all 0.3s ease;
  cursor: pointer;
}

.tarologist-card:hover {
  background: linear-gradient(135deg, rgba(212, 175, 55, 0.15) 0%, rgba(212, 175, 55, 0.2) 100%);
  border-color: rgba(212, 175, 55, 0.5);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(212, 175, 55, 0.2);
}

.tarologist-card.selected {
  border-color: var(--gold);
  box-shadow: 0 0 20px rgba(212, 175, 55, 0.4);
}

.tarologist-avatar {
  width: 70px;
  height: 70px;
  border-radius: 12px;
  object-fit: cover;
  border: 2px solid rgba(212, 175, 55, 0.4);
  flex-shrink: 0;
}

.tarologist-info {
  flex: 1;
  min-width: 0;
}

.tarologist-name {
  font-family: 'Cormorant Garamond', serif;
  font-size: 20px;
  font-weight: 600;
  color: var(--gold);
  margin-bottom: 4px;
}

.tarologist-description {
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 8px;
}

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

.tarologist-rating {
  display: flex;
  align-items: center;
  gap: 2px;
  font-size: 14px;
}

.tarologist-stars {
  color: var(--gold);
  text-shadow: 0 0 8px rgba(212, 175, 55, 0.6);
}

.tarologist-rating-value {
  color: var(--text-secondary);
  font-size: 11px;
}

.tarologist-price {
  background: linear-gradient(135deg, var(--gold) 0%, var(--gold-light) 100%);
  color: #1a0b2e;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
}

.tarologist-level {
  font-size: 10px;
  color: var(--text-secondary);
  background: rgba(255, 255, 255, 0.1);
  padding: 2px 8px;
  border-radius: 10px;
}

.tarologist-select-btn {
  background: linear-gradient(135deg, var(--gold) 0%, var(--gold-light) 100%);
  border: none;
  border-radius: 10px;
  padding: 10px 20px;
  color: #1a0b2e;
  font-family: 'Cormorant Garamond', serif;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.tarologist-select-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 16px rgba(212, 175, 55, 0.4);
}

.tarologist-select-btn:disabled {
  background: rgba(128, 128, 128, 0.3);
  cursor: not-allowed;
  opacity: 0.6;
}

.tarologist-select-btn:disabled:hover {
  transform: none;
  box-shadow: none;
}

/* Статус онлайн */
.online-status {
  font-size: 11px;
  padding: 2px 6px;
  border-radius: 10px;
  margin-left: 6px;
  font-weight: 600;
}

.online-status.online {
  background: rgba(76, 175, 80, 0.2);
  color: #4caf50;
}

.online-status.offline {
  background: rgba(128, 128, 128, 0.2);
  color: #888;
}

.online-status.busy {
  background: rgba(244, 67, 54, 0.2);
  color: #f44336;
}

.tarologist-loading {
  display: none;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  padding: 40px 20px;
}

.tarologist-loading.active {
  display: flex;
}

.loading-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid rgba(212, 175, 55, 0.2);
  border-top-color: var(--gold);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.tarologist-loading p {
  color: var(--text-secondary);
  font-size: 14px;
}

/* ========================================
   МОДАЛЬНОЕ ОКНО ОПЛАТЫ
   ======================================== */

.modal-payment {
  max-width: 360px;
}

.payment-info {
  background: rgba(255, 255, 255, 0.03);
  border-radius: 12px;
  padding: 16px;
  margin: 16px 0;
}

.payment-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.payment-row:last-child {
  border-bottom: none;
}

.payment-label {
  color: var(--text-secondary);
  font-size: 14px;
}

.payment-value {
  color: var(--text-primary);
  font-size: 14px;
  font-weight: 500;
}

.payment-total {
  margin-top: 8px;
  padding-top: 12px;
  border-top: 2px solid rgba(212, 175, 55, 0.3);
}

.payment-total .payment-value {
  font-size: 20px;
  font-weight: 700;
  color: var(--gold);
}

.stars-amount {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.stars-amount::before {
  content: '⭐';
  font-size: 16px;
}

.payment-disclaimer {
  color: var(--text-secondary);
  font-size: 12px;
  line-height: 1.5;
  text-align: center;
  margin: 16px 0;
  font-style: italic;
}

.payment-buttons {
  display: flex;
  gap: 12px;
  margin-top: 20px;
}

.payment-cancel-btn,
.payment-confirm-btn {
  flex: 1;
  padding: 14px 20px;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  border: none;
}

.payment-cancel-btn {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-secondary);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.payment-cancel-btn:hover {
  background: rgba(255, 255, 255, 0.15);
  color: var(--text-primary);
}

.payment-confirm-btn {
  background: linear-gradient(135deg, var(--gold) 0%, var(--gold-light) 100%);
  color: #1a0b2e;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.payment-confirm-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 6px 20px rgba(212, 175, 55, 0.4);
}

.btn-stars {
  font-size: 16px;
}

/* ========================================
   ЭКРАН ЧАТА
   ======================================== */

#screen-chat {
  justify-content: flex-start;
  padding: 0;
  overflow: hidden;
}

.chat-header {
  width: 100%;
  padding: 16px 20px;
  background: linear-gradient(135deg, rgba(26, 11, 46, 0.95) 0%, rgba(45, 31, 78, 0.95) 100%);
  border-bottom: 1px solid rgba(212, 175, 55, 0.2);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  z-index: 10;
}

.chat-tarologist-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.chat-tarologist-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(212, 175, 55, 0.4);
}

.chat-tarologist-name {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.chat-tarologist-name span:first-child {
  font-family: 'Cormorant Garamond', serif;
  font-size: 16px;
  font-weight: 600;
  color: var(--gold);
}

.chat-status {
  font-size: 11px;
  color: var(--text-secondary);
}

.chat-timer {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(212, 175, 55, 0.1);
  padding: 6px 12px;
  border-radius: 20px;
  border: 1px solid rgba(212, 175, 55, 0.3);
}

.timer-icon {
  font-size: 14px;
}

.timer-value {
  font-family: 'Cormorant Garamond', serif;
  font-size: 16px;
  font-weight: 600;
  color: var(--gold);
  min-width: 50px;
  text-align: right;
}

.chat-timer.urgent {
  animation: timerUrgent 1s ease-in-out infinite;
}

@keyframes timerUrgent {
  0%, 100% { border-color: rgba(212, 175, 55, 0.3); }
  50% { border-color: rgba(239, 68, 68, 0.6); }
}

.chat-messages {
  flex: 1;
  width: 100%;
  padding: 16px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.chat-message {
  max-width: 80%;
  padding: 10px 14px;
  border-radius: 16px;
  font-size: 14px;
  line-height: 1.4;
  word-wrap: break-word;
  animation: messageSlide 0.3s ease;
}

@keyframes messageSlide {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.chat-message.client {
  align-self: flex-end;
  background: linear-gradient(135deg, var(--gold) 0%, var(--gold-light) 100%);
  color: #1a0b2e;
  border-bottom-right-radius: 4px;
}

.chat-message.tarologist {
  align-self: flex-start;
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-primary);
  border-bottom-left-radius: 4px;
}

.chat-message-time {
  font-size: 10px;
  opacity: 0.7;
  margin-top: 4px;
  text-align: right;
}

.chat-input-container {
  width: 100%;
  padding: 16px;
  background: linear-gradient(135deg, rgba(26, 11, 46, 0.95) 0%, rgba(45, 31, 78, 0.95) 100%);
  border-top: 1px solid rgba(212, 175, 55, 0.2);
  display: flex;
  gap: 12px;
  align-items: center;
}

.chat-input {
  flex: 1;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 24px;
  padding: 12px 16px;
  font-size: 14px;
  color: var(--text-primary);
  outline: none;
  transition: all 0.2s ease;
}

.chat-input:focus {
  border-color: rgba(212, 175, 55, 0.4);
  background: rgba(255, 255, 255, 0.08);
}

.chat-input::placeholder {
  color: var(--text-secondary);
}

.chat-send-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--gold) 0%, var(--gold-light) 100%);
  border: none;
  color: #1a0b2e;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.chat-send-btn:hover {
  transform: scale(1.1);
  box-shadow: 0 4px 16px rgba(212, 175, 55, 0.4);
}

.chat-send-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.chat-timeout-message {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(26, 11, 46, 0.98);
  border: 2px solid rgba(212, 175, 55, 0.4);
  border-radius: 16px;
  padding: 24px 32px;
  text-align: center;
  z-index: 100;
}

.chat-timeout-message p:first-child {
  font-family: 'Cormorant Garamond', serif;
  font-size: 20px;
  font-weight: 600;
  color: var(--gold);
  margin-bottom: 8px;
}

.timeout-subtext {
  color: var(--text-secondary);
  font-size: 13px;
  font-style: italic;
}

/* ========================================
   Медиа-сообщения в чате
   ======================================== */

.message-media {
  margin-bottom: 8px;
}

.message-media img {
  max-width: 100%;
  max-height: 300px;
  border-radius: 12px;
  display: block;
  object-fit: cover;
}

.message-voice,
.message-audio {
  margin-bottom: 8px;
}

.message-voice audio,
.message-audio audio {
  max-width: 100%;
  height: 40px;
}

.message-video {
  margin-bottom: 8px;
}

.message-video video {
  max-width: 100%;
  max-height: 300px;
  border-radius: 12px;
}

.message-document {
  margin-bottom: 8px;
}

.document-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--gold);
  text-decoration: none;
  padding: 8px 12px;
  background: rgba(212, 175, 55, 0.1);
  border: 1px solid rgba(212, 175, 55, 0.3);
  border-radius: 8px;
  font-size: 13px;
  transition: all 0.2s ease;
}

.document-link:hover {
  background: rgba(212, 175, 55, 0.2);
  border-color: rgba(212, 175, 55, 0.5);
}

/* Кнопка отправки расклада */
.share-spread-btn {
  align-self: center;
  background: linear-gradient(135deg, rgba(212, 175, 55, 0.15) 0%, rgba(212, 175, 55, 0.25) 100%);
  border: 1px solid var(--gold);
  border-radius: 12px;
  padding: 12px 20px;
  color: var(--text-primary);
  font-family: 'Cormorant Garamond', serif;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 8px 0;
  max-width: 90%;
}

.share-spread-btn:hover {
  background: linear-gradient(135deg, rgba(212, 175, 55, 0.25) 0%, rgba(212, 175, 55, 0.35) 100%);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(212, 175, 55, 0.3);
}

.share-spread-btn:active {
  transform: translateY(0);
}

.btn-icon {
  font-size: 18px;
}

/* ========================================
   ЭКРАН ОЦЕНКИ
   ======================================== */

.rating-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  padding: 20px;
  max-width: 400px;
}

.rating-icon {
  font-size: 64px;
  filter: drop-shadow(0 0 20px rgba(212, 175, 55, 0.5));
}

.rating-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: 28px;
  font-weight: 600;
  color: var(--gold);
  text-align: center;
}

.rating-subtitle {
  color: var(--text-secondary);
  font-size: 14px;
  text-align: center;
}

.stars-rating {
  display: flex;
  gap: 8px;
  margin: 16px 0;
}

.star-btn {
  background: none;
  border: none;
  font-size: 48px;
  color: rgba(212, 175, 55, 0.3);
  cursor: pointer;
  transition: all 0.2s ease;
  padding: 0;
  line-height: 1;
}

.star-btn:hover {
  transform: scale(1.1);
}

.star-btn.active,
.star-btn.active ~ .star-btn {
  color: rgba(212, 175, 55, 0.3);
}

.star-btn.active,
.star-btn.filled {
  color: var(--gold);
  text-shadow: 0 0 20px rgba(212, 175, 55, 0.8), 0 0 40px rgba(212, 175, 55, 0.4);
}

.selected-rating-text {
  color: var(--text-secondary);
  font-size: 14px;
  min-height: 20px;
}

.submit-rating-btn {
  background: linear-gradient(135deg, var(--gold) 0%, var(--gold-light) 100%);
  border: none;
  border-radius: 12px;
  padding: 14px 40px;
  color: #1a0b2e;
  font-family: 'Cormorant Garamond', serif;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  margin-top: 8px;
}

.submit-rating-btn:hover:not(:disabled) {
  transform: scale(1.05);
  box-shadow: 0 6px 20px rgba(212, 175, 55, 0.4);
}

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

.back-to-main-rating-btn {
  background: transparent;
  border: 1px solid var(--text-secondary);
  border-radius: 8px;
  padding: 10px 24px;
  color: var(--text-secondary);
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s ease;
  margin-top: 8px;
}

.back-to-main-rating-btn:hover {
  border-color: var(--gold);
  color: var(--gold);
}

/* ========================================
   МОДАЛЬНОЕ ОКНО УСПЕШНОЙ ОПЛАТЫ
   ======================================== */

.modal-success {
  text-align: center;
}

.success-icon {
  font-size: 64px;
  margin-bottom: 16px;
}

.success-text {
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 1.5;
  margin: 16px 0;
}

.start-chat-btn {
  background: linear-gradient(135deg, var(--gold) 0%, var(--gold-light) 100%);
  border: none;
  border-radius: 10px;
  padding: 14px 40px;
  color: #1a0b2e;
  font-family: 'Cormorant Garamond', serif;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  margin-top: 16px;
  width: 100%;
}

.start-chat-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 6px 20px rgba(212, 175, 55, 0.4);
}

/* ========================================
   МОДАЛЬНОЕ ОКНО ОЦЕНКИ КОНСУЛЬТАЦИИ
   ======================================== */

.modal-rating {
  text-align: center;
  max-width: 400px;
}

.rating-text {
  color: var(--text-secondary);
  font-size: 14px;
  margin: 12px 0 20px;
}

.rating-stars {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin: 20px 0;
}

.rating-stars .star {
  font-size: 32px;
  cursor: pointer;
  opacity: 0.3;
  transition: all 0.2s ease;
}

.rating-stars .star:hover,
.rating-stars .star.active {
  opacity: 1;
  transform: scale(1.2);
}

.rating-comment {
  margin: 20px 0;
}

.rating-comment textarea {
  width: 100%;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  padding: 12px;
  color: var(--text-primary);
  font-family: inherit;
  font-size: 14px;
  resize: vertical;
}

.rating-comment textarea:focus {
  outline: none;
  border-color: var(--gold);
}

.rating-comment textarea::placeholder {
  color: var(--text-secondary);
}

.rating-actions {
  display: flex;
  gap: 12px;
  margin-top: 20px;
}

.rating-actions .modal-close {
  flex: 1;
  background: transparent;
  border: 1px solid var(--text-secondary);
  color: var(--text-secondary);
}

.rating-actions .modal-close:hover {
  border-color: var(--gold);
  color: var(--gold);
}

.rating-actions .submit-rating-btn {
  flex: 1;
  background: linear-gradient(135deg, var(--gold) 0%, var(--gold-light) 100%);
  border: none;
  color: #1a0b2e;
  font-weight: 600;
}

.rating-actions .submit-rating-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.rating-actions .submit-rating-btn:not(:disabled):hover {
  transform: scale(1.05);
  box-shadow: 0 6px 20px rgba(212, 175, 55, 0.4);
}
