/* ===========================
   Shared Page Styles
   Common styles used across content pages
   (weloveduane, dance, movie, spook, settings)
   =========================== */

body {
  font-family: "Comic Sans MS", "Comic Sans", cursive;
  margin: 0;
  padding: 0;
}

/* Utility: center-aligned container */
.text-center {
  text-align: center;
}

/* ===========================
   Dark page background
   (Used on weloveduane, settings, etc.)
   =========================== */

.page-dark {
  background: linear-gradient(160deg, #0a1628, #112240, #0d3b4e, #0a1628);
  background-size: 400% 400%;
  animation: page-dark-shift 12s ease infinite;
  min-height: 100vh;
  color: white;
}

@keyframes page-dark-shift {
  0%   { background-position: 0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* ===========================
   Settings Page Styles
   =========================== */

.settings-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 20px;
  box-sizing: border-box;
}

.settings-card {
  background: rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  padding: 40px 50px;
  max-width: 420px;
  width: 100%;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.settings-card h1 {
  margin: 0 0 8px 0;
  font-size: 1.8em;
  background: linear-gradient(90deg, #7b68ee, #00bcd4);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.settings-card .settings-subtitle {
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.85em;
  margin: 0 0 30px 0;
}

.settings-card hr {
  border: none;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  margin: 0 0 24px 0;
}

/* Toggle switch */
.toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 30px;
}

.toggle-label {
  color: rgba(255, 255, 255, 0.85);
  font-size: 1em;
}

.toggle-switch {
  position: relative;
  width: 52px;
  height: 28px;
  flex-shrink: 0;
}

.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 28px;
  transition: background 0.3s ease;
}

.toggle-slider::before {
  content: "";
  position: absolute;
  height: 22px;
  width: 22px;
  left: 3px;
  bottom: 3px;
  background: white;
  border-radius: 50%;
  transition: transform 0.3s ease;
}

.toggle-switch input:checked + .toggle-slider {
  background: linear-gradient(135deg, #7b68ee, #ff6ec7);
}

.toggle-switch input:checked + .toggle-slider::before {
  transform: translateX(24px);
}

/* Save button */
.settings-save-btn {
  width: 100%;
  padding: 14px;
  font-family: "Comic Sans MS", "Comic Sans", cursive;
  font-size: 1.1em;
  font-weight: bold;
  color: white;
  background: linear-gradient(135deg, #7b68ee, #00bcd4);
  border: none;
  border-radius: 12px;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
  box-shadow: 0 4px 16px rgba(123, 104, 238, 0.3);
}

.settings-save-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(123, 104, 238, 0.5);
}

.settings-save-btn:active {
  transform: translateY(0);
  opacity: 0.9;
}

/* Toast notification */
.toast {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%) translateY(80px);
  background: rgba(123, 104, 238, 0.9);
  backdrop-filter: blur(8px);
  color: white;
  padding: 14px 28px;
  border-radius: 12px;
  font-family: "Comic Sans MS", "Comic Sans", cursive;
  font-size: 0.95em;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  opacity: 0;
  transition: transform 0.4s ease, opacity 0.4s ease;
  z-index: 999;
  pointer-events: none;
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ===========================
   Movie Page Styles
   =========================== */

.movie-body {
  background: linear-gradient(180deg, #0a0a0a, #1a1a2e);
  min-height: 100vh;
  text-align: center;
  padding: 20px;
  box-sizing: border-box;
}

.movie-title {
  color: white;
  font-size: 2em;
  margin: 20px 0;
  text-shadow: 0 0 20px rgba(123, 104, 238, 0.5);
}

.movie-player {
  max-width: 900px;
  margin: 0 auto;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.6);
}

.movie-player video {
  display: block;
  width: 100%;
  height: auto;
}

.hidden-link {
  color: #0a0a0a;
  text-decoration: none;
  font-size: 0.8em;
}

/* ===========================
   Light Mode Overrides (content pages)
   =========================== */

body.page-dark.light-mode {
  background: linear-gradient(160deg, #e8eaf6, #f3e5f5, #e0f7fa, #e8eaf6);
  background-size: 400% 400%;
  animation: page-dark-shift 12s ease infinite;
  color: #222;
}

body.light-mode .settings-card {
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(123, 104, 238, 0.15);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
}

body.light-mode .settings-card h1 {
  /* gradient text still works on light bg */
}

body.light-mode .settings-card .settings-subtitle {
  color: rgba(0, 0, 0, 0.5);
}

body.light-mode .settings-card hr {
  border-top: 1px solid rgba(0, 0, 0, 0.08);
}

body.light-mode .toggle-label { color: #333; }

body.light-mode .toggle-slider {
  background: rgba(0, 0, 0, 0.12);
}

body.light-mode .toggle-slider::before {
  background: white;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
}

body.light-mode .settings-save-btn {
  box-shadow: 0 4px 16px rgba(123, 104, 238, 0.2);
}

body.light-mode .toast {
  background: rgba(123, 104, 238, 0.95);
}

/* Movie page light mode */
body.movie-body.light-mode {
  background: linear-gradient(180deg, #f5f5f5, #e8eaf6);
}

body.light-mode .movie-title {
  color: #222;
  text-shadow: none;
}

body.light-mode .movie-player {
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
}

body.light-mode .hidden-link { color: #f5f5f5; }

/* ===========================
   Mobile Responsive
   =========================== */

@media (max-width: 600px) {
  /* Settings card */
  .settings-card {
    padding: 24px 20px;
    border-radius: 14px;
  }
  .settings-card h1 { font-size: 1.4em; }
  .toggle-row { gap: 12px; }
  .toggle-label { font-size: 0.9em; }

  /* Movie page */
  .movie-title { font-size: 1.4em; }
  .movie-body { padding: 12px; }
  .movie-player { border-radius: 8px; }
}
