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

html, body {
  height: 100%;
  overflow: hidden;
}

body {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: #0a0618;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  color: #f0e6d8;
  margin: 0;
  padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
}

.wrap {
  width: 100%;
  max-width: 100%;
  height: 100%;
  background: linear-gradient(145deg, #1a1228, #261d38);
  border-radius: 0;
  padding: 8px;
  border: 1px solid rgba(255, 215, 0, 0.2);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8);
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 8px;
  overflow: hidden;
}

.wrap::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: conic-gradient(from 0deg, transparent, rgba(255, 215, 0, 0.02), transparent, rgba(255, 215, 0, 0.02), transparent);
  animation: spinGlow 30s linear infinite;
  pointer-events: none;
}

@keyframes spinGlow {
  100% { transform: rotate(360deg); }
}

.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 2;
  flex-shrink: 0;
  min-height: 44px;
}

.header h1 {
  font-size: clamp(1.2rem, 5vw, 1.8rem);
  font-weight: 300;
  color: #f0e6d8;
  margin-right: auto;
}

.right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.lvl-badge {
  background: rgba(212, 175, 55, 0.12);
  border: 1px solid rgba(212, 175, 55, 0.3);
  border-radius: 30px;
  padding: 6px 14px;
  font-size: 0.85rem;
  color: #f0c45a;
  display: flex;
  align-items: center;
  gap: 6px;
}

.lvl-badge strong {
  font-size: 1.1rem;
}

.title-badge {
  font-size: 0.8rem;
  color: #b388ff;
  background: rgba(179, 136, 255, 0.1);
  border-radius: 20px;
  padding: 0 10px;
  white-space: nowrap;
}

.vip-badge {
  font-size: 0.8rem;
  background: rgba(255, 215, 0, 0.2);
  border: 1px solid #d4af37;
  border-radius: 20px;
  padding: 2px 12px;
  color: #f5c542;
  white-space: nowrap;
  margin-left: 4px;
}

#settingsBtn {
  background: none;
  border: none;
  color: #b0a0c0;
  font-size: 1.4rem;
  cursor: pointer;
}

.burger-btn {
  display: none;
  background: none;
  border: none;
  color: #f0e6d8;
  font-size: 1.8rem;
  cursor: pointer;
  padding: 0 8px;
}

.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  z-index: 2;
  flex-shrink: 0;
}

.tab-btn {
  padding: 6px 14px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.02));
  border: 1px solid rgba(255, 215, 0, 0.15);
  border-radius: 20px;
  color: #c0b0d0;
  font-size: 0.8rem;
  cursor: pointer;
  transition: 0.3s;
  display: flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

.tab-btn.active {
  background: linear-gradient(135deg, rgba(212, 175, 55, 0.25), rgba(212, 175, 55, 0.08));
  border-color: #d4af37;
  color: #f5c542;
  box-shadow: 0 0 12px rgba(212, 175, 55, 0.3);
}

.tab-btn:active {
  transform: scale(0.96);
}

.main-content {
  position: relative;
  flex: 1;
  overflow: hidden;
  z-index: 1;
  min-height: 0;
}

.tab-content {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow-y: auto;
  display: none;
}

.tab-content.active {
  display: block;
}

.side-menu {
  position: fixed;
  top: 0;
  left: -280px;
  width: 260px;
  height: 100%;
  background: linear-gradient(180deg, #1a1228, #261d38);
  z-index: 2000;
  transition: left 0.3s ease;
  padding: 12px;
  border-right: 1px solid rgba(212, 175, 55, 0.2);
  display: flex;
  flex-direction: column;
  font-family: inherit;
}

.side-menu.open {
  left: 0;
}

.side-menu-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: #f0c45a;
  margin-bottom: 12px;
  font-size: 1rem;
}

.close-menu-btn {
  background: none;
  border: none;
  color: #f0e6d8;
  font-size: 1.4rem;
  cursor: pointer;
}

.side-menu-content {
  overflow-y: auto;
  flex: 1;
}

.overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1500;
  display: none;
}

.overlay.show {
  display: block;
}

.wheel-section {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  justify-content: center;
  height: 100%;
}

.wheel-container {
  flex: 0 0 auto;
  position: relative;
  width: min(340px, 80vw);
  height: min(340px, 80vw);
  background: radial-gradient(circle, #2a1f3a, #0f0a1a);
  border-radius: 50%;
  padding: 6px;
  box-shadow: inset 0 0 80px rgba(0, 0, 0, 0.6), 0 0 60px rgba(212, 175, 55, 0.15);
}

#wheelCanvas {
  width: 100%;
  height: 100%;
  display: block;
  border-radius: 50%;
}

