/* === MediocreVPN Mini App - Modern Glass Design === */

/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', 'SF Pro Display', system-ui, sans-serif;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    background: linear-gradient(135deg, #0a0e1a 0%, #16171a 50%, #1a1f2e 100%);
    min-height: 100vh;
    color: white;
    overflow-x: hidden;
    margin: 0;
    padding: 0;
}

/* Старые стили header удалены - используем новые стеклянные стили */

/* Старые стили header удалены - используем новые стеклянные стили из секции ниже */

section {
  margin: 22px 0;
  padding: 0 18px;
}

.subscription-status-card {
  background: #23242a;
  border-radius: 16px;
  padding: 12px 16px 10px 16px;
  margin-bottom: 18px;
  min-width: 0;
  max-width: 350px;
  color: #fff;
}

.status-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 7px;
  gap: 8px;
}

.username {
  font-size: 20px;
  font-weight: 500;
  color: #fff;
  margin-bottom: 2px;
}

.userid {
  font-size: 12px;
  color: #888;
  margin-bottom: 4px;
}

.status-badge {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #242427;
  box-shadow: 0 0 0 2px #23242a;
}

.status-badge svg {
  width: 32px;
  height: 32px;
}

.status-main {
  margin-left: 1px;
  margin-top: 3px;
}

.status-text {
  font-size: 20px;
  font-weight: 700;
  color: #fff;
  margin-right: 8px;
  display: inline-block;
}

.status-expiry {
  display: inline-block;
  font-size: 15px;
  color: #ddd;
}

.badge-svg circle {
  fill: #4caf50;
  transition: fill 0.2s;
}
.status-badge.inactive .badge-svg circle {
  fill: #f44336;
}
.badge-svg polygon {
  fill: #fff;
}

#actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 12px;
}

button,
input[type="button"] {
  padding: 13px 0;
  font-size: 1.05em;
  background: #3a945c;
  border: none;
  color: #fff;
  border-radius: 10px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.18s;
  box-shadow: 0 1px 4px rgba(0,0,0,0.10);
}
button:active,
input[type="button"]:active {
  background: #276c45;
}
button.secondary,
input[type="button"].secondary {
  background: #23242a;
  color: #e2e2e2;
  border: 1px solid #31343b;
}
button:disabled,
input[type="button"]:disabled {
  background: #444;
  color: #aaa;
  cursor: not-allowed;
}

/* Визуальная блокировка кнопки крутки во время спина */
#luck-action-btn.luck-btn-loading {
  position: relative;
  opacity: 0.8;
  pointer-events: none;
}
#luck-action-btn.luck-btn-loading::after {
  content: "";
  position: absolute;
  right: 12px;
  top: 50%;
  width: 16px;
  height: 16px;
  margin-top: -8px; /* центрирование */
  border: 2px solid rgba(255,255,255,.35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: luck-spin 0.8s linear infinite;
}
@keyframes luck-spin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

input[type="text"],
input[type="number"],
select,
textarea {
  font-size: 1em;
  padding: 10px 14px;
  border-radius: 8px;
  border: 1px solid #31343b;
  background: #212227;
  color: #f2f2f2;
  margin-top: 8px;
  width: 100%;
  box-sizing: border-box;
  outline: none;
  transition: border 0.18s;
}
input[type="text"]:focus,
input[type="number"]:focus,
select:focus,
textarea:focus {
  border: 1.5px solid #3a945c;
}

.form-group {
  margin-bottom: 26px;
}

#subscription-form label {
  color: #c2c2c2;
  font-size: 1em;
}

#subscription-form select {
  margin-top: 6px;
  background: #23242a;
  color: #f2f2f2;
}

#pay-button {
  margin-top: 16px;
}

/* === Система лояльности === */

/* Страница лояльности rewards.html */
.loyalty-current-status {
  background: #23242a;
  border-radius: 16px;
  padding: 20px;
  margin-bottom: 20px;
}

.loyalty-current-status h2 {
  margin: 0 0 15px 0;
  font-size: 1.3em;
  color: #f2f2f2;
}

.loyalty-amount-spent {
  font-size: 1.1em;
  margin-bottom: 15px;
  text-align: center;
  color: #ddd;
}

.loyalty-level-progress {
  margin-top: 15px;
}

.loyalty-progress-text {
  text-align: center;
  margin-top: 10px;
  font-size: 0.95em;
  color: #bbb;
}

