:root {
  --font-family: "Manrope", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --bg: #000000;
  --bg2: #0f0f10;
  --background-2: #262626;
  --card: radial-gradient(70% 93% at 100% 100%, rgba(56, 56, 56, 0.72) 0%, rgba(5, 5, 5, 0.92) 100%);
  --background-gradient-2: linear-gradient(130deg, #292929 24%, #050505 40%, #050505 60%, #292929 76%);
  --card-border: rgba(255, 255, 255, 0.13);
  --panel-soft: rgba(255, 255, 255, 0.05);
  --panel-soft-2: rgba(255, 255, 255, 0.08);
  --text: #ffffff;
  --muted: #a8a8a8;
  --primary: #5f9bff;
  --primary-2: #4285f4;
  --danger: #ff758f;
  --success: #4cff78;
  --shadow: 0 34px 84px rgba(0, 0, 0, 0.22);
  --radius: 34px;
  --radius-pill: 999px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

html {
  font-size: 10px;
}

body {
  min-height: 100vh;
  font-size: 16px;
  color: var(--text);
  font-family: var(--font-family);
  background: linear-gradient(180deg, var(--bg2), var(--bg));
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a {
  color: inherit;
}

.page-root {
  position: relative;
  min-height: 100vh;
  overflow-x: hidden;
}

.bg {
  position: fixed;
  inset: 0;
  background:
    radial-gradient(circle at 18% 22%, rgba(95, 155, 255, 0.11), transparent 30%),
    radial-gradient(circle at 82% 18%, rgba(255, 255, 255, 0.06), transparent 34%),
    radial-gradient(circle at 72% 82%, rgba(66, 133, 244, 0.12), transparent 32%),
    linear-gradient(180deg, var(--bg2), var(--bg));
  z-index: 0;
}

.app-shell {
  position: relative;
  z-index: 1;
  width: min(100%, 1120px);
  margin: 0 auto;
  padding: 12px 10px 18px;
}

.hero-card,
.card {
  background: var(--card);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.hero-card {
  padding: 16px 18px;
  margin-bottom: 10px;
}

.eyebrow {
  display: inline-block;
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

.hero-brand-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
  text-decoration: none;
}

.hero-brand-icon {
  display: inline-grid;
  place-items: center;
  width: 46px;
  height: 42px;
  border-radius: 11px;
  background: #050505;
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #fff;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: -0.04em;
  flex-shrink: 0;
}

.hero-card h1,
.card h2,
.card h3 {
  margin: 0;
}

.card h2 {
  font-size: 28px;
  line-height: 1.1;
  letter-spacing: -0.03em;
}

.card h3 {
  font-size: 22px;
  line-height: 1.15;
  letter-spacing: -0.03em;
}

.card {
  padding: 14px;
  margin-bottom: 10px;
}

.card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.card-head-actions {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.muted {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.tiny {
  font-size: 13px;
}

.hidden {
  display: none !important;
}

.chip {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 6px 10px;
  border-radius: var(--radius-pill);
  font-size: 12px;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.12);
}

.chip-soft {
  background: rgba(76, 255, 120, 0.12);
  color: #d9ffe4;
}

.chip-danger {
  background: rgba(255, 117, 143, 0.16);
  color: #ffd7df;
}

.chip-success {
  background: rgba(76, 255, 120, 0.16);
  color: #d7ffe1;
}

.btn {
  border: 0;
  border-radius: var(--radius-pill);
  padding: 14px 18px;
  font-family: inherit;
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  background: rgba(255, 255, 255, 0.08);
  cursor: pointer;
  transition: transform 0.24s ease, background 0.24s ease, border-color 0.24s ease, box-shadow 0.24s ease, filter 0.24s ease;
}

.btn:hover {
  background: rgba(255, 255, 255, 0.18);
  transform: translateY(-1px) scale(1.01);
}

.btn-primary {
  color: #ffffff;
  background: linear-gradient(135deg, #63a4ff 0%, #1a73e8 100%);
  box-shadow: 0 0 0 1px rgba(26, 115, 232, 0.14), 0 8px 22px rgba(26, 115, 232, 0.24);
}

.btn-primary:hover {
  background: linear-gradient(135deg, #63a4ff 0%, #1a73e8 100%);
  box-shadow: 0 0 0 1px rgba(26, 115, 232, 0.18), 0 10px 24px rgba(26, 115, 232, 0.28);
}

.btn-telegram {
  font-weight: 700;
  color: #f5fbff;
  background: linear-gradient(180deg, #45b5ff, #2297f4);
  box-shadow: 0 10px 24px rgba(34, 151, 244, 0.28);
}

.btn-telegram:hover {
  background: linear-gradient(180deg, #59beff, #2da0f8);
}

.btn-danger {
  color: #fff0f4;
  background: rgba(255, 117, 143, 0.18);
}

.btn-secondary {
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.08);
}

.btn-copy {
  min-width: 120px;
}

.auth-grid,
.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.card-connect,
.card-subscription {
  grid-column: 1 / -1;
}

.auth-block,
.stack-block {
  display: flex;
  flex-direction: column;
  padding: 18px;
  border-radius: 24px;
  background: var(--panel-soft);
  border: 1px solid var(--panel-soft-2);
}

.auth-title-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.google-slot {
  min-height: 42px;
  margin-top: 12px;
}

.auth-action-btn {
  width: auto;
  min-width: 150px;
  min-height: 0;
  padding: 11px 18px;
  justify-content: center;
  text-decoration: none;
}

.telegram-auth-actions {
  justify-content: flex-start;
}

.telegram-auth-actions,
.row-actions,
.plan-grid,
.link-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 12px;
}

.connect-platforms {
  display: grid;
  gap: 8px;
  margin: 10px 0 4px;
}

.support-footer {
  margin: 2px 0 0;
  padding: 2px 2px 10px;
}

.support-footer-btn {
  width: 100%;
  justify-content: center;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.support-footer-btn:hover {
  background: rgba(255, 255, 255, 0.12);
}

.connect-key-panel {
  margin: 10px 0 12px;
  padding: 12px;
  border-radius: 18px;
  background: radial-gradient(70% 93% at 100% 100%, rgba(39, 66, 112, 0.38) 0%, rgba(5, 5, 5, 0.96) 100%);
  border: 1px solid rgba(66, 133, 244, 0.26);
  box-shadow: 0 20px 44px rgba(12, 18, 34, 0.34);
}

.connect-key-label {
  margin-bottom: 10px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #8db7ff;
}

.connect-platform-tile {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 12px 14px;
  border-radius: 18px;
  background: var(--card);
  border: 1px solid var(--card-border);
  color: var(--text);
  box-shadow: var(--shadow);
  text-decoration: none;
  transition: transform 0.3s ease, border-color 0.3s ease, background 0.3s ease;
}

.connect-platform-tile:hover {
  transform: scale(1.02);
}

.connect-platform-symbol {
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.06);
  flex-shrink: 0;
}

.connect-platform-icon {
  display: block;
  width: 20px;
  height: 20px;
  object-fit: contain;
}

.connect-platform-content h4 {
  margin: 0;
  font-size: 19px;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.connect-platform-content p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13.5px;
  line-height: 1.6;
}

.connect-platform-arrow {
  font-size: 20px;
  color: var(--muted);
}

.telegram-login-state {
  margin-top: 14px;
}

.field {
  display: block;
  margin-top: 12px;
}

.field span {
  display: block;
  margin-bottom: 8px;
  font-size: 13px;
  color: var(--muted);
}

.field input {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  padding: 12px 14px;
  font: inherit;
  color: var(--text);
  background: rgba(8, 8, 8, 0.7);
}

.error-text {
  margin-top: 12px;
  color: #ffc2d0;
}

.subtle-link {
  display: inline-block;
  margin-top: 10px;
  font-size: 14px;
  color: var(--muted);
  text-decoration: none;
}

.subtle-link:hover {
  color: var(--text);
}

.dashboard-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.dashboard-title h2 {
  margin-bottom: 8px;
}

.dashboard-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.stats-grid .stat-tile-wide {
  grid-column: 1 / -1;
}

.stat-tile {
  padding: 11px 12px;
  border-radius: 16px;
  background: var(--panel-soft);
  border: 1px solid var(--panel-soft-2);
}

.stat-label {
  display: block;
  margin-bottom: 8px;
  font-size: 12px;
  color: var(--muted);
}

.stat-value {
  display: block;
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.section-title {
  margin-bottom: 12px;
}

.plan-grid {
  margin-top: 18px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  align-items: stretch;
}

.plan-btn {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  min-height: 156px;
  padding: 14px;
  border-radius: 22px;
  border: 1px solid var(--card-border);
  background: var(--card);
  box-shadow: var(--shadow);
  font-weight: 800;
  text-align: center;
  color: var(--text);
}

.plan-btn-head {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
}

.plan-btn-duration {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  min-width: 96px;
  padding: 7px 13px;
  border-radius: 34px;
  background: var(--background-gradient-2);
  color: var(--text);
  font-size: 12.5px;
  font-weight: 700;
  white-space: nowrap;
}

.plan-btn-bottom {
  display: flex;
  flex-direction: column;
  margin-top: auto;
  padding-top: 12px;
}

.plan-btn-savings {
  text-align: center;
  color: #8db7ff;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.2;
}

.plan-btn-savings-empty {
  visibility: hidden;
}

.plan-btn-price {
  margin-top: 6px;
  text-align: center;
  color: #fff;
  font-size: 27px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.04em;
}

.plan-btn-accent {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 24px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(66, 133, 244, 0.18);
  color: #8db7ff;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  line-height: 1;
}

.plan-btn-featured {
  border-color: rgba(66, 133, 244, 0.32);
  background: radial-gradient(70% 93% at 100% 100%, rgba(39, 66, 112, 0.68) 0%, rgba(5, 5, 5, 0.94) 100%);
}

.plan-actions-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 18px;
}

.locations-list,
.sessions-list {
  display: grid;
  gap: 8px;
}

.location-item,
.session-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 12px;
  border-radius: 16px;
  background: var(--panel-soft);
  border: 1px solid var(--panel-soft-2);
}

.location-title,
.session-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
}

.location-meta,
.session-meta {
  color: var(--muted);
  font-size: 13px;
}

.location-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: var(--success);
  box-shadow: 0 0 0 3px rgba(76, 255, 120, 0.12), 0 0 12px rgba(76, 255, 120, 0.7);
}

.subscription-url-box {
  padding: 12px 14px;
  border-radius: 16px;
  background: rgba(8, 12, 20, 0.92);
  border: 1px solid rgba(66, 133, 244, 0.18);
  overflow-wrap: anywhere;
  font-size: 13px;
  line-height: 1.55;
}

.connect-key-actions {
  margin-top: 14px;
}

.loading-card {
  min-height: 128px;
}

.inline-loader {
  display: flex;
  align-items: center;
  gap: 14px;
}

.spinner {
  width: 18px;
  height: 18px;
  border-radius: 999px;
  border: 2px solid rgba(243, 236, 255, 0.25);
  border-top-color: #f3ecff;
  animation: spin .7s linear infinite;
}

.banner {
  margin-bottom: 10px;
  padding: 10px 12px;
  border-radius: 16px;
  background: var(--panel-soft);
  border: 1px solid var(--panel-soft-2);
  color: var(--muted);
}

.banner-error {
  background: rgba(255, 117, 143, 0.14);
  color: #ffd2dc;
}

.confirm-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(0, 0, 0, 0.62);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.confirm-modal {
  width: min(100%, 460px);
  padding: 20px;
  border-radius: 24px;
  border: 1px solid var(--card-border);
  background: var(--card);
  box-shadow: var(--shadow);
}

.confirm-modal h3 {
  margin: 0 0 12px;
  font-size: 24px;
  line-height: 1.1;
  letter-spacing: -0.03em;
}

.confirm-modal .muted {
  margin: 0;
}

.confirm-modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 18px;
}

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

.faq-list {
  display: grid;
  gap: 8px;
}

.faq-item {
  border-radius: 18px;
  background: var(--panel-soft);
  border: 1px solid var(--panel-soft-2);
  overflow: hidden;
}

.faq-item summary {
  list-style: none;
  cursor: pointer;
  padding: 12px 14px;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.35;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary::after {
  content: '+';
  float: right;
  color: #8db7ff;
  font-size: 18px;
  line-height: 1;
}

.faq-item[open] summary::after {
  content: '−';
}

.faq-item p {
  margin: 0;
  padding: 0 14px 12px;
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.55;
}

@media (max-width: 900px) {
  .auth-grid,
  .dashboard-grid,
  .plan-grid {
    grid-template-columns: 1fr;
  }

  .stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dashboard-header {
    flex-direction: column;
  }

  .card-head {
    align-items: flex-start;
  }

  .card-head-actions {
    width: 100%;
    justify-content: flex-start;
  }
}

@media (max-width: 640px) {
  .connect-platform-tile {
    padding: 11px 12px;
    gap: 10px;
  }

  .connect-platform-content h4 {
    font-size: 19px;
  }

  .connect-platform-content p {
    font-size: 13.5px;
  }

  .stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .stats-grid .stat-tile-wide {
    grid-column: 1 / -1;
  }
}