.wheel-info {
  flex: 1;
  min-width: 220px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.btn-spin {
  display: block;
  margin: 10px auto;
  padding: 14px 32px;
  background: linear-gradient(135deg, #f5c542, #b8860b);
  border: none;
  border-radius: 60px;
  color: #1a1225;
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: 1px;
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(184, 134, 11, 0.5), 0 0 20px rgba(245, 197, 66, 0.4);
  text-transform: uppercase;
  transition: 0.3s;
}

.btn-spin:hover {
  box-shadow: 0 8px 28px rgba(184, 134, 11, 0.7), 0 0 30px rgba(245, 197, 66, 0.6);
}

.btn-spin:active {
  transform: scale(0.94);
}

.btn-spin:disabled {
  opacity: 0.4;
  pointer-events: none;
}

.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
  gap: 6px;
  background: rgba(0, 0, 0, 0.4);
  border-radius: 20px;
  padding: 8px 10px;
  margin: 10px 0;
  border: 1px solid rgba(255, 255, 255, 0.04);
}

.stats div {
  text-align: center;
}

.stats span {
  opacity: 0.6;
  display: block;
  font-size: 0.75rem;
}

.stats strong {
  font-size: 1rem;
  color: #f0e6d8;
  display: block;
}

.result-box {
  background: rgba(0, 0, 0, 0.5);
  border-radius: 20px;
  padding: 12px;
  min-height: 60px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(212, 175, 55, 0.15);
  margin-bottom: 8px;
}

.result-box .big {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 4px;
}

.result-box .sub {
  font-size: 0.9rem;
  color: #b0a0c0;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: center;
  margin: 8px 0;
}

.actions button {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 215, 0, 0.15);
  border-radius: 30px;
  padding: 6px 16px;
  color: #d0c0e0;
  font-size: 0.8rem;
  cursor: pointer;
  transition: 0.3s;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.actions button:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: #d4af37;
}

.actions button:active {
  transform: scale(0.96);
}

.actions .gold {
  background: rgba(212, 175, 55, 0.15);
  border-color: #b8860b;
  color: #f5c542;
  font-weight: 600;
}

.actions .gold:hover {
  background: rgba(212, 175, 55, 0.25);
}

.vip-banner {
  display: none;
  background: linear-gradient(135deg, #d4af37, #b8860b);
  color: #1a1225;
  font-weight: 700;
  font-size: 0.85rem;
  text-align: center;
  padding: 8px;
  border-radius: 20px;
  margin: 4px 0;
}

.vip-banner.active {
  display: block;
}

.garden-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
  gap: 8px;
  margin: 8px 0;
  padding: 10px;
  background: rgba(20, 40, 20, 0.25);
  border-radius: 20px;
  border: 1px solid rgba(100, 160, 80, 0.15);
}

.plant-card {
  aspect-ratio: 1/1;
  border-radius: 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  background: rgba(30, 50, 30, 0.4);
  border: 2px solid rgba(100, 160, 80, 0.25);
  position: relative;
  cursor: pointer;
  transition: 0.3s;
}

.plant-card:hover {
  border-color: rgba(212, 175, 55, 0.5);
  transform: scale(1.03);
}

.plant-card .emoji {
  font-size: 2.2rem;
}

.plant-card .pname {
  color: #c0d8b0;
  font-weight: 500;
  margin-top: 4px;
}

.plant-card .pstage {
  color: #8a9a78;
  font-size: 0.75rem;
}

.plant-card .water-status {
  position: absolute;
  top: 4px;
  right: 4px;
  font-size: 0.9rem;
}

.empty-slot {
  border-style: dashed;
  border-color: rgba(100, 160, 60, 0.15);
  background: rgba(10, 15, 8, 0.2);
}

.plant-card.seed-stage {
  background: rgba(139, 69, 19, 0.3);
  border-color: #8b4513;
}

.plant-card.sprout-stage {
  background: rgba(85, 107, 47, 0.3);
  border-color: #6b8e23;
}

.plant-card.strong-stage {
  background: rgba(34, 139, 34, 0.3);
  border-color: #228b22;
}

.plant-card.flower-stage {
  background: rgba(218, 165, 32, 0.3);
  border-color: #daa520;
}

.plant-card.wilted-stage {
  background: rgba(160, 82, 45, 0.3);
  border-color: #a0522d;
}

.plant-card.wilting-stage {
  background: rgba(255, 165, 0, 0.3);
  border-color: #ffa500;
}

