/* ============================================================
   landing.css — Главная страница ТапТапМиллионер
   ============================================================ */

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

:root {
  --bg:          #080814;
  --bg-card:     #0f0f24;
  --bg-card2:    #131328;
  --gold:        #FFD700;
  --gold-dim:    #B8860B;
  --gold-light:  #FFF3A0;
  --gold-accent: #FFA500;
  --green:       #2ECC71;
  --text:        #F0E6C8;
  --text-sec:    #9A8B6E;
  --text-muted:  #5A5070;
  --border:      rgba(255,215,0,0.12);
  --radius:      16px;
  --radius-sm:   10px;
}

html { scroll-behavior: smooth; }

body {
  font-family:      'Segoe UI', system-ui, -apple-system, sans-serif;
  background-color: var(--bg);
  color:            var(--text);
  overflow-x:       hidden;
  background-image:
    radial-gradient(ellipse 800px 600px at 20% 10%, rgba(255,215,0,0.04) 0%, transparent 100%),
    radial-gradient(ellipse 600px 800px at 80% 80%, rgba(255,100,0,0.03) 0%, transparent 100%);
}

.hidden { display: none !important; }

/* ── Навбар ─────────────────────────────────────────────────── */
#navbar {
  position:   sticky;
  top:        0;
  z-index:    100;
  display:    flex;
  align-items: center;
  justify-content: space-between;
  padding:    14px 32px;
  background: rgba(8,8,20,0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
}

.nav-logo {
  font-size:   1.3rem;
  font-weight: 800;
  color:       var(--gold);
  text-decoration: none;
  letter-spacing: -0.02em;
  text-shadow: 0 0 20px rgba(255,215,0,0.3);
}

.nav-logo span { opacity: 0.7; }

.nav-actions { display: flex; gap: 10px; align-items: center; }

.nav-user {
  font-size:  0.85rem;
  color:      var(--text-sec);
}

.btn {
  display:       inline-flex;
  align-items:   center;
  gap:           6px;
  padding:       9px 20px;
  border-radius: var(--radius-sm);
  font-size:     0.9rem;
  font-weight:   700;
  cursor:        pointer;
  border:        none;
  text-decoration: none;
  transition:    all 0.2s ease;
  letter-spacing: 0.01em;
  white-space:   nowrap;
}

.btn-primary {
  background: linear-gradient(135deg, #C89600, #8B6200);
  color:      var(--gold-light);
}

.btn-primary:hover {
  background: linear-gradient(135deg, #FFD700, #C89600);
  color:      #1a1200;
  box-shadow: 0 4px 20px rgba(255,215,0,0.4);
  transform:  translateY(-1px);
}

.btn-outline {
  background:  transparent;
  color:       var(--text);
  border:      1px solid var(--border);
}

.btn-outline:hover {
  border-color: rgba(255,215,0,0.4);
  background:   rgba(255,215,0,0.06);
}

/* ── Hero ────────────────────────────────────────────────────── */
#hero {
  display:         flex;
  flex-direction:  column;
  align-items:     center;
  text-align:      center;
  padding:         80px 24px 64px;
  position:        relative;
  overflow:        hidden;
}

#hero::before {
  content:       '';
  position:      absolute;
  top:           0; left: 50%;
  transform:     translateX(-50%);
  width:         700px; height: 500px;
  background:    radial-gradient(ellipse, rgba(255,215,0,0.07) 0%, transparent 70%);
  pointer-events: none;
}

.hero-badge {
  display:       inline-block;
  background:    rgba(255,215,0,0.1);
  border:        1px solid rgba(255,215,0,0.25);
  border-radius: 20px;
  padding:       5px 14px;
  font-size:     0.78rem;
  color:         var(--gold);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 24px;
}

.hero-title {
  font-size:      clamp(2.4rem, 6vw, 4.2rem);
  font-weight:    900;
  line-height:    1.1;
  color:          var(--text);
  margin-bottom:  16px;
  letter-spacing: -0.03em;
}

.hero-title .gold { color: var(--gold); text-shadow: 0 0 30px rgba(255,215,0,0.35); }

.hero-sub {
  font-size:     clamp(1rem, 2.5vw, 1.25rem);
  color:         var(--text-sec);
  max-width:     560px;
  line-height:   1.6;
  margin-bottom: 40px;
}

.hero-cta {
  display:   flex;
  gap:       14px;
  flex-wrap: wrap;
  justify-content: center;
  margin-bottom: 56px;
}

