/* ==========================================================
   JENECKY — Radical Modern / Black & White
   ========================================================== */

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

:root {
  --bg: #050505;
  --fg: #fafafa;
  --fg-2: rgba(250, 250, 250, 0.7);
  --fg-dim: rgba(250, 250, 250, 0.45);
  --fg-faint: rgba(250, 250, 250, 0.2);
  --border: rgba(250, 250, 250, 0.12);
  --border-strong: rgba(250, 250, 250, 0.28);
}

html, body {
  min-height: 100%;
  background: var(--bg);
  color: var(--fg);
  font-family: 'Space Grotesk', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-weight: 400;
  letter-spacing: -0.01em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  overflow-x: hidden;
  position: relative;
}

.mono {
  font-family: 'JetBrains Mono', 'Space Mono', ui-monospace, Menlo, monospace;
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 500;
}

.dim { color: var(--fg-dim); }

/* ==========================================================
   Animated fog / drifting clouds  (unchanged)
   ========================================================== */

.fog {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  mix-blend-mode: screen;
  background-repeat: repeat;
  will-change: background-position;
}

/*  feColorMatrix RGB constants set the fog colour.
    (1, 0.40, 0.72) ≈ rgb(255,102,184) — vivid pink.
    Layer 3 uses a softer rose (1, 0.55, 0.80) for atmospheric depth. */

.fog-1 {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='1600' height='1600'%3E%3Cfilter id='f1' x='0' y='0' width='100%25' height='100%25'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.00625' numOctaves='4' seed='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1  0 0 0 0 0.40  0 0 0 0 0.72  0 0 0 0.65 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23f1)'/%3E%3C/svg%3E");
  background-size: 1600px 1600px;
  opacity: 0.45;
  filter: blur(3px);
  animation: fog-drift-1 220s linear infinite;
}

.fog-2 {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='2000' height='2000'%3E%3Cfilter id='f2' x='0' y='0' width='100%25' height='100%25'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.004' numOctaves='3' seed='17' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1  0 0 0 0 0.42  0 0 0 0 0.74  0 0 0 0.6 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23f2)'/%3E%3C/svg%3E");
  background-size: 2000px 2000px;
  opacity: 0.32;
  filter: blur(6px);
  animation: fog-drift-2 340s linear infinite;
}

.fog-3 {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='2400' height='2400'%3E%3Cfilter id='f3' x='0' y='0' width='100%25' height='100%25'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.0025' numOctaves='2' seed='29' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1  0 0 0 0 0.55  0 0 0 0 0.80  0 0 0 0.6 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23f3)'/%3E%3C/svg%3E");
  background-size: 2400px 2400px;
  opacity: 0.22;
  filter: blur(12px);
  animation: fog-drift-3 520s linear infinite reverse;
}

@keyframes fog-drift-1 {
  from { background-position: 0 0; }
  to   { background-position: -1600px -1600px; }
}
@keyframes fog-drift-2 {
  from { background-position: 0 0; }
  to   { background-position: 2000px -2000px; }
}
@keyframes fog-drift-3 {
  from { background-position: 0 0; }
  to   { background-position: -2400px 2400px; }
}

.vignette {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(ellipse at center, transparent 30%, rgba(0,0,0,0.45) 80%, rgba(0,0,0,0.85) 100%);
}

@media (prefers-reduced-motion: reduce) {
  .fog-1, .fog-2, .fog-3 { animation: none; }
}

/* ==========================================================
   Layout — grid frame
   ========================================================== */

.shell {
  position: relative;
  z-index: 2;
  min-height: 100vh;
  display: grid;
  grid-template-rows: auto 1fr auto;
  padding: 1.25rem;
  gap: 0;
}

