/* ── Reset ─────────────────────────────────────── */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --gold:        #F5C842;
  --gold-light:  #F0D663;
  --gold-dim:    rgba(245, 200, 66, .15);
  --gold-border: rgba(245, 200, 66, .45);
  --cream:       #FFF6CC;
  --cream2:      #FFFBEB;
  --dark:        #2D2418;
  --muted:       #7A6A50;
  --gray:        #9C9A8C;
  --green:       #3a9e50;
  --red:         #d94040;
  --orange:      #c07a20;
  --white:       #FFFFFF;
  --bg:          #FFF6CC;
  --bg-card:     #FFFFFF;
  --bg-card2:    #FFFBEB;
  --border:      rgba(45, 36, 24, .10);
  --shadow-sm:   0 2px 8px  rgba(45, 36, 24, .08);
  --shadow-md:   0 8px 24px rgba(45, 36, 24, .12);
  --r:           16px;
  --rs:          10px;
}

html,
body {
  height: 100%;
}

body {
  background: var(--bg);
  color: var(--dark);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 15px;
  line-height: 1.5;
  min-height: 100vh;
  overflow-x: hidden;
  transition: background-color .35s ease, color .35s ease;
}

body::before {
  content: '';
  position: fixed;
  top: -15%;
  left: 50%;
  transform: translateX(-50%);
  width: 700px;
  height: 350px;
  background: radial-gradient(ellipse at center, rgba(245, 200, 66, .18) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
  animation: blobFloat 7s ease-in-out infinite alternate;
}

body::after {
  content: '';
  position: fixed;
  bottom: -10%;
  left: -10%;
  width: 400px;
  height: 400px;
  background: radial-gradient(ellipse at 40% 50%, rgba(245, 200, 66, .12) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
  animation: blobFloat 9s ease-in-out infinite alternate-reverse;
}

@keyframes blobFloat {
  0%   { transform: translateX(-50%) translateY(0); }
  100% { transform: translateX(-48%) translateY(12px); }
}

/* ── Layout ─────────────────────────────────────── */
.wrap {
  position: relative;
  z-index: 1;
  max-width: 720px;
  margin: 0 auto;
  padding: 28px 16px 80px;
}

/* ── Header ─────────────────────────────────────── */
header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--gold);
  box-shadow: 0 2px 12px rgba(45, 36, 24, 0.15);
  margin: -28px -16px 20px;
  padding: 0 24px;
  height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.logo-img {
  height: 44px;
  width: auto;
}

.header-btns {
  display: flex;
  gap: 7px;
}

.icon-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  background: rgba(45, 36, 24, .14);
  border: 1px solid rgba(45, 36, 24, .22);
  border-radius: var(--rs);
  cursor: pointer;
  color: var(--dark);
  transition: .2s;
  text-decoration: none;
}

.icon-btn:hover {
  background: rgba(45, 36, 24, .24);
  border-color: rgba(45, 36, 24, .38);
  color: var(--dark);
}

.icon-btn.tg:hover {
  color: #1a6a9e;
  border-color: rgba(26, 106, 158, .4);
  background: rgba(26, 106, 158, .12);
}

.icon-btn svg {
  width: 17px;
  height: 17px;
}

/* ── Fade-in animation ───────────────────────────── */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: translateY(0); }
}

.fade-in {
  animation: fadeInUp .5s ease both;
}
.fade-in-d1 { animation-delay: .08s; }
.fade-in-d2 { animation-delay: .16s; }
.fade-in-d3 { animation-delay: .24s; }

/* ── Card ────────────────────────────────────────── */
.card {
  background: var(--bg-card);
  border: 1.5px solid rgba(45, 36, 24, .10);
  border-radius: 20px;
  padding: 20px;
  margin-bottom: 12px;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: background-color .35s ease, border-color .35s ease,
              box-shadow .35s ease;
}

.card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(245, 200, 66, .04) 0%, transparent 60%);
  pointer-events: none;
}

/* ── Status badge ───────────────────────────────── */
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 100px;
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 14px;
}

.status-badge svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}

.status-badge--active {
  background: rgba(58, 158, 80, .08);
  border: 1px solid rgba(58, 158, 80, .30);
  color: var(--green);
}

.status-badge--inactive {
  background: rgba(217, 64, 64, .08);
  border: 1px solid rgba(217, 64, 64, .30);
  color: var(--red);
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
}

.status-dot--green {
  background: var(--green);
  animation: statusPulse 2s ease-in-out infinite;
}

.status-dot--red {
  background: var(--red);
}