.daily-quest {
  background: rgba(212, 175, 55, 0.05);
  border-radius: 12px;
  padding: 6px;
  margin: 6px 0;
  text-align: center;
  font-size: 0.85rem;
}

.arena-block {
  background: rgba(0, 0, 0, 0.3);
  border-radius: 16px;
  padding: 10px;
  margin: 6px 0;
  border: 1px solid rgba(212, 175, 55, 0.1);
}

.arena-battle {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 4px 0;
}

.fighter {
  text-align: center;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 12px;
  padding: 6px;
  flex: 1;
}

.fighter .name {
  font-weight: 600;
  color: #f0c45a;
  font-size: 0.85rem;
}

.fighter .hp {
  color: #ff6b6b;
  font-size: 0.85rem;
}

.fighter .power {
  color: #b0a0c0;
  font-size: 0.7rem;
}

.vs {
  font-size: 1.5rem;
  color: #d4af37;
  font-weight: 700;
  padding: 0 6px;
}

.battle-log {
  background: rgba(0, 0, 0, 0.3);
  border-radius: 12px;
  padding: 4px;
  font-size: 0.65rem;
  color: #b0a0c0;
  min-height: 30px;
  max-height: 80px;
  overflow-y: auto;
  margin-top: 4px;
}

.arena-stats {
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
  margin-top: 4px;
}

.raid-card {
  background: rgba(255, 255, 255, 0.03);
  border-radius: 12px;
  padding: 6px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  margin-bottom: 8px;
}

.raid-card .raid-title {
  color: #f0c45a;
  font-weight: 600;
  font-size: 0.85rem;
}

.raid-card .raid-desc {
  color: #b0a0c0;
  font-size: 0.75rem;
}

.tournament-block {
  background: rgba(0, 0, 0, 0.3);
  border-radius: 16px;
  padding: 10px;
  margin: 6px 0;
  border: 1px solid rgba(212, 175, 55, 0.1);
}

.tournament-block .t-title {
  color: #f5c542;
  font-weight: 600;
  font-size: 0.85rem;
}

.tournament-block .t-row {
  display: flex;
  justify-content: space-between;
  padding: 2px 0;
  font-size: 0.7rem;
  color: #b0a0c0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

.tournament-block .t-row .place {
  color: #f5c542;
  font-weight: 600;
}

.tournament-block .t-row .reward {
  color: #d4e65c;
}

.shop-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 12px;
  padding: 6px 10px;
  margin: 4px 0;
  border: 1px solid rgba(255, 255, 255, 0.04);
}

.shop-item .sname {
  font-size: 0.8rem;
  color: #d0c0d8;
}

.shop-item .sprice {
  font-size: 0.8rem;
  color: #f5c542;
}

.shop-item button {
  background: #6a1b9a;
  border: 1px solid #d4af37;
  border-radius: 30px;
  padding: 4px 14px;
  color: #fff;
  font-size: 0.75rem;
  cursor: pointer;
  transition: 0.2s;
}

.shop-item button:hover {
  background: #7b1fa2;
}

/* ИСПРАВЛЕНО: перенос текста в карточках */
.collection-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
  gap: 8px;
  margin: 8px 0;
}

.collection-card {
  text-align: center;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 12px;
  padding: 8px 4px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  word-break: break-word;
  overflow-wrap: anywhere;
}

.collection-card.collected {
  border-color: #d4af37;
  background: rgba(212, 175, 55, 0.1);
}

.collection-card .cemoji {
  font-size: 1.8rem;
}

.collection-card .ccount {
  font-size: 0.75rem;
  color: #b0a0c0;
  line-height: 1.2;
}

.progress-block {
  background: rgba(0, 0, 0, 0.3);
  border-radius: 16px;
  padding: 10px;
  margin: 6px 0;
  border: 1px solid rgba(212, 175, 55, 0.1);
}

.progress-block .title {
  color: #f0c45a;
  font-weight: 600;
  font-size: 0.9rem;
}

.progress-block .desc {
  color: #b0a0c0;
  font-size: 0.75rem;
  margin: 2px 0;
}

.progress-bar {
  background: #1a1228;
  border-radius: 10px;
  height: 6px;
  overflow: hidden;
  margin: 3px 0;
}

.progress-bar .fill {
  height: 100%;
  background: linear-gradient(90deg, #b8860b, #f5c542);
  border-radius: 10px;
  transition: width 0.5s;
}

.bonus-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  margin: 4px 0;
}

