@import url('https://fonts.googleapis.com/css2?family=DM+Serif+Display:ital@0;1&family=DM+Sans:wght@300;400;500;600&display=swap');

/* ─── VARIABLES ─────────────────────────────────────────────── */
:root {
  --bg:        #0c0c0b;
  --surface:   #141413;
  --surface2:  #1c1c1a;
  --border:    rgba(255, 251, 235, 0.08);
  --border-hi: rgba(255, 251, 235, 0.16);
  --accent:    #b8956a;
  --accent-dim: rgba(184, 149, 106, 0.10);
  --accent-hi: #c4a07a;
  --text:      #ede9e1;
  --text-2:    #b8b2a8;
  --muted:     #7d7a73;
  --muted-hi:  #9e9a93;
  --danger:    #c96a6a;
  --success:   #7ab87a;
  --radius:    8px;
  --radius-sm: 5px;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: 'DM Sans', sans-serif;
  background-color: var(--bg);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.6;
  overflow-x: hidden;
}


/* ─── HEADER ─────────────────────────────────────────────────── */
#header {
  position: relative;
  z-index: 10;
  padding: 24px 48px;
  display: flex;
  align-items: center;
  border-bottom: 1px solid var(--border);
  background: var(--bg);
}

.header-inner {
  display: flex;
  align-items: baseline;
  gap: 20px;
}

.logo {
  font-family: 'DM Serif Display', serif;
  font-size: 1.6rem;
  color: var(--text);
  letter-spacing: -0.3px;
}

.slogan {
  font-size: 0.82rem;
  color: var(--muted);
  font-weight: 400;
  font-style: italic;
  letter-spacing: 0;
}

/* ─── MAIN ───────────────────────────────────────────────────── */
#app {
  position: relative;
  z-index: 1;
}

/* ─── LANDING HERO ───────────────────────────────────────────── */
#landing {
  max-width: 900px;
  margin: 0 auto;
  padding: 72px 32px 80px;
}

/* ─── INTRO TEXT ─────────────────────────────────────────────── */
.platform-intro {
  margin-bottom: 52px;
}

.platform-intro p {
  font-size: 1.1rem;
  color: var(--text-2);
  line-height: 1.85;
  font-weight: 400;
}

/* ─── LEARNING FRAMEWORK BOX ─────────────────────────────────── */
.learning-framework-box {
  border-left: 2px solid var(--accent);
  padding: 4px 0 4px 20px;
  margin-bottom: 52px;
  background: transparent;
}

.framework-content h3 {
  font-family: 'DM Sans', sans-serif;
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 8px;
}

.framework-content {
  overflow: visible;
  position: relative;
}

.framework-content p {
  font-size: 0.9rem;
  color: var(--text-2);
  line-height: 1.7;
  font-weight: 400;
  overflow: visible;
}

.framework-content strong {
  font-weight: 600;
  color: var(--text);
}

/* ─── REFERENCE TOOLTIP ──────────────────────────────────────── */
.reference-tooltip {
  position: relative;
  display: inline-block;
  cursor: help;
}

.reference-tooltip sup {
  color: var(--accent);
  font-weight: 600;
  margin: 0 2px;
  opacity: 0.8;
  transition: opacity 0.2s ease;
}

.reference-tooltip:hover sup {
  opacity: 1;
}

.tooltip-box {
  display: none;
  position: fixed;
  background: var(--surface2);
  border: 1px solid var(--border-hi);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  width: 340px;
  font-size: 0.78rem;
  color: var(--text-2);
  line-height: 1.6;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
  z-index: 9999;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  animation: tooltipFadeIn 0.25s ease forwards;
}

.tooltip-box strong {
  color: var(--accent);
  font-weight: 600;
}

.tooltip-box .tooltip-link {
  color: var(--accent);
  text-decoration: none;
  font-weight: 500;
  transition: opacity 0.2s;
  display: inline-block;
  margin: 8px 0;
}

.tooltip-box .tooltip-link:hover {
  opacity: 0.8;
  text-decoration: underline;
}

.tooltip-box em {
  color: #a0b8d0;
  font-style: italic;
}

.tooltip-box .tooltip-doi {
  font-size: 0.72rem;
  color: var(--muted);
  display: inline-block;
  margin-top: 8px;
}