.hero-cta .btn { padding: 14px 32px; font-size: 1rem; }
.hero-cta .btn-primary { box-shadow: 0 8px 32px rgba(255,215,0,0.25); }

/* Монетка-превью */
.hero-coin {
  font-size:   6rem;
  line-height: 1;
  filter:      drop-shadow(0 0 40px rgba(255,215,0,0.4))
               drop-shadow(0 8px 20px rgba(0,0,0,0.5));
  animation:   coinFloat 3s ease-in-out infinite;
  user-select: none;
}

@keyframes coinFloat {
  0%, 100% { transform: translateY(0)    rotate(-2deg); }
  50%       { transform: translateY(-14px) rotate(2deg); }
}

.hero-stats {
  display:   flex;
  gap:       40px;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 48px;
}

.hero-stat-val {
  font-size:   2rem;
  font-weight: 800;
  color:       var(--gold);
  display:     block;
  text-align:  center;
}

.hero-stat-lbl {
  font-size:  0.8rem;
  color:      var(--text-muted);
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* ── Фичи ────────────────────────────────────────────────────── */
#features {
  padding:    64px 24px;
  max-width:  1100px;
  margin:     0 auto;
}

.section-title {
  font-size:     clamp(1.6rem, 3vw, 2.2rem);
  font-weight:   800;
  text-align:    center;
  color:         var(--text);
  margin-bottom: 8px;
  letter-spacing: -0.02em;
}

.section-sub {
  text-align:    center;
  color:         var(--text-sec);
  font-size:     1rem;
  margin-bottom: 48px;
}

.features-grid {
  display:               grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap:                   20px;
}

.feature-card {
  background:    var(--bg-card);
  border:        1px solid var(--border);
  border-radius: var(--radius);
  padding:       28px 24px;
  transition:    transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.feature-card:hover {
  transform:    translateY(-4px);
  border-color: rgba(255,215,0,0.25);
  box-shadow:   0 12px 32px rgba(0,0,0,0.3), 0 0 0 1px rgba(255,215,0,0.08);
}

.feature-icon {
  font-size:     2.4rem;
  margin-bottom: 14px;
  display:       block;
}

.feature-title {
  font-size:     1.05rem;
  font-weight:   700;
  color:         var(--text);
  margin-bottom: 8px;
}

.feature-desc {
  font-size:   0.88rem;
  color:       var(--text-sec);
  line-height: 1.6;
}

/* ── Как играть ──────────────────────────────────────────────── */
#how {
  padding:    64px 24px;
  background: linear-gradient(180deg, transparent, rgba(255,215,0,0.02) 50%, transparent);
}

.how-inner {
  max-width: 900px;
  margin:    0 auto;
}

.steps {
  display:               grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap:                   24px;
  margin-top:            40px;
}

.step {
  display:        flex;
  flex-direction: column;
  align-items:    center;
  text-align:     center;
  gap:            12px;
}

.step-num {
  width:         44px;
  height:        44px;
  border-radius: 50%;
  background:    linear-gradient(135deg, var(--gold-dim), #5a3800);
  display:       flex;
  align-items:   center;
  justify-content: center;
  font-size:     1.1rem;
  font-weight:   800;
  color:         var(--gold-light);
  flex-shrink:   0;
}

.step-title {
  font-size:   0.95rem;
  font-weight: 700;
  color:       var(--text);
}

.step-desc {
  font-size:   0.83rem;
  color:       var(--text-sec);
  line-height: 1.5;
}

/* ── Секция лидеры + чат ─────────────────────────────────────── */
#community {
  padding:    64px 24px;
  max-width:  1100px;
  margin:     0 auto;
}

.community-grid {
  display:               grid;
  grid-template-columns: 1fr 1fr;
  gap:                   24px;
  margin-top:            40px;
}

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

.community-panel {
  background:    var(--bg-card);
  border:        1px solid var(--border);
  border-radius: var(--radius);
  overflow:      hidden;
  display:       flex;
  flex-direction: column;
}

.panel-header {
  padding:     16px 20px;
  border-bottom: 1px solid var(--border);
  font-size:   0.9rem;
  font-weight: 700;
  color:       var(--gold);
  display:     flex;
  align-items: center;
  gap:         8px;
}

/* ── Мини-лидерборд ──────────────────────────────────────────── */
.mini-lb {
  flex: 1;
  overflow-y: auto;
  padding: 12px 0;
}