.bonus-item {
  background: rgba(255, 255, 255, 0.03);
  border-radius: 10px;
  padding: 4px 8px;
  font-size: 0.7rem;
  color: #c0b0d0;
}

.bonus-item .val {
  color: #f5c542;
  font-weight: 600;
  float: right;
}

.streak-box {
  background: rgba(212, 175, 55, 0.08);
  border-radius: 16px;
  padding: 8px;
  margin: 8px 0;
  text-align: center;
  border: 1px solid rgba(212, 175, 55, 0.2);
}

.streak-box .streak-days {
  font-size: 1.3rem;
  color: #f5c542;
  font-weight: 700;
}

.streak-box .streak-reward {
  font-size: 0.85rem;
  color: #d0c0d8;
}

.titles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 10px;
  margin-top: 8px;
}

.title-card {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(0, 0, 0, 0.3);
  border-radius: 16px;
  padding: 10px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  transition: 0.2s;
}

.title-card.achieved {
  background: rgba(212, 175, 55, 0.1);
  border-color: #d4af37;
}

.title-icon {
  font-size: 2rem;
  width: 50px;
  text-align: center;
}

.title-info {
  flex: 1;
}

.title-name {
  font-weight: 600;
  color: #f0c45a;
  font-size: 0.9rem;
}

.title-level {
  font-size: 0.75rem;
  color: #b0a0c0;
}

.title-reward {
  font-size: 0.8rem;
  color: #d4e65c;
  margin: 2px 0;
}

.title-progress .progress-bar {
  height: 4px;
  background: #1a1228;
  border-radius: 4px;
  overflow: hidden;
  margin-top: 4px;
}

.title-progress .fill {
  height: 100%;
  background: linear-gradient(90deg, #b8860b, #f5c542);
}

.modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 10px;
}

.modal.active {
  display: flex;
}

.modal-panel {
  background: linear-gradient(145deg, #1a1228, #261d38);
  border-radius: 30px;
  padding: 24px;
  width: 100%;
  max-width: 360px;
  border: 1px solid rgba(212, 175, 55, 0.2);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.9);
  text-align: center;
  font-family: inherit;
}

.modal-panel h2 {
  color: #f5c542;
  font-weight: 300;
  font-size: 1.4rem;
  margin-bottom: 12px;
}

.modal-panel p {
  color: #d0c0d8;
  font-size: 0.9rem;
  margin: 8px 0;
  line-height: 1.4;
}

.modal-panel a {
  color: #f0c45a;
}

.modal-panel button {
  background: #6a1b9a;
  border: 1px solid #d4af37;
  border-radius: 30px;
  padding: 10px 16px;
  color: #fff;
  font-weight: 700;
  cursor: pointer;
  width: auto;
  margin-top: 12px;
  font-size: 0.9rem;
  transition: 0.2s;
}

.modal-panel button:hover {
  background: #7b1fa2;
}

/* Строки настроек */
.settings-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.settings-row label {
  color: #d0c0d8;
  font-size: 0.9rem;
}

.settings-row input[type="checkbox"] {
  width: 20px;
  height: 20px;
  accent-color: #d4af37;
  cursor: pointer;
}

#wisdomModal .modal-panel {
  background: linear-gradient(145deg, #2a1f3a, #1a1228);
  border: 2px solid #d4af37;
}

#wisdomModal h2 {
  color: #f5c542;
}

#wisdomModal p {
  font-size: 1.2rem;
  color: #f0e6d8;
  margin: 16px 0;
}

#wisdomModal button {
  background: #d4af37;
  color: #1a1225;
  margin-top: 10px;
}

.toast {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: #1a1228;
  color: #f5c542;
  padding: 8px 20px;
  border-radius: 40px;
  border: 1px solid #d4af37;
  z-index: 9999;
  font-size: 0.85rem;
  animation: fadeInOut 3s ease;
}

@keyframes fadeInOut {
  0% { opacity: 0; bottom: 0; }
  10% { opacity: 1; bottom: 30px; }
  90% { opacity: 1; bottom: 30px; }
  100% { opacity: 0; bottom: 0; }
}

.footer {
  text-align: center;
  font-size: 0.6rem;
  opacity: 0.5;
  margin-top: 8px;
  flex-shrink: 0;
}

.footer a {
  color: inherit;
  text-decoration: none;
  margin: 0 6px;
}

#preloader {
  position: fixed;
  inset: 0;
  background: #0a0618;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 500;
  transition: opacity 0.5s;
}

#preloader .spinner {
  font-size: 3rem;
  animation: spin 1s linear infinite;
}

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

