:root {
  --bg: #0b1220;
  --bg-card: rgba(18, 28, 48, 0.85);
  --bg-card-hover: rgba(24, 38, 64, 0.95);
  --border: rgba(56, 189, 248, 0.18);
  --border-strong: rgba(56, 189, 248, 0.35);
  --cyan: #22d3ee;
  --cyan-dim: #06b6d4;
  --cyan-glow: rgba(34, 211, 238, 0.25);
  --text: #e2e8f0;
  --text-muted: #94a3b8;
  --success: #34d399;
  --danger: #f87171;
  --warning: #fbbf24;
  --radius: 16px;
  --radius-sm: 12px;
  --shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  --font: 'Inter', system-ui, -apple-system, sans-serif;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.5;
  overflow-x: hidden;
}

.bg-glow {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-color: #070b14;
  background-image:
    linear-gradient(180deg, rgba(7, 11, 20, 0.55) 0%, rgba(7, 11, 20, 0.75) 100%),
    url('bg.png');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

/* Header */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(16px);
  background: rgba(11, 18, 32, 0.85);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  max-width: 720px;
  margin: 0 auto;
  padding: 14px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  user-select: none;
}

.logo-icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  object-fit: cover;
  display: block;
  box-shadow: 0 0 20px var(--cyan-glow);
  border: 1px solid var(--border-strong);
  background: #0b1220;
}

.logo-text {
  display: flex;
  flex-direction: column;
}

.logo-name {
  font-weight: 700;
  font-size: 15px;
  letter-spacing: 0.02em;
  color: #fff;
}

.logo-sub {
  font-size: 11px;
  color: var(--text-muted);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.header-user {
  display: inline-flex;
  align-items: center;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(34, 211, 238, 0.08);
  border: 1px solid var(--border);
  cursor: pointer;
  transition: all 0.2s ease;
}

.header-user:hover {
  background: rgba(34, 211, 238, 0.15);
  border-color: var(--border-strong);
}

.header-username {
  font-size: 13px;
  font-weight: 600;
  color: var(--cyan);
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.header-balance {
  display: inline-flex;
  align-items: center;
  padding: 8px 12px;
  border-radius: 999px;
  background: transparent;
  border: 1px solid transparent;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  color: var(--cyan);
  transition: all 0.2s ease;
}

.header-balance:hover {
  background: rgba(34, 211, 238, 0.08);
  border-color: var(--border);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: 999px;
  border: none;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.btn-telegram {
  background: linear-gradient(135deg, #0ea5e9, #22d3ee);
  color: #0b1220;
  box-shadow: 0 4px 16px var(--cyan-glow);
}

.btn-telegram:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 24px var(--cyan-glow);
}

.btn-telegram.logged {
  background: rgba(34, 211, 238, 0.15);
  color: var(--cyan);
  border: 1px solid var(--border-strong);
  box-shadow: none;
}

.btn-primary {
  background: linear-gradient(135deg, #0ea5e9, #22d3ee);
  color: #0b1220;
  width: 100%;
  padding: 14px 20px;
  font-size: 15px;
  border-radius: var(--radius-sm);
  box-shadow: 0 4px 20px var(--cyan-glow);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 28px var(--cyan-glow);
}

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

.btn-outline {
  background: transparent;
  color: var(--cyan);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  padding: 12px 20px;
}

.btn-outline:hover {
  background: rgba(34, 211, 238, 0.1);
}

.btn-outline.full,
.btn-telegram.full {
  width: 100%;
  margin-top: 12px;
}

.btn-back {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 14px;
  font-family: inherit;
  cursor: pointer;
  padding: 4px 0;
  margin-bottom: 4px;
}

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

/* Main */
.main {
  position: relative;
  z-index: 1;
  max-width: 720px;
  margin: 0 auto;
  padding: 24px 20px 80px;
  min-height: calc(100vh - 140px);
}

.section {
  display: none;
  animation: fadeIn 0.25s ease;
}

.section.active {
  display: block;
}

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

.section-title {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 8px;
  color: #fff;
}

.section-header {
  margin-bottom: 20px;
}

.section-desc {
  color: var(--text-muted);
  font-size: 14px;
  margin-bottom: 20px;
}

.subsection-title {
  font-size: 16px;
  font-weight: 600;
  margin: 24px 0 12px;
  color: #fff;
}

/* Cards grid (home) */
.cards-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 14px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  flex-direction: column;
  gap: 8px;
  backdrop-filter: blur(8px);
  box-shadow: var(--shadow);
}

.card:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-strong);
  transform: translateY(-2px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45), 0 0 24px var(--cyan-glow);
}

.card-wide {
  grid-column: 1 / -1;
  flex-direction: row;
  align-items: center;
  gap: 12px;
  padding: 16px 16px;
}

.card-primary {
  background: linear-gradient(135deg, rgba(14, 116, 144, 0.35), rgba(18, 28, 48, 0.9));
  border-color: var(--border-strong);
}

.card-icon {
  font-size: 22px;
  line-height: 1;
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.card-icon img {
  width: 28px;
  height: 28px;
  object-fit: contain;
  display: block;
  filter: drop-shadow(0 0 8px rgba(34, 211, 238, 0.35));
}

.card-wide .card-icon {
  width: 32px;
  height: 32px;
}

.card-wide .card-icon img {
  width: 32px;
  height: 32px;
}

.card-body h2 {
  font-size: 15px;
  font-weight: 600;
  color: #fff;
  margin-bottom: 2px;
}

.card-body p {
  font-size: 12px;
  color: var(--text-muted);
}

.card-arrow {
  margin-left: auto;
  font-size: 24px;
  color: var(--cyan);
  opacity: 0.7;
}

/* Accounts list */
.accounts-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.account-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 18px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 14px;
  backdrop-filter: blur(8px);
}

.account-card:hover:not(.disabled) {
  border-color: var(--border-strong);
  background: var(--bg-card-hover);
  transform: translateY(-1px);
}

.account-card.disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.account-status {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  flex-shrink: 0;
}

.account-status.free {
  background: var(--success);
  box-shadow: 0 0 10px rgba(52, 211, 153, 0.5);
}

.account-status.busy {
  background: var(--danger);
  box-shadow: 0 0 10px rgba(248, 113, 113, 0.4);
}

.account-status.unavailable {
  background: var(--text-muted);
}

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

.account-name {
  font-weight: 600;
  font-size: 15px;
  color: #fff;
}

.account-meta {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
}

.account-price {
  font-weight: 600;
  font-size: 14px;
  color: var(--cyan);
  white-space: nowrap;
}

.account-badge {
  font-size: 11px;
  padding: 3px 8px;
  border-radius: 6px;
  font-weight: 500;
}

.account-badge.free {
  background: rgba(52, 211, 153, 0.15);
  color: var(--success);
}

.account-badge.busy {
  background: rgba(248, 113, 113, 0.15);
  color: var(--danger);
}

.account-badge.unavailable {
  background: rgba(148, 163, 184, 0.15);
  color: var(--text-muted);
}

/* Detail */
.detail-content {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.detail-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  backdrop-filter: blur(8px);
}

.detail-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  flex-wrap: wrap;
  gap: 8px;
}