/* Top & bottom bars */
.bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1.5rem;
  padding: 0.6rem 0.25rem;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.bar-group {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.bar-group.center {
  flex: 0 1 auto;
}

.dot {
  width: 6px; height: 6px;
  background: var(--fg);
  border-radius: 50%;
  display: inline-block;
  animation: pulse 2.4s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%      { opacity: 0.35; transform: scale(0.85); }
}

/* ==========================================================
   Main content
   ========================================================== */

.main {
  display: grid;
  grid-template-columns: 1fr;
  align-items: center;
  justify-items: center;
  padding: 3rem 1.5rem;
  gap: 2.5rem;
}

/* Wordmark */
.wordmark {
  text-align: center;
  width: 100%;
  max-width: 1400px;
}

.wordmark-row {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 0.6rem;
  line-height: 0.85;
}

.wordmark-name {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: clamp(3.5rem, 16vw, 13rem);
  letter-spacing: -0.055em;
  text-transform: uppercase;
}

.wordmark-tld {
  font-family: 'JetBrains Mono', monospace;
  font-weight: 500;
  font-size: clamp(0.8rem, 1.4vw, 1.1rem);
  letter-spacing: 0.1em;
  color: var(--fg-dim);
  text-transform: uppercase;
  align-self: flex-end;
  padding-bottom: 0.5em;
}

.wordmark-meta {
  display: flex;
  justify-content: center;
  gap: 2rem;
  margin-top: 1.5rem;
  color: var(--fg-dim);
}

.wordmark-meta::before,
.wordmark-meta::after {
  content: '';
  flex: 1;
  max-width: 120px;
  height: 1px;
  background: var(--border);
  align-self: center;
}

/* ==========================================================
   Auth card
   ========================================================== */

.auth {
  width: 100%;
  max-width: 420px;
  background: rgba(10, 10, 10, 0.4);
  backdrop-filter: blur(16px) saturate(120%);
  -webkit-backdrop-filter: blur(16px) saturate(120%);
  border: 1px solid var(--border);
  padding: 1.75rem 1.75rem 1.5rem;
  position: relative;
}

.auth::before,
.auth::after {
  content: '';
  position: absolute;
  width: 10px;
  height: 10px;
  border: 1px solid var(--fg);
}
.auth::before { top: -1px; left: -1px; border-right: none; border-bottom: none; }
.auth::after  { bottom: -1px; right: -1px; border-left: none; border-top: none; }

.auth-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.75rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
}

.auth-title { color: var(--fg); }

.auth-status {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--fg-dim);
}

/* Fields */
.field {
  margin-bottom: 1.25rem;
}

.field label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.45rem;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.62rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--fg-dim);
}

.field label .ix {
  color: var(--fg-faint);
}

.field input {
  width: 100%;
  padding: 0.7rem 0;
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--border-strong);
  color: var(--fg);
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.02rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  outline: none;
  transition: border-color 0.25s ease;
}

.field input::placeholder {
  color: var(--fg-faint);
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.field input:focus {
  border-bottom-color: var(--fg);
}

.field input:-webkit-autofill,
.field input:-webkit-autofill:hover,
.field input:-webkit-autofill:focus {
  -webkit-text-fill-color: var(--fg);
  -webkit-box-shadow: 0 0 0 1000px var(--bg) inset;
  transition: background-color 9999s ease-in-out 0s;
}

/* Button */
.btn {
  width: 100%;
  margin-top: 0.5rem;
  padding: 0.95rem 1.25rem;
  background: var(--fg);
  color: var(--bg);
  border: 1px solid var(--fg);
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 600;
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  transition: background 0.25s ease, color 0.25s ease;
}

.btn .arrow {
  display: inline-block;
  font-family: 'JetBrains Mono', monospace;
  transition: transform 0.3s ease;
}

.btn:hover {
  background: transparent;
  color: var(--fg);
}

.btn:hover .arrow {
  transform: translateX(4px);
}

/* Error */
.error {
  margin-top: 1rem;
  padding: 0.65rem 0.75rem;
  border: 1px solid rgba(255, 90, 90, 0.35);
  background: rgba(255, 90, 90, 0.06);
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.65rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255, 140, 140, 0.95);
  min-height: 0;
  opacity: 0;
  max-height: 0;
  overflow: hidden;
  transition: opacity 0.3s ease, max-height 0.3s ease, margin-top 0.3s ease, padding 0.3s ease;
}

.error.show {
  opacity: 1;
  max-height: 60px;
}

/* ==========================================================
   Corner registration marks
   ========================================================== */

.corner {
  position: fixed;
  width: 14px;
  height: 14px;
  z-index: 3;
  pointer-events: none;
}

.corner::before,
.corner::after {
  content: '';
  position: absolute;
  background: var(--fg);
}

