/* ============================================================
   WSocks Mini App — index.html page-specific styles
   ============================================================ */

/* App container */
.app {
  width: 100%;
  max-width: 480px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  position: relative;
  margin: 0 auto;
  animation: fadeInUp 0.6s ease-out;
}

/* Profile card */
.profile {
  background: var(--card);
  border-radius: 16px;
  border: 1px solid var(--border);
  padding: 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.profile-left {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.profile img {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  flex-shrink: 0;
}

.profile-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.profile-info .name {
  font-weight: 700;
  font-size: 17px;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.profile-info .tg-id {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.4);
}

.profile-stats {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 8px;
}

.stat-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 12px;
  cursor: pointer;
  transition: background 0.2s ease;
  color: #fff;
  font-family: inherit;
  white-space: nowrap;
}

.stat-btn:hover {
  background: rgba(255, 255, 255, 0.08);
}

.stat-btn-label {
  color: rgba(255, 255, 255, 0.5);
  font-size: 12px;
}

.stat-btn-value {
  font-weight: 700;
  font-size: 18px;
  color: #fff;
  margin-left: auto;
}

/* Action cards (Internet & Shop) */
.action-card {
  position: relative;
  border-radius: 16px;
  border: 0;
  padding: 28px;
  min-height: 180px;
  display: flex;
  align-items: center;
  gap: 18px;
  cursor: pointer;
  overflow: hidden;
  text-decoration: none;
  color: #fff;
  -webkit-tap-highlight-color: transparent;
  outline: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.action-card.net {
  background: linear-gradient(135deg, #ffffff 0%, #dcdcdc 50%, #b0b0b0 100%) !important;
  color: #000000 !important;
  border: 1px solid #ffffff !important;
  box-shadow: 0 8px 32px rgba(255, 255, 255, 0.05) !important;
}

.action-card.net:hover {
  background: linear-gradient(135deg, #dcdcdc 0%, #b0b0b0 50%, #8c8c8c 100%) !important;
  box-shadow: 0 12px 40px rgba(255, 255, 255, 0.1) !important;
}

.action-card.net .action-card-desc {
  color: rgba(0, 0, 0, 0.7) !important;
}

.action-card.net .action-card-icon svg {
  stroke: #000000 !important;
}

.action-card.shop {
  background: linear-gradient(135deg, #2a2a2a 0%, #121212 100%) !important;
  color: #ffffff !important;
  border: 1px solid #3e3e42 !important;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3) !important;
}

.action-card.shop:hover {
  background: linear-gradient(135deg, #1a1a1c 0%, #050506 100%) !important;
  border-color: #5a5a60 !important;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5) !important;
}

.action-card.shop .action-card-desc {
  color: rgba(255, 255, 255, 0.6) !important;
}

.action-card.shop .action-card-icon svg {
  stroke: #ffffff !important;
}

.action-card::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.04;
  background-image: radial-gradient(circle, #fff 1px, transparent 1px);
  background-size: 24px 24px;
  pointer-events: none;
}

.action-card .glow-1 {
  position: absolute;
  width: 180px;
  height: 180px;
  border-radius: 50%;
  filter: blur(70px);
  opacity: 0.2;
  pointer-events: none;
}

.action-card.net .glow-1 {
  top: -40px;
  right: -30px;
  background: #ffffff;
}

.action-card.shop .glow-1 {
  bottom: -40px;
  left: -30px;
  background: #ffffff;
}

.action-card .glow-2 {
  position: absolute;
  width: 140px;
  height: 140px;
  border-radius: 50%;
  filter: blur(60px);
  opacity: 0.12;
  pointer-events: none;
}

.action-card.net .glow-2 {
  bottom: -30px;
  left: 30%;
  background: #888888;
}

.action-card.shop .glow-2 {
  top: -30px;
  right: 20%;
  background: #888888;
}

.action-card .bg-icon {
  position: absolute;
  color: #fff;
  pointer-events: none;
  z-index: 0;
}

.action-card .bg-icon-1 {
  top: 15%;
  right: 10%;
  width: 64px;
  height: 64px;
  transform: rotate(15deg);
  opacity: 0.15;
}

.action-card .bg-icon-2 {
  top: 10%;
  right: 35%;
  width: 48px;
  height: 48px;
  transform: rotate(-20deg);
  opacity: 0.15;
}

.action-card .bg-icon-3 {
  top: 20%;
  right: 60%;
  width: 36px;
  height: 36px;
  transform: translateY(-50%) rotate(45deg);
  opacity: 0.1;
}

.action-card .bg-icon-4 {
  top: 50%;
  right: 5%;
  width: 56px;
  height: 56px;
  transform: rotate(-10deg);
  opacity: 0.12;
}

.action-card .bg-icon-5 {
  top: 45%;
  right: 30%;
  width: 40px;
  height: 40px;
  transform: rotate(30deg);
  opacity: 0.12;
}

.action-card:hover .bg-icon {
  opacity: 0.25;
}

.action-card-icon {
  width: 90px;
  height: 90px;
  border-radius: 0;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  z-index: 1;
  transition: transform 0.3s ease;
}



.action-card:hover .action-card-icon {
  transform: scale(1.15);
}

.action-card-icon svg {
  width: 90px;
  height: 90px;
  stroke: #fff;
  fill: none;
}

.action-card-body {
  flex: 1;
  min-width: 0;
  z-index: 1;
}

.action-card-title {
  font-size: 22px;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 4px;
}

.action-card-desc {
  font-size: 15px;
  color: rgba(255, 255, 255, 0.5);
  line-height: 1.4;
}

.action-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
}

.action-card:active {
  transform: scale(0.98);
}

/* Compact row buttons */
.compact-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.compact-btn {
  background: #181818;
  border: 1px solid #262626;
  border-radius: 14px;
  padding: 24px 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  cursor: pointer;
  transition: all 0.2s ease;
  color: var(--text);
  -webkit-tap-highlight-color: transparent;
  outline: none;
}

.compact-btn:hover {
  transform: translateY(-2px);
  background: #222222;
}

.compact-btn:active {
  transform: scale(0.97);
}

.compact-btn svg {
  width: 34px;
  height: 34px;
  stroke: var(--accent);
  fill: none;
  stroke-width: 2;
}

.compact-btn span {
  font-size: 15px;
  font-weight: 600;
  line-height: 1;
}

/* Social buttons */
.social {
  background: #181818;
  border: 1px solid #262626;
  border-radius: 16px;
  padding: 16px 20px;
  display: flex;
  justify-content: space-between;
}

.social button {
  background: transparent;
  border: none;
  color: #ffffff;
  border-radius: 14px;
  width: 64px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.social button svg {
  width: 36px;
  height: 36px;
  fill: currentColor;
}

.social button:hover {
  color: var(--accent);
  background: rgba(255, 255, 255, 0.06);
  transform: translateY(-2px);
}

.social button:active {
  transform: scale(0.95);
}

/* Subscriptions toggle */
.subscriptions-toggle {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) - 4px);
  padding: 10px 14px;
  color: var(--text);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  transition: all 0.25s ease;
  margin-top: 4px;
}

.subscriptions-toggle:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
  background: var(--card-hover);
}

.subscriptions-toggle svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
  transition: transform 0.3s ease;
}

.subscriptions-toggle.expanded svg {
  transform: rotate(180deg);
}

/* Subscriptions section */
.subscriptions-section {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 4px;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease, margin-top 0.3s ease;
}

.subscriptions-section.expanded {
  max-height: 2000px;
  margin-top: 8px;
}

.active-subscriptions-short {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 4px;
  font-size: 11px;
  color: rgba(255, 255, 255, 0.7);
}

.active-subscriptions-short-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 0;
}

.active-subscriptions-short-name {
  font-weight: 500;
}

.active-subscriptions-short-date {
  color: rgba(255, 255, 255, 0.5);
}

.subscriptions-section-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  margin: 0;
}

