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

body {
  background: var(--tg-theme-bg-color, #0f0f14);
  color: var(--tg-theme-text-color, #ffffff);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  padding-bottom: 70px;
}

#app { min-height: 100vh; }

.tab { display: none; padding: 20px 16px; animation: fadeIn 0.2s ease; }
.tab.active { display: block; }

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.page-title {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 16px;
}

/* ---- Profil ---- */
.profile-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 24px;
}

.avatar {
  width: 84px;
  height: 84px;
  border-radius: 50%;
  border: 2px solid #333;
  object-fit: cover;
  background: #222;
  margin-bottom: 12px;
}

.profile-header h2 {
  font-size: 18px;
  font-weight: 700;
  text-align: center;
}

.card {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  padding: 16px;
  margin-bottom: 16px;
}

.card-title {
  font-size: 14px;
  color: #999;
  margin-bottom: 10px;
}

.stat-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  font-size: 15px;
}
.stat-row:last-child { border-bottom: none; }

.joined-badge {
  text-align: center;
  font-size: 13px;
  color: #888;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 20px;
  padding: 8px 16px;
  display: inline-block;
  width: 100%;
}

/* ---- List (contacts / top) ---- */
.list-item {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 14px;
  padding: 12px 14px;
  margin-bottom: 10px;
}

.list-item .rank {
  font-weight: 700;
  color: #888;
  min-width: 28px;
}

.list-item .info { flex: 1; }
.list-item .name { font-weight: 600; font-size: 15px; }
.list-item .meta { font-size: 12px; color: #888; margin-top: 2px; }

.empty-state {
  text-align: center;
  color: #666;
  padding: 40px 0;
  font-size: 14px;
}

/* ---- Sozlamalar ---- */
.toggle-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  font-size: 14px;
}

.switch {
  position: relative;
  width: 46px;
  height: 26px;
  flex-shrink: 0;
}
.switch input { opacity: 0; width: 0; height: 0; }
.slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background-color: #444;
  border-radius: 999px;
  transition: 0.2s;
}
.slider::before {
  content: "";
  position: absolute;
  height: 20px; width: 20px;
  left: 3px; bottom: 3px;
  background-color: white;
  border-radius: 50%;
  transition: 0.2s;
}
.switch input:checked + .slider { background-color: #3390ec; }
.switch input:checked + .slider::before { transform: translateX(20px); }

/* ---- Tab bar ---- */
.tabbar {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  display: flex;
  background: rgba(20,20,26,0.97);
  border-top: 1px solid rgba(255,255,255,0.08);
  backdrop-filter: blur(10px);
}

.tab-btn {
  flex: 1;
  background: none;
  border: none;
  color: #888;
  font-size: 13px;
  padding: 14px 0;
  cursor: pointer;
}

.tab-btn.active {
  color: var(--tg-theme-button-color, #3390ec);
  font-weight: 700;
}