@keyframes statusPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(58, 158, 80, .4); }
  50%      { box-shadow: 0 0 0 5px rgba(58, 158, 80, 0); }
}

/* ── User info ───────────────────────────────────── */
.user-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}

.user-avatar {
  width: 42px;
  height: 42px;
  flex-shrink: 0;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(245, 200, 66, .25), rgba(245, 200, 66, .10));
  border: 1px solid var(--gold-border);
  display: flex;
  align-items: center;
  justify-content: center;
}

.user-avatar svg {
  width: 20px;
  height: 20px;
  color: var(--dark);
}

.user-name {
  font-size: 15px;
  font-weight: 700;
  color: var(--dark);
}

.user-sub {
  font-size: 13px;
  color: var(--muted);
  margin-top: 2px;
}

.info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
}

.info-block {
  background: var(--bg-card2);
  border: 1px solid var(--border);
  border-radius: var(--rs);
  padding: 10px 12px;
  transition: background-color .35s ease, border-color .35s ease;
}

.info-block.b-blue {
  border-color: rgba(56, 139, 253, .3);
  background: rgba(56, 139, 253, .04);
}

.info-block.b-green {
  border-color: rgba(58, 158, 80, .3);
  background: rgba(58, 158, 80, .04);
}

.info-block.b-red {
  border-color: rgba(217, 64, 64, .3);
  background: rgba(217, 64, 64, .04);
}

.info-block.b-yellow {
  border-color: var(--gold-border);
  background: var(--gold-dim);
}

.info-label {
  font-size: 11px;
  color: var(--muted);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: .04em;
  margin-bottom: 3px;
}

.info-val {
  font-size: 14px;
  font-weight: 600;
  color: var(--dark);
}

.info-val.green {
  color: var(--green);
}

.info-val.red {
  color: var(--red);
}

.info-val.orange {
  color: var(--orange);
}

/* ── Sub URL box ─────────────────────────────────── */
.url-box {
  display: flex;
  align-items: center;
  gap: 9px;
  background: var(--bg-card2);
  border: 1.5px solid var(--gold-border);
  border-radius: var(--rs);
  padding: 9px 12px;
  margin-top: 12px;
  transition: border-color .3s ease, background-color .35s ease;
}

.url-box.copied {
  border-color: var(--green);
}

.url-text {
  flex: 1;
  font-family: monospace;
  font-size: 12px;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.copy-btn {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 7px 13px;
  background: var(--dark);
  border: none;
  border-radius: 8px;
  color: var(--white);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: background .18s, transform .18s, color .18s;
  white-space: nowrap;
  min-height: 36px;
}

.copy-btn.copied {
  background: var(--green);
  pointer-events: none;
}

.copy-btn:hover {
  background: #1a0f08;
  transform: translateY(-1px);
}

.copy-btn svg {
  width: 12px;
  height: 12px;
}

/* ── Section title ───────────────────────────────── */
.section-title {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 12px;
  color: var(--dark);
}

/* ── OS Tabs ─────────────────────────────────────── */
.os-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-bottom: 16px;
}

.os-tab {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  background: var(--cream2);
  border: 1px solid var(--border);
  border-radius: var(--rs);
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
  transition: background .18s, border-color .18s, color .18s,
              transform .18s;
  white-space: nowrap;
}

.os-tab:active {
  transform: scale(.97);
}

.os-tab svg,
.os-tab__icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  display: block;
}

.os-tab:hover {
  background: var(--gold-dim);
  border-color: var(--gold-border);
  color: var(--dark);
}

.os-tab.active {
  background: var(--dark);
  border-color: var(--dark);
  color: var(--white);
  font-weight: 700;
}

/* ── OS panels ───────────────────────────────────── */
.os-panels-wrap {
  position: relative;
}

.os-panel {
  display: none;
  opacity: 0;
  transform: translateY(8px);
}

.os-panel.active {
  display: block;
  animation: fadeInUp .3s ease both;
}

/* ── Steps ───────────────────────────────────────── */
.steps {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.step {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  background: var(--bg-card2);
  border: 1.5px solid rgba(232, 217, 138, 0.6);
  border-radius: 16px;
  padding: 14px 16px;
  transition: border-color .22s, box-shadow .22s, transform .22s,
              background-color .35s;
}

.step:hover {
  border-color: rgba(232, 217, 138, 0.9);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.step-num {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--dark);
  border: 1.5px solid var(--dark);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  color: var(--white);
}

.step-body {
  flex: 1;
  min-width: 0;
}

.step-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--dark);
  margin-bottom: 4px;
}

.step-desc {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.55;
}

.step-desc ul {
  padding-left: 18px;
  margin-top: 5px;
}

