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

:root {
  --bg: #0a0a0f;
  --bg-subtle: #12121a;
  --text: #c8c8d0;
  --text-dim: #5a5a6e;
  --accent: #8b0000;
  --accent-glow: #ff1a1a;
  --border: #1a1a2e;
}

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  font-family: 'Courier New', monospace;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
  overscroll-behavior-x: none;
}

/* === Navigation === */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  padding: 1.5rem 2rem;
  z-index: 100;
  background: linear-gradient(to bottom, var(--bg), transparent);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  z-index: 101;
  color: var(--text);
}

.hamburger-icon {
  transition: transform 0.2s ease;
}

.nav-toggle:active .hamburger-icon {
  transform: scaleY(0.7);
}

.ham-line {
  transition: all 0.2s ease;
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 2rem;
  justify-content: flex-end;
}

.nav-link {
  color: var(--text);
  text-decoration: none;
  font-size: 0.85rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  transition: color 0.3s ease, text-shadow 0.3s ease;
}

.nav-link:hover,
.nav-link.active {
  color: #fff;
  text-shadow: 0 0 8px rgba(255, 255, 255, 0.3);
}

.nav-user {
  color: var(--text-dim);
  font-size: 0.8rem;
  letter-spacing: 1px;
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

@media (max-width: 600px) {
  .nav-user {
    flex-direction: column;
    gap: 0.5rem;
  }
}

#nav-username-display {
  color: var(--text);
  font-size: 0.85rem;
  letter-spacing: 2px;
}

.nav-logout {
  font-size: 0.75rem;
  color: var(--text-dim);
}

.nav-close-item {
  display: none;
}

/* Mobile nav */
@media (max-width: 600px) {
  .nav-toggle {
    display: flex;
    position: relative;
    z-index: 102;
  }

  .nav-links {
    position: fixed;
    top: 0;
    left: -100%;
    width: 60%;
    height: 100vh;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background: var(--bg-subtle);
    border-right: 2px solid #2a2a40;
    box-shadow: 4px 0 15px rgba(0, 0, 0, 0.7);
    transition: left 0.3s ease;
    padding-top: 2rem;
  }

  .nav-links.open {
    left: 0;
  }

  .nav-close-item {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
  }

  .nav-close {
    background: none;
    border: none;
    color: var(--text);
    font-size: 1.8rem;
    cursor: pointer;
    padding: 0.5rem;
    line-height: 1;
  }
}

/* === Hero / Landing === */
.hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  text-align: center;
  padding: 2rem;
}

.glitch-wrapper {
  position: relative;
}

.title {
  font-size: clamp(3rem, 10vw, 7rem);
  font-weight: 900;
  letter-spacing: -2px;
  color: var(--text);
  position: relative;
  animation: fadeInUp 1.5s ease forwards;
}

/* Glitch effect */
.glitch {
  position: relative;
}

.glitch::before,
.glitch::after {
  content: attr(data-text);
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
}

.glitch::before {
  color: var(--accent-glow);
  animation: glitch-1 4s infinite linear;
}

.glitch::after {
  color: #0ff;
  animation: glitch-2 4s infinite linear;
}

@keyframes glitch-1 {
  0%, 90%, 100% { opacity: 0; transform: none; }
  91% { opacity: 0.8; transform: translate(-2px, -1px); clip-path: inset(20% 0 60% 0); }
  93% { opacity: 0; }
  95% { opacity: 0.6; transform: translate(2px, 1px); clip-path: inset(50% 0 20% 0); }
  97% { opacity: 0; }
}

@keyframes glitch-2 {
  0%, 88%, 100% { opacity: 0; transform: none; }
  89% { opacity: 0.6; transform: translate(2px, 1px); clip-path: inset(40% 0 30% 0); }
  91% { opacity: 0; }
  94% { opacity: 0.5; transform: translate(-1px, 2px); clip-path: inset(10% 0 70% 0); }
  96% { opacity: 0; }
}

.tagline {
  margin-top: 1.5rem;
  font-size: 1.1rem;
  color: var(--text-dim);
  letter-spacing: 1px;
  opacity: 0;
  animation: fadeIn 2s ease 1s forwards;
}