/* Секция доступных наград */
.rewards-card {
  background: linear-gradient(135deg, #2d4a22 0%, #3a5f2a 100%);
  border-radius: 16px;
  padding: 20px;
  margin-bottom: 20px;
  border: 1px solid #4a6b3a;
}

.rewards-card h2 {
  margin: 0 0 15px 0;
  font-size: 1.3em;
  color: #fff;
  text-align: center;
}

.claim-button {
  width: 100%;
  margin-top: 15px;
  background: #4caf50;
  padding: 15px;
  font-size: 1.1em;
  font-weight: 600;
}

.claim-button:active {
  background: #3d8b40;
}

/* Как это работает */
.how-it-works-card {
  background: #23242a;
  border-radius: 16px;
  padding: 20px;
  margin-bottom: 20px;
}

.how-it-works-card h2 {
  margin: 0 0 20px 0;
  font-size: 1.3em;
  color: #f2f2f2;
  text-align: center;
}

.step-list {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.step {
  display: flex;
  align-items: flex-start;
  gap: 15px;
}

.step-icon {
  font-size: 1.5em;
  min-width: 40px;
  text-align: center;
}

.step-content h3 {
  margin: 0 0 5px 0;
  font-size: 1.1em;
  color: #f2f2f2;
}

.step-content p {
  margin: 0;
  font-size: 0.95em;
  color: #bbb;
  line-height: 1.4;
}

/* Уровни скидок */
.levels-card {
  background: #23242a;
  border-radius: 16px;
  padding: 20px;
  margin-bottom: 20px;
}

.levels-card h2 {
  margin: 0 0 20px 0;
  font-size: 1.3em;
  color: #f2f2f2;
  text-align: center;
}

.levels-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 20px;
}

.level-item {
  display: flex;
  align-items: center;
  background: #2a2b32;
  border-radius: 12px;
  padding: 15px;
  gap: 15px;
  border: 2px solid transparent;
  transition: all 0.2s;
}

.level-item[data-threshold="400"] {
  border-color: #cd7f32;
}

.level-item[data-threshold="900"] {
  border-color: #c0c0c0;
}

.level-item[data-threshold="1500"] {
  border-color: #ffd700;
}

.level-icon {
  font-size: 1.8em;
  min-width: 40px;
  text-align: center;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  align-self: flex-start;
}

.level-info {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-width: 0;
}

.level-main {
  flex: 1;
  min-width: 0;
}

.level-title {
  font-size: 1.1em;
  font-weight: 600;
  color: #f2f2f2;
  margin: 0 0 4px 0;
  line-height: 1.2;
}

.level-requirement {
  font-size: 0.9em;
  color: #bbb;
  margin: 0;
  line-height: 1.2;
}

.level-reward {
  font-size: 1.1em;
  font-weight: 700;
  color: #4caf50;
  white-space: nowrap;
  margin-left: 15px;
  flex-shrink: 0;
}

.level-note {
  background: #2a2b32;
  border-radius: 8px;
  padding: 15px;
  border-left: 4px solid #4caf50;
}

.level-note p {
  margin: 0;
  font-size: 0.9em;
  color: #ddd;
  line-height: 1.4;
}

/* Список наград */
.rewards-list {
  margin-bottom: 15px;
}

.reward-item {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #3a5f2a;
  border-radius: 8px;
  padding: 12px;
  margin-bottom: 8px;
  border: 1px solid #4a6b3a;
}

.reward-icon {
  font-size: 1.2em;
}

.reward-text {
  flex: 1;
  color: #fff;
  font-weight: 500;
}

/* Адаптивность для мобильных устройств */
@media (max-width: 600px) {
  .step {
    align-items: flex-start;
  }
  
  .level-item {
    padding: 12px;
    gap: 10px;
  }
  
  .level-icon {
    font-size: 1.5em;
    min-width: 32px;
  }
  
  .level-info {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }
  
  .level-main {
    width: 100%;
  }
  
  .level-title {
    font-size: 1em;
    margin-bottom: 2px;
  }
  
  .level-requirement {
    font-size: 0.85em;
  }
  
  .level-reward {
    font-size: 1em;
    margin-left: 0;
    margin-top: 2px;
    align-self: flex-end;
  }
}

/* Для очень маленьких экранов */
@media (max-width: 360px) {
  .level-item {
    padding: 10px;
  }
  
  .level-icon {
    font-size: 1.3em;
    min-width: 28px;
  }
  
  .level-title {
    font-size: 0.95em;
  }
  
  .level-requirement {
    font-size: 0.8em;
  }
  
  .level-reward {
    font-size: 0.95em;
  }
}
/* Старый стиль loyalty-card удален - используется стеклянная версия ниже */

/* === Luck qty full-width responsive controls === */
#luck-qty-row {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 8px;
  width: 100%;
  align-items: center;
}
#luck-qty-row .qty-btn {
  padding: 0;
  width: 100%;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  -webkit-appearance: none;
  appearance: none;
  line-height: 1;
  text-align: center;
  font-size: 16px;
  font-weight: 700;
  border-radius: 10px;
}
#luck-qty-input {
  width: 100%;
  height: 44px;
  display: inline-block;
  text-align: center;
  padding: 8px 10px;
  border-radius: 10px;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.2);
  color: #fff;
  font-size: 16px;
  box-sizing: border-box;
  -moz-appearance: textfield;
}
/* Убираем стрелки у number на webkit */
#luck-qty-input::-webkit-outer-spin-button,
#luck-qty-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

/* Небольшая адаптация на очень узких экранах */
@media (max-width: 360px) {
  #luck-qty-row .qty-btn,
  #luck-qty-input {
    height: 40px;
    font-size: 15px;
    border-radius: 8px;
  }
}

.loyalty-stats {
  display: flex;
  flex-direction: column;
  gap: 11px;
}

.loyalty-stat {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0px 0;
}

.stat-label {
  color: #c2c2c2;
  font-size: 0.9em;
}

.stat-value {
  color: #f2f2f2;
  font-weight: 600;
  font-size: 1em;
}

.loyalty-progress-container {
  margin: 1px 0;
}