.step-desc li {
  margin-bottom: 3px;
}

.step-btns {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 10px;
}

/* ── Buttons ─────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: var(--rs);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: .18s;
  border: none;
}

.btn-cyan {
  background: var(--dark);
  border: 1.5px solid var(--dark);
  color: var(--white);
}

.btn-primary {
  background: var(--gold);
  border: 1.5px solid var(--gold);
  color: var(--dark);
  box-shadow: 0 4px 14px var(--gold-dim);
}

.btn-primary:hover {
  background: var(--gold-light);
  border-color: var(--gold-light);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(245, 200, 66, 0.25);
}

.btn-cyan:hover {
  background: #1a0f08;
  border-color: #1a0f08;
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn-ghost {
  background: transparent;
  border: 1.5px solid var(--dark);
  color: var(--dark);
}

.btn-ghost:hover {
  background: var(--dark);
  color: var(--white);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn svg {
  width: 14px;
  height: 14px;
}

/* ── Image placeholder ───────────────────────────── */
.img-hint {
  background: var(--gold-dim);
  border: 1px dashed var(--gold-border);
  border-radius: var(--rs);
  padding: 10px 13px;
  margin-top: 8px;
  font-size: 12px;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 7px;
}

/* ── Toast ───────────────────────────────────────── */
.toast {
  position: fixed;
  bottom: 26px;
  left: 50%;
  transform: translateX(-50%) translateY(70px);
  opacity: 0;
  background: var(--dark);
  border: 1px solid var(--gold-border);
  color: var(--gold);
  padding: 9px 20px;
  border-radius: 50px;
  font-size: 13px;
  font-weight: 700;
  z-index: 999;
  transition: transform .32s cubic-bezier(.22, .68, 0, 1.1),
              opacity .32s ease;
  pointer-events: none;
}

.toast.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

/* ── Theme toggle icons ──────────────────────────── */
.icon-moon { display: block; }
.icon-sun  { display: none;  }

html[data-theme="dark"] .icon-moon { display: none;  }
html[data-theme="dark"] .icon-sun  { display: block; }

/* ════════════════════════════════════════════════════
   DARK THEME
   ════════════════════════════════════════════════════ */

html[data-theme="dark"] {
  color-scheme: dark;
}

html[data-theme="dark"] body {
  background: #1C1409;
  color: #EEE0B8;
}

html[data-theme="dark"] body::before {
  background: radial-gradient(ellipse at center, rgba(245, 200, 66, .10) 0%, transparent 70%);
}

html[data-theme="dark"] body::after {
  background: radial-gradient(circle, rgba(245, 200, 66, .07) 0%, transparent 70%);
}

/* ── Card ── */
html[data-theme="dark"] .card {
  background: #271B0C;
  border-color: rgba(245, 200, 66, .14);
}

html[data-theme="dark"] .card::before {
  background: linear-gradient(135deg, rgba(245, 200, 66, .06) 0%, transparent 60%);
}