/* Новые стили v3.0 */
.luck-bar-container {
  margin: 6px 0;
  text-align: center;
}
.luck-bar-label {
  font-size: 0.7rem;
  color: #f5c542;
  margin-bottom: 2px;
}
.luck-bar {
  background: #1a1228;
  border-radius: 10px;
  height: 6px;
  overflow: hidden;
  width: 100%;
  margin: 0 auto;
}
#luckFill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #ffaa00, #ffd700);
  border-radius: 10px;
  transition: width 0.5s, background 0.5s;
}

#blessingTimer {
  font-size: 0.8rem;
  color: #ffd700;
  text-align: center;
  margin: 4px 0;
  display: none;
}

.mantra-btn {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 215, 0, 0.15);
  border-radius: 20px;
  padding: 6px 14px;
  color: #c0b0d0;
  font-size: 0.8rem;
  cursor: pointer;
  transition: 0.3s;
}
.mantra-btn.active {
  background: rgba(212, 175, 55, 0.2);
  border-color: #d4af37;
  color: #f5c542;
  box-shadow: 0 0 8px rgba(212, 175, 55, 0.3);
}

#dailyBossBox {
  background: rgba(255, 0, 0, 0.15);
  border: 1px solid #d4af37;
  border-radius: 12px;
  padding: 8px;
  margin: 8px 0;
  text-align: center;
}

.shake {
  animation: shake 0.5s ease;
}
@keyframes shake {
  0%, 100% { transform: translate(0); }
  25% { transform: translate(-2px, 1px); }
  50% { transform: translate(2px, -1px); }
  75% { transform: translate(-1px, -1px); }
}

.particle {
  position: fixed;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  pointer-events: none;
  animation: particle-fall 1s ease-out forwards;
  z-index: 9999;
}
@keyframes particle-fall {
  0% { transform: translateY(0) scale(1); opacity: 1; }
  100% { transform: translateY(80px) scale(0); opacity: 0; }
}

.firework {
  animation: firework 1.5s ease-out forwards;
}
@keyframes firework {
  0% { transform: translate(0, 0) scale(1); opacity: 1; }
  100% { transform: translate(var(--tx), var(--ty)) scale(0); opacity: 0; }
}

#gardenDecorLayer {
  font-size: 2rem;
  text-align: center;
  margin-top: 8px;
  min-height: 2.5rem;
}

#tabVip .progress-block {
  text-align: center;
}
#vipProgressBlock .progress-bar {
  height: 10px;
  margin: 8px 0;
}
#vipProgressBlock .fill {
  background: linear-gradient(90deg, #d4af37, #f5c542);
}
#vipBonusList {
  grid-template-columns: 1fr;
}

#herbariumContainer {
  background: rgba(255, 255, 255, 0.02);
  border-radius: 16px;
  padding: 8px;
  margin-top: 12px;
  border: 1px solid rgba(212, 175, 55, 0.15);
}

/* Адаптивность */
@media (max-width: 800px) {
  .desktop-only { display: none !important; }
  .burger-btn { display: block; }
  .header h1 { font-size: 1.1rem; }
  .side-menu { display: flex; }
  .mobile-tabs { display: flex !important; flex-direction: column; gap: 6px; margin-top: 10px; }
  .mobile-tabs .tab-btn { justify-content: flex-start; font-size: 0.8rem; padding: 10px 14px; }
  .wheel-container { width: min(300px, 85vw); height: min(300px, 85vw); margin-bottom: 60px; }
  .wheel-section { flex-direction: column; flex-wrap: nowrap; height: auto; align-items: center; }
  .wheel-info { min-width: auto; width: 100%; }
  #focusMenu button { font-size: 0.85rem; padding: 5px 10px; }
}