.pulse-line {
  margin-top: 3rem;
  width: 200px;
  height: 1px;
  background: var(--accent);
  opacity: 0;
  animation: fadeIn 2s ease 1.5s forwards, pulse 3s ease-in-out 2s infinite;
}

.hero-btn {
  margin-top: 3.5rem;
  padding: 1rem 2rem;
  font-size: 1rem;
  letter-spacing: 3px;
  opacity: 0;
  animation: fadeIn 2s ease 2s forwards;
  text-decoration: none;
  display: inline-block;
}

/* === Sections === */
.section {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 4rem 2rem;
}

.section-title {
  font-size: 1.5rem;
  letter-spacing: 4px;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 2rem;
}

.hidden {
  display: none;
}

/* === Locked Content === */
.locked-content {
  text-align: center;
  border: 1px solid var(--border);
  padding: 3rem;
  border-radius: 2px;
  background: var(--bg-subtle);
}

.locked-message {
  font-size: 1.2rem;
  color: var(--accent);
  letter-spacing: 3px;
  margin-bottom: 0.5rem;
}

.locked-sub {
  color: var(--text-dim);
  font-size: 0.85rem;
}

/* === Narration === */
.narration {
  width: 100%;
  max-width: 550px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 2rem 1rem;
  position: relative;
}

.narration-text {
  font-size: 0.95rem;
  line-height: 2;
  color: var(--text);
  text-align: left;
  width: 100%;
}

.audio-toggle {
  font-size: 0.75rem;
  padding: 0.5rem 1rem;
  letter-spacing: 1px;
  background: transparent;
  border: 1px solid var(--border);
  position: fixed;
  top: 1.5rem;
  right: 1.5rem;
  z-index: 50;
}

.audio-toggle:hover {
  background: transparent;
  border-color: var(--text-dim);
  box-shadow: none;
}

.audio-toggle.active {
  border-color: var(--accent);
  color: var(--accent);
}

.narration-controls-top {
  display: none;
}

.narration-controls-bottom {
  display: flex;
  gap: 0.5rem;
  align-self: center;
  margin-top: 1.5rem;
  padding: 1rem 0;
}

@media (max-width: 600px) {
  .narration-controls-bottom {
    position: fixed;
    bottom: 1rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 50;
    background: var(--bg);
    padding: 0.8rem 1.5rem;
    border: 1px solid var(--border);
    border-radius: 2px;
  }
}

.narration-ctrl {
  font-size: 0.75rem;
  padding: 0.5rem 1rem;
  letter-spacing: 1px;
  background: transparent;
  border: 1px solid var(--border);
}

.narration-ctrl:hover {
  background: transparent;
  border-color: var(--text-dim);
  box-shadow: none;
}

.narration-text p {
  margin-bottom: 1.2rem;
}

.narration-continue {
  margin-top: 2rem;
  opacity: 0;
  animation: fadeIn 1s ease forwards;
  align-self: center;
}

.narration-continue.visible {
  display: inline-block;
}