.loyalty-progress-bar {
  width: 100%;
  height: 8px;
  background: #31343b;
  border-radius: 4px;
  overflow: hidden;
  position: relative;
}

.loyalty-progress {
  height: 100%;
  background: linear-gradient(90deg, #3a945c, #4caf50);
  border-radius: 4px;
  transition: width 0.3s ease;
  position: relative;
}

.loyalty-progress-bar::after {
  content: attr(data-progress) "%";
  position: absolute;
  right: 8px;
  top: -24px;
  color: #c2c2c2;
  font-size: 0.8em;
  font-weight: 500;
}

.loyalty-next-reward {
  background: #1e2024;
  border-radius: 8px;
  padding: 10px 12px;
  color: #e2e2e2;
  font-size: 0.9em;
  line-height: 1.4;
  border-left: 3px solid #3a945c;
}

.loyalty-next-reward strong {
  color: #4caf50;
}

.loyalty-rewards-count {
  background: linear-gradient(90deg, #ff9800, #ff5722);
  border-radius: 8px;
  padding: 10px 12px;
  color: #fff;
  font-size: 0.9em;
  text-align: center;
  font-weight: 500;
}

.loyalty-rewards-count strong {
  font-weight: 700;
}

#loyalty-claim-btn {
  background: linear-gradient(90deg, #ff9800, #ff5722);
  color: #fff;
  font-weight: 600;
  box-shadow: 0 2px 8px rgba(255, 152, 0, 0.3);
}

#loyalty-claim-btn:active {
  background: linear-gradient(90deg, #e68900, #e64a19);
}

/* Отступ снизу для последней секции */
#loyalty-section {
  margin-bottom: 30px;
}


.action-buttons {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 0; /* или ваш вариант */
  width: 100%;
  box-sizing: border-box;
  margin: 0;
  position: static; /* УБРАТЬ fixed, left, transform! */
  background: none;
  box-shadow: none;
}
.action-buttons button {
  width: 100%;
  box-sizing: border-box;
}
@media (min-width: 600px) {
  .action-buttons {
    max-width: 420px;
    margin: 0 auto;
  }
}

/* Дублирующиеся стили modal удалены - используется стеклянная версия ниже */

/* Старые стили modal-content удалены - используется стеклянная версия ниже */

#download-buttons {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 12px;
  align-items: center;
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 13px;
  justify-content: center;
  align-items: center;
}

.store-button {
  display: flex;
  align-items: center;
  gap: 7px;
  text-decoration: none;
  background: #383940;
  color: #f5f2f2;
  border-radius: 9px;
  padding: 10px 18px;
  font-weight: 500;
  border: 1px solid #31343b;
  transition: background 0.14s, box-shadow 0.16s;
  box-shadow: 0 1px 2px rgba(0,0,0,0.09);
}
.store-button:hover {
  background: #818182;
}

.store-button img {
  width: 28px;
  height: 28px;
}

.bottom-banner {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  display: flex;
  justify-content: center;
  background: transparent; /* или #fff если нужен фон */
  z-index: 1000;
  padding: 0 18px 12px; /* отступ снизу */
  box-sizing: border-box;
  text-decoration: none; /* убрать подчеркивание */
}

.bottom-banner img {
  display: block;
  max-width: 100%; /* или 100% для адаптивности */
  width: 100%;
  height: auto;
  border-radius: 16px;
  box-shadow: 0 2px 8px rgba(43, 61, 109, 0.07);
}


.yandex-rtb-container {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  display: flex;
  justify-content: center;
  background: transparent;
  z-index: 1000;
  padding: 0 18px 12px;
  box-sizing: border-box;
}

.yandex-rtb-inner {
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 2px 8px rgba(43, 61, 109, 0.07);
  width: 100%;
  max-width: 370px;
  overflow: hidden;
  display: flex;
  justify-content: center;
  align-items: center;
}

#referral-info, #referral-stats, #referral-action {
  margin-bottom: 22px;
  display: flex;
  flex-direction: column;
  margin-top: 5px;
  gap: 12px;
  align-items: stretch;
}

.referral-link p {
  color: #aaa;
  margin: 0 0 5px 0;
  font-size: 0.98em;
}

.referral-link {
  display: flex;
  gap: 10px;
  align-items: flex-end; 
}

/* Поле ввода */
.referral-link input[type="text"] {
  flex: 1;
  height: 36px;
  padding: 0 12px;
  background: #2d2f36;
  color: #fafafa;
  border: 1px solid #31343b;
  border-radius: 8px;
  font-size: 16px;
  line-height: 1;
  box-sizing: border-box;
}

/* Кнопка */
.referral-link button {
  height: 36px;
  padding: 0 18px;
  background: #389e57;
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
  line-height: 1;
  box-sizing: border-box;
}


/* Старые стили stat-box удалены - используется стеклянная версия ниже */


@media (max-width: 480px) {
  .modal-content {
    padding: 18px 6vw 18px 6vw;
    min-width: 0;
  }
  header {
    padding: 10px 8px 10px 2px;
  }
}

.swiper {
  width: 100%;
  max-width: 400px;
  display: flex;
  margin: 0 auto;
  flex-direction: column;
  align-items: center;
}
.swiper-slide {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}
.swiper-slide img {
  width: 100%;
  max-width: 350px;
  border-radius: 10px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.13);
}