.subscriptions-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.subscription-item {
  background: var(--card);
  border-radius: calc(var(--radius) - 4px);
  padding: 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border: 1px solid var(--border);
  transition: transform 0.25s ease;
}

.subscription-item:hover {
  transform: translateY(-2px);
}

.subscription-name {
  font-weight: 600;
  font-size: 14px;
  color: #ffffff;
}

.subscription-name.subscription-net { color: #ffffff; }
.subscription-name.subscription-white { color: #ffffff; }
.subscription-name.subscription-free { color: #ffffff; }
.subscription-name.subscription-adm { color: #d4af37; }

.subscription-status {
  padding: 3px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.2);
  color: var(--accent);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
}

.subscription-status.expired {
  background: rgba(255, 80, 80, 0.2);
  color: #ff5050;
}

.purchase-history {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 4px;
  max-height: 200px;
  overflow-y: auto;
}

/* Modal list & items */
.modal-list {
  list-style: none;
  padding: 8px;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 400px;
  overflow-y: auto;
}

.modal-item {
  background: var(--card);
  border-radius: calc(var(--radius) - 4px);
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  border: 1px solid var(--border);
  animation: itemSlideIn 0.3s ease-out both;
}

.modal-item:nth-child(1) { animation-delay: 0.05s; }
.modal-item:nth-child(2) { animation-delay: 0.1s; }
.modal-item:nth-child(3) { animation-delay: 0.15s; }
.modal-item:nth-child(4) { animation-delay: 0.2s; }
.modal-item:nth-child(5) { animation-delay: 0.25s; }
.modal-item:nth-child(n+6) { animation-delay: 0.3s; }

@keyframes itemSlideIn {
  from {
    opacity: 0;
    transform: translateX(-20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.modal-item-name {
  font-weight: 600;
  font-size: 15px;
  color: #ffffff;
}

.modal-item-name.subscription-net { color: #ffffff; }
.modal-item-name.subscription-white { color: #ffffff; }
.modal-item-name.subscription-free { color: #ffffff; }
.modal-item-name.subscription-adm { color: #d4af37; }
.modal-item-name.subscription-service { color: #a78bfa; }

.modal-item-details {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.7);
}

/* Terms modal */
.modal-terms-content {
  max-height: 500px;
  overflow-y: auto;
  padding: 16px;
  background: var(--card);
  border-radius: calc(var(--radius) - 4px);
  border: 1px solid var(--border);
  color: var(--text);
  line-height: 1.6;
  font-size: 14px;
}

.modal-terms-content b {
  color: var(--accent);
  font-weight: 600;
}

.modal-terms-content ul {
  margin: 12px 0;
  padding-left: 24px;
}

.modal-terms-content li {
  margin: 8px 0;
}

.modal-terms-content i {
  color: rgba(255, 255, 255, 0.7);
  font-style: italic;
}

/* Consent modal */
.consent-content {
  padding: 20px;
  color: var(--text);
  line-height: 1.6;
}

.consent-content p {
  margin: 0 0 20px 0;
  font-size: 15px;
}

.consent-checkboxes {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.consent-checkbox {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  cursor: pointer;
  font-size: 15px;
  line-height: 1.5;
}

.consent-checkbox input[type="checkbox"] {
  width: 20px;
  height: 20px;
  margin-top: 2px;
  cursor: pointer;
  accent-color: var(--accent);
  flex-shrink: 0;
}

.consent-link {
  color: var(--accent);
  text-decoration: none;
  transition: opacity 0.2s ease;
}

.consent-link:hover {
  opacity: 0.8;
  text-decoration: underline;
}

#consent-accept-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

#consent-accept-btn:disabled:hover {
  transform: none;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

/* Referral tab */
.ref-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin: 20px 0;
}

.ref-stat-item {
  background: var(--card);
  border-radius: calc(var(--radius) - 4px);
  padding: 16px;
  text-align: center;
  border: 1px solid var(--border);
}

.ref-stat-value {
  font-size: 24px;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 4px;
}

.ref-stat-label {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.7);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.ref-link-section {
  margin-top: 24px;
}

.ref-link-section label {
  display: block;
  margin-bottom: 8px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}

.ref-link-container {
  display: flex;
  gap: 8px;
}

.ref-link-container input {
  flex: 1;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) - 4px);
  padding: 12px;
  color: var(--text);
  font-size: 13px;
}

/* Support tab */
.support-options {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 20px;
}

.support-option-btn {
  background: #222222;
  border: 1px solid #262626;
  border-radius: calc(var(--radius) - 4px);
  padding: 14px;
  color: var(--text);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-align: center;
}

.support-option-btn svg {
  flex-shrink: 0;
  stroke: currentColor;
  fill: none;
  width: 20px;
  height: 20px;
}

.support-option-btn:hover {
  transform: translateY(-2px);
  background: #262626;
}

.support-info {
  margin-top: 20px;
  padding: 16px;
  background: var(--card);
  border-radius: calc(var(--radius) - 4px);
  border: 1px solid var(--border);
}

.support-info p {
  margin: 8px 0;
  font-size: 14px;
}

#support-tg-btn-modal {
  background: #222222;
  border: 1px solid #262626;
  color: #ffffff;
}

#support-tg-btn-modal:hover {
  background: #2a2a2a;
}

#support-tg-btn-modal span { color: #ffffff; }
#support-tg-btn-modal svg { color: #ffffff; }

#copy-tg-id-btn {
  background: var(--card);
  border: 1px solid var(--border);
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.info-content {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.info-section {
  background: #222222;
  border-radius: calc(var(--radius) - 4px);
  padding: 12px;
  border: 1px solid #262626;
}

.info-section h4 {
  margin: 0 0 8px;
  font-size: 16px;
  font-weight: 600;
  color: var(--accent);
}

.info-section p {
  margin: 0;
  font-size: 14px;
}

.info-section ul {
  margin: 4px 0 0;
  padding-left: 20px;
  color: rgba(255, 255, 255, 0.7);
}

.info-section li {
  margin: 4px 0;
  font-size: 14px;
}

.purchase-item {
  background: var(--card);
  border-radius: calc(var(--radius) - 4px);
  padding: 10px 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border: 1px solid var(--border);
  font-size: 13px;
}

.purchase-name {
  font-weight: 500;
  color: var(--text);
}

.purchase-date {
  color: rgba(255, 255, 255, 0.6);
  font-size: 12px;
}

.purchase-price {
  font-weight: 600;
  color: var(--accent);
  font-size: 14px;
}

.support-hint {
  margin-top: 8px;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.7);
  text-align: center;
}

/* Proxy popup */
.proxy-popup {
  position: fixed;
  bottom: 20px;
  left: 20px;
  right: 20px;
  max-width: 480px;
  margin: 0 auto;
  background: var(--card);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  border: 1px solid var(--border);
  z-index: 10000;
  cursor: pointer;
  transform: translateY(100px);
  opacity: 0;
  visibility: hidden;
  transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  -webkit-tap-highlight-color: transparent;
}

.proxy-popup.show {
  transform: translateY(0);
  opacity: 1;
  visibility: visible;
  animation: proxySlideInUp 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes proxySlideInUp {
  from {
    transform: translateY(100px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.proxy-popup:hover {
  transform: translateY(-4px) scale(1.02);
  box-shadow: 0 12px 40px rgba(255, 255, 255, 0.3);
  border-color: rgba(255, 255, 255, 0.4);
}

.proxy-popup-content {
  display: flex;
  align-items: center;
  gap: 12px;
}

.proxy-popup-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0.1));
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.proxy-popup-icon svg {
  width: 28px;
  height: 28px;
  stroke: #ffffff;
  fill: none;
  stroke-width: 2;
}

.proxy-popup-text {
  flex: 1;
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.5;
}

.proxy-popup-close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0.6;
  transition: all 0.2s ease;
  padding: 0;
  z-index: 10;
}

.proxy-popup-close:hover {
  opacity: 1;
  background: rgba(255, 255, 255, 0.15);
  transform: scale(1.1);
}

.proxy-popup-close svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  stroke-width: 2.5;
}

/* === Responsive — mobile === */
@media (max-width: 480px) {
  /* Container */
  .app {
    max-width: 100%;
    padding: 0 10px;
    gap: 10px;
    padding-top: 60px;
  }

  /* Profile card — compact */
  .profile {
    padding: 12px;
    border-radius: 12px;
    gap: 10px;
    flex-wrap: wrap;
  }

  .profile img {
    width: 42px;
    height: 42px;
  }

  .profile-info .name {
    font-size: 15px;
  }

  .profile-info .tg-id {
    font-size: 11px;
  }

  /* Stat buttons — compact */
  .profile-stats {
    gap: 6px;
    margin-top: 4px;
  }

  .stat-btn {
    padding: 7px 10px;
    border-radius: 10px;
    font-size: 12px;
    gap: 6px;
  }

  .stat-btn-label {
    font-size: 10px;
  }

  .stat-btn-value {
    font-size: 15px;
  }

  /* Action cards — compact */
  .action-card {
    padding: 16px;
    min-height: 160px;
    gap: 12px;
    border-radius: 14px;
  }

  .action-card-icon {
    width: 75px;
    height: 75px;
  }

  .action-card-icon svg {
    width: 75px;
    height: 75px;
  }

  .action-card-title {
    font-size: 18px;
  }

  .action-card-desc {
    font-size: 13px;
  }

  .action-card .glow-1,
  .action-card .glow-2 {
    /* Optional: reduce scale instead of completely hiding */
    transform: scale(0.9);
  }

  .action-card .bg-icon {
    transform: scale(1.0);
  }

  /* Compact row — smaller buttons */
  .compact-row {
    gap: 6px;
  }

  .compact-btn {
    padding: 20px 8px;
    border-radius: 12px;
  }

  .compact-btn span {
    font-size: 13px;
  }

  .compact-btn svg {
    width: 26px;
    height: 26px;
  }

  /* Social buttons — bigger tap targets */
  .social {
    padding: 12px 16px;
    border-radius: 14px;
    gap: 10px;
  }

  .social button {
    width: 60px;
    height: 60px;
    border-radius: 14px;
  }

  .social button svg {
    width: 32px;
    height: 32px;
  }

  /* Proxy popup — full width */
  .proxy-popup {
    bottom: 12px;
    left: 12px;
    right: 12px;
    max-width: none;
    padding: 14px;
    border-radius: 14px;
  }

  /* Theme toggle & back link — smaller */
  .theme-toggle {
    width: 38px;
    height: 38px;
    top: 14px;
  }

  .back-link {
    width: 38px;
    height: 38px;
    top: 14px;
  }

  .theme-toggle svg,
  .back-link svg {
    width: 20px;
    height: 20px;
  }

  /* Modals */
  .modal-content {
    padding: 16px;
    border-radius: 16px;
    margin: 8px;
  }

  .modal-header h3 {
    font-size: 16px;
  }

  .modal-item {
    padding: 10px;
    border-radius: 10px;
  }

  .modal-actions {
    gap: 8px;
  }

  .modal-actions button {
    padding: 10px;
    font-size: 13px;
    border-radius: 10px;
  }

  /* Support options */
  .support-option {
    padding: 12px;
    border-radius: 12px;
  }

  /* Info sections */
  .info-section {
    padding: 12px;
    border-radius: 12px;
    font-size: 13px;
  }

  /* Referral link */
  .ref-link-container input {
    padding: 8px 10px;
    font-size: 12px;
    border-radius: 10px;
  }
}

@media (max-width: 360px) {
  .app {
    padding: 0 8px;
    padding-top: 56px;
    gap: 8px;
  }

  .profile {
    padding: 10px;
    gap: 8px;
  }

  .action-card {
    padding: 14px;
    min-height: 100px;
  }

  .action-card-title {
    font-size: 14px;
  }

  .compact-btn {
    padding: 12px 6px;
  }

  .compact-btn span {
    font-size: 10px;
  }
}

/* === Light theme — index page overrides === */
.light .theme-toggle { top: 16px; right: 16px; }

.light .compact-btn svg { stroke: var(--accent); }

.light .subscription-name { color: #000000; }
.light .subscription-name.subscription-net { color: #000000; }
.light .subscription-name.subscription-white { color: #000000; }
.light .subscription-name.subscription-free { color: #000000; }
.light .subscription-name.subscription-adm { color: #000000; }

.light .subscription-name-old,
.light .purchase-name { color: var(--text); }

.light .purchase-date { color: rgba(26, 26, 26, 0.6); }

.light .active-subscriptions-short { color: rgba(26, 26, 26, 0.7); }
.light .active-subscriptions-short-date { color: rgba(26, 26, 26, 0.5); }

.light .modal-item-name { color: #000000; }
.light .modal-item-name.subscription-net { color: #000000; }
.light .modal-item-name.subscription-white { color: #000000; }
.light .modal-item-name.subscription-free { color: #000000; }
.light .modal-item-name.subscription-adm { color: #000000; }
.light .modal-item-name.subscription-service { color: #000000; }
.light .modal-item-name-old { color: var(--text); }

.light .modal-item-details { color: rgba(26, 26, 26, 0.7); }

.light .modal-item { background: #ffffff; border-color: #e0e0e6; }

.light .modal-terms-content { background: #ffffff; border-color: #e0e0e6; }
.light .modal-terms-content i { color: rgba(26, 26, 26, 0.7); }

.light .ref-stat-item,
.light .support-option-btn,
.light .support-info,
.light .info-section,
.light .ref-link-container input { background: #ffffff; border-color: #e0e0e6; color: #1a1a1a; }
.light .ref-link-container input::placeholder { color: rgba(26, 26, 26, 0.5); }
.light .ref-link-section label, .light .ref-empty { color: #1a1a1a; }

.light .ref-stat-label,
.light .support-info p { color: rgba(26, 26, 26, 0.7); }

.light .support-option-btn,
.light #support-tg-btn-modal span { color: #1a1a1a; }

.light .support-option-btn svg,
.light #support-tg-btn-modal svg { stroke: #1a1a1a; color: #1a1a1a; }

.light .compact-btn svg { stroke: #111827; color: #111827; }

.light .compact-btn span { color: var(--text); }
.light .compact-btn { background: #ffffff; border-color: #e0e0e6; }
.light .compact-btn:hover { background: #f5f5f7; }

.light .social { background: #ffffff; border-color: #e0e0e6; }
.light .social button { background: transparent; border: none; color: #111827; }
.light .social button:hover { background: rgba(0, 0, 0, 0.06); }

.light .profile { background: #ffffff; border-color: #e0e0e6; }
.light .profile-info .name { color: #1a1a1a; }
.light .profile-info .tg-id { color: rgba(26, 26, 26, 0.4); }

.light .stat-btn { background: rgba(0, 0, 0, 0.04); border-color: rgba(0, 0, 0, 0.06); color: #1a1a1a; }
.light .stat-btn:hover { background: rgba(0, 0, 0, 0.07); }
.light .stat-btn-label { color: rgba(26, 26, 26, 0.5); }
.light .stat-btn-value { color: #1a1a1a; }

.light .subscription-item { background: #ffffff; border-color: #e0e0e6; }
.light .purchase-item { background: #ffffff; border-color: #e0e0e6; }

.light .subscription-status { background: rgba(255, 255, 255, 0.15); color: #ffffff; }

.light .subscription-name,
.light .subscription-name.subscription-net,
.light .subscription-name.subscription-white,
.light .subscription-name.subscription-free,
.light .modal-item-name,
.light .modal-item-name.subscription-net,
.light .modal-item-name.subscription-white,
.light .modal-item-name.subscription-free {
  color: #1a1a1a;
}

.light .support-hint { color: rgba(26, 26, 26, 0.7); }

.light .info-section ul { color: rgba(26, 26, 26, 0.8); }

.light #copy-tg-id-btn { background: #ffffff; border-color: #e0e0e6; color: #1a1a1a; }

.light .proxy-popup { background: rgba(255, 255, 255, 0.95); box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2); border-color: rgba(0, 0, 0, 0.1); }
.light .proxy-popup:hover { box-shadow: 0 12px 40px rgba(255, 255, 255, 0.25); border-color: rgba(255, 255, 255, 0.3); }
.light .proxy-popup-icon { background: linear-gradient(135deg, rgba(255, 255, 255, 0.15), rgba(255, 255, 255, 0.08)); border-color: rgba(255, 255, 255, 0.25); }
.light .proxy-popup-icon svg { stroke: #ffffff; }
.light .proxy-popup-close { background: rgba(0, 0, 0, 0.08); }
.light .proxy-popup-close:hover { background: rgba(0, 0, 0, 0.12); }

.light .action-card.net {
  background: linear-gradient(135deg, #1f1f23 0%, #000000 100%) !important;
  color: #ffffff !important;
  border-color: #000000 !important;
}
.light .action-card.net .action-card-desc {
  color: rgba(255, 255, 255, 0.6) !important;
}
.light .action-card.net .action-card-icon svg {
  stroke: #ffffff !important;
}

.light .action-card.shop {
  background: linear-gradient(135deg, #ffffff 0%, #f0f0f2 50%, #e0e0e4 100%) !important;
  color: #000000 !important;
  border-color: #d1d1d6 !important;
}
.light .action-card.shop .action-card-desc {
  color: rgba(0, 0, 0, 0.6) !important;
}
.light .action-card.shop .action-card-icon svg {
  stroke: #000000 !important;
}
