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

body {
  min-height: 100vh;
  background: linear-gradient(135deg, #ffc1cc, #ffd6e0, #ffe8f0);
  font-family: 'Segoe UI', sans-serif;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 20px;
  overflow-x: hidden;
  position: relative;
  text-align: center;
  color: #6a1b4d;
}

#heartCanvas {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 0;
  pointer-events: none;
}

.container {
  background: rgba(255, 255, 255, 0.92);
  padding: 2em;
  border-radius: 20px;
  box-shadow: 0 8px 20px rgba(0,0,0,0.15);
  max-width: 500px;
  width: 100%;
  z-index: 1;
  animation: fadeIn 1.5s ease;
  margin: 20px auto;
  position: relative;
}

.rehmah-photo {
  width: 130px;
  height: 130px;
  object-fit: cover;
  border-radius: 50%;
  border: 4px solid #ff99c8;
  box-shadow: 0 0 15px rgba(255, 153, 200, 0.6);
  margin-bottom: 15px;
}

h1 { font-size: 1.8em; margin-bottom: 0.4em; }
h2 { font-size: 1.3em; margin-bottom: 0.5em; color: #c94f7c; }
h3 { font-size: 1.1em; color: #c94f7c; margin-bottom: 0.5em; }

.compliment {
  font-size: 1.2em;
  font-style: italic;
  color: #b8005c;
  margin: 0.8em 0;
}

.note { font-size: 0.9em; color: #92546d; }

/* ── Portal nav ─────────────────────────────────── */
.portal-nav {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin: 20px 0;
}

.nav-card {
  background: #fff0f5;
  border: 1px solid #ffb6c1;
  border-radius: 12px;
  padding: 12px 6px;
  text-decoration: none;
  color: #6a1b4d;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  font-size: 0.8em;
  transition: background 0.2s, transform 0.1s;
}

.nav-card:hover { background: #ffd6e0; transform: translateY(-2px); }
.nav-card.done { background: #d4f5d4; border-color: #7ec87e; color: #2d6a2d; }
.nav-card .nav-icon { font-size: 1.5em; }
.nav-card small { font-size: 0.8em; color: #7ec87e; }

/* ── Streak ─────────────────────────────────────── */
.streak-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: #fff0f5;
  border-radius: 12px;
  padding: 10px 15px;
  margin-bottom: 15px;
  font-size: 0.95em;
}

.streak-mascot { width: 32px; height: 32px; object-fit: contain; }

/* ── Alert banner ───────────────────────────────── */
.alert-banner {
  background: #ffe4f0;
  border: 1px solid #ff99c8;
  border-radius: 12px;
  padding: 10px 15px;
  margin-bottom: 15px;
  font-size: 0.9em;
}
.alert-banner a { color: #c94f7c; font-weight: bold; }

/* ── Buttons ────────────────────────────────────── */
.btn-primary {
  background: #ff99c8;
  color: white;
  border: none;
  padding: 10px 20px;
  font-size: 1em;
  border-radius: 10px;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
}
.btn-primary:hover { background: #ff6aa3; }

.btn-secondary {
  background: transparent;
  color: #c94f7c;
  border: 1px solid #ffb6c1;
  padding: 10px 20px;
  font-size: 1em;
  border-radius: 10px;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
}
.btn-secondary:hover { background: #fff0f5; }

/* ── Back link ──────────────────────────────────── */
.back-link {
  display: inline-block;
  color: #c94f7c;
  text-decoration: none;
  font-size: 0.9em;
  margin-bottom: 15px;
}

.logout-link {
  display: block;
  margin-top: 15px;
  color: #b0708a;
  font-size: 0.8em;
  text-decoration: none;
}

/* ── Request box ────────────────────────────────── */
.request-box {
  background: #fff0f5;
  padding: 20px;
  margin: 20px 0;
  border-radius: 15px;
  text-align: left;
  box-shadow: 0 0 10px rgba(255, 153, 200, 0.2);
}
.request-box h2 { color: #c94f7c; margin-bottom: 10px; }
.request-box textarea {
  width: 100%;
  padding: 10px;
  border-radius: 10px;
  border: 1px solid #ffb6c1;
  resize: vertical;
  font-size: 0.95em;
  margin-bottom: 10px;
}
.request-box button {
  background: #ff99c8;
  color: white;
  border: none;
  padding: 10px 15px;
  font-size: 0.95em;
  border-radius: 10px;
  cursor: pointer;
}
.request-box button:hover { background: #ff6aa3; }

/* ── Section box ────────────────────────────────── */
.section-box {
  background: #fff0f5;
  border-radius: 15px;
  padding: 20px;
  margin: 20px 0;
  text-align: left;
  box-shadow: 0 0 8px rgba(255,153,200,0.15);
}

/* ── Log list ───────────────────────────────────── */
.log-list {
  list-style: none;
  text-align: left;
}
.log-list li {
  padding: 10px 0;
  border-bottom: 1px solid #ffd6e0;
  font-size: 0.95em;
  position: relative;
}
.log-list li:last-child { border-bottom: none; }

/* ── Rating form ────────────────────────────────── */
.fnaf-rating {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
  margin: 15px 0;
}
.fnaf-char {
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
  font-size: 0.75em;
  gap: 4px;
}
.fnaf-char input { display: none; }
.fnaf-char img { width: 55px; height: 55px; object-fit: contain; border-radius: 8px; border: 2px solid transparent; transition: border 0.2s; }
.fnaf-char input:checked + img { border-color: #ff99c8; box-shadow: 0 0 8px #ff99c8; }
.already-rated {
  background: #e8f5e9;
  border: 1px solid #a5d6a7;
  border-radius: 12px;
  padding: 15px;
  margin-bottom: 20px;
  color: #2e7d32;
}

/* ── Mood grid ──────────────────────────────────── */
.mood-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin: 15px 0;
}
.mood-option {
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
  padding: 10px;
  border-radius: 12px;
  border: 2px solid transparent;
  background: #fff0f5;
  transition: all 0.2s;
  font-size: 0.8em;
  gap: 4px;
}
.mood-option span { font-size: 2em; }
.mood-option input { display: none; }
.mood-option:has(input:checked) { border-color: #ff99c8; background: #ffd6e0; }

/* ── Habit list ─────────────────────────────────── */
.habit-list { list-style: none; }
.habit-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border-radius: 12px;
  margin-bottom: 8px;
  background: #fff0f5;
  border: 1px solid #ffb6c1;
}
.habit-done { opacity: 0.6; text-decoration: line-through; }
.habit-check {
  background: none;
  border: none;
  font-size: 1.4em;
  cursor: pointer;
  padding: 0;
}
.habit-check:disabled { cursor: default; }

/* ── Checklist ──────────────────────────────────── */
.checklist { list-style: none; }
.checklist li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid #ffd6e0;
}
.checklist .task-done span { text-decoration: line-through; opacity: 0.6; }
.check-btn { background: none; border: none; font-size: 1.2em; cursor: pointer; }

/* ── Table ──────────────────────────────────────── */
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85em;
  margin-top: 10px;
}
.data-table th, .data-table td {
  padding: 8px 10px;
  text-align: left;
  border-bottom: 1px solid #ffd6e0;
}
.data-table th { color: #c94f7c; font-weight: 600; }

/* ── RSVP badges ────────────────────────────────── */
.rsvp-badge {
  padding: 2px 8px;
  border-radius: 8px;
  font-size: 0.8em;
}
.rsvp-confirmed { background: #d4edda; color: #155724; }
.rsvp-declined  { background: #f8d7da; color: #721c24; }
.rsvp-pending   { background: #fff3cd; color: #856404; }

/* ── Countdown ──────────────────────────────────── */
.countdown-box {
  background: linear-gradient(135deg, #ff99c8, #ffb6c1);
  color: white;
  border-radius: 15px;
  padding: 20px;
  margin-bottom: 20px;
  text-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

/* ── Bucket list ────────────────────────────────── */
.bucket-list { list-style: none; }
.bucket-list li {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 0;
  border-bottom: 1px solid #ffd6e0;
  font-size: 0.95em;
}
.bucket-list .task-done span { text-decoration: line-through; opacity: 0.6; }

/* ── Letter list ────────────────────────────────── */
.letter-list { list-style: none; }
.letter-list li {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border-radius: 12px;
  margin-bottom: 8px;
  background: #fff0f5;
  border: 1px solid #ffb6c1;
}
.letter-list a {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: inherit;
  width: 100%;
}
.letter-list a:hover { opacity: 0.8; }
.letter-icon { font-size: 1.8em; }
.letter-unread { border-color: #ff6aa3; background: #ffe4f0; }
.locked-letters li { opacity: 0.6; }
.new-badge {
  background: #ff6aa3;
  color: white;
  font-size: 0.7em;
  padding: 2px 6px;
  border-radius: 6px;
  margin-left: 6px;
}

/* ── Random memory ──────────────────────────────── */
.random-memory {
  background: linear-gradient(135deg, #fff0f5, #ffd6e0);
  border-radius: 15px;
  padding: 15px 20px;
  margin-bottom: 20px;
  text-align: left;
}
.random-memory blockquote {
  font-style: italic;
  color: #6a1b4d;
  font-size: 1.05em;
  margin-top: 5px;
  border-left: 3px solid #ff99c8;
  padding-left: 12px;
}

/* ── Delete & export ────────────────────────────── */
.delete-btn {
  background: none;
  border: none;
  color: #ccc;
  cursor: pointer;
  font-size: 0.85em;
  margin-left: auto;
  padding: 2px 5px;
}
.delete-btn:hover { color: #e53935; }

.export-link {
  display: inline-block;
  margin-top: 10px;
  color: #c94f7c;
  font-size: 0.85em;
  text-decoration: none;
}
.export-link:hover { text-decoration: underline; }

/* ── Screamer ───────────────────────────────────── */
#screamer {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.5);
  width: 200px;
  z-index: 9999;
  transition: transform 0.3s ease, opacity 0.3s ease;
  opacity: 0;
  pointer-events: none;
}
#screamer.active {
  transform: translate(-50%, -50%) scale(20);
  opacity: 1;
}

/* ── Theme toggle ───────────────────────────────── */
#themeToggle {
  position: fixed;
  top: 15px;
  right: 15px;
  background: rgba(255,255,255,0.8);
  border: 1px solid #ffb6c1;
  font-size: 1.3em;
  cursor: pointer;
  z-index: 10000;
  border-radius: 50%;
  width: 42px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ── Animations ─────────────────────────────────── */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(15px); }
  to   { opacity: 1; transform: translateY(0); }
}
.fade-in { animation: fadeIn 1.5s ease-in-out; }

@keyframes shake {
  0%   { transform: translate(1px, 1px); }
  25%  { transform: translate(-2px, -1px); }
  50%  { transform: translate(2px, 2px); }
  75%  { transform: translate(-1px, 2px); }
  100% { transform: translate(0, 0); }
}
body.shake { animation: shake 0.3s; }

/* ═══════════════════════════════════════════════════
   FNAF NIGHT SHIFT THEME
   ═══════════════════════════════════════════════════ */
.fnaf-theme {
  background: linear-gradient(135deg, #0a0010, #050008, #0d0020);
  color: #c8a0e0;
}

.fnaf-theme .container {
  background: rgba(10, 0, 20, 0.92);
  color: #c8a0e0;
  border: 1px solid #3a0060;
  box-shadow: 0 0 30px rgba(100, 0, 200, 0.3), 0 0 60px rgba(100, 0, 200, 0.1);
}

.fnaf-theme h1, .fnaf-theme h2, .fnaf-theme h3 { color: #e090ff; }
.fnaf-theme .compliment { color: #cc66ff; }
.fnaf-theme .note { color: #9060b0; }

.fnaf-theme .portal-nav .nav-card {
  background: rgba(30, 0, 50, 0.8);
  border-color: #5a0090;
  color: #c8a0e0;
}
.fnaf-theme .portal-nav .nav-card:hover {
  background: rgba(80, 0, 150, 0.6);
  box-shadow: 0 0 10px rgba(150, 0, 255, 0.4);
}
.fnaf-theme .portal-nav .nav-card.done {
  background: rgba(0, 40, 0, 0.8);
  border-color: #3a8a3a;
  color: #90ee90;
}

.fnaf-theme .streak-bar {
  background: rgba(30, 0, 50, 0.8);
  border: 1px solid #5a0090;
  color: #c8a0e0;
}

.fnaf-theme .alert-banner {
  background: rgba(50, 0, 80, 0.8);
  border-color: #8a00cc;
  color: #dda0ff;
}
.fnaf-theme .alert-banner a { color: #cc66ff; }

.fnaf-theme .request-box,
.fnaf-theme .section-box {
  background: rgba(15, 0, 30, 0.9);
  border: 1px solid #5a0090;
}

.fnaf-theme .request-box textarea,
.fnaf-theme input[type="text"],
.fnaf-theme input[type="date"],
.fnaf-theme input[type="number"],
.fnaf-theme input[type="password"],
.fnaf-theme textarea,
.fnaf-theme select {
  background: rgba(20, 0, 40, 0.9) !important;
  color: #c8a0e0 !important;
  border-color: #5a0090 !important;
}

.fnaf-theme .btn-primary { background: #6600bb; }
.fnaf-theme .btn-primary:hover { background: #8800ee; box-shadow: 0 0 10px #8800ee; }
.fnaf-theme .btn-secondary { color: #cc66ff; border-color: #5a0090; }

.fnaf-theme .log-list li,
.fnaf-theme .checklist li,
.fnaf-theme .bucket-list li { border-color: #3a0060; }

.fnaf-theme .data-table th { color: #cc66ff; }
.fnaf-theme .data-table th,
.fnaf-theme .data-table td { border-color: #3a0060; }

.fnaf-theme .nav-card small { color: #90ee90; }

.fnaf-theme .letter-list li {
  background: rgba(20, 0, 40, 0.9);
  border-color: #5a0090;
}
.fnaf-theme .letter-unread { border-color: #9900ff; background: rgba(50, 0, 80, 0.9); }

.fnaf-theme .mood-option { background: rgba(20, 0, 40, 0.8); border-color: #3a0060; }
.fnaf-theme .mood-option:has(input:checked) { border-color: #9900ff; background: rgba(60, 0, 100, 0.8); }

.fnaf-theme .habit-item { background: rgba(20, 0, 40, 0.8); border-color: #5a0090; }
.fnaf-theme .countdown-box { background: linear-gradient(135deg, #3a0060, #6600bb); }

.fnaf-theme .random-memory { background: rgba(30, 0, 50, 0.8); }
.fnaf-theme .random-memory blockquote { border-color: #8800ee; color: #c8a0e0; }

.fnaf-theme #themeToggle {
  background: rgba(10, 0, 20, 0.9);
  border-color: #5a0090;
  color: #c8a0e0;
}

.fnaf-theme .back-link,
.fnaf-theme .logout-link,
.fnaf-theme .export-link { color: #cc66ff; }

.fnaf-theme .rehmah-photo { border-color: #8800ee; box-shadow: 0 0 15px rgba(136, 0, 238, 0.6); }
