/* ============================================
   ELE and I — Shared Base Styles
   Used by all pages (except trial.html and effects-test.html)
   ============================================ */

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

/* Core Variables — Warm Sand Palette */
:root {
  /* Brand colors (unchanged) */
  --ele-color: #ff6b6b;
  --user-color: #4a9eff;
  
  /* Backgrounds (light warm tones) */
  --bg: #f5f0e8;
  --bg-deep: #efe9df;
  --bg-card: #ebe5db;
  --bg-elevated: #fff;
  --bg-overlay: rgba(245, 240, 232, 0.95);
  --bg-overlay-heavy: rgba(235, 229, 219, 0.98);
  
  /* Borders */
  --border: #d5cfc5;
  --border-light: #e5dfd5;
  --border-dark: #c5bfb5;
  
  /* Text (dark warm tones) */
  --text: #2a2520;
  --text-secondary: #4a4540;
  --text-muted: #7a756b;
  --text-dim: #9a958b;
  --text-faint: #b5b0a5;
  
  /* Accent colors */
  --yellow-glow: #ffeb3b;
  --green-success: #7dce82;
  --light-blue: #7dd3fc;
  
  /* Inputs */
  --input-bg: #fff;
  --input-border: #d5cfc5;
  --input-focus: var(--user-color);
  
  /* Buttons */
  --btn-primary-bg: var(--user-color);
  --btn-primary-text: #fff;
}

/* Base Body */
body {
  background: var(--bg);
  font-family: monospace;
  color: var(--text);
}

/* ---- Navigation ---- */
nav {
  line-height: 1;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: var(--bg-overlay);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(10px);
}

.nav-inner {
  max-width: 1000px;
  margin: 0 auto;
  padding: 12px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text);
}

.nav-dots {
  display: flex;
  gap: 6px;
}

.nav-dot {
  width: 10px;
  height: 10px;
  border-radius: 2px;
}

.nav-dot.ele { background: var(--ele-color); }
.nav-dot.user { background: var(--user-color); }

.nav-title {
  font-size: 12px;
  letter-spacing: 2px;
  color: var(--text-muted);
}

.nav-links {
  display: flex;
  gap: 25px;
  align-items: center;
}

.nav-link {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 12px;
  transition: color 0.2s;
}

.nav-link:hover { color: var(--text); }
.nav-link.active { color: var(--user-color); }

.nav-separator {
  color: var(--text-dim);
  font-size: 14px;
}

.nav-menu-btn {
  display: none;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 20px;
  cursor: pointer;
}

@media (max-width: 900px) {
  .nav-links { display: none; }
  .nav-links.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    padding: 15px 20px;
    gap: 15px;
  }
  .nav-menu-btn { display: block; }
  .nav-separator { display: none; }
}

/* ---- Site Footer ---- */
.site-footer {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
  gap: 20px;
  padding: 12px 20px;
  padding-bottom: max(12px, env(safe-area-inset-bottom));
  background: transparent;
  z-index: 50;
}

.site-footer a {
  color: var(--text-dim);
  text-decoration: none;
  font-size: 10px;
  opacity: 0.6;
  transition: opacity 0.2s;
}

.site-footer a:hover {
  opacity: 1;
}

/* ---- Rotate Device Overlay (blocks landscape on mobile phones) ---- */
.rotate-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--bg);
  z-index: 9999;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 30px;
  padding: 40px;
  text-align: center;
}

.rotate-overlay.visible {
  display: flex;
}

.rotate-icon {
  font-size: 48px;
  animation: rotate-hint 2s ease-in-out infinite;
}

@keyframes rotate-hint {
  0%, 100% { transform: rotate(0deg); }
  25% { transform: rotate(-15deg); }
  75% { transform: rotate(15deg); }
}

.rotate-message {
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1.8;
  max-width: 280px;
}

.rotate-message strong {
  color: var(--text);
  display: block;
  font-size: 16px;
  margin-bottom: 10px;
}

/* ---- Prompt Header (for Commons, Responses pages) ---- */
.prompt-header {
  background: var(--ele-color);
  color: #fff;
  padding: 20px 25px;
  border-radius: 8px;
  margin-bottom: 20px;
  text-align: center;
}

.prompt-header-text {
  font-family: 'Georgia', serif;
  font-size: 16px;
  line-height: 1.5;
  font-style: italic;
}

.prompt-header-date {
  font-family: monospace;
  font-size: 11px;
  margin-top: 10px;
  opacity: 0.85;
}

/* Day separator for grouped views */
.day-separator {
  margin-top: 40px;
}

.day-separator:first-child {
  margin-top: 0;
}

/* Sort toggle button */
.sort-toggle {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-muted);
  padding: 6px 14px;
  font-family: monospace;
  font-size: 10px;
  cursor: pointer;
  transition: all 0.2s;
  margin-left: 10px;
}

.sort-toggle:hover {
  border-color: var(--text-muted);
}

.sort-toggle.active {
  border-color: var(--ele-color);
  color: var(--ele-color);
}

/* Navigation buttons (for share page) */
.nav-buttons {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 25px;
}

.nav-btn {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-muted);
  padding: 10px 18px;
  font-family: monospace;
  font-size: 11px;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
  display: inline-block;
}

.nav-btn:hover {
  border-color: var(--text-muted);
  color: var(--text);
}

.nav-btn.primary {
  border-color: var(--user-color);
  color: var(--user-color);
}

.nav-btn.primary:hover {
  background: var(--user-color);
  color: #fff;
}

/* ---- Keepsake Card "..." indicator ---- */
.keepsake-more {
  color: var(--ele-color);
  font-size: 14px;
  font-weight: bold;
  margin-top: 6px;
  letter-spacing: 2px;
}
