/* Тестовая песочница — тёмная тема, неоновый бирюзовый #22d3ee */

:root {
  --accent: #22d3ee;
  --accent-dim: rgba(34, 211, 238, 0.25);
  --bg: #0f1419;
  --bg-card: #1a2332;
  --text: #e2e8f0;
  --text-muted: #94a3b8;
  --border: rgba(34, 211, 238, 0.2);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  padding-bottom: env(safe-area-inset-bottom, 16px);
}

.app {
  max-width: 480px;
  margin: 0 auto;
  padding: 16px;
}

/* Hero */
.hero {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
}

.mascot {
  border-radius: 50%;
  border: 2px solid var(--accent);
  background: var(--bg-card);
  object-fit: cover;
}

.hero-info {
  flex: 1;
}

.title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--accent);
}

.level {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin: 4px 0 8px;
}

.xp-bar {
  height: 8px;
  background: var(--bg-card);
  border-radius: 4px;
  overflow: hidden;
  border: 1px solid var(--border);
}

.xp-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), #06b6d4);
  border-radius: 3px;
  transition: width 0.4s ease;
}

.xp-text {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 4px;
}

/* Cards */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 16px;
}

.section-title {
  font-size: 1rem;
  margin-bottom: 12px;
  color: var(--accent);
}

/* Map */
.map-card {
  text-align: center;
}

.globe {
  position: relative;
  width: 120px;
  height: 120px;
  margin: 0 auto 12px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, #1e3a5f, #0f172a);
  border: 2px solid var(--border);
}

.globe-ring {
  position: absolute;
  inset: 8px;
  border: 1px dashed var(--accent-dim);
  border-radius: 50%;
}

.globe-dot {
  position: absolute;
  top: 35%;
  left: 55%;
  width: 12px;
  height: 12px;
  background: var(--accent);
  border-radius: 50%;
  box-shadow: 0 0 12px var(--accent);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.7; transform: scale(1.1); }
}

.map-label {
  font-size: 0.95rem;
  color: var(--text);
}

.map-city {
  font-size: 0.85rem;
  color: var(--accent);
  margin-top: 4px;
}

/* Stats */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 16px;
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px 8px;
  text-align: center;
}

.stat-value {
  display: block;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--accent);
}

.stat-label {
  font-size: 0.7rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Achievements */
.achievements {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
}

.achievement {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 64px;
}

.achievement-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: 4px;
}

.achievement.unlocked .achievement-icon {
  background: var(--accent-dim);
  border: 2px solid var(--accent);
  box-shadow: 0 0 10px var(--accent-dim);
}

.achievement.locked .achievement-icon {
  background: #2d3748;
  border: 2px solid #4a5568;
  filter: grayscale(1);
  opacity: 0.5;
}

.achievement-name {
  font-size: 0.65rem;
  text-align: center;
  color: var(--text-muted);
  line-height: 1.2;
}

.achievement.unlocked .achievement-name {
  color: var(--accent);
}

/* Referrals */
.referral-count {
  margin-bottom: 10px;
  color: var(--text-muted);
}

.referral-link-wrap {
  display: flex;
  gap: 8px;
}

.referral-link {
  flex: 1;
  padding: 10px 12px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font-size: 0.8rem;
}

/* Leaderboard */
.leaderboard {
  list-style: none;
  counter-reset: rank;
}

.leaderboard li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 12px;
  border-radius: 8px;
  margin-bottom: 6px;
  background: var(--bg);
  counter-increment: rank;
}

.leaderboard li::before {
  content: counter(rank) ".";
  margin-right: 10px;
  color: var(--text-muted);
  font-weight: 600;
  min-width: 1.5em;
}

.leaderboard li.highlight {
  background: var(--accent-dim);
  border: 1px solid var(--accent);
  color: var(--accent);
  font-weight: 600;
}

.leaderboard .refs {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.leaderboard li.highlight .refs {
  color: var(--accent);
}

/* Channel reward */
.channel-reward .disclaimer {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin: 8px 0 12px;
  font-style: italic;
}

/* Buttons */
.btn {
  padding: 12px 20px;
  border: none;
  border-radius: 10px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.2s;
}

.btn:active {
  opacity: 0.8;
}

.btn-primary {
  background: var(--accent);
  color: var(--bg);
  white-space: nowrap;
}

.btn-secondary {
  background: transparent;
  color: var(--accent);
  border: 2px solid var(--accent);
  width: 100%;
}

.actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 8px;
}

.btn-action {
  background: var(--bg-card);
  color: var(--accent);
  border: 2px solid var(--accent);
}