/* === Chat Interface === */
.chat-container {
  width: 100%;
  max-width: 500px;
  height: 70vh;
  overflow-y: auto;
  padding: 2rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.chat-message {
  display: flex;
  flex-direction: column;
  animation: fadeInUp 0.3s ease forwards;
}

.chat-speaker {
  font-size: 0.7rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 0.3rem;
}

.chat-sarah .chat-speaker {
  color: var(--accent);
}

.chat-player .chat-speaker {
  color: #4a9eff;
  text-align: right;
}

.chat-sarah {
  align-items: flex-start;
}

.chat-player {
  align-items: flex-end;
}

.chat-bubble {
  max-width: 75%;
  padding: 0.8rem 1.2rem;
  border-radius: 2px;
  font-size: 0.9rem;
  line-height: 1.5;
}

.chat-sarah .chat-bubble {
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  color: var(--text);
}

.chat-player .chat-bubble {
  background: rgba(139, 0, 0, 0.15);
  border: 1px solid var(--accent);
  color: var(--text);
}

.chat-narration {
  align-items: flex-start;
}

.narration-bubble {
  background: transparent;
  border: none;
  color: var(--text-dim);
  font-style: italic;
  font-size: 0.85rem;
  max-width: 90%;
  text-align: left;
}

/* Typing indicator */
.typing-bubble {
  display: flex;
  gap: 4px;
  align-items: center;
  padding: 1rem 1.4rem;
}

.typing-bubble span {
  width: 6px;
  height: 6px;
  background: var(--text-dim);
  border-radius: 50%;
  animation: typingDot 1.4s infinite;
}

.typing-bubble span:nth-child(2) {
  animation-delay: 0.2s;
}

.typing-bubble span:nth-child(3) {
  animation-delay: 0.4s;
}

@keyframes typingDot {
  0%, 60%, 100% { opacity: 0.3; transform: translateY(0); }
  30% { opacity: 1; transform: translateY(-3px); }
}

/* Chat options */
.chat-options {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  padding: 0.5rem 0;
  align-self: flex-end;
  width: 100%;
  max-width: 80%;
  margin-left: auto;
}

.chat-options-label {
  font-size: 0.7rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--text-dim);
  text-align: right;
  margin-bottom: 0.2rem;
}

.chat-option-btn {
  padding: 0.8rem 1.2rem;
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
  font-family: inherit;
  font-size: 0.85rem;
  text-align: left;
  cursor: pointer;
  transition: all 0.3s ease;
  opacity: 0;
  animation: fadeInUp 0.3s ease forwards;
  line-height: 1.4;
}

.chat-option-btn:hover {
  border-color: var(--accent);
  background: rgba(139, 0, 0, 0.1);
  box-shadow: 0 0 10px rgba(139, 0, 0, 0.2);
}

/* === Visual Novel Interface === */
.novel-scene {
  width: 100%;
  max-width: 600px;
  min-height: 60vh;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 1.5rem;
}

