/* =============================================
   GRAPHITE — Modern Dark + Mint Accent
   ============================================= */

:root {
  --bg:       #0d0d0d;
  --bg-alt:   #141418;
  --bg-card:  #1a1a22;
  --bg-hover: #22222e;
  --border:   #2a2a36;
  --text:     #e8e8ed;
  --text-2:   #9898a8;
  --text-3:   #686878;
  --accent:   #00d2a0;
  --accent-hover: #00e8b0;
  --accent-dim: rgba(0, 210, 160, 0.12);
  --danger:   #ff4d6a;
  --radius:   12px;
  --radius-sm: 8px;
  --font:     'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

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

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--accent-hover); }
::selection { background: var(--accent); color: #000; }

.container { max-width: 1080px; margin: 0 auto; padding: 0 20px; }
.hidden { display: none !important; }

/* ---- HEADER ---- */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(13, 13, 13, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}

.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 56px;
}

.header__logo {
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: 0.5px;
  display: flex;
  align-items: center;
  gap: 2px;
}
.header__logo:hover { color: #fff; }
.header__logo-icon { color: var(--accent); font-size: 14px; }

.header__nav {
  display: none;
  gap: 28px;
}
.header__nav a {
  color: var(--text-2);
  font-size: 14px;
  font-weight: 500;
  transition: color 0.2s;
}
.header__nav a:hover { color: #fff; }

/* ---- BUTTONS ---- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 20px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  font-family: var(--font);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
  text-decoration: none;
  line-height: 1.4;
}

.btn--accent {
  background: var(--accent);
  color: #000;
  border-color: var(--accent);
}
.btn--accent:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
  color: #000;
  box-shadow: 0 0 20px rgba(0, 210, 160, 0.3);
}

.btn--outline {
  background: transparent;
  color: var(--text);
  border-color: var(--border);
}
.btn--outline:hover {
  border-color: var(--text-3);
  background: var(--bg-hover);
  color: #fff;
}

.btn--ghost {
  background: transparent;
  color: var(--text-2);
  border-color: transparent;
}
.btn--ghost:hover { color: var(--text); background: var(--bg-hover); }

.btn--primary {
  background: var(--accent);
  color: #000;
  border-color: var(--accent);
}
.btn--primary:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
  color: #000;
}

.btn--sm { padding: 7px 14px; font-size: 13px; }
.btn--lg { padding: 14px 28px; font-size: 16px; border-radius: var(--radius); }

/* ---- HERO ---- */
.hero {
  padding: 80px 0 60px;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -200px;
  left: 50%;
  transform: translateX(-50%);
  width: 800px;
  height: 600px;
  background: radial-gradient(ellipse, rgba(0, 210, 160, 0.08) 0%, transparent 70%);
  pointer-events: none;
}

.hero__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 36px;
}

.hero__content { flex: 1; }

.hero__badge {
  display: inline-block;
  padding: 4px 12px;
  background: var(--accent-dim);
  color: var(--accent);
  font-size: 13px;
  font-weight: 600;
  border-radius: 20px;
  margin-bottom: 20px;
  border: 1px solid rgba(0, 210, 160, 0.2);
}

.hero h1 {
  font-size: 44px;
  font-weight: 700;
  line-height: 1.15;
  color: #fff;
  margin-bottom: 16px;
  letter-spacing: -0.5px;
}

.hero__sub {
  font-size: 17px;
  color: var(--text-2);
  margin-bottom: 32px;
  line-height: 1.6;
}

.hero__cta {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.hero__visual {
  flex-shrink: 0;
}

.hero__compare {
  display: flex;
  gap: 12px;
}

.hero__compare-card {
  flex: 1;
  min-width: 0;
  border-radius: var(--radius);
  padding: 16px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.hero__compare-card--before {
  background: var(--bg-card);
  border: 1px solid var(--border);
  opacity: 0.7;
}

.hero__compare-card--after {
  background: var(--bg-card);
  border: 1px solid rgba(0, 210, 160, 0.3);
  box-shadow: 0 0 30px rgba(0, 210, 160, 0.08);
}

.hero__compare-label {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 4px;
}

.hero__compare-card--before .hero__compare-label { color: var(--text-3); }
.hero__compare-card--after .hero__compare-label { color: var(--accent); }

.hero__compare-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-2);
  line-height: 1.4;
}

.hero__compare-icon {
  flex-shrink: 0;
  font-size: 12px;
  font-weight: 700;
}
.hero__compare-icon--bad { color: var(--danger); }
.hero__compare-icon--good { color: var(--accent); }

.hero__compare-speed {
  margin-top: 6px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
  text-align: center;
}

.hero__compare-speed-val {
  font-size: 22px;
  font-weight: 700;
}
.hero__compare-speed-val--slow { color: var(--danger); }
.hero__compare-speed-val--fast { color: var(--accent); }

/* ---- SECTIONS ---- */
.section {
  padding: 60px 0;
}

.section--alt {
  background: var(--bg-alt);
}

.section__title {
  font-size: 28px;
  font-weight: 700;
  color: #fff;
  text-align: center;
  margin-bottom: 8px;
}

.section__sub {
  text-align: center;
  color: var(--text-2);
  font-size: 15px;
  margin-bottom: 40px;
}

/* ---- FEATURES ---- */
.features {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.feature {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  transition: border-color 0.2s;
}
.feature:hover { border-color: var(--accent); }

.feature__icon {
  font-size: 28px;
  margin-bottom: 10px;
}

.feature__title {
  font-size: 16px;
  font-weight: 600;
  color: #fff;
  margin-bottom: 4px;
}

.feature__desc {
  font-size: 14px;
  color: var(--text-2);
  line-height: 1.5;
}

/* ---- STEPS ---- */
.steps {
  display: flex;
  flex-direction: column;
  gap: 24px;
  max-width: 640px;
  margin: 0 auto;
}

.step {
  display: flex;
  gap: 20px;
  align-items: flex-start;
}

.step__num {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--accent);
  color: #000;
  font-size: 18px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

.step__body {
  flex: 1;
  padding-top: 2px;
}

.step__body h3 {
  font-size: 18px;
  font-weight: 600;
  color: #fff;
  margin-bottom: 4px;
}

.step__body p {
  font-size: 14px;
  color: var(--text-2);
  margin-bottom: 12px;
}

.step__links {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

/* ---- PLANS ---- */
.plans {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.plan {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 24px;
  position: relative;
  display: flex;
  flex-direction: column;
}

.plan--featured {
  border-color: var(--accent);
  box-shadow: 0 0 30px rgba(0, 210, 160, 0.1);
}

.plan__badge {
  position: absolute;
  top: -1px;
  right: 20px;
  background: var(--accent);
  color: #000;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.plan__name {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-2);
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.plan__price {
  font-size: 36px;
  font-weight: 700;
  color: #fff;
  line-height: 1.1;
  margin-bottom: 4px;
}

.plan__cur { font-size: 18px; color: var(--text-2); font-weight: 500; }

.plan__period {
  font-size: 14px;
  color: var(--text-3);
  margin-bottom: 20px;
}

.plan__sale {
  color: var(--accent);
  font-weight: 600;
}

.plan__features {
  list-style: none;
  margin-bottom: 24px;
  flex: 1;
}

.plan__features li {
  font-size: 14px;
  color: var(--text-2);
  padding: 6px 0;
  border-bottom: 1px solid var(--border);
}

.plan__features li::before {
  content: '✓ ';
  color: var(--accent);
  font-weight: 600;
}

.plan__features li:last-child { border-bottom: none; }

/* ---- FAQ ---- */
.faq {
  max-width: 700px;
  margin: 0 auto;
}

.faq__item {
  border-bottom: 1px solid var(--border);
}

.faq__item summary {
  padding: 18px 0;
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: color 0.2s;
}
.faq__item summary::-webkit-details-marker { display: none; }
.faq__item summary::after {
  content: '+';
  font-size: 20px;
  color: var(--text-3);
  transition: transform 0.2s;
}
.faq__item[open] summary::after {
  content: '−';
  color: var(--accent);
}
.faq__item summary:hover { color: #fff; }

.faq__answer {
  padding: 0 0 18px;
  font-size: 14px;
  color: var(--text-2);
  line-height: 1.7;
}

/* ---- FOOTER ---- */
.footer {
  border-top: 1px solid var(--border);
  padding: 24px 0;
}

.footer__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.footer__left {
  display: flex;
  align-items: center;
  gap: 16px;
}

.footer__logo {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
}

.footer__copy {
  font-size: 13px;
  color: var(--text-3);
}

.footer__right a {
  font-size: 14px;
  color: var(--text-2);
}
.footer__right a:hover { color: var(--accent); }

/* ---- INPUT ---- */
.input {
  padding: 10px 14px;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: var(--font);
  font-size: 14px;
  color: var(--text);
  outline: none;
  width: 100%;
  transition: border-color 0.2s;
}
.input:focus { border-color: var(--accent); background: var(--bg); }
.input::placeholder { color: var(--text-3); }
.input--mono { font-family: 'SF Mono', 'Fira Code', monospace; font-size: 12px; }

.sub-url-row { display: flex; gap: 8px; margin-top: 8px; }
.sub-url-row .input { flex: 1; }

/* ---- AUTH ---- */
.auth-form { display: flex; flex-direction: column; gap: 10px; }

.auth-divider {
  text-align: center;
  color: var(--text-3);
  font-size: 13px;
  margin: 16px 0;
  position: relative;
}
.auth-divider::before, .auth-divider::after {
  content: '';
  position: absolute;
  top: 50%;
  width: calc(50% - 20px);
  height: 1px;
  background: var(--border);
}
.auth-divider::before { left: 0; }
.auth-divider::after { right: 0; }

.auth-hint {
  font-size: 13px;
  color: var(--text-2);
  margin-bottom: 8px;
}

.auth-message {
  font-size: 13px;
  color: var(--text-3);
  text-align: center;
  min-height: 18px;
  margin-top: 8px;
}
.auth-message.success { color: var(--accent); font-weight: 600; }
.auth-message.error { color: var(--danger); font-weight: 600; }

/* ---- PROFILE ---- */
.profile-card {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 20px;
}

.profile-row {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
}
.profile-row:last-child { border-bottom: none; }

.profile-label {
  color: var(--text-3);
  font-size: 13px;
}

.profile-section {
  margin-bottom: 20px;
}

#profile-status.active { color: var(--accent); font-weight: 600; }
#profile-status.expired { color: var(--danger); font-weight: 600; }

/* ---- DRAWER ---- */
.drawer-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  z-index: 199;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s;
  backdrop-filter: blur(4px);
}
.drawer-overlay.open { opacity: 1; pointer-events: auto; }

.drawer {
  position: fixed;
  top: 0; right: 0; bottom: 0;
  width: min(400px, 100vw);
  background: var(--bg);
  border-left: 1px solid var(--border);
  z-index: 200;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.25s ease;
}
.drawer.open { transform: translateX(0); }

.drawer__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  font-weight: 600;
  font-size: 16px;
  flex-shrink: 0;
}

.drawer__close {
  background: none;
  border: none;
  color: var(--text-2);
  font-size: 24px;
  cursor: pointer;
  padding: 0;
  line-height: 1;
}
.drawer__close:hover { color: #fff; }

.drawer__body {
  padding: 20px;
  overflow-y: auto;
  flex: 1;
}

/* ---- MODAL ---- */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  z-index: 300;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  backdrop-filter: blur(4px);
}

.modal {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  width: 100%;
  max-width: 440px;
  overflow: hidden;
}

.modal__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  font-weight: 600;
  font-size: 16px;
}

.modal__close {
  background: none;
  border: none;
  color: var(--text-2);
  font-size: 24px;
  cursor: pointer;
  padding: 0;
  line-height: 1;
}
.modal__close:hover { color: #fff; }

.modal__body {
  padding: 20px;
  min-height: 80px;
}

.ds-widget-pane { }

/* ---- CHAT ---- */
.chat-fab {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 150;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--accent);
  color: #000;
  font-size: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border: none;
  box-shadow: 0 4px 16px rgba(0, 210, 160, 0.35);
  transition: transform 0.2s, box-shadow 0.2s;
}
.chat-fab:hover {
  transform: scale(1.08);
  box-shadow: 0 6px 24px rgba(0, 210, 160, 0.45);
}

.chat-widget {
  position: fixed;
  bottom: 82px;
  right: 20px;
  z-index: 151;
  width: 340px;
  max-width: calc(100vw - 40px);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  display: flex;
  flex-direction: column;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  overflow: hidden;
}

.chat-widget__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  font-weight: 600;
  font-size: 14px;
}

.chat-widget__close {
  background: none;
  border: none;
  color: var(--text-2);
  font-size: 20px;
  cursor: pointer;
  padding: 0;
  line-height: 1;
}

.chat-widget__messages {
  height: 240px;
  overflow-y: auto;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.chat-msg {
  font-size: 13px;
  padding: 8px 12px;
  max-width: 85%;
  word-wrap: break-word;
  line-height: 1.5;
  border-radius: var(--radius-sm);
}

.chat-msg--user {
  background: var(--accent);
  color: #000;
  align-self: flex-end;
}

.chat-msg--admin {
  background: var(--bg-card);
  color: var(--text);
  align-self: flex-start;
  border: 1px solid var(--border);
}

.chat-widget__form {
  display: flex;
  gap: 8px;
  padding: 10px 12px;
  border-top: 1px solid var(--border);
}
.chat-widget__form .input { flex: 1; }

/* ---- MARIO EASTER EGG ---- */
.mario-easter {
  padding: 30px 0;
}

.mario-collapse summary {
  cursor: pointer;
  color: var(--text-3);
  font-size: 13px;
  list-style: none;
  text-align: center;
  transition: color 0.2s;
}
.mario-collapse summary::-webkit-details-marker { display: none; }
.mario-collapse summary:hover { color: var(--text-2); }

.mario-inner { padding: 16px 0; }

.mario-hint {
  font-size: 12px;
  color: var(--text-3);
  margin-bottom: 10px;
}

.mario-stats {
  font-size: 12px;
  color: var(--text-3);
  margin-top: 8px;
}

/* ---- SCROLLBAR ---- */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-3); }

/* ---- TABLET (max 767px) ---- */
@media (max-width: 767px) {
  .hero__content { text-align: center; }
  .hero__cta { justify-content: center; }
  .hero__badge { margin-left: auto; margin-right: auto; }
}

/* ---- DESKTOP (768px+) ---- */
@media (min-width: 768px) {
  .header__nav { display: flex; }

  .hero { padding: 100px 0 80px; }
  .hero h1 { font-size: 52px; }
  .hero__inner { flex-direction: row; gap: 60px; align-items: center; }
  .hero__compare-card { padding: 20px 18px; gap: 10px; }

  .features { grid-template-columns: repeat(4, 1fr); }

  .plans { grid-template-columns: repeat(4, 1fr); }

  .section { padding: 80px 0; }
}

/* ---- MOBILE (max 480px) ---- */
@media (max-width: 480px) {
  .hero { padding: 44px 0 36px; }
  .hero__content { text-align: center; }
  .hero h1 { font-size: 28px; }
  .hero__sub { font-size: 14px; }
  .hero__badge { font-size: 12px; }
  .hero__cta { flex-direction: column; }
  .hero__cta .btn { width: 100%; }

  .hero__compare { gap: 8px; }
  .hero__compare-card { padding: 12px 10px; gap: 6px; }
  .hero__compare-row { font-size: 11px; gap: 5px; }
  .hero__compare-label { font-size: 11px; }
  .hero__compare-speed-val { font-size: 18px; }

  .features { grid-template-columns: 1fr; }

  .plans { grid-template-columns: 1fr; }

  .step { gap: 14px; }
  .step__num { width: 36px; height: 36px; font-size: 16px; }
}