.swiper-slide p {
  font-size: 16px;
  margin-top: 4px;
  margin-bottom: 15px;
  color: #ccc;
}
.swiper-pagination {
  margin-top: 26px !important;

}

.swiper-pagination-bullets {
  display: flex;
  justify-content: center;
  gap: 8px;
}

.swiper-pagination-bullet {
  background: #888;
  opacity: 1;
  width: 10px;
  height: 10px;
}
.swiper-pagination-bullet-active {
  background: #3a945c;
}

#no-sub-msg {
  display: flex;
  flex-direction: column;
  align-items: center;
  color: #f44336;
  margin-top: 10px;
}
#no-sub-msg button {
  margin-top: 7px;
}

::-webkit-input-placeholder { color: #7e7e7e; }
::-moz-placeholder { color: #7e7e7e; }
:-ms-input-placeholder { color: #7e7e7e; }
::placeholder { color: #7e7e7e; }

/* === СТЕКЛЯННЫЕ КОМПОНЕНТЫ И ОБНОВЛЕННЫЕ СТИЛИ === */

/* Glass morphism components */
.glass-card {
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 20px;
    padding: 24px;
    margin: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
    overflow: visible; /* Позволяем выпадающему списку выходить за границы */
}


.glass-card:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.18);
    transform: translateY(-2px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.25);
}

/* Стеклянные кнопки с улучшенным дизайном */
.glass-button {
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 16px;
    padding: 18px 24px;
    margin: 10px 0;
    color: white;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    display: block;
    text-align: center;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    user-select: none;
    min-height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    word-wrap: break-word;
    hyphens: auto;
    line-height: 1.4;
}

.glass-button:before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: left 0.6s;
}

.glass-button:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.25);
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.25);
}

.glass-button:hover:before {
    left: 100%;
}

.glass-button:active {
    transform: translateY(-1px) scale(1.01);
    background: rgba(255, 255, 255, 0.12);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

/* Специальная кнопка с градиентом и анимацией блика */
.glass-button.gradient-special {
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    border: 1px solid rgba(255, 255, 255, 0.2);
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(99, 102, 241, 0.3);
}

.glass-button.gradient-special::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, 
        transparent 0%, 
        transparent 30%, 
        rgba(255, 255, 255, 0.4) 50%, 
        transparent 70%, 
        transparent 100%);
    animation: button-shine 4s cubic-bezier(0.25, 0.46, 0.45, 0.94) infinite;
    opacity: 0;
    pointer-events: none;
}