.detail-name {
  font-size: 18px;
  font-weight: 700;
  color: #fff;
}

.detail-desc {
  font-size: 13px;
  color: var(--text-muted);
  white-space: pre-line;
  line-height: 1.6;
  max-height: 280px;
  overflow-y: auto;
  padding-right: 8px;
}

.detail-desc::-webkit-scrollbar {
  width: 4px;
}

.detail-desc::-webkit-scrollbar-thumb {
  background: var(--border-strong);
  border-radius: 4px;
}

.durations-title {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 10px;
  color: #fff;
}

.durations-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 10px;
}

.duration-btn {
  background: rgba(34, 211, 238, 0.08);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px 12px;
  cursor: pointer;
  transition: all 0.2s;
  text-align: center;
  font-family: inherit;
  color: var(--text);
}

.duration-btn:hover {
  border-color: var(--cyan);
  background: rgba(34, 211, 238, 0.15);
}

.duration-btn.selected {
  border-color: var(--cyan);
  background: rgba(34, 211, 238, 0.2);
  box-shadow: 0 0 16px var(--cyan-glow);
}

.duration-hours {
  font-weight: 700;
  font-size: 15px;
  color: #fff;
}

.duration-price {
  font-size: 13px;
  color: var(--cyan);
  margin-top: 4px;
}

/* Balance */
.balance-card {
  background: linear-gradient(135deg, rgba(14, 116, 144, 0.4), rgba(18, 28, 48, 0.95));
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  padding: 28px 24px;
  text-align: center;
  margin-bottom: 8px;
  box-shadow: 0 0 40px var(--cyan-glow);
}

