:root {
  --primary: #1B64DA;
  --danger: #F04452;
  --success: #0ABF76;
  --bg: #0C0D10;
  --surface: #17181D;
  --surface2: #1E1F25;
  --border: #2A2B30;
  --text: #FFFFFF;
  --text-muted: #9A9FA8;
  --chart-bg: #13141A;
  --up: #F04452;
  --down: #1B64DA;
  --radius: 8px;
  --radius-sm: 4px;
}

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

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 14px;
  line-height: 1.5;
  min-height: 100vh;
}

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

a:hover {
  text-decoration: underline;
}

/* ── Layout ─────────────────────────────────────────────── */
.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ── Header ─────────────────────────────────────────────── */
.header {
  height: 56px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
}

.logo {
  font-size: 18px;
  font-weight: 700;
  color: var(--primary);
  letter-spacing: -0.5px;
  text-decoration: none;
}

.logo:hover {
  text-decoration: none;
}

.nav {
  display: flex;
  gap: 4px;
}

.nav-link {
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 500;
  transition: color 0.15s, background 0.15s;
}

.nav-link:hover {
  color: var(--text);
  background: var(--surface2);
  text-decoration: none;
}

.nav-link.active {
  color: var(--text);
  background: var(--surface2);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.header-nickname {
  color: var(--text-muted);
  font-size: 13px;
}

/* ── Buttons ─────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  border: none;
  transition: opacity 0.15s, background 0.15s;
  text-decoration: none;
}

.btn:hover { opacity: 0.9; text-decoration: none; }
.btn:active { opacity: 0.8; }
.btn:disabled { opacity: 0.4; cursor: not-allowed; }

.btn-primary { background: var(--primary); color: #fff; }
.btn-danger  { background: var(--danger);  color: #fff; }
.btn-success { background: var(--success); color: #fff; }
.btn-ghost   { background: transparent; color: var(--text-muted); border: 1px solid var(--border); }
.btn-outline { background: transparent; color: var(--primary); border: 1px solid var(--primary); }
.btn-google  {
  background: #fff;
  color: #1f1f1f;
  border: 1px solid var(--border);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}
.btn-google-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: linear-gradient(135deg, #4285F4 0%, #34A853 100%);
  color: #fff;
  font-weight: 700;
  font-size: 12px;
}
.btn-block   { width: 100%; }
.btn-lg      { padding: 12px 24px; font-size: 15px; }
.btn-sm      { padding: 5px 12px; font-size: 13px; }

/* ── Forms ─────────────────────────────────────────────── */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-label {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
}

.form-control {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: 14px;
  padding: 10px 12px;
  transition: border-color 0.15s;
  outline: none;
  width: 100%;
}

.form-control::placeholder { color: var(--text-muted); }
.form-control:focus { border-color: var(--primary); }
.form-control.is-invalid { border-color: var(--danger); }

.form-error {
  font-size: 12px;
  color: var(--danger);
}

.form-non-field-errors {
  background: rgba(240, 68, 82, 0.1);
  border: 1px solid rgba(240, 68, 82, 0.3);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  font-size: 13px;
  color: var(--danger);
  margin-bottom: 16px;
}

/* ── Auth Card ───────────────────────────────────────────── */
.auth-wrapper {
  min-height: calc(100vh - 56px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 16px;
}

.auth-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 40px;
  width: 100%;
  max-width: 420px;
}

.auth-title {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 4px;
}

.auth-subtitle {
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 32px;
}

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

.auth-footer {
  margin-top: 24px;
  text-align: center;
  font-size: 13px;
  color: var(--text-muted);
}

.auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 20px 0 16px;
  color: var(--text-muted);
  font-size: 12px;
}

.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

/* ── Step Indicator ──────────────────────────────────────── */
.step-indicator {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 32px;
}

.step {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-muted);
}

.step.active {
  color: var(--text);
}

.step-dot {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--surface2);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 600;
}

.step.active .step-dot {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

.step.done .step-dot {
  background: var(--success);
  border-color: var(--success);
  color: #fff;
}

.step-line {
  flex: 1;
  height: 1px;
  background: var(--border);
}

/* ── Alerts ─────────────────────────────────────────────── */
.alert {
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  margin-bottom: 16px;
}

.alert-success {
  background: rgba(10, 191, 118, 0.1);
  border: 1px solid rgba(10, 191, 118, 0.3);
  color: var(--success);
}

.alert-info {
  background: rgba(27, 100, 218, 0.1);
  border: 1px solid rgba(27, 100, 218, 0.3);
  color: var(--primary);
}

/* ── Landing ─────────────────────────────────────────────── */
.hero {
  padding: 80px 0 60px;
  text-align: center;
}

.hero-title {
  font-size: 42px;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 16px;
  letter-spacing: -1px;
}

.hero-title .accent { color: var(--primary); }

.hero-desc {
  font-size: 16px;
  color: var(--text-muted);
  margin-bottom: 36px;
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
}

.hero-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin: 60px 0;
}

.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  text-align: center;
}

.stat-label {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.stat-value {
  font-size: 24px;
  font-weight: 700;
}

/* ── Ticker Preview ──────────────────────────────────────── */
.ticker-preview {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 80px;
}

.ticker-preview-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
}

.ticker-row {
  display: flex;
  align-items: center;
  padding: 14px 20px;
  border-bottom: 1px solid var(--border);
  transition: background 0.1s;
}

.ticker-row:last-child { border-bottom: none; }
.ticker-row:hover { background: var(--surface2); }

.ticker-symbol { font-weight: 600; width: 80px; }
.ticker-name   { color: var(--text-muted); flex: 1; }
.ticker-price  { font-weight: 600; width: 130px; text-align: right; }
.ticker-change { width: 80px; text-align: right; font-size: 13px; }
.up         { color: var(--up); }
.down       { color: var(--down); }
.change-up  { color: var(--up); }
.change-down{ color: var(--down); }

@keyframes flash-up {
  0%   { background: color-mix(in srgb, var(--up) 20%, transparent); }
  100% { background: transparent; }
}
@keyframes flash-down {
  0%   { background: color-mix(in srgb, var(--down) 20%, transparent); }
  100% { background: transparent; }
}
.flash-up   { animation: flash-up   0.6s ease-out; }
.flash-down { animation: flash-down 0.6s ease-out; }

@media (prefers-reduced-motion: reduce) {
  .flash-up, .flash-down { animation: none; }
}

/* ── Utility ─────────────────────────────────────────────── */
.text-muted  { color: var(--text-muted); }
.text-center { text-align: center; }
.mt-8  { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mb-8  { margin-bottom: 8px; }
.mb-16 { margin-bottom: 16px; }
