/* ═══════════════════════════════════════════════════════════
   AMS.DEV Landing — Full Terminal • Cyberpunk • Glitch
   ═══════════════════════════════════════════════════════════ */

:root {
  --bg:       #020203;
  --panel:    #06060a;
  --surface:  #0a0a12;
  --surface2: #0e0e18;
  --border:   #1a1a2e;
  --border2:  #252540;
  --fg:       #e8e6f0;
  --dim:      #a09eb0;
  --mute:     #504e60;
  --accent:   #ff3b6b;
  --green:    #3ecf6e;
  --gold:     #ffb86c;
  --blue:     #5b8dee;
  --font:     'Courier New', 'Consolas', 'Fira Code', 'Cascadia Code', monospace;
}

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { background: var(--bg); }
body {
  font-family: var(--font);
  background: transparent; color: var(--fg);
  min-height: 100vh; overflow-x: hidden;
  -webkit-font-smoothing: none;
}

.bg-matrix { position: fixed; inset: 0; z-index: 0; pointer-events: none; opacity: 0.7; }

.crt-overlay {
  pointer-events: none; position: fixed; inset: 0; z-index: 9998;
  background: repeating-linear-gradient(0deg, rgba(0,0,0,0.06) 0px, rgba(0,0,0,0.06) 1px, transparent 1px, transparent 3px);
  opacity: 0.45; animation: crtFlicker 8s linear infinite;
}
@keyframes crtFlicker {
  0%, 99.5%, 100% { opacity: 0.45; } 99.6% { opacity: 0.55; } 99.7% { opacity: 0.3; } 99.8% { opacity: 0.6; }
}
.scanline {
  pointer-events: none; position: fixed; inset: 0; z-index: 9999;
  background: linear-gradient(0deg, transparent 50%, rgba(0,0,0,0.04) 50%);
  background-size: 100% 4px;
  animation: scanMove 6s linear infinite, scanIntensity 3s ease-in-out infinite;
  opacity: 0.12;
}
@keyframes scanMove { 0% { background-position: 0 0; } 100% { background-position: 0 100px; } }
@keyframes scanIntensity { 0%, 100% { opacity: 0.08; } 50% { opacity: 0.18; } }

.glow-orb { position: fixed; border-radius: 50%; pointer-events: none; z-index: 0; filter: blur(140px); opacity: 0.08; }
.glow-orb-1 {
  width: 700px; height: 700px; background: radial-gradient(circle, var(--accent), transparent 70%);
  top: -250px; left: -250px; animation: orbFloat1 10s ease-in-out infinite, orbPulse 4s ease-in-out infinite;
}
.glow-orb-2 {
  width: 600px; height: 600px; background: radial-gradient(circle, var(--blue), transparent 70%);
  bottom: -250px; right: -200px; animation: orbFloat2 12s ease-in-out infinite, orbPulse 5s ease-in-out infinite;
}
@keyframes orbPulse { 0%, 100% { opacity: 0.06; } 50% { opacity: 0.14; } }
@keyframes orbFloat1 { 0%, 100% { transform: translate(0, 0) scale(1); } 33% { transform: translate(80px, 50px) scale(1.1); } 66% { transform: translate(-20px, -30px) scale(0.9); } }
@keyframes orbFloat2 { 0%, 100% { transform: translate(0, 0) scale(1); } 33% { transform: translate(-60px, -40px) scale(1.15); } 66% { transform: translate(30px, 20px) scale(0.85); } }

.blink { animation: blink 1s step-end infinite; }
@keyframes blink { 50% { opacity: 0; } }
.dim { color: var(--mute); }

/* Sound Toggle */
.sound-toggle {
  position: fixed; top: 16px; right: 16px; z-index: 10000;
  font-size: 18px; background: rgba(10,10,18,0.6);
  border: 1px solid var(--border2); border-radius: 6px;
  padding: 6px 10px; cursor: pointer; opacity: 0.4;
  transition: opacity 0.2s ease;
  backdrop-filter: blur(10px);
}
.sound-toggle:hover { opacity: 1; }

/* ═══════════════════════════════════════════════════════════
   CONSOLE LOGIN
   ═══════════════════════════════════════════════════════════ */
.login-page {
  display: flex; align-items: center; justify-content: center;
  min-height: 100vh; padding: 20px;
}