.balance-label {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.balance-value {
  font-size: 36px;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.02em;
}

.balance-user {
  font-size: 13px;
  color: var(--cyan);
  margin-top: 8px;
}

.topup-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.topup-btn {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 16px 12px;
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
  transition: all 0.2s;
}

.topup-btn:hover {
  border-color: var(--cyan);
  background: rgba(34, 211, 238, 0.12);
  color: var(--cyan);
}

.topup-btn.custom {
  grid-column: 1 / -1;
  color: var(--text-muted);
  font-weight: 500;
}

.payment-methods {
  display: flex;
  gap: 10px;
  margin-top: 20px;
}

.method {
  flex: 1;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 14px;
  font-weight: 500;
}

.method.active {
  border-color: var(--cyan);
  background: rgba(34, 211, 238, 0.1);
}

.badge {
  font-size: 11px;
  background: rgba(52, 211, 153, 0.2);
  color: var(--success);
  padding: 2px 8px;
  border-radius: 6px;
  font-weight: 600;
}

.badge.muted {
  background: rgba(148, 163, 184, 0.15);
  color: var(--text-muted);
}

.hint {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 16px;
  line-height: 1.5;
}

/* Info / Rules / Support */
.info-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
}

.info-card p {
  margin-bottom: 12px;
  color: var(--text-muted);
}

.info-card.rules {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.55;
}

.info-card.rules .rules-lead {
  color: #fff;
  font-weight: 600;
  font-size: 15px;
  margin-bottom: 16px;
}

.info-card.rules h3 {
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  margin: 18px 0 10px;
}

.info-card.rules ol,
.info-card.rules ul {
  padding-left: 20px;
  margin-bottom: 8px;
}

.info-card.rules li {
  margin-bottom: 8px;
}

.info-card.rules ul {
  list-style: disc;
  margin-top: 6px;
}

.info-card.rules a {
  color: var(--cyan);
  text-decoration: none;
}

.info-card.rules a:hover {
  text-decoration: underline;
}

.info-card.rules .rules-warn {
  margin-top: 16px;
  color: var(--warning);
  font-weight: 500;
}

.info-card.rules .rules-contact {
  margin-top: 12px;
  color: var(--text);
}

/* Reviews */
.reviews-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 20px;
}

.review-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 18px;
}

.stars,
.review-stars {
  display: flex;
  gap: 3px;
  margin-bottom: 8px;
}

.stars img,
.review-stars img {
  width: 18px;
  height: 18px;
  display: block;
}

.review-card p {
  font-size: 14px;
  color: var(--text);
  margin-bottom: 8px;
}

.review-author {
  font-size: 13px;
  color: var(--cyan);
  text-decoration: none;
  font-weight: 500;
}

.review-author:hover {
  text-decoration: underline;
}

/* Order */
.order-content {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.order-summary {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
}

.order-row {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  font-size: 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.order-row:last-child {
  border-bottom: none;
  padding-top: 12px;
  margin-top: 4px;
}

.order-row.total {
  font-size: 18px;
  font-weight: 700;
  color: #fff;
}

.order-row .value {
  color: var(--cyan);
  font-weight: 600;
}

.order-row.total .value {
  color: var(--cyan);
  font-size: 20px;
}

/* Toast */
.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: rgba(18, 28, 48, 0.95);
  border: 1px solid var(--border-strong);
  color: #fff;
  padding: 12px 24px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 500;
  z-index: 1000;
  opacity: 0;
  transition: all 0.3s ease;
  pointer-events: none;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
  white-space: nowrap;
}

.toast.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

.toast.success {
  border-color: rgba(52, 211, 153, 0.4);
}

.toast.error {
  border-color: rgba(248, 113, 113, 0.4);
}

/* Footer */
.footer {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 20px;
  font-size: 12px;
  color: var(--text-muted);
  border-top: 1px solid var(--border);
}

.footer-links a {
  color: var(--text-muted);
  text-decoration: none;
}

.footer-links a:hover {
  color: var(--cyan);
}

/* Responsive */
@media (max-width: 480px) {
  .header-inner {
    padding: 12px 14px;
  }

  .logo-name {
    font-size: 13px;
  }

  .btn-telegram span {
    display: none;
  }

  .btn-telegram {
    padding: 10px 12px;
  }

  .main {
    padding: 16px 14px 60px;
  }

  .cards-grid {
    gap: 10px;
  }

  .topup-grid {
    grid-template-columns: 1fr 1fr;
  }

  .durations-grid {
    grid-template-columns: 1fr 1fr;
  }

  .balance-value {
    font-size: 30px;
  }
}

.review-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}
.review-user {
  font-size: 13px;
  color: var(--cyan);
  font-weight: 500;
}
.review-text {
  font-size: 14px;
  color: var(--text);
  margin: 0 0 8px;
  line-height: 1.45;
  word-break: break-word;
}
