:root {
  color-scheme: dark;
  --bg: #07111f;
  --bg-soft: #0d1a2d;
  --card: rgba(18, 31, 54, 0.92);
  --card-border: rgba(255, 255, 255, 0.08);
  --accent: #2ae0a3;
  --accent-strong: #12c389;
  --accent-glow: rgba(42, 224, 163, 0.24);
  --text: #f5f8ff;
  --muted: #9fb1cc;
  --danger: #ff6f91;
  --danger-strong: #ff4d6d;
  --danger-glow: rgba(255, 77, 109, 0.28);
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.35);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Inter", system-ui, sans-serif;
  background:
    radial-gradient(circle at top, rgba(42, 224, 163, 0.18), transparent 34%),
    linear-gradient(180deg, #08111f 0%, #060d18 100%);
  color: var(--text);
}

button {
  font: inherit;
}

.hidden {
  display: none !important;
}

.app-shell {
  width: min(100%, 480px);
  margin: 0 auto;
  padding: 20px 16px 40px;
}

.hero-card,
.countries-card,
.share-modal,
.progress-card,
.messenger-choice-card,
.session-card {
  background: var(--card);
  border: 1px solid var(--card-border);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.hero-card,
.countries-card {
  border-radius: 28px;
  padding: 18px;
}

.hero-card {
  margin-top: 10px;
}

.hero-top,
.section-head,
.modal-head,
.progress-meta,
.modal-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.eyebrow {
  margin: 0 0 8px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
}

h1,
h2,
h3,
.session-title {
  margin: 0;
}

h1 {
  font-size: 28px;
  line-height: 1.1;
}

h2,
h3 {
  font-size: 20px;
}

.connection-pill,
.country-count {
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
}

.connection-pill.connected {
  background: rgba(42, 224, 163, 0.16);
  color: #c7ffed;
}

.connect-zone {
  display: flex;
  justify-content: center;
  padding: 28px 0 22px;
}

.connect-button {
  position: relative;
  width: 260px;
  height: 260px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  padding: 0;
  cursor: pointer;
}

.connect-ring,
.connect-core {
  position: absolute;
  inset: 0;
  border-radius: 50%;
}

.connect-ring {
  background:
    radial-gradient(circle at center, rgba(255, 77, 109, 0.34), rgba(255, 77, 109, 0.04) 68%, transparent 70%),
    linear-gradient(135deg, rgba(255, 111, 145, 0.92), rgba(255, 77, 109, 0.76));
  filter: blur(10px);
  opacity: 0.95;
  transform: scale(1.02);
}

.connect-core {
  inset: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  flex-direction: column;
  gap: 8px;
  padding: 28px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.02)),
    linear-gradient(180deg, #163053 0%, #0d1930 100%);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow:
    inset 0 1px 10px rgba(255, 255, 255, 0.08),
    0 0 0 12px var(--danger-glow);
}

.connect-label {
  font-size: 30px;
  font-weight: 800;
}

.connect-hint {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.35;
}

.connect-button.connected .connect-core {
  background:
    linear-gradient(180deg, rgba(42, 224, 163, 0.22), rgba(42, 224, 163, 0.08)),
    linear-gradient(180deg, #143a3b 0%, #0b2328 100%);
  box-shadow:
    inset 0 1px 10px rgba(255, 255, 255, 0.08),
    0 0 0 12px var(--accent-glow);
}

.connect-button.connected .connect-ring {
  background:
    radial-gradient(circle at center, rgba(42, 224, 163, 0.35), rgba(42, 224, 163, 0.02) 68%, transparent 70%),
    linear-gradient(135deg, rgba(42, 224, 163, 0.8), rgba(22, 112, 255, 0.65));
}

.session-card {
  display: flex;
  align-items: center;
  gap: 12px;
  border-radius: 20px;
  padding: 14px 16px;
}

.session-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--danger);
  box-shadow: 0 0 0 8px rgba(255, 111, 145, 0.12);
}

.session-dot.active {
  background: var(--accent);
  box-shadow: 0 0 0 8px rgba(42, 224, 163, 0.16);
}

.session-title {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 4px;
}

.session-value {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
}

.countries-card {
  margin-top: 16px;
}

.countries-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 16px;
}

.country-chip {
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  padding: 14px 12px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.country-chip.active {
  background: rgba(42, 224, 163, 0.16);
  border-color: rgba(42, 224, 163, 0.42);
  color: #d9fff4;
}

.country-chip:active,
.connect-button:active,
.primary-action:active,
.messenger-choice-btn:active,
.icon-button:active {
  transform: scale(0.98);
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 16px;
  background: rgba(2, 7, 15, 0.72);
}

.modal-backdrop.hidden {
  display: none;
}

.share-modal {
  width: min(100%, 480px);
  border-radius: 28px 28px 20px 20px;
  padding: 18px;
}

.icon-button,
.primary-action,
.messenger-choice-btn {
  border: 0;
  cursor: pointer;
}

.icon-button {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
  font-size: 28px;
  line-height: 1;
}

.share-copy {
  margin: 14px 0 16px;
  color: #d6def0;
  line-height: 1.5;
}

.messenger-choice-card,
.progress-card,
.selected-messenger {
  border-radius: 20px;
  padding: 14px;
}

.messenger-choice-card {
  margin-bottom: 12px;
}

.messenger-choice-title {
  margin: 0 0 14px;
  font-size: 15px;
  font-weight: 700;
}

.messenger-choice-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.messenger-choice-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border-radius: 18px;
  padding: 14px 12px;
  font-weight: 700;
  color: var(--text);
}

.messenger-choice-wa {
  background: rgba(37, 211, 102, 0.16);
  border: 1px solid rgba(37, 211, 102, 0.28);
}

.messenger-choice-max {
  background: rgba(111, 140, 255, 0.16);
  border: 1px solid rgba(111, 140, 255, 0.28);
}

.messenger-choice-icon,
.selected-messenger-icon,
.share-action-icon {
  width: 22px;
  height: 22px;
  object-fit: contain;
  flex: 0 0 auto;
}

.progress-meta {
  margin-bottom: 10px;
}

.progress-track {
  width: 100%;
  height: 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.progress-fill {
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent) 0%, #1c7dff 100%);
  transition: width 0.25s ease;
}

.selected-messenger {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 12px;
  margin-bottom: 12px;
}

.selected-messenger-text {
  font-weight: 700;
}

.modal-actions {
  margin-top: 14px;
}

.primary-action {
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border-radius: 16px;
  padding: 14px;
  font-weight: 700;
}

.primary-action {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-strong) 100%);
  color: #052217;
}

@media (max-width: 380px) {
  .connect-button {
    width: 220px;
    height: 220px;
  }

  .connect-label {
    font-size: 26px;
  }
}