.console-frame {
  position: relative; z-index: 1;
  width: 680px; max-width: 96vw;
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 2px;
  background: rgba(2,2,4,0.92);
  backdrop-filter: blur(20px);
  box-shadow: 0 0 100px rgba(0,0,0,0.6),
              inset 0 0 80px rgba(0,0,0,0.4),
              0 0 1px rgba(255,59,107,0.1);
  padding: 24px 28px 20px;
  min-height: 420px;
}

.console-log {
  font-family: var(--font);
  font-size: 13px;
  line-height: 1.7;
  color: var(--fg);
}

.console-line {
  display: flex; align-items: baseline;
  opacity: 0;
  transform: translateY(4px);
}
.console-line.dim { color: var(--mute); font-size: 12px; }

.prompt-dot {
  display: inline-block; width: 6px; height: 6px; border-radius: 50%;
  background: var(--green); margin-right: 8px;
  box-shadow: 0 0 6px rgba(62,207,110,0.5);
  animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse { 0%, 100% { box-shadow: 0 0 4px rgba(62,207,110,0.3); } 50% { box-shadow: 0 0 12px rgba(62,207,110,0.7); } }

/* Console prompt / form */
.console-form { margin: 0; }
.console-prompt { color: var(--green); margin-right: 8px; font-weight: 700; }
.console-cmd { color: var(--fg); }

.console-input-line {
  display: flex; align-items: center;
  margin-top: 10px;
}
.console-label {
  color: var(--dim); font-size: 12px;
  margin-right: 6px; white-space: nowrap;
}
.console-prompt-input {
  position: relative;
  display: inline-flex; align-items: center;
}
.console-input {
  font-family: var(--font); font-size: 13px;
  color: var(--fg);
  background: transparent; border: none; outline: none;
  caret-color: transparent;
  width: 200px;
  padding: 0;
}
.console-input::placeholder { color: rgba(255,255,255,0.06); }
.input-cursor {
  color: var(--fg);
  font-size: 13px;
  animation: none;
  pointer-events: none;
  opacity: 0;
  position: absolute;
  left: 0; top: 0;
  transition: left 0.05s ease;
}
.input-cursor.active {
  opacity: 1;
  animation: blink 1s step-end infinite;
}

.console-error {
  color: var(--accent); margin-top: 12px;
  font-size: 12px;
  text-shadow: 0 0 8px rgba(255,59,107,0.3);
}

/* Submit button as terminal command */
.console-btn {
  font-family: var(--font); font-size: 13px;
  color: var(--fg);
  background: transparent; border: none; outline: none;
  cursor: pointer; padding: 0;
  transition: all 0.2s ease;
}
.console-btn:hover { color: var(--accent); text-shadow: 0 0 10px rgba(255,59,107,0.4); }
.console-btn:hover .console-prompt { color: var(--accent); }

/* ═══════════════════════════════════════════════════════════
   DASHBOARD (unchanged from previous)
   ═══════════════════════════════════════════════════════════ */
.dash-page { display: flex; flex-direction: column; min-height: 100vh; }
.topbar {
  position: sticky; top: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 28px; background: rgba(6,6,10,0.8); backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border2); min-height: 50px;
}
.tb-brand {
  font-size: 16px; font-weight: 800; letter-spacing: 4px;
  background: linear-gradient(135deg, var(--fg), var(--accent));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.tb-div { color: var(--mute); margin: 0 12px; }
.tb-label { font-size: 9px; color: var(--mute); letter-spacing: 2px; text-transform: uppercase; }
.tb-center { flex: 1; display: flex; justify-content: center; }
.status-ticker {
  display: flex; align-items: center; gap: 10px;
  padding: 6px 20px; background: rgba(62,207,110,0.04);
  border: 1px solid rgba(62,207,110,0.12); border-radius: 20px;
  font-size: 10px; color: var(--green); letter-spacing: 2px;
}
.ticker-pulse {
  width: 8px; height: 8px; border-radius: 50%; background: var(--green);
  box-shadow: 0 0 10px rgba(62,207,110,0.6); animation: pulse 2s ease-in-out infinite;
}
#ticker-text { transition: opacity 0.2s ease; }
.tb-right { display: flex; align-items: center; gap: 12px; }
.user-chip {
  display: flex; align-items: center; gap: 8px;
  padding: 5px 14px; background: var(--surface); border: 1px solid var(--border2);
  border-radius: 20px; font-size: 12px;
}
.chip-dot { width: 7px; height: 7px; border-radius: 50%; }
.chip-dot.online { background: var(--green); box-shadow: 0 0 6px rgba(62,207,110,0.5); }
.badge-role {
  font-size: 8px; padding: 2px 8px; border-radius: 10px;
  background: rgba(255,59,107,0.12); color: var(--accent);
  text-transform: uppercase; letter-spacing: 1px;
}
.btn-nav {
  padding: 7px 16px; background: var(--surface); border: 1px solid var(--border2);
  border-radius: 6px; color: var(--fg); font-size: 11px; font-weight: 600;
  text-decoration: none; letter-spacing: 1px; transition: all 0.2s ease;
}
.btn-nav:hover { border-color: var(--accent); background: rgba(255,59,107,0.06); box-shadow: 0 0 16px rgba(255,59,107,0.08); }
.logout-btn { color: var(--mute); }
.logout-btn:hover { color: var(--accent); }

.dash-wrapper { display: flex; justify-content: center; flex: 1; padding: 0 20px; }
.dash-main { width: 100%; max-width: 800px; padding: 48px 0; position: relative; z-index: 1; }

.hero-section { text-align: center; padding: 32px 0 40px; position: relative; }
.hero-glow {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%);
  width: 500px; height: 250px;
  background: radial-gradient(ellipse, rgba(255,59,107,0.05) 0%, transparent 70%);
  pointer-events: none;
}
.hero-title { font-size: 42px; font-weight: 800; letter-spacing: 8px; text-transform: uppercase; color: var(--fg); margin-bottom: 12px; line-height: 1.1; }
.hero-sub { font-size: 12px; color: var(--dim); letter-spacing: 1.5px; }