.mini-lb-row {
  display:     flex;
  align-items: center;
  gap:         12px;
  padding:     10px 20px;
  transition:  background 0.15s;
}

.mini-lb-row:hover { background: rgba(255,215,0,0.03); }

.mini-lb-rank {
  font-size:  1.1rem;
  width:      28px;
  text-align: center;
  flex-shrink: 0;
}

.mini-lb-name {
  flex:        1;
  font-weight: 600;
  font-size:   0.9rem;
  color:       var(--text);
  overflow:    hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mini-lb-score {
  font-size:   0.85rem;
  color:       var(--gold);
  font-weight: 700;
  white-space: nowrap;
}

.mini-lb-empty {
  text-align: center;
  color:      var(--text-muted);
  font-size:  0.88rem;
  padding:    32px 20px;
}

/* ── Чат ─────────────────────────────────────────────────────── */
.chat-messages {
  flex:       1;
  height:     320px;
  overflow-y: auto;
  padding:    12px 0;
  display:    flex;
  flex-direction: column;
  gap:        2px;
}

.chat-msg {
  padding:    6px 20px;
  font-size:  0.88rem;
  line-height: 1.4;
  transition: background 0.1s;
}

.chat-msg:hover { background: rgba(255,255,255,0.02); }

.chat-msg-user {
  font-weight: 700;
  color:       var(--gold-accent);
  margin-right: 6px;
}

.chat-msg-text { color: var(--text); word-break: break-word; }

.chat-msg-time {
  font-size:   0.72rem;
  color:       var(--text-muted);
  margin-left: 6px;
}

.chat-empty {
  text-align: center;
  color:      var(--text-muted);
  font-size:  0.88rem;
  padding:    40px 20px;
  flex:       1;
  display:    flex;
  align-items: center;
  justify-content: center;
}

.chat-input-wrap {
  padding:      12px 16px;
  border-top:   1px solid var(--border);
  display:      flex;
  gap:          8px;
  align-items:  center;
}

.chat-input {
  flex:          1;
  background:    rgba(255,255,255,0.05);
  border:        1px solid var(--border);
  border-radius: var(--radius-sm);
  color:         var(--text);
  font-size:     0.88rem;
  padding:       8px 12px;
  outline:       none;
  transition:    border-color 0.2s;
}

.chat-input:focus {
  border-color: rgba(255,215,0,0.4);
}

.chat-input::placeholder { color: var(--text-muted); }

.chat-input:disabled {
  opacity: 0.5;
  cursor:  not-allowed;
}

.chat-send-btn {
  background:    linear-gradient(135deg, #C89600, #8B6200);
  border:        none;
  border-radius: var(--radius-sm);
  color:         var(--gold-light);
  font-weight:   700;
  font-size:     0.85rem;
  padding:       8px 16px;
  cursor:        pointer;
  transition:    all 0.2s;
  white-space:   nowrap;
}

.chat-send-btn:hover:not(:disabled) {
  background: linear-gradient(135deg, #FFD700, #C89600);
  color:      #1a1200;
}

.chat-send-btn:disabled { opacity: 0.4; cursor: not-allowed; }

.chat-login-note {
  padding:    10px 16px;
  font-size:  0.8rem;
  color:      var(--text-muted);
  text-align: center;
  border-top: 1px solid var(--border);
}

.chat-login-note a {
  color:           var(--gold);
  text-decoration: none;
}

.chat-login-note a:hover { text-decoration: underline; }

/* ── CTA баннер ──────────────────────────────────────────────── */
#cta {
  padding:    80px 24px;
  text-align: center;
}

.cta-box {
  max-width:     640px;
  margin:        0 auto;
  background:    var(--bg-card);
  border:        1px solid rgba(255,215,0,0.2);
  border-radius: 24px;
  padding:       56px 40px;
  box-shadow:    0 0 80px rgba(255,215,0,0.05);
  position:      relative;
  overflow:      hidden;
}

.cta-box::before {
  content:    '';
  position:   absolute;
  top: -60px; left: 50%;
  transform:  translateX(-50%);
  width:      400px; height: 200px;
  background: radial-gradient(ellipse, rgba(255,215,0,0.08) 0%, transparent 70%);
  pointer-events: none;
}

.cta-box h2 {
  font-size:     clamp(1.6rem, 3vw, 2.2rem);
  font-weight:   800;
  color:         var(--gold);
  margin-bottom: 12px;
}

.cta-box p {
  color:         var(--text-sec);
  font-size:     1rem;
  line-height:   1.6;
  margin-bottom: 32px;
}

/* ── Авторизационная модалка ─────────────────────────────────── */
.modal {
  position:        fixed;
  inset:           0;
  background:      rgba(0,0,0,0.75);
  backdrop-filter: blur(8px);
  display:         flex;
  align-items:     center;
  justify-content: center;
  z-index:         1000;
  padding:         16px;
}

.modal.hidden { display: none; }

.modal-content {
  background:    var(--bg-card);
  border:        1px solid rgba(255,215,0,0.2);
  border-radius: 20px;
  box-shadow:    0 24px 80px rgba(0,0,0,0.6);
  max-width:     420px;
  width:         100%;
  padding:       36px 28px 28px;
  position:      relative;
}

.auth-logo    { font-size: 2.8rem; text-align: center; margin-bottom: 6px; filter: drop-shadow(0 0 14px rgba(255,215,0,0.4)); }
.auth-title   { font-size: 1.5rem; font-weight: 800; color: var(--gold); text-align: center; margin-bottom: 4px; }
.auth-subtitle { font-size: 0.85rem; color: var(--text-sec); text-align: center; margin-bottom: 24px; }

.auth-tabs {
  display:       flex;
  border-bottom: 1px solid var(--border);
  margin-bottom: 20px;
}

.auth-tab {
  flex:          1;
  background:    transparent;
  border:        none;
  border-bottom: 2px solid transparent;
  color:         var(--text-sec);
  cursor:        pointer;
  font-size:     0.9rem;
  font-weight:   600;
  padding:       10px 0;
  transition:    color 0.2s, border-color 0.2s;
}

.auth-tab.active { color: var(--gold); border-color: var(--gold); }
.auth-tab:hover:not(.active) { color: var(--text); }

.auth-form {
  display:        flex;
  flex-direction: column;
  gap:            14px;
}

.auth-field {
  display:        flex;
  flex-direction: column;
  gap:            5px;
}

.auth-field label {
  font-size:     0.75rem;
  color:         var(--text-sec);
  font-weight:   600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.auth-field input {
  background:    rgba(255,255,255,0.04);
  border:        1px solid var(--border);
  border-radius: var(--radius-sm);
  color:         var(--text);
  font-size:     0.95rem;
  padding:       10px 14px;
  outline:       none;
  transition:    border-color 0.2s, box-shadow 0.2s;
}

.auth-field input:focus {
  border-color: rgba(255,215,0,0.5);
  box-shadow:   0 0 0 3px rgba(255,215,0,0.1);
}

.auth-field input::placeholder { color: var(--text-muted); }

.auth-submit {
  width:         100%;
  margin-top:    4px;
  padding:       12px;
  background:    linear-gradient(135deg, #C89600, #8B6200);
  border:        none;
  border-radius: var(--radius-sm);
  color:         var(--gold-light);
  font-size:     1rem;
  font-weight:   700;
  cursor:        pointer;
  letter-spacing: 0.04em;
  transition:    background 0.2s, transform 0.2s;
}

.auth-submit:hover {
  background: linear-gradient(135deg, #FFD700, #C89600);
  color:      #1a1200;
  transform:  scale(1.02);
}

.auth-error {
  background:    rgba(231,76,60,0.12);
  border:        1px solid rgba(231,76,60,0.3);
  border-radius: var(--radius-sm);
  color:         #ff6b6b;
  font-size:     0.85rem;
  margin-top:    8px;
  padding:       10px 14px;
  text-align:    center;
}

/* ── Футер ───────────────────────────────────────────────────── */
footer {
  border-top:  1px solid var(--border);
  padding:     32px 24px;
  text-align:  center;
  color:       var(--text-muted);
  font-size:   0.82rem;
}

footer a {
  color:           var(--text-sec);
  text-decoration: none;
}

footer a:hover { color: var(--gold); }

/* ── Скроллбар ───────────────────────────────────────────────── */
::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255,215,0,0.2); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255,215,0,0.4); }

/* ── Адаптив ─────────────────────────────────────────────────── */
@media (max-width: 600px) {
  #navbar { padding: 12px 16px; }
  #hero   { padding: 56px 16px 48px; }
  .hero-cta .btn { width: 100%; justify-content: center; }
  .cta-box { padding: 40px 24px; }
  #features, #how, #community, #cta { padding: 48px 16px; }
}
