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

:root {
  --btc: #f7931a;
  --eth: #4a7fff;
  --bg: #07090f;
  --card: rgba(13, 17, 28, 0.82);
  --border: rgba(255, 255, 255, 0.09);
  --text: #e8ecf4;
  --muted: #8b94a7;
}

html, body { height: 100%; }

/* Light mode */
body.light {
  --bg: #eef1f7;
  --card: rgba(255, 255, 255, 0.86);
  --border: rgba(20, 26, 40, 0.12);
  --text: #171c26;
  --muted: #5b6475;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  overflow-x: hidden;
}

/* Fixed full-page chart background */
#chartBg {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  z-index: 0;
}

/* Timeframe toggle */
.tf-toggle {
  position: fixed;
  top: 16px;
  right: 20px;
  z-index: 5;
  display: flex;
  gap: 6px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 5px;
  backdrop-filter: blur(8px);
}
.tf-toggle button {
  background: transparent;
  color: var(--muted);
  border: none;
  padding: 6px 14px;
  border-radius: 7px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}
.tf-toggle button.active {
  background: linear-gradient(135deg, var(--btc), var(--eth));
  color: #fff;
}

/* Price ticker */
.ticker {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 5;
  font-size: 14px;
  font-weight: 600;
  display: flex;
  gap: 22px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 8px 18px;
  backdrop-filter: blur(8px);
}
.ticker .btc { color: var(--btc); text-shadow: 0 0 12px rgba(247,147,26,.6); }
.ticker .eth { color: var(--eth); text-shadow: 0 0 12px rgba(74,127,255,.6); }

/* Layout */
.layout {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 420px 1fr;
  min-height: 100vh;
}

/* Left auth panel */
.auth-panel {
  position: sticky;
  top: 0;
  align-self: start;
  height: 100vh;
  overflow-y: auto;
  padding: 60px 34px 40px;
  border-right: 1px solid var(--border);
}
.logo {
  font-size: 40px;
  letter-spacing: -1px;
}
.logo span {
  background: linear-gradient(90deg, var(--btc), var(--eth));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.tagline { color: var(--muted); margin: 6px 0 28px; }

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 26px;
  box-shadow: 0 0 40px rgba(247,147,26,.06), 0 0 60px rgba(74,127,255,.06);
}
.card h2 { margin-bottom: 14px; font-size: 20px; }
.card.hidden { display: none; }
.kyc-note { font-size: 12.5px; color: var(--muted); margin-bottom: 12px; }

form { display: flex; flex-direction: column; gap: 10px; }
form hr { border: none; border-top: 1px solid var(--border); margin: 6px 0; }
.row { display: flex; gap: 10px; }
.row input { flex: 1; min-width: 0; }

input, select {
  background: rgba(255,255,255,.05);
  border: 1px solid var(--border);
  border-radius: 9px;
  padding: 11px 13px;
  color: var(--text);
  font-size: 14px;
  width: 100%;
}
input:focus, select:focus {
  outline: none;
  border-color: var(--eth);
  box-shadow: 0 0 0 3px rgba(74,127,255,.18);
}
label { font-size: 12.5px; color: var(--muted); display: flex; flex-direction: column; gap: 5px; }

.btn {
  display: inline-block;
  text-align: center;
  text-decoration: none;
  background: linear-gradient(135deg, var(--btc), var(--eth));
  color: #fff;
  border: none;
  border-radius: 9px;
  padding: 12px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  margin-top: 6px;
  transition: filter .2s, transform .1s;
}
.btn:hover { filter: brightness(1.15); }
.btn:active { transform: scale(.98); }

.switch { font-size: 13px; color: var(--muted); margin-top: 14px; text-align: center; }
.switch a { color: var(--eth); }

/* Right scrollable info panel */
.info-panel {
  padding: 90px 8vw 60px;
  display: flex;
  flex-direction: column;
  gap: 48px;
}
.info-panel section {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 30px 34px;
  backdrop-filter: blur(6px);
}
.info-panel h2 { margin-bottom: 10px; }
.info-panel p { color: var(--muted); line-height: 1.65; }
.info-panel footer { text-align: center; color: var(--muted); font-size: 13px; padding: 20px 0 0; }

/* Share button */
.share-btn {
  position: fixed;
  bottom: 18px;
  right: 18px;
  z-index: 9;
  background: linear-gradient(135deg, var(--btc), var(--eth));
  color: #fff;
  border: none;
  border-radius: 30px;
  padding: 12px 20px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 18px rgba(0,0,0,.35);
  transition: transform .15s, filter .15s;
}
.share-btn:hover { transform: translateY(-2px); filter: brightness(1.12); }

/* Flash messages */
.flash-wrap {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.flash {
  padding: 12px 22px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  background: var(--card);
  border: 1px solid var(--border);
  backdrop-filter: blur(8px);
}
.flash.success { border-color: rgba(60,200,120,.5); color: #6fe0a0; }
.flash.error { border-color: rgba(240,80,80,.5); color: #ff8f8f; }

@media (max-width: 900px) {
  .layout { grid-template-columns: 1fr; }
  .auth-panel { position: relative; height: auto; border-right: none; border-bottom: 1px solid var(--border); }
}

/* Phones: stack the ticker and toggle instead of overlapping the header */
@media (max-width: 700px) {
  .ticker {
    position: static;
    transform: none;
    margin: 12px auto 0;
    width: max-content;
    max-width: 94vw;
    font-size: 12.5px;
    gap: 14px;
    justify-content: center;
    flex-wrap: wrap;
  }
  .tf-toggle {
    position: static;
    margin: 10px auto 0;
    width: max-content;
  }
  .auth-panel { padding-top: 26px; }
  .info-panel { padding: 40px 6vw 60px; }
  .share-btn { padding: 10px 16px; font-size: 13px; }
}
