/* styles.css — shared theme for every page.
   Dark (Letterboxd) is the default. Adding the class "light-theme" to <html>
   (handled by theme.js) switches to the original light look. */

/* Load both fonts — dark theme uses Inter, light theme uses Poppins */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;600;700;800&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;600&display=swap');

/* ===== Theme variables ===== */
:root {                       /* DARK — Letterboxd (default) */
  --font: "Inter", "Helvetica Neue", Arial, sans-serif;
  --bg: #14181c;
  --text: #99aabb;
  --heading: #ffffff;
  --link: #00e054;
  --link-hover: #40bcf4;
  --card-bg: #2c3440;
  --card-border: #455667;
  --btn-bg: #2c3440;
  --btn-text: #ffffff;
  --btn-border: #455667;
  --nav-link: #99aabb;
  --nav-hover: #00e054;
  --bg-overlay: rgba(20, 24, 28, 0.74);
}
.light-theme {                /* LIGHT — the original look */
  --font: "Poppins", sans-serif;
  --bg: #ffffff;
  --text: #333333;
  --heading: #222222;
  --link: #1565c0;
  --link-hover: #0d47a1;
  --card-bg: #ffffff;
  --card-border: #dddddd;
  --btn-bg: #ffffff;
  --btn-text: #000000;
  --btn-border: #000000;
  --nav-link: #333333;
  --nav-hover: #000000;
  --bg-overlay: rgba(255, 255, 255, 0.85);
}

html { background-color: var(--bg); }

body {
  font-family: var(--font);
  text-align: center;
  background-color: transparent;
  color: var(--text);
  margin: 0;
  padding: 24px 16px 60px;
}

/* Faded movie-poster wall background (the grid + posters are injected by theme.js) */
#poster-bg {
  position: fixed;
  inset: 0;
  z-index: -2;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  overflow: hidden;
}
#poster-bg img { width: 100%; display: block; }
#poster-bg-overlay {
  position: fixed;
  inset: 0;
  z-index: -1;
  background-color: var(--bg-overlay);
}

/* Soft colorful glows background — every page EXCEPT the movie arcade
   (which gets the poster wall instead). Injected by theme.js. */
#glow-bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(circle at 15% 25%, rgba(255, 128, 0, 0.30), transparent 45%),
    radial-gradient(circle at 85% 20%, rgba(0, 224, 84, 0.24), transparent 45%),
    radial-gradient(circle at 50% 100%, rgba(64, 188, 244, 0.26), transparent 50%);
}
.light-theme #glow-bg {
  background:
    radial-gradient(circle at 15% 25%, rgba(255, 128, 0, 0.34), transparent 45%),
    radial-gradient(circle at 85% 20%, rgba(0, 224, 84, 0.30), transparent 45%),
    radial-gradient(circle at 50% 100%, rgba(64, 188, 244, 0.32), transparent 50%);
}

h1, h2, h3 { color: var(--heading); }

a { color: var(--link); text-decoration: none; }
a:hover { color: var(--link-hover); }

button {
  border-radius: 4px;
  cursor: pointer;
}

div { margin-bottom: 15px; }

/* Navigation bar */
nav { margin-bottom: 30px; }
nav a {
  margin: 0 10px;
  text-decoration: none;
  font-weight: 600;
  color: var(--nav-link);
  text-transform: uppercase;
  font-size: 0.85rem;
  letter-spacing: 0.04em;
}
nav a:hover { color: var(--nav-hover); }

/* Projects page: a responsive grid of cards */
.project-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px;
}
.card {
  border: 1px solid var(--card-border);
  background-color: var(--card-bg);
  border-radius: 6px;
  padding: 20px;
  max-width: 300px;
  text-align: left;
  color: var(--text);
}

/* Home page: intro + about */
.intro { font-size: 1.25rem; color: var(--text); }
.about {
  max-width: 600px;
  margin: 30px auto;
  text-align: left;
}
.about p { line-height: 1.6; }

/* Home page: bottom navigation buttons */
.home-nav {
  display: flex;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
  margin-top: 60px;
}
.home-nav a {
  font-size: 1.4rem;
  font-weight: 700;
  padding: 12px 28px;
  background-color: var(--btn-bg);
  color: var(--btn-text);
  border: 1px solid var(--btn-border);
  border-radius: 6px;
  text-decoration: none;
}
.home-nav a:hover {
  background-color: var(--link);
  color: var(--bg);
}

/* Button style matching the home buttons (About page) */
.white-btn {
  font-size: 1.1rem;
  font-weight: 700;
  padding: 10px 22px;
  background-color: var(--btn-bg);
  color: var(--btn-text);
  border: 1px solid var(--btn-border);
  border-radius: 6px;
  cursor: pointer;
}

/* Make the fun fact stand out when it appears */
#fact-display { font-weight: bold; color: var(--heading); }

/* ===== Settings button + panel (home page) ===== */
#settings-btn {
  position: fixed;
  top: 16px;
  right: 16px;
  z-index: 1000;
  background-color: var(--card-bg);
  color: var(--text);
  border: 1px solid var(--card-border);
  border-radius: 6px;
  padding: 8px 12px;
  font-size: 1.1rem;
}
#settings-panel {
  position: fixed;
  top: 58px;
  right: 16px;
  z-index: 1000;
  background-color: var(--card-bg);
  color: var(--text);
  border: 1px solid var(--card-border);
  border-radius: 8px;
  padding: 16px 18px;
  text-align: left;
  min-width: 200px;
}
#settings-panel h3 { margin: 0 0 10px; }
#settings-panel button {
  background-color: var(--btn-bg);
  color: var(--btn-text);
  border: 1px solid var(--btn-border);
  border-radius: 6px;
  padding: 8px 14px;
  cursor: pointer;
  font-weight: 600;
}

/* Red circular click counter — a flat-topped 3D "arcade button" look */
.red-circle {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  background-color: #ff5252;
  color: white;
  border: none;
  font-size: 2.5rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  box-shadow: 0 14px 0 #c0392b, 0 26px 24px rgba(0, 0, 0, 0.45);
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}
.red-circle:active {
  transform: translateY(10px);
  box-shadow: 0 4px 0 #c0392b, 0 10px 14px rgba(0, 0, 0, 0.45);
}
