:root {
  --bg: #020913;
  --surface: rgba(8, 18, 38, 0.88);
  --border: rgba(255, 255, 255, 0.07);
  --border-hi: rgba(13, 239, 168, 0.22);
  --green: #0defa8;
  --blue: #3b82f6;
  --red: #f43f5e;
  --text: #dce8f5;
  --text-dim: #a8bdd4;
  --text-muted: #6b8faa;
  --radius: 18px;
  --radius-sm: 10px;
}

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

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  display: grid;
  place-items: center;
  min-height: 100vh;
  padding: 24px;
  background:
    radial-gradient(ellipse 70% 45% at 15% -5%, rgba(13, 239, 168, 0.06) 0%, transparent 65%),
    radial-gradient(ellipse 55% 35% at 90% 105%, rgba(59, 130, 246, 0.06) 0%, transparent 65%),
    #020913;
  color: var(--text);
  font-family: Inter, "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
}

.login-shell {
  width: 100%;
  display: flex;
  justify-content: center;
}

.login-panel {
  width: min(460px, 100%);
  padding: 28px;
  border-radius: var(--radius);
  background: linear-gradient(165deg, rgba(13, 239, 168, 0.05), rgba(8, 18, 38, 0.94) 45%, rgba(59, 130, 246, 0.06));
  border: 1px solid var(--border);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.34);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.login-brand {
  margin-bottom: 24px;
}

.brand-mark {
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand-icon {
  display: inline-flex;
  width: 52px;
  height: 52px;
  align-items: center;
  justify-content: center;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0.08));
  color: #fff;
  font-size: 21px;
  box-shadow: 0 0 18px rgba(255, 255, 255, 0.16);
}

.brand-name {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.brand-tagline {
  margin-top: 4px;
  color: #67d9ff;
  font-size: 15px;
  font-style: italic;
}

.brand-rule {
  height: 1px;
  margin: 18px 0 14px;
  background: linear-gradient(90deg, transparent, rgba(13, 239, 168, 0.4), transparent);
}

.login-brand p {
  margin: 0;
  color: var(--text-dim);
  line-height: 1.7;
  font-size: 14px;
}

form {
  display: grid;
  gap: 14px;
}

.label {
  display: block;
  margin-bottom: 6px;
  color: var(--text-muted);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

input {
  width: 100%;
  padding: 11px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
  font-size: 14px;
  outline: none;
  transition: all 0.18s ease;
}

input:focus {
  border-color: var(--border-hi);
  box-shadow: 0 0 0 3px rgba(13, 239, 168, 0.08);
}

/* Override Chrome/Edge autofill yellow/white background */
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus,
input:-webkit-autofill:active {
  -webkit-box-shadow: 0 0 0 1000px rgba(8, 18, 38, 0.94) inset !important;
  -webkit-text-fill-color: var(--text) !important;
  caret-color: var(--text);
  transition: background-color 9999s ease-in-out 0s;
}

.login-error {
  padding: 11px 12px;
  border-radius: 12px;
  border: 1px solid rgba(244, 63, 94, 0.24);
  background: rgba(244, 63, 94, 0.08);
  color: #fda4af;
  font-size: 12px;
  line-height: 1.5;
}

.login-notice {
  padding: 11px 12px;
  border-radius: 12px;
  border: 1px solid rgba(103, 217, 255, 0.18);
  background: rgba(59, 130, 246, 0.08);
  color: #b9e6ff;
  font-size: 12px;
  line-height: 1.5;
}

.btn {
  width: 100%;
  padding: 11px 14px;
  border-radius: var(--radius-sm);
  border: none;
  cursor: pointer;
  font-size: 13px;
  font-weight: 800;
  transition: transform 0.16s ease, box-shadow 0.16s ease, filter 0.16s ease;
}

.btn:active {
  transform: scale(0.99);
}

.btn-primary {
  color: #011a0e;
  background: linear-gradient(135deg, #0defa8 0%, #14c97a 100%);
  box-shadow: 0 0 24px rgba(13, 239, 168, 0.24), 0 8px 22px rgba(0, 0, 0, 0.26);
}

.btn-primary:hover {
  filter: brightness(1.04);
  transform: translateY(-1px);
  box-shadow: 0 0 32px rgba(13, 239, 168, 0.34), 0 10px 24px rgba(0, 0, 0, 0.3);
}

.login-footer {
  margin-top: 18px;
  color: var(--text-muted);
  font-size: 11px;
  text-align: center;
}

.hidden {
  display: none !important;
}

/* Bolt logo SVG sizing in login brand-icon (2026-06-12) */
.brand-icon img {
    width: 70%;
    height: 70%;
    object-fit: contain;
    display: block;
}

/* === Galaxy background (added 2026-06-13) ============================= */

#galaxy-bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  overflow: hidden;
}

#galaxy-bg canvas {
  display: block;
}

/* Galaxy page: kill the static radial gradient so the canvas isn't tinted */
body.galaxy-page {
  background: #020913;
}

/* Glass card variant — applied to .login-panel on galaxy pages */
body.galaxy-page .login-panel {
  background: rgba(8, 16, 14, 0.55);
  border: 1px solid rgba(13, 239, 168, 0.22);
  box-shadow:
    0 0 40px rgba(13, 239, 168, 0.08),
    0 24px 60px rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

/* === Telegram footer link ============================================= */

.login-footer a.tg-link {
  color: var(--green);
  font-weight: 700;
  text-decoration: none;
}

.login-footer a.tg-link:hover {
  text-decoration: underline;
}

/* === Expired-account screen =========================================== */

.expired-screen {
  text-align: center;
}

.expired-icon {
  font-size: 28px;
  line-height: 1;
  margin-bottom: 12px;
  color: #f4c84a;
}

.expired-title {
  font-size: 18px;
  font-weight: 800;
  letter-spacing: 0.04em;
  margin-bottom: 10px;
}

.expired-body {
  color: var(--text-dim);
  font-size: 14px;
  line-height: 1.6;
  margin-bottom: 20px;
}

.expired-body strong {
  color: var(--green);
  font-weight: 700;
}

.expired-actions {
  display: grid;
  gap: 10px;
}

.btn.btn-link {
  background: transparent;
  color: var(--text-muted);
  box-shadow: none;
  font-weight: 600;
  font-size: 12px;
}

.btn.btn-link:hover {
  color: var(--text);
  filter: none;
  transform: none;
  box-shadow: none;
}

/* === Mobile breakpoint ================================================ */

@media (max-width: 540px) {
  body { padding: 16px; }
  .login-panel { padding: 20px; }
}