@media (max-width: 480px) {
  .btn-spin { font-size: 1rem; padding: 10px 20px; margin-top: 16px; }
  .actions button { font-size: 0.7rem; padding: 5px 10px; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .wheel-container { width: min(280px, 90vw); height: min(280px, 90vw); margin-bottom: 60px; }
  
  .collection-grid { grid-template-columns: repeat(auto-fill, minmax(65px, 1fr)); gap: 4px; }
  .collection-card { padding: 6px 2px; }
  .collection-card .cemoji { font-size: 1.4rem; }
  .collection-card .ccount { font-size: 0.65rem; }

  .shop-item { flex-wrap: wrap; gap: 4px; padding: 8px 6px; }
  .shop-item span { font-size: 0.75rem; flex: 1 1 auto; }
  .shop-item button { font-size: 0.7rem; padding: 5px 12px; white-space: nowrap; }
  .modal-panel { padding: 16px; max-width: 95vw; }
  h3 { font-size: 1rem; }
}


.shop-grid {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 8px 0;
}

.shop-row {
  display: grid;
  grid-template-columns: 1fr 80px auto;
  align-items: center;
  gap: 10px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 12px;
  padding: 8px 12px;
  border: 1px solid rgba(255, 255, 255, 0.04);
}

.shop-row span {
  font-size: 0.8rem;
  color: #d0c0d8;
}

.shop-row span:nth-child(2) {
  text-align: center;
  color: #f5c542;
  font-weight: 600;
}

.shop-row button {
  background: #6a1b9a;
  border: 1px solid #d4af37;
  border-radius: 30px;
  padding: 6px 18px;
  color: #fff;
  font-size: 0.75rem;
  cursor: pointer;
  justify-self: end;
}



/* Магазин: ровные столбцы */
.shop-grid {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 8px 0;
}

.shop-row {
  display: grid;
  grid-template-columns: 1fr 110px auto; /* достаточно для "2 099 голосов" */
  align-items: center;
  gap: 10px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 12px;
  padding: 8px 12px;
  border: 1px solid rgba(255, 255, 255, 0.04);
}

.shop-row span {
  font-size: 0.8rem;
  color: #d0c0d8;
}

.shop-row span:nth-child(2) {
  text-align: center;
  color: #f5c542;
  font-weight: 600;
}

.shop-row button {
  background: #6a1b9a;
  border: 1px solid #d4af37;
  border-radius: 30px;
  padding: 6px 18px;
  color: #fff;
  font-size: 0.75rem;
  cursor: pointer;
  justify-self: end;
}

/* Адаптация для мобильных */
@media (max-width: 480px) {
  .shop-row {
    grid-template-columns: 1fr 80px auto;
    gap: 6px;
    padding: 6px 8px;
  }
  .shop-row span {
    font-size: 0.7rem;
  }
  .shop-row span:nth-child(2) {
    font-size: 0.7rem;
  }
}



/* --- Сезонный Battle Pass --- */
.season-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 6px;
  margin: 12px 0;
}

.season-header {
  font-weight: bold;
  color: #f5c542;
  text-align: center;
  background: rgba(255,255,255,0.05);
  border-radius: 10px;
  padding: 6px;
  font-size: 0.8rem;
}

.season-cell {
  text-align: center;
  background: rgba(255,255,255,0.03);
  border-radius: 10px;
  padding: 8px 4px;
  font-size: 0.75rem;
  color: #d0c0d8;
  border: 1px solid rgba(255,215,0,0.1);
}

.season-cell.unlocked {
  background: rgba(212,175,55,0.2);
  border-color: #d4af37;
  color: #f5c542;
}

/* Адаптация для мобильных */
@media (max-width: 480px) {
  .season-grid {
    grid-template-columns: 1fr 1fr 1fr;
    gap: 4px;
  }
  .season-header {
    font-size: 0.65rem;
    padding: 4px;
  }
  .season-cell {
    font-size: 0.65rem;
    padding: 6px 2px;
  }
}


@keyframes coinFly {
  0% { transform: translateY(0) scale(1); opacity: 1; }
  100% { transform: translateY(-200px) scale(0.5); opacity: 0; }
}
@keyframes buddhaAppear {
  0% { transform: scale(0); opacity: 0; }
  50% { transform: scale(2); opacity: 1; }
  100% { transform: scale(1); opacity: 0; }
}
.coin-particle, .buddha-particle {
  position: absolute;
  pointer-events: none;
  z-index: 100;
}



/* Ежедневная мотивация */
.daily-quote-panel {
  animation: glowPulse 2s infinite alternate;
}

@keyframes glowPulse {
  0% { box-shadow: 0 0 20px rgba(212,175,55,0.3); }
  100% { box-shadow: 0 0 40px rgba(212,175,55,0.7); }
}

#dailyQuoteModal .modal-panel {
  padding: 20px;
  border-radius: 20px;
}

#dailyQuoteEmoji {
  display: inline-block;
  animation: float 3s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}
#focusMenu button {
  color: #f0e6d8;
}

/* ========== ДРУЗЬЯ ========== */
.friends-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.friends-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 8px;
}

.friend-card {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 215, 0, 0.12);
  border-radius: 16px;
  padding: 10px 12px;
  transition: background 0.3s, border-color 0.3s;
}

.friend-card:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(212, 175, 55, 0.4);
}