.glass-button.gradient-special:hover {
    background: linear-gradient(135deg, #7c3aed, #a855f7);
    border-color: rgba(255, 255, 255, 0.3);
    box-shadow: 0 8px 30px rgba(99, 102, 241, 0.4);
}

.glass-button.gradient-special:hover::after {
    opacity: 1;
    animation-duration: 2s; /* Ускоряем анимацию при ховере */
}

@keyframes button-shine {
    0% { 
        transform: translateX(-120%);
        opacity: 0;
    }
    15% {
        opacity: 0.8;
    }
    85% {
        opacity: 0.8;
    }
    100% { 
        transform: translateX(120%);
        opacity: 0;
    }
}

/* Градиентный текст */
.text-gradient {
    background: linear-gradient(135deg, #00d4aa, #6366f1, #8b5cf6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    background-size: 200% 200%;
    animation: gradient-shift 4s ease-in-out infinite;
}

@keyframes gradient-shift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

/* Container and layout */
.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 16px;
}

.page {
    display: none;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    min-height: 100vh;
    padding: 0px 0;
	margin-top: 10px
}

.page.active {
    display: block;
    opacity: 1;
    transform: translateY(0);
}

/* Navigation */
.nav-header {
    display: flex;
    align-items: center;
    margin-bottom: 24px;
    padding: 0 16px;
    gap: 12px;
}

.nav-header h1 {
    font-size: 18px;
    font-weight: 600;
    color: white;
    margin: 0;
    flex: 1;
    min-width: 0;
    line-height: 1.3;
    word-break: break-word;
}

.back-button {
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 10px;
    padding: 6px 10px;
    color: white;
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 13px;
    font-weight: 500;
    white-space: nowrap;
    flex-shrink: 0;
}

.back-button:hover {
    background: rgba(255, 255, 255, 0.12);
    transform: translateX(-3px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

/* Header - обычный стиль без стеклянного эффекта */
header {
    text-align: center;
    padding: 0px 20px;
    margin: 0px;
}

header h1 {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 8px;
}

/* Status card */
.status-card {
    background: rgba(255, 255, 255, 0.06);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 24px;
    margin: 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
}

.status-card:hover {
    background: rgba(255, 255, 255, 0.08);
    transform: translateY(-2px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.2);
}

.status-info h3 {
    font-size: 18px;
    margin-bottom: 6px;
    color: #f1f5f9;
    font-weight: 600;
}

.status-info p {
    font-size: 14px;
    color: #94a3b8;
    margin: 2px 0;
}

.status-badge {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, #00d4aa, #6366f1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    box-shadow: 0 4px 20px rgba(99, 102, 241, 0.3);
    transition: all 0.3s ease;
}

.status-badge.inactive {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    box-shadow: 0 4px 20px rgba(239, 68, 68, 0.3);
}

/* Loyalty progress */
.loyalty-card {
    background: rgba(255, 255, 255, 0.06);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 24px;
    margin: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
    position: relative;
    z-index: 1; /* Низкий z-index чтобы не перекрывать селектор */
}

/* Компактная версия накопительной системы */
.loyalty-card-compact {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    padding: 16px;
    margin: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.loyalty-card-compact:hover {
    background: rgba(255, 255, 255, 0.08);
    transform: translateY(-1px);
    box-shadow: 0 6px 25px rgba(0, 0, 0, 0.15);
}

.loyalty-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.loyalty-header h4 {
    font-size: 16px;
    margin: 0;
    color: #f1f5f9;
    font-weight: 600;
}

.loyalty-amount {
    font-size: 16px;
    font-weight: 700;
    color: #00d4aa;
    background: rgba(0, 212, 170, 0.1);
    padding: 4px 8px;
    border-radius: 6px;
    border: 1px solid rgba(0, 212, 170, 0.2);
}

.loyalty-next-compact {
    font-size: 12px;
    color: #94a3b8;
    margin: 8px 0 12px 0;
    text-align: center;
}

.claim-compact-btn {
    width: 100%;
    padding: 10px;
    background: linear-gradient(135deg, #00d4aa, #6366f1);
    border: none;
    border-radius: 10px;
    color: white;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(0, 212, 170, 0.3);
}

.claim-compact-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(0, 212, 170, 0.4);
}

.loyalty-card:hover {
    background: rgba(255, 255, 255, 0.08);
    transform: translateY(-2px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.2);
}

.loyalty-card h3 {
    font-size: 20px;
    margin-bottom: 16px;
    color: #f1f5f9;
    font-weight: 600;
}

.progress-bar {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    height: 12px;
    margin: 12px 0;
    overflow: hidden;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

.progress-fill {
    background: linear-gradient(90deg, #00d4aa, #6366f1, #8b5cf6);
    height: 100%;
    border-radius: 12px;
    transition: width 1.2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.3);
    position: relative;
    min-width: 2px; /* Минимальная ширина для видимости */
    will-change: width; /* Оптимизация для анимации */
}

.progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, 
        transparent 0%, 
        transparent 40%, 
        rgba(255, 255, 255, 0.4) 50%, 
        transparent 60%, 
        transparent 100%);
    animation: progress-shine 3s cubic-bezier(0.25, 0.46, 0.45, 0.94) infinite;
    opacity: 0.8;
}

@keyframes progress-shine {
    0% { 
        transform: translateX(-120%);
        opacity: 0;
    }
    10% {
        opacity: 0.8;
    }
    90% {
        opacity: 0.8;
    }
    100% { 
        transform: translateX(120%);
        opacity: 0;
    }
}

/* Grid layouts */
.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin: 16px;
}

.stat-box {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 20px;
    text-align: center;
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.stat-box:hover {
    background: rgba(255, 255, 255, 0.08);
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
}

.stat-box h4 {
    font-size: 28px;
    color: #6366f1;
    margin-bottom: 6px;
    font-weight: 700;
    text-shadow: 0 2px 4px rgba(99, 102, 241, 0.3);
}

.stat-box p {
    font-size: 12px;
    color: #94a3b8;
    margin: 0;
}

/* Store buttons */
.store-buttons {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin: 20px 16px;
}

.store-button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 16px;
    padding: 16px 20px;
    color: white;
    text-decoration: none;
    transition: all 0.3s ease;
    font-weight: 500;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.store-button:hover {
    background: rgba(255, 255, 255, 0.12);
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2);
}

.store-button img {
    width: 28px;
    height: 28px;
}

/* Modals - объединенные стили */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(10,10,15,0.75);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    justify-content: center;
    align-items: center;
    transition: opacity 0.2s;
}

.modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
}

.modal-content {
    background: rgba(26, 31, 46, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    margin: 20px;
    padding: 32px;
    border-radius: 24px;
    width: 90%;
    max-width: 400px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    animation: modalSlide 0.3s ease;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
}

.modal-close {
    color: #94a3b8;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    line-height: 1;
    transition: all 0.3s ease;
}

.modal-close:hover {
    color: white;
    transform: scale(1.1);
}

.modal h2 {
    margin-top: 0;
    color: white;
    margin-bottom: 20px;
    font-size: 22px;
    font-weight: 600;
}

.modal input {
    width: 100%;
    padding: 16px;
    margin: 12px 0;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    color: white;
    font-size: 16px;
    box-sizing: border-box;
    transition: all 0.3s ease;
}

.modal input:focus {
    border-color: rgba(99, 102, 241, 0.5);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
    outline: none;
}

.modal button {
    width: 100%;
    padding: 16px;
    margin-top: 16px;
    border: none;
    border-radius: 12px;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: white;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(99, 102, 241, 0.3);
}

.modal button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(99, 102, 241, 0.4);
}

/* Swiper customization */
.swiper {
    width: 100%;
    margin: 20px 0;
    overflow: hidden;
    border-radius: 16px;
}

.swiper-wrapper {
    padding: 0;
}

.swiper-slide {
    text-align: center;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: 16px;
    padding: 24px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
    width: 100%;
    box-sizing: border-box;
}

