:root {
  --bg-color: var(--tg-theme-bg-color, #0f172a);
  --text-color: var(--tg-theme-text-color, #f8fafc);
  --hint-color: var(--tg-theme-hint-color, #94a3b8);
  --sec-bg: var(--tg-theme-secondary-bg-color, #1e293b);
  --button-color: var(--tg-theme-button-color, #2563eb);
  --button-text: var(--tg-theme-button-text-color, #ffffff);
  
  --accent-blue: #3b82f6;
  --accent-gradient: linear-gradient(135deg, #1d4ed8 0%, #3b82f6 100%);
  --border-color: rgba(255, 255, 255, 0.08);
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  background-color: var(--bg-color);
  color: var(--text-color);
  margin: 0;
  padding: 16px;
  box-sizing: border-box;
  -webkit-user-select: none;
  user-select: none;
}

/* Профиль */
.header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--accent-gradient);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 17px;
}

.user-info h3 { margin: 0; font-size: 15px; font-weight: 600; }
.user-info p { margin: 2px 0 0; font-size: 12px; color: var(--hint-color); }

/* Вкладки */
.tabs {
  display: flex;
  background: var(--sec-bg);
  padding: 4px;
  border-radius: 12px;
  margin-bottom: 20px;
  border: 1px solid var(--border-color);
}

.tab-btn {
  flex: 1;
  padding: 10px;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: var(--hint-color);
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.tab-btn.active {
  background: var(--button-color);
  color: var(--button-text);
}

/* VPN БАННЕР */
.vpn-banner {
  background: var(--accent-gradient);
  border-radius: 18px;
  padding: 20px;
  color: #ffffff;
  margin-bottom: 24px;
  box-shadow: 0 8px 20px rgba(29, 78, 216, 0.25);
}

.banner-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}

.banner-title-group h2 {
  margin: 0 0 6px 0;
  font-size: 22px;
  font-weight: 700;
}

.badge {
  display: inline-block;
  font-size: 11px;
  padding: 3px 10px;
  border-radius: 20px;
  font-weight: 600;
}

.badge-active {
  background: rgba(255, 255, 255, 0.2);
  color: #ffffff;
  backdrop-filter: blur(4px);
}

.sub-expire-box {
  background: rgba(0, 0, 0, 0.22);
  backdrop-filter: blur(8px);
  border-radius: 12px;
  padding: 8px 12px;
  text-align: right;
  min-width: 120px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.sub-expire-label {
  display: block;
  font-size: 10px;
  text-transform: uppercase;
  opacity: 0.8;
}

.sub-expire-date {
  display: block;
  font-size: 15px;
  font-weight: 700;
  margin: 2px 0;
}

.sub-expire-days {
  display: inline-block;
  font-size: 10px;
  background: rgba(255, 255, 255, 0.2);
  padding: 2px 6px;
  border-radius: 6px;
}

.banner-desc {
  font-size: 12px;
  opacity: 0.9;
  margin: 14px 0;
  line-height: 1.4;
}

/* Шаги 1 и 2 */
.steps-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 16px;
}

.step-card {
  background: rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  padding: 8px 10px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.step-num {
  background: #ffffff;
  color: #1d4ed8;
  font-weight: bold;
  font-size: 11px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.step-text {
  font-size: 10px;
  line-height: 1.2;
}

/* Главная кнопка скопировать */
.main-action-btn {
  width: 100%;
  padding: 13px;
  background: #ffffff;
  color: #1d4ed8;
  border: none;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Секция с клиентами */
.section-title-block {
  margin-bottom: 12px;
}

.section-title-block h3 { margin: 0 0 4px 0; font-size: 15px; font-weight: 600; }
.section-title-block p { margin: 0; font-size: 12px; color: var(--hint-color); }

.clients-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  margin-bottom: 16px;
}

.client-card {
  background: var(--sec-bg);
  border-radius: 14px;
  padding: 12px 14px;
  border: 1px solid var(--border-color);
}

.client-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.client-info { display: flex; align-items: center; gap: 10px; }

.client-icon {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 14px;
  color: #fff;
}

.icon-happ { background: #3b82f6; }
.icon-hiddify { background: #6366f1; }
.icon-karing { background: #8b5cf6; }
.icon-streisand { background: #ec4899; }

.client-meta h4 { margin: 0; font-size: 14px; font-weight: 600; }

.client-open-link {
  font-size: 11px;
  color: var(--accent-blue);
  text-decoration: none;
  font-weight: 600;
}

.platform-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.p-tag {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-color);
  color: var(--text-color);
  text-decoration: none;
  font-size: 10px;
  padding: 4px 8px;
  border-radius: 6px;
}

.net-check-card {
  background: var(--sec-bg);
  border: 1px dashed var(--hint-color);
  border-radius: 12px;
  padding: 12px;
  text-align: center;
  font-size: 12px;
  color: var(--hint-color);
  cursor: pointer;
}