.friend-avatar {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(212, 175, 55, 0.1);
  border: 1px solid rgba(212, 175, 55, 0.3);
  font-size: 1.8rem;
}

.friend-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

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

.friend-name {
  font-weight: 600;
  color: #f0e6d8;
  font-size: 0.9rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.friend-status {
  font-size: 0.75rem;
  color: #b0a0c0;
  margin-top: 2px;
}

.btn-bless {
  flex-shrink: 0;
  background: rgba(212, 175, 55, 0.15);
  border: 1px solid #d4af37;
  border-radius: 50%;
  width: 36px;
  height: 36px;
  font-size: 1.2rem;
  color: #f5c542;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.3s, transform 0.2s;
}

.btn-bless:hover:not(:disabled) {
  background: rgba(212, 175, 55, 0.3);
  transform: scale(1.1);
}

.btn-bless:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.2);
  color: #888;
}

/* ========== ВКЛАДКА «КАК ИГРАТЬ» ========== */
.guide-section {
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(212, 175, 55, 0.2);
  border-radius: 16px;
  margin-bottom: 12px;
  overflow: hidden;
  transition: border-color 0.3s, box-shadow 0.3s;
}

.guide-section:hover {
  border-color: rgba(212, 175, 55, 0.5);
  box-shadow: 0 0 15px rgba(212, 175, 55, 0.1);
}

.guide-section > summary {
  list-style: none;               /* убираем стандартный маркер */
  cursor: pointer;
  padding: 14px 18px;
  font-size: 1rem;
  font-weight: 600;
  color: #f5c542;
  background: linear-gradient(135deg, rgba(212, 175, 55, 0.15), rgba(212, 175, 55, 0.05));
  display: flex;
  align-items: center;
  gap: 10px;
  user-select: none;
  transition: background 0.3s;
}

.guide-section > summary::-webkit-details-marker {
  display: none;                  /* скрываем стандартный треугольник в Chrome */
}

/* Стрелка через CSS-треугольник */
.guide-section > summary::after {
  content: "";
  width: 0;
  height: 0;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-top: 5px solid #d4af37; /* цвет стрелки */
  margin-left: auto;
  transition: transform 0.3s;
}

.guide-section[open] > summary::after {
  transform: rotate(-180deg);
}

.guide-section[open] > summary {
  background: linear-gradient(135deg, rgba(212, 175, 55, 0.25), rgba(212, 175, 55, 0.1));
}

.guide-content {
  padding: 12px 18px;
  font-size: 0.9rem;
  line-height: 1.5;
  color: #d0c0d8;
  animation: guideFadeIn 0.25s ease;
}

@keyframes guideFadeIn {
  from { opacity: 0; transform: translateY(-4px); }
  to   { opacity: 1; transform: translateY(0); }
}

.guide-content p {
  margin: 6px 0;
}

.guide-content strong {
  color: #f5c542;
}

.guide-content ul {
  margin: 6px 0 6px 20px;
  padding: 0;
}

.guide-content li {
  margin: 3px 0;
}

.guide-tip {
  background: rgba(212, 175, 55, 0.08);
  border-left: 3px solid #d4af37;
  padding: 8px 12px;
  border-radius: 8px;
  margin: 8px 0;
  font-size: 0.85rem;
}

@media (max-width: 480px) {
  .guide-section > summary {
    font-size: 0.9rem;
    padding: 10px 14px;
  }
  .guide-content {
    padding: 10px 14px;
    font-size: 0.85rem;
  }
}

/* Кнопки в гайде */
.btn-open-tab {
  display: inline-block;
  margin-top: 8px;
  background: rgba(212, 175, 55, 0.2);
  border: 1px solid #d4af37;
  border-radius: 20px;
  padding: 6px 14px;
  color: #f5c542;
  font-size: 0.8rem;
  cursor: pointer;
  transition: background 0.3s, color 0.3s;
}

.btn-open-tab:hover {
  background: rgba(212, 175, 55, 0.4);
  color: #1a1225;
}

/* Оглавление */
.btn-toc {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(212,175,55,0.3);
  border-radius: 15px;
  padding: 5px 10px;
  color: #d0c0d8;
  font-size: 0.8rem;
  cursor: pointer;
  transition: background 0.3s;
}

.btn-toc:hover {
  background: rgba(212,175,55,0.15);
}

/* Плавающая кнопка помощи (единственный экземпляр) */
#helpFab {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: linear-gradient(135deg, #f5c542, #b8860b);
  border: 2px solid #d4af37;
  color: #1a1225;
  font-size: 1.6rem;
  font-weight: bold;
  cursor: pointer;
  z-index: 9999;
  box-shadow: 0 4px 15px rgba(212, 175, 55, 0.5);
  transition: transform 0.2s, box-shadow 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