.glitch-text { position: relative; display: inline-block; }
.glitch-text::before, .glitch-text::after {
  content: attr(data-text); position: absolute; top: 0; left: 0; width: 100%; height: 100%;
}
.glitch-text::before { color: var(--blue); animation: glitch 2.5s infinite; clip-path: inset(0 0 50% 0); }
.glitch-text::after { color: var(--accent); animation: glitch 2.5s infinite reverse; clip-path: inset(50% 0 0 0); }
@keyframes glitch {
  0%, 95%, 100% { transform: none; opacity: 0; }
  96% { transform: translate(-2px, 1px); opacity: 0.7; }
  97% { transform: translate(2px, -1px); opacity: 0.5; }
  98% { transform: translate(-1px, 2px); opacity: 0.8; }
}

.stats-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-bottom: 28px; }
.stat-card {
  background: var(--surface); border: 1px solid var(--border2); border-radius: 8px;
  padding: 24px 20px; text-align: center; transition: all 0.3s ease; position: relative; overflow: hidden;
}
.stat-card::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 1px; background: linear-gradient(90deg, transparent, var(--accent), transparent); opacity: 0; transition: opacity 0.3s ease; }
.stat-card:hover { border-color: var(--accent); box-shadow: 0 0 30px rgba(255,59,107,0.04); transform: translateY(-2px); }
.stat-card:hover::before { opacity: 1; }
.stat-icon { font-size: 28px; margin-bottom: 10px; }
.stat-val { font-size: 26px; font-weight: 800; color: var(--fg); letter-spacing: 1px; }
.stat-val.accent { color: var(--accent); }
.stat-val.green { color: var(--green); }
.stat-lbl { font-size: 9px; color: var(--mute); text-transform: uppercase; letter-spacing: 2px; margin-top: 8px; }

.panel { background: var(--surface); border: 1px solid var(--border2); border-radius: 8px; margin-bottom: 24px; overflow: hidden; }
.panel-head {
  display: flex; align-items: center; gap: 10px;
  padding: 16px 20px; background: var(--surface2); border-bottom: 1px solid var(--border2);
  font-size: 11px; font-weight: 700; letter-spacing: 2px; text-transform: uppercase;
}
.panel-sub { margin-left: auto; font-size: 9px; color: var(--mute); text-transform: none; font-weight: 400; }