.swiper-slide img {
    max-width: 100%;
    width: 100%;
    height: auto;
    border-radius: 12px;
    margin-bottom: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes modalSlide {
    from { 
        opacity: 0;
        transform: translateY(-30px) scale(0.9);
    }
    to { 
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.fade-in {
    animation: fadeIn 0.8s ease-out;
}

/* Responsive design */
@media (max-width: 480px) {
    .glass-button {
        font-size: 14px;
        padding: 16px 20px;
        min-height: 52px;
        border-radius: 14px;
        margin: 8px 0;
    }
    
    .glass-button.gradient-special {
        font-size: 15px;
        font-weight: 600;
    }
    
    .container {
        padding: 0 12px;
    }
    
    .glass-card {
        margin: 12px;
        padding: 20px;
        border-radius: 16px;
    }
    
    .status-card {
        margin: 12px;
        padding: 20px;
    }
    
    .loyalty-card-compact {
        margin: 12px;
        padding: 14px;
    }
}

@media (min-width: 481px) and (max-width: 767px) {
    .glass-button {
        font-size: 16px;
        padding: 18px 24px;
        min-height: 56px;
        margin: 10px 0;
    }
    
    .container {
        padding: 0 16px;
    }
    
    .glass-card {
        margin: 16px;
        padding: 24px;
    }
}

@media (min-width: 768px) {
    .container {
        padding: 0 40px;
        max-width: 600px;
        margin: 0 auto;
    }
    
    .glass-card {
        margin: 24px auto;
        padding: 32px;
        max-width: 500px;
    }
    
    .glass-button {
        font-size: 18px;
        padding: 20px 32px;
        min-height: 60px;
        margin: 12px 0;
        max-width: 400px;
        margin-left: auto;
        margin-right: auto;
    }
    
    .grid-2 {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
        margin: 24px auto;
        max-width: 500px;
    }
    
    .store-buttons {
        flex-direction: row;
        margin: 24px auto;
        max-width: 500px;
        gap: 16px;
    }
    
    .store-button {
        flex: 1;
        min-width: 0;
    }
    
    header h1 {
        font-size: 40px;
    }
    
    .status-card {
        margin: 24px auto;
        max-width: 500px;
    }
    
    .loyalty-card-compact {
        margin: 24px auto;
        max-width: 500px;
    }
}

/* Desktop-specific styles */
@media (min-width: 1024px) {
    body {
        padding: 20px;
        background-attachment: fixed;
    }
    
    .container {
        max-width: 700px;
        padding: 0 40px;
        margin: 0 auto;
    }
    
    .page {
        padding: 40px 0;
        max-width: 700px;
        margin: 0 auto;
    }
    
    .glass-button {
        font-size: 18px;
        padding: 22px 36px;
        min-height: 64px;
        margin: 16px auto;
        max-width: 450px;
        border-radius: 18px;
    }
    
    .glass-button:hover {
        transform: translateY(-3px) scale(1.02);
        box-shadow: 0 12px 40px rgba(0, 0, 0, 0.25);
    }
    
    .glass-card {
        margin: 32px auto;
        padding: 40px;
        max-width: 600px;
        border-radius: 24px;
    }
    
    .status-card {
        margin: 32px auto;
        padding: 32px;
        max-width: 600px;
    }
    
    .loyalty-card-compact {
        margin: 32px auto;
        padding: 24px;
        max-width: 600px;
    }
    
    .grid-2 {
        margin: 32px auto;
        max-width: 600px;
        gap: 24px;
    }
    
    .store-buttons {
        margin: 32px auto;
        max-width: 600px;
        gap: 20px;
    }
}

/* Стандартный стеклянный селектор */
.glass-select {
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    padding: 16px 20px;
    color: white;
    font-size: 16px;
    font-weight: 500;
    width: 100%;
    margin: 16px 0;
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: url('data:image/svg+xml;charset=US-ASCII,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 10 6"><path fill="%2394a3b8" d="M1 1l4 4 4-4" stroke="%2394a3b8" stroke-width="1" fill="none" stroke-linecap="round" stroke-linejoin="round"/></svg>');
    background-repeat: no-repeat;
    background-position: calc(100% - 16px) center;
    background-size: 14px 8px;
    padding-right: 50px;
    box-sizing: border-box;
}

.glass-select:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.25);
    transform: translateY(-1px);
    box-shadow: 0 6px 25px rgba(0, 0, 0, 0.15);
}

.glass-select:focus {
    outline: none;
    border-color: rgba(99, 102, 241, 0.5);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.glass-select option {
    background: #1a1f2e;
    color: white;
    padding: 16px;
    font-size: 16px;
    border: none;
}

/* Обёртка для селектора */
.select-container {
    position: relative;
    margin: 16px 0;
    overflow: visible;
    z-index: 1;
}

/* Дополнительная фиксация стрелки селектора */
.glass-select {
    position: relative;
    z-index: 1;
}

.glass-select::-ms-expand {
    display: none; /* Убираем стрелку IE/Edge */
}

/* Компактная карта оплаты */
.payment-card {
    padding: 20px !important;
    margin: 16px !important;
}

.payment-card h3 {
    font-size: 18px;
    margin-bottom: 16px;
    color: #f1f5f9;
    font-weight: 600;
}

.payment-card .select-container {
    margin: 8px 0 16px 0;
}

.payment-card .glass-select {
    margin: 0;
}

/* Блок информации о скидке пользователя */
.discount-info-card {
    background: linear-gradient(135deg, rgba(0, 212, 170, 0.1), rgba(99, 102, 241, 0.1));
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(0, 212, 170, 0.3);
    border-radius: 16px;
    padding: 20px;
    margin: 16px;
    box-shadow: 0 8px 32px rgba(0, 212, 170, 0.15);
    transition: all 0.3s ease;
}

.discount-info-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 40px rgba(0, 212, 170, 0.2);
}

.discount-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.discount-icon {
    font-size: 24px;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.discount-header h4 {
    margin: 0;
    color: #f1f5f9;
    font-size: 18px;
    font-weight: 600;
}

.discount-details {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.discount-percentage {
    font-size: 32px;
    font-weight: 700;
    color: #00d4aa;
    text-shadow: 0 2px 8px rgba(0, 212, 170, 0.3);
}

.discount-description {
    flex: 1;
    margin: 0;
    color: #94a3b8;
    font-size: 14px;
    line-height: 1.4;
}

/* Улучшенная адаптивность кнопок для касания */
@media (hover: none) and (pointer: coarse) {
    /* Стили для устройств с тачскрином */
    .glass-button {
        min-height: 56px;
        padding: 18px 24px;
        font-size: 16px;
        -webkit-tap-highlight-color: rgba(255, 255, 255, 0.1);
        touch-action: manipulation;
    }
    
    .glass-button:active {
        transform: scale(0.98);
        background: rgba(255, 255, 255, 0.15);
        transition: transform 0.1s ease;
    }
    
    .store-button {
        min-height: 52px;
        -webkit-tap-highlight-color: rgba(255, 255, 255, 0.1);
        touch-action: manipulation;
    }
}

/* Для устройств с мышью */
@media (hover: hover) and (pointer: fine) {
    .glass-button:hover {
        transform: translateY(-3px) scale(1.02);
        box-shadow: 0 8px 30px rgba(0, 0, 0, 0.25);
    }
    
    .glass-button:active {
        transform: translateY(-1px) scale(1.01);
    }
}

/* === ANDROID TV PAGE STYLES === */

.tv-main-card {
    padding: 28px !important;
    margin: 16px !important;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.tv-header {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 32px;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.tv-icon {
    font-size: 48px;
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 32px rgba(99, 102, 241, 0.3);
    animation: pulse-glow 3s infinite;
}

@keyframes pulse-glow {
    0%, 100% { 
        transform: scale(1); 
        box-shadow: 0 8px 32px rgba(99, 102, 241, 0.3);
    }
    50% { 
        transform: scale(1.05); 
        box-shadow: 0 12px 40px rgba(99, 102, 241, 0.4);
    }
}

.tv-title-section h2 {
    font-size: 24px;
    font-weight: 600;
    color: #f1f5f9;
    margin: 0 0 8px 0;
}

.tv-subtitle {
    font-size: 16px;
    color: #94a3b8;
    margin: 0;
}

.tv-steps {
    display: flex;
    flex-direction: column;
    gap: 0px;
}

.tv-step {
    display: flex;
    gap: 16px;
    align-items: flex-start;
}

.step-number {
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, #00d4aa, #6366f1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: white;
    font-size: 16px;
    flex-shrink: 0;
    box-shadow: 0 4px 16px rgba(0, 212, 170, 0.3);
    margin-top: 2px; /* Небольшой отступ для выравнивания с заголовком */
}

.step-content {
    flex: 1;
}

.step-content h4 {
    font-size: 16px;
    font-weight: 600;
    color: #f1f5f9;
    margin: 0 0 8px 0;
    line-height: 32px; /* Высота строки равная высоте номера для выравнивания */
    display: flex;
    align-items: center;
    min-height: 32px; /* Минимальная высота равная высоте номера */
}

.step-content p {
    font-size: 14px;
    color: #94a3b8;
    margin: 0 0 12px 0;
    line-height: 1.4;
}

.tv-link-display {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 12px 16px;
    margin-top: 8px;
}

.tv-link-text {
    flex: 1;
    font-family: 'Courier New', monospace;
    font-size: 16px;
    color: #00d4aa;
    font-weight: 600;
}

.tv-copy-link-btn {
    background: rgba(0, 212, 170, 0.2);
    border: 1px solid rgba(0, 212, 170, 0.3);
    border-radius: 8px;
    padding: 8px 12px;
    color: #00d4aa;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 16px;
}

.tv-copy-link-btn:hover {
    background: rgba(0, 212, 170, 0.3);
    transform: translateY(-1px);
}

.tv-code-input-section {
    display: flex;
    gap: 12px;
    margin: 8px 0;
    padding: 10px;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.tv-code-input {
    flex: 1;
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    padding: 16px;
    color: white;
    font-size: 18px;
    font-weight: 600;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 4px;
    transition: all 0.3s ease;
}

.tv-code-input:focus {
    border-color: rgba(99, 102, 241, 0.5);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
    outline: none;
}

.tv-code-input::placeholder {
    color: #64748b;
    letter-spacing: normal;
    text-transform: none;
    font-weight: 400;
}

.tv-confirm-btn {
    background: linear-gradient(135deg, #00d4aa, #6366f1);
    border: none;
    border-radius: 12px;
    padding: 16px 24px;
    color: white;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(0, 212, 170, 0.3);
    white-space: nowrap;
}

.tv-confirm-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(0, 212, 170, 0.4);
}

.tv-status, .tv-success {
    text-align: center;
    padding: 24px;
    margin-top: 24px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.tv-status-icon, .tv-success-icon {
    font-size: 48px;
    margin-bottom: 16px;
    display: block;
}

.tv-status p, .tv-success p {
    color: #94a3b8;
    margin: 8px 0 0 0;
    font-size: 16px;
}

.tv-success h3 {
    color: #00d4aa;
    font-size: 24px;
    margin: 0 0 12px 0;
}

.tv-info-card {
    padding: 24px !important;
    margin: 16px !important;
}

.tv-info-card h3 {
    font-size: 20px;
    font-weight: 600;
    color: #f1f5f9;
    margin: 0 0 20px 0;
}

.tv-instruction-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.instruction-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    transition: all 0.3s ease;
}

.instruction-item:hover {
    background: rgba(255, 255, 255, 0.08);
    transform: translateX(4px);
}

.instruction-icon {
    font-size: 24px;
    width: 40px;
    text-align: center;
    flex-shrink: 0;
}

.instruction-text {
    flex: 1;
    font-size: 14px;
    color: #94a3b8;
    line-height: 1.4;
}

.instruction-text strong {
    color: #f1f5f9;
    font-weight: 600;
}

.tv-alternatives {
    padding: 20px !important;
    margin: 16px !important;
}

.tv-alternatives h3 {
    font-size: 18px;
    font-weight: 600;
    color: #f1f5f9;
    margin: 0 0 16px 0;
}

/* Responsive для Android TV страницы */
@media (max-width: 480px) {
    .tv-header {
        flex-direction: column;
        text-align: center;
        gap: 16px;
    }
    
    .tv-icon {
        width: 64px;
        height: 64px;
        font-size: 32px;
    }
    
    .tv-title-section h2 {
        font-size: 20px;
    }
    
    .tv-step {
        display: flex;
        flex-direction: row;
        gap: 16px;
        align-items: flex-start;
    }
    
    .step-number {
        width: 32px;
        height: 32px;
        flex-shrink: 0;
        margin-top: 2px;
    }
    
    .step-content h4 {
        font-size: 16px;
        font-weight: 600;
        color: #f1f5f9;
        margin: 0 0 8px 0;
        line-height: 32px;
        display: flex;
        align-items: center;
        min-height: 32px;
    }
    
    .tv-code-input-section {
        flex-direction: column;
    }
    
    .tv-link-display {
        flex-direction: column;
        gap: 12px;
        text-align: center;
    }
}

/* Высокая плотность пикселей */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .glass-button {
        backdrop-filter: blur(16px);
        -webkit-backdrop-filter: blur(16px);
    }
}

/* Широкие экраны */
@media (min-width: 1200px) {
    .container {
        max-width: 800px;
    }
    
    .glass-button {
        max-width: 500px;
        font-size: 19px;
        padding: 24px 40px;
        min-height: 68px;
    }
}

/* Очень широкие экраны */
@media (min-width: 1600px) {
    .container {
        max-width: 900px;
        padding: 0 60px;
    }
    
    .glass-button {
        max-width: 600px;
        font-size: 20px;
        padding: 26px 44px;
        min-height: 72px;
    }
}

/* === STORE LAYOUT FIXES === */
/* Чтобы кнопка "Назад" в шапке не перекрывалась содержимым */
.nav-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: linear-gradient(180deg, rgba(10,14,26,0.9), rgba(10,14,26,0.0));
  backdrop-filter: blur(6px);
}

/* Сетка категорий и элементы*/
.store-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.tile-cat {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
}
.tile-cat img {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  object-fit: cover;
}
.tile-cat .title {
  font-weight: 700;
}
.tile-cat .meta {
  color: #94a3b8;
  font-size: 12px;
}

/* Строка товара в списках */
.product-row {
  display: flex;
  gap: 14px;
  align-items: center;
}
.product-row img {
  width: 96px;
  height: 96px;
  border-radius: 12px;
  object-fit: cover;
}
.product-row .price {
  margin-top: 10px;
  font-weight: 800;
}

/* Hide elements for different platforms */
.mobile-only {
    display: block;
}

.desktop-only {
    display: none;
}

@media (min-width: 768px) {
    .mobile-only {
        display: none;
    }
    
    .desktop-only {
        display: block;
    }
}

/* Предотвращение переполнения на очень маленьких экранах */
@media (max-width: 320px) {
    .glass-button {
        font-size: 13px;
        padding: 14px 16px;
        min-height: 48px;
        margin: 6px 0;
    }
    
    .container {
        padding: 0 8px;
    }
    
    .glass-card {
        margin: 8px;
        padding: 16px;
    }
}

/* Ландшафтная ориентация на мобильных */
@media (max-height: 500px) and (orientation: landscape) {
    .glass-button {
        min-height: 44px;
        padding: 12px 20px;
        margin: 6px 0;
        font-size: 15px;
    }
    
    .glass-card {
        padding: 16px;
        margin: 8px;
    }
}
