:root {
  --ink: #ffffff;
  --muted: #888888;
  --paper: #030303;
  --white: #121212;
  --line: rgba(255, 255, 255, .09);
  --accent: #ff0a3b;
  --accent-dark: #d90834;
  --green: #47d78b;
  --yellow: #ff0a3b;
  --shadow: 0 18px 60px rgba(0, 0, 0, .45);
  --radius: 24px;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body { margin: 0; color: var(--ink); background:
  radial-gradient(circle at 80% 20%, rgba(255, 10, 59, .12) 0%, transparent 38%),
  radial-gradient(circle at 25% 75%, rgba(100, 0, 255, .08) 0%, transparent 45%),
  var(--paper); font-family: Montserrat, Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; line-height: 1.5; position: relative; overflow-x: hidden; }
body::before { content: ""; position: fixed; inset: 0; background-image:
  linear-gradient(rgba(255,255,255,.03) 1px, transparent 1px),
  linear-gradient(90deg, rgba(255,255,255,.03) 1px, transparent 1px);
  background-size: 60px 60px; pointer-events: none; z-index: -2; }
body::after { content: ""; position: fixed; inset: 0; background: radial-gradient(ellipse at center, transparent 38%, rgba(0,0,0,.68) 100%); pointer-events: none; z-index: -1; }
button, input { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; }
button { color: inherit; }

.site-header, .dashboard-header { min-height: 82px; display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 18px clamp(20px, 5vw, 72px); border-bottom: 1px solid var(--line); background: rgba(3, 3, 3, .78); backdrop-filter: blur(16px); position: sticky; top: 0; z-index: 20; }
.brand { display: inline-flex; align-items: center; text-decoration: none; }
.brand img { display: block; max-width: 100%; }
.main-nav { display: flex; align-items: center; gap: clamp(18px, 3vw, 42px); margin-left: auto; }
.main-nav a { color: #b0b0b0; font-size: .88rem; font-weight: 700; text-decoration: none; transition: color .3s ease; }
.main-nav a:hover { color: #fff; }
.header-actions, .dashboard-user, .button-row, .hero-actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }

.button { min-height: 44px; border-radius: 999px; padding: 10px 20px; border: 1px solid transparent; display: inline-flex; align-items: center; justify-content: center; gap: 8px; text-decoration: none; font-weight: 750; cursor: pointer; transition: transform .16s ease, background .16s ease, border-color .16s ease, opacity .16s ease; }
.button:hover { transform: translateY(-1px); }
.button:focus-visible, input:focus-visible, .icon-button:focus-visible, .text-button:focus-visible { outline: 3px solid rgba(255, 68, 56, .25); outline-offset: 2px; }
.button:disabled { opacity: .45; cursor: not-allowed; transform: none; }
.button-primary { background: var(--accent); color: #fff; box-shadow: 0 0 22px rgba(255, 10, 59, .36); }
.button-primary:hover { background: var(--accent-dark); }
.button-dark { background: #202020; color: #fff; border-color: #343434; }
.button-ghost { background: transparent; border-color: var(--line); }
.button-ghost:hover { border-color: rgba(255,10,59,.65); background: rgba(255,10,59,.08); }
.button-danger { color: #fff; background: var(--accent-dark); }
.button-large { min-height: 54px; padding: 14px 26px; }
.button-full { width: 100%; }
.telegram-button { background: #229ed9; color: #fff; }

.section-shell { width: min(1180px, calc(100% - 40px)); margin-inline: auto; }
.hero { min-height: calc(100vh - 83px); padding-block: clamp(64px, 10vw, 130px); display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(300px, .8fr); gap: clamp(40px, 8vw, 110px); align-items: center; }
.hero-copy { min-width: 0; }
.eyebrow, .card-kicker { display: block; color: var(--accent); text-transform: uppercase; letter-spacing: .16em; font-weight: 850; font-size: .75rem; margin-bottom: 12px; }
.hero-badge { display: inline-block; margin-bottom: 25px; border: 1px solid rgba(255,10,59,.4); border-radius: 999px; padding: 8px 18px; color: var(--accent); font-size: .68rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; }
h1, h2, h3, p { margin-top: 0; }
.hero h1 { font-size: clamp(3rem, 7.3vw, 6.8rem); letter-spacing: -.065em; line-height: .91; margin-bottom: 28px; max-width: 900px; }
.hero h1 span { color: var(--accent); }
.lead { color: var(--muted); max-width: 650px; font-size: clamp(1.05rem, 2vw, 1.35rem); }
.hero-actions { margin-top: 36px; }
.brand-symbol { aspect-ratio: 1; max-width: 440px; width: 100%; justify-self: end; position: relative; filter: drop-shadow(0 20px 55px rgba(255,10,59,.18)); }
.brand-symbol::before, .brand-symbol::after { content: ""; position: absolute; z-index: 0; border: 1px solid rgba(255,10,59,.32); border-radius: 50%; box-shadow: inset 0 0 90px rgba(255,10,59,.06); animation: brand-pulse 3.4s ease-in-out infinite; }
.brand-symbol::before { inset: 21%; }
.brand-symbol::after { inset: 7%; animation-delay: 1.1s; }
.brand-tile { position: absolute; z-index: 1; display: block; height: auto; }
.tile-red { width: 47%; left: 8%; top: 24%; transform: rotate(-8deg); z-index: 2; }
.tile-white-large { width: 39%; right: 6%; top: 9%; transform: rotate(9deg); opacity: 1; z-index: 3; }
.tile-white-medium { width: 28%; right: 18%; bottom: 11%; transform: rotate(-5deg); opacity: .82; z-index: 2; }
@keyframes brand-pulse { 0%, 100% { opacity: .28; transform: scale(.96); } 50% { opacity: .9; transform: scale(1.035); border-color: rgba(255,10,59,.72); box-shadow: 0 0 30px rgba(255,10,59,.13), inset 0 0 90px rgba(255,10,59,.08); } }

.section-block { padding-block: clamp(80px, 10vw, 140px); }
.section-heading { max-width: 720px; margin-bottom: 44px; }
.section-heading h2 { font-size: clamp(2.2rem, 5vw, 4.6rem); line-height: 1; letter-spacing: -.05em; margin-bottom: 18px; }
.section-heading h2 span, .auth-dialog h2 span { color: var(--accent); }
.centered-heading { max-width: none; text-align: center; }
.features-section { border-top: 1px solid var(--line); }
.features-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; }
.feature-card { min-height: 270px; border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; background: rgba(15,15,15,.76); transition: border-color .45s cubic-bezier(.22,1,.36,1), transform .45s cubic-bezier(.22,1,.36,1), box-shadow .45s ease; }
.feature-card:hover { border-color: rgba(255,10,59,.5); transform: translateY(-3px); box-shadow: 0 16px 45px rgba(0,0,0,.24); }
.feature-card img { width: 40px; height: 40px; object-fit: contain; margin-bottom: 28px; }
.feature-card h3 { font-size: 1.2rem; margin-bottom: 10px; }
.feature-card p { color: var(--muted); font-size: .91rem; margin-bottom: 0; }
.feature-card strong { color: #fff; }
.plan-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.plan-card, .skeleton-card { min-height: 420px; border: 1px solid var(--line); background: rgba(18,18,18,.76); border-radius: var(--radius); padding: 26px; display: flex; flex-direction: column; backdrop-filter: blur(10px); position: relative; overflow: hidden; }
.plan-card { transition: transform .55s cubic-bezier(.22,1,.36,1), border-color .55s ease, box-shadow .55s ease, background .55s ease; will-change: transform; }
.plan-card:hover { border-color: rgba(255,10,59,.72); box-shadow: 0 18px 46px rgba(255,10,59,.1); transform: translateY(-4px); background: rgba(22,18,19,.86); }
.plan-card.featured { border-color: rgba(255,10,59,.34); background: linear-gradient(180deg, rgba(255,10,59,.07), rgba(18,18,18,.76) 45%); }
.popular-badge { position: absolute; z-index: 4; top: 32px; right: -51px; width: 190px; padding: 7px 0; background: var(--accent); color: #fff; font-size: .62rem; font-weight: 900; line-height: 1; letter-spacing: .065em; text-align: center; transform: rotate(45deg); transform-origin: center; box-shadow: 0 5px 18px rgba(255,10,59,.28); }
.plan-card h3 { font-size: 1.35rem; }
.plan-price { font-size: 2.55rem; font-weight: 900; letter-spacing: -.05em; margin: 8px 0 24px; }
.plan-price small { color: var(--muted); font-size: .85rem; letter-spacing: normal; }
.plan-features { list-style: none; padding: 0; margin: 0 0 26px; display: grid; gap: 12px; color: #c6c6c6; font-size: .78rem; }
.plan-features li { display: grid; grid-template-columns: 14px 1fr; gap: 9px; align-items: start; }
.plan-features img { width: 11px; height: 11px; margin-top: 3px; }
.plan-features strong { color: #fff; }
.plan-card .button { margin-top: auto; }
.skeleton-card { background: linear-gradient(110deg, #111 20%, #1d1d1d 35%, #111 50%); background-size: 200% 100%; animation: shimmer 1.2s linear infinite; }
@keyframes shimmer { to { background-position-x: -200%; } }

.locations-section { border-top: 1px solid var(--line); }
.locations-grid { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }
.locations-grid span { display: inline-flex; align-items: center; gap: 8px; padding: 11px 17px; border: 1px solid var(--line); border-radius: 999px; background: rgba(18,18,18,.7); color: #c8c8c8; font-size: .86rem; transition: border-color .35s ease, color .35s ease, transform .35s cubic-bezier(.22,1,.36,1); }
.locations-grid span:hover { color: #fff; border-color: rgba(255,10,59,.48); transform: translateY(-2px); }
.location-flag { width: 22px; height: 15px; flex: 0 0 auto; border-radius: 3px; box-shadow: 0 0 0 1px rgba(255,255,255,.16); overflow: hidden; }
.site-footer { min-height: 150px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; gap: 24px; color: var(--muted); }
.footer-brand { display: grid; gap: 10px; font-size: .8rem; }
.footer-links { display: flex; gap: 22px; flex-wrap: wrap; }

dialog { color: var(--ink); }
dialog::backdrop { background: rgba(16, 15, 14, .62); backdrop-filter: blur(5px); }
.auth-dialog, .action-dialog { width: min(520px, calc(100% - 24px)); border: 1px solid rgba(255,255,255,.1); border-radius: 28px; padding: clamp(28px, 6vw, 48px); box-shadow: 0 0 70px rgba(255,10,59,.16), var(--shadow); background: #101010; max-height: min(90vh, 850px); overflow-x: hidden; overflow-y: auto; }
.auth-dialog[open], .action-dialog[open] { animation: dialog-in .2s ease-out; }
@keyframes dialog-in { from { opacity: 0; transform: translateY(12px) scale(.985); } }
.dialog-close { position: absolute; right: 18px; top: 14px; width: 42px; height: 42px; border: 1px solid var(--line); border-radius: 50%; background: #1b1b1b; color: #fff; cursor: pointer; font-family: Arial, sans-serif; font-size: 1.7rem; line-height: 1; padding: 0 0 2px; display: grid; place-items: center; }
.auth-brand { margin-bottom: 32px; }
.auth-dialog h2, .action-dialog h2 { font-size: clamp(1.9rem, 5vw, 2.65rem); line-height: 1; letter-spacing: -.04em; margin-bottom: 12px; }
.dialog-lead, .muted { color: var(--muted); }
.form-stack { display: grid; gap: 16px; margin-top: 26px; }
.form-stack label:not(.check-row) { display: grid; gap: 7px; font-size: .86rem; font-weight: 750; }
input { width: 100%; min-height: 48px; border: 1px solid var(--line); border-radius: 13px; padding: 11px 14px; background: rgba(255,255,255,.04); color: #fff; }
input:focus { border-color: var(--accent); }
label small { color: var(--muted); font-weight: 450; }
.password-check-list { list-style: none; padding: 0; margin: -6px 0 0; display: flex; flex-wrap: wrap; gap: 7px 14px; }
.password-check-list li, .password-match { color: #747474; font-size: .72rem; font-weight: 500; transition: color .3s ease; }
.password-check-list li::before { content: "●"; margin-right: 6px; }
.password-check-list li.valid, .password-match.valid { color: var(--green); }
.password-match { margin: -8px 0 0; }
.password-match:empty { display: none; }
input.invalid { border-color: rgba(255,10,59,.8); }
.check-row { display: grid; grid-template-columns: 20px 1fr; gap: 10px; align-items: start; font-size: .84rem; color: var(--muted); }
.check-row input { min-height: 0; width: 18px; height: 18px; margin-top: 2px; accent-color: var(--accent); }
.check-row a { color: var(--ink); }
.code-input { text-align: center; letter-spacing: .4em; font-size: 1.6rem; font-weight: 800; }
.auth-switch { text-align: center; margin: 24px 0 0; color: var(--muted); }
.auth-switch button, .text-button { border: 0; padding: 0; background: none; text-decoration: underline; cursor: pointer; color: var(--ink); }
.text-button { margin-top: 18px; }

.toast { position: fixed; z-index: 2147483647; inset: auto auto 24px 50%; margin: 0; transform: translateX(-50%); width: max-content; max-width: min(520px, calc(100% - 32px)); background: #171717; color: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 13px 18px; box-shadow: var(--shadow); text-align: center; }
.toast.error { background: #a51f1a; }
.toast.success { background: #126e49; }

.dashboard-body { min-height: 100vh; }
.dashboard-user { color: var(--muted); font-size: .9rem; }
.dashboard-shell { width: min(1180px, calc(100% - 40px)); margin: 0 auto; padding: 56px 0 100px; }
.dashboard-footer { width: min(1180px, calc(100% - 40px)); margin: 0 auto; }
.dashboard-intro { display: flex; justify-content: space-between; align-items: end; gap: 30px; margin-bottom: 35px; }
.dashboard-intro h1 { font-size: clamp(2.5rem, 5vw, 4.8rem); line-height: .95; letter-spacing: -.055em; margin-bottom: 12px; }
.dashboard-intro p { color: var(--muted); margin-bottom: 0; }
.status-pill { border-radius: 999px; padding: 8px 14px; font-size: .78rem; font-weight: 850; text-transform: uppercase; letter-spacing: .08em; background: #222; border: 1px solid var(--line); }
.status-pill.active { color: #7ff0b3; background: rgba(24,138,91,.2); border-color: rgba(71,215,139,.35); }
.status-pill.expired { color: #ff829a; background: rgba(255,10,59,.12); border-color: rgba(255,10,59,.3); }
.dashboard-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.dash-card { background: rgba(18,18,18,.78); border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(24px, 4vw, 38px); min-width: 0; backdrop-filter: blur(10px); transition: border-color .25s ease, transform .25s ease; }
.dash-card:hover { border-color: rgba(255,10,59,.3); transform: translateY(-2px); }
.telegram-card { border-color: rgba(34,158,217,.38); background: linear-gradient(145deg, rgba(34,158,217,.18), rgba(18,18,18,.76) 70%); box-shadow: inset 0 1px rgba(255,255,255,.035), 0 12px 34px rgba(34,158,217,.07); }
.telegram-card:hover { border-color: rgba(34,158,217,.62); box-shadow: 0 16px 38px rgba(34,158,217,.1); }
.telegram-card .card-kicker { color: #55b9ec; }
.telegram-status { margin-bottom: 20px; border: 1px solid rgba(86,190,239,.24); border-radius: 13px; padding: 11px 13px; background: rgba(34,158,217,.1); color: #b9e5f9; font-size: .88rem; }
.span-two { grid-column: span 2; }
.card-heading { display: flex; justify-content: space-between; gap: 24px; align-items: start; }
.card-heading h2, .dash-card h2 { font-size: clamp(1.5rem, 3vw, 2.25rem); letter-spacing: -.04em; line-height: 1.05; }
.expiry { color: var(--muted); white-space: nowrap; }
.subscription-link-row, .referral-link { display: flex; align-items: center; gap: 10px; background: rgba(255,255,255,.04); border: 1px solid var(--line); border-radius: 14px; padding: 10px 10px 10px 14px; margin: 22px 0; }
.subscription-link-row code, .referral-link code { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; flex: 1; font-size: .82rem; }
.icon-button { border: 1px solid var(--line); border-radius: 10px; background: #202020; color: #fff; padding: 9px 12px; cursor: pointer; font-weight: 750; }
.inline-form { display: flex; gap: 9px; margin-top: 18px; }
.inline-form input { min-width: 0; }
.gift-actions-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 24px; }
.gift-action-panel { min-width: 0; margin: 0; border: 1px solid var(--line); border-radius: 18px; padding: 20px; background: rgba(255,255,255,.025); }
.gift-action-panel h3 { margin-bottom: 7px; }
.gift-action-panel p { min-height: 44px; margin-bottom: 17px; font-size: .86rem; }
.gift-action-panel > .inline-form { margin-top: 0; }
.gift-action-panel .button { min-width: 145px; }
.gift-list { display: grid; gap: 8px; margin-top: 20px; }
.gift-item { display: flex; justify-content: space-between; gap: 16px; align-items: center; padding: 12px 14px; border-radius: 12px; background: rgba(255,255,255,.04); border: 1px solid var(--line); }
.gift-item.used { opacity: .58; }
.gift-item button { border: 0; background: transparent; text-decoration: underline; cursor: pointer; }
.coin-balance { color: var(--accent); }
.stats-row { display: grid; grid-template-columns: repeat(3, 1fr); margin-top: 24px; border: 1px solid var(--line); border-radius: 16px; overflow: hidden; }
.stats-row div { padding: 18px; display: grid; border-right: 1px solid var(--line); }
.stats-row div:last-child { border-right: 0; }
.stats-row strong { font-size: 1.5rem; }
.stats-row span { color: var(--muted); font-size: .8rem; }
.stack-actions { display: grid; gap: 9px; }
.help-grid { margin-top: 16px; display: grid; grid-template-columns: repeat(auto-fit, minmax(175px, 1fr)); gap: 10px; }
.help-grid a { background: rgba(18,18,18,.82); color: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 20px; display: grid; text-decoration: none; }
.help-grid a:hover { border-color: var(--accent); box-shadow: 0 0 24px rgba(255,10,59,.12); }
.help-grid span { color: #aaa; font-size: .82rem; margin-top: 16px; }
.payment-methods { min-width: 0; border: 0; padding: 0; margin: 25px 0; }
.payment-methods legend { font-weight: 800; margin-bottom: 10px; }
.payment-methods label { display: inline-flex; margin: 0 7px 7px 0; }
.payment-methods input { position: absolute; width: 1px; height: 1px; min-height: 0; margin: 0; opacity: 0; pointer-events: none; }
.payment-methods span { border: 1px solid var(--line); border-radius: 999px; padding: 9px 15px; cursor: pointer; }
.payment-methods input:checked + span { color: #fff; background: var(--accent); border-color: var(--accent); }
.dialog-plan-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; margin-top: 24px; }
.dialog-plan { position: relative; overflow: hidden; min-height: 72px; border: 1px solid var(--line); background: #171717; color: #fff; border-radius: 14px; padding: 14px; cursor: pointer; text-align: left; }
.dialog-plan.featured { padding-right: 66px; border-color: rgba(255,10,59,.42); background: linear-gradient(145deg, rgba(255,10,59,.09), #171717 72%); }
.dialog-popular-badge { position: absolute; top: 12px; right: -26px; width: 118px; padding: 5px 0; background: var(--accent); color: #fff; font-size: .48rem; font-weight: 900; line-height: 1; letter-spacing: .05em; text-align: center; transform: rotate(45deg); box-shadow: 0 4px 13px rgba(255,10,59,.25); pointer-events: none; }
.dialog-plan.selected { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.dialog-plan strong, .dialog-plan span { display: block; }
.dialog-plan span { color: var(--muted); }
.dialog-plan .dialog-popular-badge { color: #fff; }
.compact-dialog { width: min(440px, calc(100% - 24px)); }
.compact-dialog > img { display: block; max-width: 100%; height: auto; margin: 22px auto 0; }
.qr-image-frame { width: min(290px, 100%); margin: 24px auto 0; padding: 14px; display: grid; place-items: center; border-radius: 20px; background: #fff; box-shadow: 0 12px 34px rgba(0,0,0,.28); }
#qr-image { display: block; width: 100%; height: auto; margin: 0; background: #fff; }

@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; min-height: auto; }
  .brand-symbol { justify-self: center; max-width: 360px; }
  .features-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .plan-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .help-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 680px) {
  .site-header, .dashboard-header { min-height: 68px; padding: 12px 16px; }
  .site-header .brand img, .dashboard-header .brand img { width: 118px; height: auto; }
  .main-nav { display: none; }
  .site-header .button, .dashboard-header .button { min-height: 40px; padding: 8px 14px; }
  .dashboard-user span { display: none; }
  .section-shell, .dashboard-shell { width: min(100% - 24px, 1180px); }
  .hero { padding-block: 55px 70px; gap: 50px; }
  .hero h1 { font-size: clamp(2.65rem, 11.5vw, 4.5rem); }
  .hero-actions .button { width: 100%; }
  .trust-row { display: grid; gap: 8px; }
  .features-grid { grid-template-columns: 1fr; }
  .feature-card { min-height: 0; }
  .plan-grid { grid-template-columns: 1fr; }
  .plan-card { min-height: 390px; }
  .site-footer { padding-block: 35px; align-items: flex-start; flex-direction: column; }
  .footer-links { display: grid; gap: 8px; }
  .dashboard-shell { padding-top: 34px; }
  .dashboard-intro { align-items: flex-start; flex-direction: column; }
  .dashboard-grid { grid-template-columns: 1fr; }
  .span-two { grid-column: auto; }
  .card-heading { flex-direction: column; }
  .inline-form { flex-direction: column; }
  .gift-actions-grid { grid-template-columns: 1fr; }
  .gift-action-panel p { min-height: 0; }
  .gift-action-panel .button { width: 100%; }
  .stats-row { grid-template-columns: 1fr; }
  .stats-row div { border-right: 0; border-bottom: 1px solid var(--line); }
  .stats-row div:last-child { border-bottom: 0; }
  .help-grid { grid-template-columns: 1fr 1fr; }
  .dialog-plan-list { grid-template-columns: 1fr; }
  .auth-dialog, .action-dialog { padding: 30px 20px; border-radius: 22px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation: none !important; transition: none !important; }
}