/* Game Table */
.game-table { display: flex; flex-direction: column; }
.game-row {
  display: flex; align-items: center; gap: 14px;
  padding: 12px 20px; border-bottom: 1px solid var(--border2);
  transition: background 0.15s ease;
}
.game-row:last-child { border-bottom: none; }
.game-row:hover { background: var(--surface2); }
.gr-icon {
  width: 28px; height: 28px; border-radius: 4px;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 800; color: #111; flex-shrink: 0;
}
.gr-name { font-size: 13px; font-weight: 700; color: var(--fg); width: 130px; flex-shrink: 0; }
.gr-version {
  font-size: 10px; color: var(--dim); font-family: var(--font);
  background: var(--surface); padding: 3px 8px; border-radius: 3px;
}
.gr-status {
  display: flex; align-items: center; gap: 8px;
  font-size: 10px; font-weight: 600; color: var(--green);
  letter-spacing: 2px; margin-left: auto;
}
.gr-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--green); box-shadow: 0 0 6px rgba(62,207,110,0.5); animation: pulse 2s ease-in-out infinite; }

/* Download */
.download-section { margin-bottom: 28px; }
.dl-card {
  display: flex; align-items: center; gap: 24px;
  background: linear-gradient(135deg, rgba(255,59,107,0.04), rgba(91,141,238,0.03));
  border: 1px solid rgba(255,59,107,0.15); border-radius: 10px;
  padding: 32px 36px; position: relative; overflow: hidden; transition: all 0.3s ease;
}
.dl-card::before {
  content: ''; position: absolute; inset: -1px; border-radius: 10px; padding: 1px;
  background: linear-gradient(135deg, var(--accent), var(--blue));
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
  opacity: 0; transition: opacity 0.3s ease;
}
.dl-card:hover::before { opacity: 0.6; }
.dl-card:hover { box-shadow: 0 0 40px rgba(255,59,107,0.06); transform: translateY(-1px); }
.dl-ring { position: absolute; inset: 20px; border: 1px dashed rgba(255,59,107,0.08); border-radius: 8px; animation: ringSpin 60s linear infinite; pointer-events: none; }
@keyframes ringSpin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
.dl-icon { font-size: 48px; flex-shrink: 0; filter: drop-shadow(0 0 12px rgba(255,59,107,0.2)); }
.dl-info { flex: 1; }
.dl-info h2 { font-size: 20px; font-weight: 800; letter-spacing: 1px; margin-bottom: 6px; color: var(--fg); }
.dl-info p { font-size: 11px; color: var(--dim); }
.btn-download {
  display: flex; align-items: center; gap: 12px;
  padding: 18px 36px;
  background: linear-gradient(135deg, var(--accent), #e02d55); color: #fff;
  font-family: var(--font); font-size: 15px; font-weight: 800; letter-spacing: 3px;
  text-decoration: none; text-transform: uppercase; border-radius: 6px;
  transition: all 0.25s ease; box-shadow: 0 4px 30px rgba(255,59,107,0.2);
  position: relative; overflow: hidden;
}
.btn-download::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(135deg, transparent 30%, rgba(255,255,255,0.1) 50%, transparent 70%);
  background-size: 200% 200%; animation: btnShine 3s ease-in-out infinite;
}
.btn-download:hover { box-shadow: 0 8px 40px rgba(255,59,107,0.3); transform: translateY(-2px); }
.dl-arrow { font-size: 22px; }
@keyframes btnShine { 0%, 100% { background-position: -100% -100%; } 50% { background-position: 200% 200%; } }

.dash-footer { display: flex; justify-content: space-between; padding-top: 20px; border-top: 1px solid var(--border2); font-size: 10px; color: var(--mute); letter-spacing: 0.5px; }

/* ═══════════════════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════════════════ */
@media (max-width: 768px) {
  .console-frame { padding: 16px 14px; }
  .console-log { font-size: 11px; }
  .console-input { width: 120px; }
  .topbar { padding: 10px 14px; flex-wrap: wrap; gap: 8px; }
  .tb-center { order: 3; width: 100%; }
  .tb-right { gap: 6px; }
  .btn-nav { padding: 6px 10px; font-size: 10px; }
  .user-chip { font-size: 10px; padding: 4px 10px; }
  .dash-main { padding: 24px 0; }
  .stats-row { grid-template-columns: 1fr; }
  .dl-card { flex-direction: column; text-align: center; padding: 24px; }
  .hero-title { font-size: 24px; letter-spacing: 4px; }
  .dash-wrapper { padding: 0 12px; }
  .gr-name { width: 80px; font-size: 11px; }
  .gr-status { font-size: 9px; letter-spacing: 1px; }
}