/* ── User info ── */
html[data-theme="dark"] .user-name  { color: #EEE0B8; }
html[data-theme="dark"] .user-sub   { color: #9A8465; }

/* ── Info blocks ── */
html[data-theme="dark"] .info-block {
  background: #311F0E;
  border-color: rgba(245, 200, 66, .14);
}

html[data-theme="dark"] .info-block.b-blue {
  background: rgba(56, 139, 253, .08);
  border-color: rgba(56, 139, 253, .22);
}

html[data-theme="dark"] .info-block.b-green {
  background: rgba(58, 158, 80, .08);
  border-color: rgba(58, 158, 80, .22);
}

html[data-theme="dark"] .info-block.b-red {
  background: rgba(217, 64, 64, .08);
  border-color: rgba(217, 64, 64, .22);
}

html[data-theme="dark"] .info-block.b-yellow {
  background: rgba(245, 200, 66, .10);
  border-color: rgba(245, 200, 66, .28);
}

html[data-theme="dark"] .info-label { color: #9A8465; }
html[data-theme="dark"] .info-val   { color: #EEE0B8; }

/* ── URL box ── */
html[data-theme="dark"] .url-box {
  background: #311F0E;
  border-color: rgba(245, 200, 66, .28);
}

html[data-theme="dark"] .url-text { color: #9A8465; }

html[data-theme="dark"] .copy-btn {
  background: var(--gold);
  color: #2D2418;
}

html[data-theme="dark"] .copy-btn:hover {
  background: var(--gold-light);
  transform: translateY(-1px);
}

/* ── Section title ── */
html[data-theme="dark"] .section-title { color: #EEE0B8; }

/* ── OS tabs ── */
html[data-theme="dark"] .os-tab {
  background: #311F0E;
  border-color: rgba(245, 200, 66, .14);
  color: #9A8465;
}

html[data-theme="dark"] .os-tab:hover {
  background: rgba(245, 200, 66, .12);
  border-color: rgba(245, 200, 66, .32);
  color: #EEE0B8;
}

html[data-theme="dark"] .os-tab.active {
  background: var(--gold);
  border-color: var(--gold);
  color: #2D2418;
}


/* ── Steps ── */
html[data-theme="dark"] .step {
  background: #311F0E;
  border-color: rgba(245, 200, 66, .20);
}

html[data-theme="dark"] .step:hover {
  border-color: rgba(245, 200, 66, .45);
  box-shadow: 0 8px 24px rgba(0, 0, 0, .40);
}

html[data-theme="dark"] .step-num {
  background: var(--gold);
  border-color: var(--gold);
  color: #2D2418;
}

html[data-theme="dark"] .step-title { color: #EEE0B8; }
html[data-theme="dark"] .step-desc  { color: #9A8465; }

html[data-theme="dark"] .step-desc strong { color: #C8B070; }
html[data-theme="dark"] .step-desc code   { color: #C8B070; }

/* ── Buttons ── */
html[data-theme="dark"] .btn-cyan {
  background: var(--gold);
  border-color: var(--gold);
  color: #2D2418;
}

html[data-theme="dark"] .btn-cyan:hover {
  background: var(--gold-light);
  border-color: var(--gold-light);
}

html[data-theme="dark"] .btn-ghost {
  border-color: rgba(245, 200, 66, .40);
  color: #EEE0B8;
}

html[data-theme="dark"] .btn-ghost:hover {
  background: rgba(245, 200, 66, .12);
  border-color: var(--gold);
  color: var(--gold);
  transform: translateY(-2px);
}

/* ── Status badge ── */
html[data-theme="dark"] .status-badge--active {
  background: rgba(58, 158, 80, .12);
  border-color: rgba(58, 158, 80, .35);
}
html[data-theme="dark"] .status-badge--inactive {
  background: rgba(217, 64, 64, .12);
  border-color: rgba(217, 64, 64, .35);
}

/* ── Toast ── */
html[data-theme="dark"] .toast {
  background: #271B0C;
  border-color: rgba(245, 200, 66, .30);
  color: var(--gold);
}

html[data-theme="dark"] .copy-btn.copied {
  background: var(--green);
  color: var(--white);
}

/* ── Responsive ───────────────────────────────────── */
@media (max-width: 600px) {
  .wrap {
    padding: 28px 12px 60px;
  }

  header {
    margin: -28px -12px 20px;
    padding: 0 14px;
    height: 56px;
  }

  .logo-img {
    height: 36px;
  }

  .card {
    padding: 16px;
    border-radius: 20px;
  }

  .info-grid {
    grid-template-columns: 1fr 1fr;
    gap: 7px;
  }

  .info-block {
    padding: 9px 10px;
  }

  .info-label {
    font-size: 10px;
  }

  .info-val {
    font-size: 13px;
  }

  .url-box {
    flex-direction: column;
    gap: 8px;
    padding: 10px;
  }

  .url-text {
    font-size: 11px;
    text-align: center;
  }

  .copy-btn {
    width: 100%;
    justify-content: center;
    min-height: 42px;
  }

  .section-title {
    font-size: 15px;
  }

  .os-tabs {
    gap: 5px;
  }

  .os-tab {
    padding: 8px 10px;
    font-size: 12px;
    min-height: 40px;
    flex: 1 1 0;
    justify-content: center;
  }

  .os-tab svg {
    width: 14px;
    height: 14px;
  }

  .step {
    padding: 12px;
    border-radius: 16px;
    gap: 10px;
  }

  .step-num {
    width: 28px;
    height: 28px;
    font-size: 12px;
  }

  .step-title {
    font-size: 13px;
  }

  .step-desc {
    font-size: 12px;
  }

  .btn {
    min-height: 44px;
    padding: 10px 14px;
    font-size: 12px;
  }

  .status-badge {
    font-size: 11px;
    padding: 5px 12px;
  }

  .user-avatar {
    width: 40px;
    height: 40px;
  }

  .user-name {
    font-size: 15px;
  }

  .user-sub {
    font-size: 12px;
  }
}

@media (max-width: 380px) {
  .info-grid {
    grid-template-columns: 1fr;
  }

  .os-tab {
    padding: 7px 8px;
    font-size: 11px;
  }
}
