@import url('https://fonts.googleapis.com/css2?family=Syne:wght@400;700;800&family=DM+Sans:wght@300;400;500&display=swap');

:root {
  --white: #ffffff;
  --off-white: #e8e8e8;
  --muted: #888;
  --dim: #444;
  --bg: #080808;
  --surface: rgba(255,255,255,0.04);
  --border: rgba(255,255,255,0.08);
  --accent: #ffffff;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: 'DM Sans', sans-serif;
  background: var(--bg);
  color: var(--white);
  overflow: hidden;
  height: 100vh;
}

/* ---- Background layers ---- */
.bg-grid {
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.025) 1px, transparent 1px);
  background-size: 60px 60px;
  z-index: 0;
  pointer-events: none;
}

.bg-glow {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(255,255,255,0.04) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

.bg-burst {
  position: fixed;
  width: 800px;
  height: 800px;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
  z-index: 0;
}

.burst-particle {
  position: absolute;
  width: 2px;
  height: 20px;
  background: white;
  border-radius: 10px;
  box-shadow: 0 0 8px white;
  opacity: 0;
}

/* ---- Top bar ---- */
.top-bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 32px;
  z-index: 100;
  border-bottom: 1px solid var(--border);
  background: rgba(8,8,8,0.8);
  backdrop-filter: blur(20px);
}

.nb-tag {
  font-family: 'Syne', sans-serif;
  font-weight: 800;
  font-size: 18px;
  letter-spacing: 3px;
  color: var(--white);
  opacity: 0.9;
}

.top-right {
  display: flex;
  gap: 10px;
}

.icon-btn {
  width: 38px;
  height: 38px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
  color: var(--off-white);
}

.icon-btn:hover {
  background: rgba(255,255,255,0.1);
  border-color: rgba(255,255,255,0.2);
  color: white;
}

/* ---- Center container ---- */
.center-container {
  position: relative;
  height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 0;
  z-index: 1;
}

.hero-eyebrow {
  font-family: 'DM Sans', sans-serif;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 5px;
  color: var(--muted);
  margin-bottom: 24px;
  text-transform: uppercase;
  animation: fadeUp 0.8s ease both;
  animation-delay: 0.1s;
}

.logo-img {
  width: 360px;
  max-width: 55vw;
  filter: drop-shadow(0 0 40px rgba(255,255,255,0.15));
  z-index: 2;
  animation: fadeUp 0.8s ease both;
  animation-delay: 0.2s;
}

.welcome {
  margin-top: 24px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 300;
  letter-spacing: 0.5px;
  animation: fadeUp 0.8s ease both;
  animation-delay: 0.35s;
}

.start-btn {
  margin-top: 36px;
  padding: 0 40px;
  height: 52px;
  display: flex;
  align-items: center;
  gap: 12px;
  background: white;
  color: black;
  border: none;
  border-radius: 14px;
  cursor: pointer;
  font-family: 'Syne', sans-serif;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 1px;
  transition: all 0.25s;
  box-shadow: 0 0 0 0 rgba(255,255,255,0.3);
  animation: fadeUp 0.8s ease both;
  animation-delay: 0.45s;
}

.start-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(255,255,255,0.25), 0 0 0 1px rgba(255,255,255,0.5);
}

.start-btn:active {
  transform: translateY(0);
}

.start-btn-arrow {
  font-size: 18px;
  transition: transform 0.2s;
}

.start-btn:hover .start-btn-arrow {
  transform: translateX(4px);
}

.logout-btn {
  margin-top: 14px;
  background: none;
  border: none;
  color: var(--dim);
  font-family: 'DM Sans', sans-serif;
  font-size: 12px;
  cursor: pointer;
  letter-spacing: 0.5px;
  transition: color 0.2s;
  animation: fadeUp 0.8s ease both;
  animation-delay: 0.55s;
  padding: 6px 12px;
  border-radius: 6px;
}

.logout-btn:hover {
  color: var(--muted);
  background: var(--surface);
}

/* ---- Bottom bar ---- */
.bottom-bar {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 10px;
  align-items: center;
  font-size: 11px;
  color: var(--dim);
  z-index: 10;
  letter-spacing: 1px;
}

.bottom-sep { color: var(--dim); opacity: 0.5; }

/* ---- Profile Panel ---- */
.profile-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 200;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}
.profile-overlay.active {
  opacity: 1;
  pointer-events: all;
}

.profile-panel {
  position: fixed;
  top: 0;
  right: 0;
  width: 300px;
  height: 100vh;
  background: #111;
  border-left: 1px solid rgba(255,255,255,0.08);
  z-index: 201;
  transform: translateX(100%);
  transition: transform 0.3s cubic-bezier(0.22,1,0.36,1);
  padding: 28px 24px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.profile-panel.active {
  transform: translateX(0);
}

.profile-panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  font-size: 16px;
  letter-spacing: 0.5px;
}

.profile-close-btn {
  background: none;
  border: none;
  color: #555;
  font-size: 16px;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 6px;
  transition: color 0.2s, background 0.2s;
}
.profile-close-btn:hover { color: white; background: rgba(255,255,255,0.08); }

.profile-avatar-wrap {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 14px;
}

.profile-avatar {
  width: 48px;
  height: 48px;
  min-width: 48px;
  border-radius: 50%;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  font-size: 18px;
  overflow: hidden;
}
.profile-avatar img { width: 100%; height: 100%; object-fit: cover; }

.profile-name {
  font-weight: 600;
  font-size: 15px;
  color: white;
}
.profile-email {
  font-size: 12px;
  color: #555;
  margin-top: 2px;
  word-break: break-all;
}

.profile-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 12px 16px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 10px;
}
.profile-field-label { font-size: 11px; color: #444; letter-spacing: 0.5px; text-transform: uppercase; }
.profile-field-value { font-size: 12px; color: #888; font-family: monospace; word-break: break-all; }

.profile-name-edit-row {
  display: flex;
  gap: 8px;
  align-items: center;
}

.profile-name-input {
  flex: 1;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 8px;
  color: white;
  font-family: 'DM Sans', sans-serif;
  font-size: 13px;
  padding: 7px 10px;
  outline: none;
  transition: border-color 0.2s;
}
.profile-name-input:focus { border-color: rgba(255,255,255,0.3); }
.profile-name-input::placeholder { color: #444; }

.profile-save-btn {
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 8px;
  color: white;
  font-family: 'DM Sans', sans-serif;
  font-size: 12px;
  font-weight: 600;
  padding: 7px 14px;
  cursor: pointer;
  transition: background 0.2s;
  white-space: nowrap;
}
.profile-save-btn:hover { background: rgba(255,255,255,0.18); }
.profile-save-btn:disabled { opacity: 0.4; cursor: not-allowed; }

.profile-save-status { font-size: 11px; min-height: 14px; }
.profile-save-ok    { color: #66bb6a; }
.profile-save-error { color: #ef5350; }

.profile-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: auto;
}

.profile-btn {
  width: 100%;
  padding: 12px;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.1);
  background: rgba(255,255,255,0.05);
  color: white;
  font-family: 'DM Sans', sans-serif;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}
.profile-btn:hover { background: rgba(255,255,255,0.1); }
.profile-btn-danger { color: #ef5350; border-color: rgba(239,83,80,0.2); background: rgba(239,83,80,0.05); }
.profile-btn-danger:hover { background: rgba(239,83,80,0.12); }

/* ---- Animations ---- */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}