.novel-dialogue-box {
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: 2px;
  padding: 1.5rem 2rem;
  min-height: 120px;
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.novel-speaker {
  font-size: 0.75rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  font-weight: bold;
}

.speaker-sarah {
  color: var(--accent);
}

.speaker-player {
  color: #4a9eff;
}

.novel-text {
  font-size: 1rem;
  line-height: 1.7;
  color: var(--text);
  min-height: 1.5em;
}

.novel-typing {
  color: var(--text-dim);
  animation: flicker 1s infinite;
}

.novel-options {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.novel-option-btn {
  padding: 1rem 1.5rem;
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
  font-family: inherit;
  font-size: 0.9rem;
  text-align: left;
  cursor: pointer;
  transition: all 0.3s ease;
  opacity: 0;
  animation: fadeInUp 0.4s ease forwards;
  line-height: 1.4;
}

.novel-option-btn:hover {
  border-color: #4a9eff;
  background: rgba(74, 158, 255, 0.05);
  box-shadow: 0 0 10px rgba(74, 158, 255, 0.15);
}

/* Chapter end */
.chapter-end {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3rem 0;
  animation: fadeIn 2s ease forwards;
}

.chapter-end-content {
  text-align: center;
}

.chapter-end-label {
  font-size: 0.8rem;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 0.5rem;
}

.chapter-end-title {
  font-size: 1.5rem;
  color: var(--text);
  margin-bottom: 1.5rem;
}

.chapter-end-content .pulse-line {
  margin: 0 auto;
}

.chapter-end-btn {
  margin-top: 2rem;
  font-size: 0.8rem;
  padding: 0.7rem 1.5rem;
}

/* === Book / Journal === */
.book {
  width: 100%;
  max-width: 480px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
  position: relative;
}

.book-page {
  width: 100%;
  height: 65vh;
  background: #0e0e14;
  border: 1px solid #1f1f30;
  border-radius: 2px;
  position: relative;
  box-shadow:
    2px 2px 8px rgba(0, 0, 0, 0.6),
    inset 0 0 30px rgba(0, 0, 0, 0.3);
  /* Spine shadow on left */
  background-image:
    linear-gradient(to right, rgba(0, 0, 0, 0.5) 0%, rgba(0, 0, 0, 0.2) 2%, transparent 5%),
    linear-gradient(to left, rgba(30, 30, 50, 0.3) 0%, transparent 3%);
}

/* Page stack effect — pages behind (right side like unread pages) */
.book-page::before,
.book-page::after {
  content: '';
  position: absolute;
  width: 100%;
  height: 100%;
  background: #0b0b10;
  border: 1px solid #2a2a3e;
  border-radius: 2px;
  z-index: -1;
}

.book-page::before {
  top: 4px;
  right: -5px;
  left: auto;
  box-shadow: 2px 2px 6px rgba(0, 0, 0, 0.5);
}

.book-page::after {
  top: 8px;
  right: -10px;
  left: auto;
  box-shadow: 2px 2px 5px rgba(0, 0, 0, 0.4);
}

/* Torn edges — top and bottom using clip-path */
.book-page-inner {
  clip-path: polygon(
    0% 1.5%, 3% 0%, 5% 1.2%, 8% 0.3%, 11% 1.8%, 14% 0%, 17% 1%, 20% 0.2%, 24% 1.5%, 27% 0%, 30% 1.3%, 34% 0.4%, 37% 1.6%, 40% 0%, 44% 1.2%, 47% 0.3%, 50% 1.4%, 53% 0%, 57% 1.1%, 60% 0.5%, 63% 1.7%, 67% 0%, 70% 1.3%, 73% 0.2%, 77% 1.5%, 80% 0%, 83% 1.2%, 87% 0.4%, 90% 1.6%, 93% 0%, 96% 1%, 100% 0.3%,
    100% 98.5%, 97% 100%, 94% 98.8%, 91% 99.7%, 88% 98.2%, 85% 100%, 82% 99%, 79% 99.8%, 76% 98.5%, 73% 100%, 70% 98.7%, 67% 99.6%, 63% 98.4%, 60% 100%, 57% 98.8%, 53% 99.7%, 50% 98.6%, 47% 100%, 44% 98.9%, 40% 99.5%, 37% 98.3%, 34% 100%, 30% 98.7%, 27% 99.8%, 24% 98.5%, 20% 100%, 17% 98.8%, 14% 99.6%, 11% 98.2%, 8% 100%, 5% 98.8%, 3% 100%, 0% 98.5%
  );
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 2.5rem 2.5rem 2.5rem 3rem;
  overflow: hidden;
}

.book-content {
  font-family: 'Courier New', monospace;
  font-size: 0.88rem;
  line-height: 2;
  color: #b0b0b8;
  text-align: left;
  overflow-y: auto;
  flex: 1;
}

.book-content p {
  margin-bottom: 1.2rem;
  text-indent: 1.2rem;
}

.book-content p:first-child {
  text-indent: 0;
}

.book-content .book-chapter-title {
  text-align: center;
  text-indent: 0;
  font-size: 0.75rem;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 2rem;
}

.book-content .book-final-line {
  color: var(--accent);
  font-style: italic;
  text-indent: 0;
  margin-top: 1.5rem;
}

.book-footer {
  text-align: center;
  padding-top: 1rem;
  border-top: 1px solid #1a1a2e;
  margin-top: 1.5rem;
}

.book-page-num {
  font-size: 0.7rem;
  letter-spacing: 2px;
  color: var(--text-dim);
}

.book-nav {
  display: flex;
  gap: 1rem;
}

.book-next-chapter {
  text-align: center;
  margin-top: 1rem;
}

.book-next-chapter p {
  font-size: 0.8rem;
  letter-spacing: 2px;
  color: var(--text-dim);
  font-style: italic;
}

.book-nav-btn {
  font-size: 0.75rem;
  padding: 0.5rem 1.5rem;
  letter-spacing: 1px;
}

.book-nav-btn:disabled {
  opacity: 0.3;
  cursor: default;
}

.book-nav-btn:disabled:hover {
  background: transparent;
  box-shadow: none;
}

/* Page turn animation */
.book-page.turning {
  animation: pageTurn 0.3s ease;
}

@keyframes pageTurn {
  0% { opacity: 1; }
  50% { opacity: 0.7; }
  100% { opacity: 1; }
}

/* === About === */
.about-content {
  max-width: 500px;
  text-align: center;
  line-height: 2;
}

.about-content p {
  margin-bottom: 0.5rem;
}

.about-footer {
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
}

.about-footer p {
  font-size: 0.75rem;
  color: var(--text-dim);
  letter-spacing: 1px;
  margin-bottom: 0.3rem;
}

.flicker {
  animation: flicker 5s infinite;
}

@keyframes flicker {
  0%, 95%, 100% { opacity: 1; }
  96% { opacity: 0.2; }
  97% { opacity: 0.8; }
  98% { opacity: 0.1; }
  99% { opacity: 0.7; }
}

/* === Login Form === */
.login-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  width: 100%;
  max-width: 320px;
}

.input-group input {
  width: 100%;
  padding: 0.8rem 1rem;
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: 2px;
  color: var(--text);
  font-family: inherit;
  font-size: 0.9rem;
  transition: border-color 0.3s ease;
}

.password-group {
  position: relative;
}

.password-group input {
  padding-right: 2.5rem;
}

.password-toggle {
  position: absolute;
  right: 0.7rem;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-dim);
  display: flex;
  align-items: center;
  padding: 0.3rem;
  transition: color 0.3s ease;
}