.corner-tl { top: 14px; left: 14px; }
.corner-tl::before { top: 0; left: 0; width: 1px; height: 100%; }
.corner-tl::after  { top: 0; left: 0; width: 100%; height: 1px; }

.corner-tr { top: 14px; right: 14px; }
.corner-tr::before { top: 0; right: 0; width: 1px; height: 100%; }
.corner-tr::after  { top: 0; right: 0; width: 100%; height: 1px; }

.corner-bl { bottom: 14px; left: 14px; }
.corner-bl::before { bottom: 0; left: 0; width: 1px; height: 100%; }
.corner-bl::after  { bottom: 0; left: 0; width: 100%; height: 1px; }

.corner-br { bottom: 14px; right: 14px; }
.corner-br::before { bottom: 0; right: 0; width: 1px; height: 100%; }
.corner-br::after  { bottom: 0; right: 0; width: 100%; height: 1px; }

/* ==========================================================
   Dashboard
   ========================================================== */

.dash {
  display: grid;
  grid-template-columns: 1fr;
  align-items: center;
  justify-items: center;
  padding: 3rem 1.5rem;
  gap: 2rem;
}

.dash-head {
  text-align: center;
}

.dash-ticker {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.7rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--fg-dim);
  margin-bottom: 0.75rem;
}

.dash-label {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.1rem;
  letter-spacing: -0.01em;
  color: var(--fg);
  margin-bottom: 2rem;
}

.dash-price {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: clamp(4rem, 13vw, 10rem);
  letter-spacing: -0.055em;
  line-height: 0.9;
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 0.3rem;
}

.dash-price .currency {
  font-family: 'JetBrains Mono', monospace;
  font-weight: 500;
  font-size: 0.2em;
  letter-spacing: 0.1em;
  color: var(--fg-dim);
  transform: translateY(-1.5em);
}

.dash-change {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  padding: 0.55rem 1.1rem;
  border: 1px solid var(--border-strong);
  margin-top: 1.25rem;
}

.dash-change.up   { border-color: rgba(255,255,255,0.6); color: var(--fg); }
.dash-change.down { border-color: var(--border); color: var(--fg-2); }

.dash-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  width: 100%;
  max-width: 720px;
  border: 1px solid var(--border);
  margin-top: 2rem;
  background: rgba(10, 10, 10, 0.35);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.dash-cell {
  padding: 1.25rem 1.5rem;
  border-right: 1px solid var(--border);
  text-align: left;
}

.dash-cell:last-child { border-right: none; }

.dash-cell-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.6rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--fg-dim);
  margin-bottom: 0.45rem;
}

.dash-cell-value {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 600;
  font-size: 1.25rem;
  letter-spacing: -0.02em;
}

.dash-refresh {
  margin-top: 1rem;
  color: var(--fg-dim);
}

/* Logout button */
.logout {
  text-decoration: none;
  color: var(--fg-dim);
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.65rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  padding: 0.45rem 0.9rem;
  border: 1px solid var(--border-strong);
  transition: all 0.2s ease;
}

.logout:hover {
  background: var(--fg);
  color: var(--bg);
  border-color: var(--fg);
}

/* ==========================================================
   Responsive
   ========================================================== */

@media (max-width: 720px) {
  .shell { padding: 0.75rem; }
  .bar { gap: 0.75rem; font-size: 0.6rem; }
  .bar .mono { font-size: 0.58rem; letter-spacing: 0.08em; }
  .bar-group.hide-mobile { display: none; }
  .main, .dash { padding: 2rem 1rem; gap: 2rem; }
  .wordmark-meta { gap: 1rem; }
  .wordmark-meta::before, .wordmark-meta::after { max-width: 40px; }
  .dash-grid { grid-template-columns: 1fr; }
  .dash-cell { border-right: none; border-bottom: 1px solid var(--border); }
  .dash-cell:last-child { border-bottom: none; }
  .corner { width: 10px; height: 10px; }
  .corner-tl, .corner-tr { top: 8px; }
  .corner-bl, .corner-br { bottom: 8px; }
  .corner-tl, .corner-bl { left: 8px; }
  .corner-tr, .corner-br { right: 8px; }
}