.tooltip-box .tooltip-doi-link {
  color: var(--accent);
  text-decoration: none;
  font-family: 'Courier New', monospace;
  font-size: 0.72rem;
  transition: opacity 0.2s;
}

.tooltip-box .tooltip-doi-link:hover {
  opacity: 0.8;
  text-decoration: underline;
}

@keyframes tooltipFadeIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.tooltip-content a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 500;
  transition: opacity 0.2s;
}

.tooltip-content a:hover {
  opacity: 0.8;
  text-decoration: underline;
}

.tooltip-content em {
  color: #a0b8d0;
  font-style: italic;
}

/* ─── FLOW DIAGRAM ───────────────────────────────────────────── */
.flow-diagram {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  margin-bottom: 56px;
}

.flow-step {
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-2);
  padding: 0 4px;
}

.flow-arrow {
  flex: 0 0 40px;
  height: 1px;
  background: var(--border-hi);
  margin: 0 12px;
}

/* ─── AUTH CONTAINER ─────────────────────────────────────────── */
#auth-container {
  max-width: 500px;
  margin: 0 auto;
}

/* ─── REGISTER FORM CARD ─────────────────────────────────────── */
.register-form,
.auth-form {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 40px 44px;
  max-width: 480px;
  margin: 0 auto;
}

.register-form h2,
.auth-form h2 {
  font-family: 'DM Sans', sans-serif;
  font-size: 1.3rem;
  font-weight: 600;
  letter-spacing: -0.2px;
  color: var(--text);
  margin-bottom: 28px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--border);
}

/* ─── FORM GRID ──────────────────────────────────────────────── */
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 20px;
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-field.full-width {
  grid-column: 1 / -1;
}

.form-field label {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.form-field input,
.form-field select {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px 16px;
  color: var(--text);
  font-family: 'DM Sans', sans-serif;
  font-size: 0.95rem;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  -webkit-appearance: none;
  appearance: none;
}

.form-field select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%237a8ba3' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 36px;
}

.form-field input::placeholder { color: #3d4f66; }
.form-field select option { background: var(--surface2); }

.form-field input:focus,
.form-field select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--accent-dim);
}

/* ─── START BUTTON ───────────────────────────────────────────── */
.btn-start {
  width: 100%;
  margin-top: 28px;
  padding: 13px 28px;
  background: var(--accent);
  border: none;
  border-radius: var(--radius-sm);
  color: var(--bg);
  font-family: 'DM Sans', sans-serif;
  font-size: 0.92rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  cursor: pointer;
  transition: background-color 0.15s ease, transform 0.1s ease;
}

.btn-start:hover {
  background: var(--accent-hi);
}

.btn-start:active {
  transform: scale(0.98);
}

/* ─── AUTH TOGGLE TEXT ───────────────────────────────────────── */
.auth-toggle-text {
  text-align: center;
  margin-top: 20px;
  font-size: 0.85rem;
  color: var(--muted);
}

.auth-toggle-text a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
  transition: color 0.2s;
}

.auth-toggle-text a:hover {
  color: var(--accent-hi);
}

/* ─── FOOTER ─────────────────────────────────────────────────── */
#footer {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 24px;
  color: var(--muted);
  font-size: 0.8rem;
  border-top: 1px solid var(--border);
  letter-spacing: 0.03em;
}

/* ─── FADE IN ANIMATION ──────────────────────────────────────── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

.platform-intro       { animation: fadeUp 0.7s ease both; animation-delay: 0.1s; }
.learning-framework-box { animation: fadeUp 0.7s ease both; animation-delay: 0.2s; }
.flow-diagram         { animation: fadeUp 0.7s ease both; animation-delay: 0.3s; }
.register-form,
.auth-form { animation: fadeUp 0.7s ease both; animation-delay: 0.45s; }

/* ─── RESPONSIVE ─────────────────────────────────────────────── */
@media (max-width: 640px) {
  #header { padding: 20px 24px; }
  .header-inner { flex-direction: column; gap: 6px; }
  #landing { padding: 40px 20px 60px; }
  .register-form { padding: 28px 24px; }
  .form-grid { grid-template-columns: 1fr; }
  .flow-diagram { flex-wrap: wrap; gap: 8px; }
  .flow-arrow { display: none; }
  .learning-framework-box { padding-left: 16px; }

  .tooltip-content {
    width: 280px;
    bottom: 120%;
  }
}