.password-toggle:hover {
  color: var(--text);
}

.password-toggle .hidden {
  display: none;
}

.input-group input:focus {
  outline: none;
  border-color: var(--accent);
}

.input-group input::placeholder {
  color: var(--text-dim);
}

.btn {
  padding: 0.8rem;
  background: transparent;
  border: 1px solid var(--accent);
  color: var(--text);
  font-family: inherit;
  font-size: 0.85rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.3s ease;
}

.btn:hover {
  background: var(--accent);
  box-shadow: 0 0 15px rgba(139, 0, 0, 0.4);
}

.form-footer {
  text-align: center;
  font-size: 0.8rem;
  color: var(--text-dim);
  margin-top: 0.5rem;
}

.form-footer a {
  color: var(--text);
  text-decoration: none;
  border-bottom: 1px solid var(--border);
  transition: border-color 0.3s ease;
}

.form-footer a:hover {
  border-color: var(--accent);
}

/* === Animations === */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

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

@keyframes pulse {
  0%, 100% { opacity: 0.4; transform: scaleX(1); }
  50% { opacity: 1; transform: scaleX(1.2); }
}

/* === Profile === */
.profile-page {
  width: 100%;
  max-width: 700px;
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.profile-row {
  display: flex;
  gap: 2rem;
}

.profile-col-left {
  flex: 0 0 200px;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.profile-mood-box {
  text-align: center;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.profile-mood-box .profile-status {
  font-size: 0.85rem;
  margin-bottom: 0;
}

.profile-col-right {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.profile-bottom {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

@media (max-width: 600px) {
  .profile-row {
    flex-direction: column;
  }

  .profile-col-left {
    flex: none;
  }
}

.profile-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
  padding: 2rem;
  border: 1px solid var(--border);
  background: var(--bg-subtle);
  border-radius: 2px;
}

.profile-avatar {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-dim);
  overflow: hidden;
}

.avatar-placeholder {
  opacity: 0.6;
}

.profile-info {
  text-align: center;
}

.profile-name {
  font-size: 1.1rem;
  color: var(--text);
  letter-spacing: 1px;
  margin-bottom: 0.5rem;
}

.profile-meta {
  font-size: 0.8rem;
  color: var(--text-dim);
  letter-spacing: 1px;
  margin-bottom: 0.3rem;
}

.profile-section {
  padding: 1.5rem;
  border: 1px solid var(--border);
  background: var(--bg-subtle);
  border-radius: 2px;
}

.profile-section-title {
  font-size: 0.75rem;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 1rem;
}

.profile-detail {
  font-size: 0.85rem;
  color: var(--text);
  margin-bottom: 0.5rem;
}

.profile-status {
  font-size: 0.9rem;
  color: var(--accent);
  font-style: italic;
  margin-bottom: 0.8rem;
}

.profile-messages {
  margin-top: 0.8rem;
  padding-top: 0.8rem;
  border-top: 1px solid var(--border);
}

.profile-settings {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.profile-email-setting {
  margin-bottom: 0.8rem;
}

.profile-setting-label {
  font-size: 0.75rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 0.5rem;
  display: block;
}

.profile-email-row {
  display: flex;
  gap: 0.5rem;
}

.profile-email-input {
  flex: 1;
  padding: 0.6rem 0.8rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 2px;
  color: var(--text);
  font-family: inherit;
  font-size: 0.85rem;
}

.profile-email-input:focus {
  outline: none;
  border-color: var(--accent);
}

.profile-email-input::placeholder {
  color: var(--text-dim);
}

.profile-email-note {
  font-size: 0.7rem;
  color: var(--text-dim);
  margin-top: 0.5rem;
  font-style: italic;
}

.profile-settings-btn {
  font-size: 0.8rem;
  padding: 0.6rem 1rem;
  text-align: left;
}

.profile-danger-btn {
  border-color: var(--accent);
  color: var(--accent);
}

.profile-danger-btn:hover {
  background: var(--accent);
  color: var(--text);
}

/* === Recovery Key === */
.recovery-card {
  max-width: 400px;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  align-items: center;
}

.recovery-warning {
  font-size: 0.85rem;
  color: var(--accent);
  line-height: 1.6;
}

.recovery-key-box {
  font-family: 'Courier New', monospace;
  font-size: 1.1rem;
  letter-spacing: 2px;
  padding: 1rem 1.5rem;
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: 2px;
  color: #fff;
  user-select: all;
}

.recovery-actions {
  display: flex;
  gap: 0.8rem;
}

.recovery-continue-btn {
  margin-top: 1rem;
}

/* === Admin === */
.admin-page {
  width: 100%;
  max-width: 600px;
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.admin-section {
  padding: 1.5rem;
  border: 1px solid var(--border);
  background: var(--bg-subtle);
  border-radius: 2px;
}

.admin-moods {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin: 1rem 0;
}

.admin-active-mood {
  font-size: 0.85rem;
  color: var(--text);
  margin: 0.8rem 0;
  padding: 0.6rem 1rem;
  background: var(--bg);
  border-left: 2px solid var(--accent);
}

.admin-active-mood span {
  color: var(--accent);
  font-style: italic;
}

.admin-mood-input {
  width: 100%;
  padding: 0.6rem 0.8rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 2px;
  color: var(--text);
  font-family: inherit;
  font-size: 0.85rem;
}

.admin-mood-input:focus {
  outline: none;
  border-color: var(--accent);
}

.admin-override {
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

/* Mood edit modal */
.mood-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 200;
}

.mood-modal.hidden {
  display: none;
}

.mood-modal-content {
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: 2px;
  padding: 2rem;
  width: 90%;
  max-width: 350px;
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.mood-modal-textarea {
  min-height: 80px;
  resize: vertical;
  font-family: inherit;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 2px;
  color: var(--text);
  padding: 0.6rem 0.8rem;
  font-size: 0.85rem;
}

.mood-modal-textarea:focus {
  outline: none;
  border-color: var(--accent);
}

.mood-modal-actions {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

/* === Guest Login === */
.guest-divider {
  color: var(--text-dim);
  font-size: 0.8rem;
  letter-spacing: 2px;
  margin: 1.5rem 0;
  text-align: center;
}

.guest-btn {
  width: 100%;
  max-width: 320px;
}

.guest-name-prompt {
  margin-top: 1rem;
  display: none;
  flex-direction: column;
  gap: 0.8rem;
  width: 100%;
  max-width: 320px;
}

.guest-name-prompt.visible {
  display: flex;
}

/* === Scrollbar === */
::-webkit-scrollbar {
  width: 6px;
}

::-webkit-scrollbar-track {
  background: var(--bg);
}

::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 3px;
}