#helpFab:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 20px rgba(212, 175, 55, 0.8);
}

#helpFab.pulse {
  animation: helpPulse 2s infinite;
}

@keyframes helpPulse {
  0% { box-shadow: 0 0 0 0 rgba(212, 175, 55, 0.7); }
  70% { box-shadow: 0 0 0 15px rgba(212, 175, 55, 0); }
  100% { box-shadow: 0 0 0 0 rgba(212, 175, 55, 0); }
}

#helpFab .badge {
  position: absolute;
  top: -5px;
  right: -5px;
  background: #ff4444;
  color: #fff;
  font-size: 0.65rem;
  font-weight: bold;
  border-radius: 10px;
  padding: 2px 6px;
  display: none;
}

#helpFab.pulse .badge {
  display: block;
}

/* ========== КНОПКИ «ЗАБРАТЬ» В ВИДЖЕТЕ И КВЕСТЕ ========== */
#dailyQuestsWidgetList button,
#mainQuestContainer button {
  background: linear-gradient(135deg, #f5c542, #b8860b);
  border: none;
  border-radius: 20px;
  padding: 6px 14px;
  color: #1a1225;
  font-weight: 700;
  font-size: 0.8rem;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s, background 0.2s;
  box-shadow: 0 4px 10px rgba(212,175,55,0.4);
  white-space: nowrap;
}

#dailyQuestsWidgetList button:hover,
#mainQuestContainer button:hover {
  background: linear-gradient(135deg, #ffd966, #d4af37);
  transform: scale(1.05);
  box-shadow: 0 6px 16px rgba(212,175,55,0.7);
}

#dailyQuestsWidgetList button:active,
#mainQuestContainer button:active {
  transform: scale(0.95);
}

/* Кнопка сундука в виджете */
#dailyChestWidgetBtn {
  background: linear-gradient(135deg, #f5c542, #b8860b);
  color: #1a1225;
  font-weight: 700;
  border: none;
  border-radius: 20px;
  padding: 8px 16px;
  cursor: pointer;
  width: 100%;
  transition: transform 0.2s, box-shadow 0.2s;
  box-shadow: 0 4px 10px rgba(212,175,55,0.4);
}

#dailyChestWidgetBtn:hover {
  transform: scale(1.02);
  box-shadow: 0 6px 16px rgba(212,175,55,0.7);
}

#dailyChestWidgetBtn:active {
  transform: scale(0.98);
}

/* Пульсация для кнопок «Забрать» и сундука */
.btn-claim-pulse {
  animation: claimPulse 1.5s infinite;
}

@keyframes claimPulse {
  0% { box-shadow: 0 0 0 0 rgba(212,175,55,0.7); }
  70% { box-shadow: 0 0 0 10px rgba(212,175,55,0); }
  100% { box-shadow: 0 0 0 0 rgba(212,175,55,0); }
}


@media (orientation: landscape) and (max-height: 600px) {
  .desktop-only { display: none !important; }
  .burger-btn { display: block; }
  .side-menu { display: flex; }
  .wrap { padding: 4px; gap: 4px; }
  .header { min-height: 32px; padding: 2px 0; }
  .header h1 { font-size: 0.9rem; }
  .wheel-section { flex-direction: row; align-items: center; gap: 8px; }
  .wheel-container { width: min(180px, 35vh); height: min(180px, 35vh); }
  .wheel-info { flex: 1; font-size: 0.6rem; }
  .btn-spin { padding: 6px 16px; font-size: 0.85rem; margin: 4px auto; }
  .stats { grid-template-columns: repeat(4, 1fr); gap: 2px; padding: 4px; }
  .stats strong { font-size: 0.7rem; }
  .stats span { font-size: 0.5rem; }
  .actions { gap: 3px; }
  .actions button { padding: 3px 8px; font-size: 0.6rem; }
  .main-content { overflow-y: auto; }
  .tab-content { overflow-y: auto; }
  .collection-grid { grid-template-columns: repeat(auto-fill, minmax(55px, 1fr)); }
}

body.fullscreen { height: 100vh; overflow: hidden; }
body.fullscreen .wrap { max-width: none; width: 100vw; border-radius: 0; box-shadow: none; border: none; }

.actions button, .shop-item button, .tab-btn, .btn-spin, .modal-panel button, button {
  white-space: normal; word-break: break-word; overflow-wrap: anywhere; line-height: 1.3;
}