/*
  PacMac-inspired dark starry theme for Prophecy Watch

  This stylesheet brings the minimalist, high‑contrast look and animated
  starfield vibe of the PacMac Mobile site to the Prophecy Watch app.
  It defines a dark colour palette, simple layouts and a fixed canvas
  behind the content for the star animation. Use this file alongside
  the existing Prophecy Watch markup; no HTML changes are needed
  beyond adding a canvas with id="starry-background" or "stars".

  Author: ChatGPT
  Date: 2025-08-11
*/

/* CSS custom properties define the colour scheme. Adjust these to tweak
   the look without touching the rest of the styles. */
:root {
  /* primary surfaces */
  --bg: #000;            /* page background: pure black */
  --card: #111;          /* containers (cards, inputs): near black */

  /* text colours */
  --text: #f1f1f1;       /* high‑contrast body text */
  --muted: #7a7a7a;      /* muted/secondary text */

  /* accent colours */
  --accent: #5296ff;     /* a cool blue accent reminiscent of a night sky */
  --neon: #80caff;       /* lighter neon blue for hover/focus states */
  --danger: #ff6363;     /* error/danger states */
}

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

html, body {
  height: 100%;
}

body {
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Ubuntu,
    Cantarell, "Helvetica Neue", Arial, "Noto Sans", "Apple Color Emoji",
    "Segoe UI Emoji";
  background-color: var(--bg);
  color: var(--text);
  overflow-x: hidden;
  position: relative;
  line-height: 1.5;
}

/* Starfield canvas fills the viewport behind all content.  The
   accompanying JavaScript should draw moving stars on this canvas. */
#starry-background,
#stars {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: -1;
  pointer-events: none; /* allow clicking through to underlying content */
}

/* Header styling: flexible, spaced layout with subtle border and blur */
.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem clamp(1rem, 4vw, 2rem);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  background-color: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(8px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.logo {
  font-size: 2rem;
  color: var(--accent);
  filter: drop-shadow(0 0 5px var(--neon));
}

.tagline {
  color: var(--muted);
  font-size: 0.875rem;
}

/* Inputs, selects and buttons share a consistent look */
.input,
.select,
.button {
  background: var(--card);
  color: var(--text);
  border: 1px solid rgba(255, 255, 255, 0.15);
  padding: 0.65rem 0.8rem;
  border-radius: 0.75rem;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.input::placeholder {
  color: var(--muted);
}

.button {
  cursor: pointer;
  box-shadow: inset 0 0 6px rgba(82, 150, 255, 0.2);
}

.button:hover,
.button:focus {
  border-color: var(--neon);
  box-shadow: inset 0 0 10px rgba(128, 202, 255, 0.4);
}

/* Grid layout for cards or articles */
.grid {
  padding: 1.5rem clamp(1rem, 4vw, 2rem);
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1rem;
}

/* Card container: perspective for 3D flipping */
.card {
  perspective: 1000px;
  position: relative;
  border-radius: 0.75rem;
  box-shadow: 0 0 8px rgba(0, 0, 0, 0.6);
}

/* Inner wrapper that actually rotates. It preserves 3D children
   so front and back faces stay separate. */
.card-inner {
  position: relative;
  width: 100%;
  height: 100%;
  transition: transform 0.6s;
  transform-style: preserve-3d;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: var(--card);
  border-radius: inherit;
  padding: 1rem;
}

/* When the card has the .flipped class, rotate the inner
   wrapper to show the backside. */
.card.flipped .card-inner {
  transform: rotateY(180deg);
}

/* Front and back faces share layout properties. They occupy
   the full size of their parent and hide the rear side. */
.card-front,
.card-back {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border-radius: inherit;
}

/* Front face stays unrotated. It holds the primary info. */
.card-front {
  z-index: 2;
}

/* Back face is rotated 180deg so it becomes visible when the
   parent card-inner rotates. */
.card-back {
  transform: rotateY(180deg);
  z-index: 1;
}

.card h3 {
  margin-bottom: 0.4rem;
  font-size: 1.1rem;
  color: var(--text);
}

.card .meta {
  color: var(--muted);
  font-size: 0.85rem;
  margin-bottom: 0.5rem;
}

.badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 0.6rem;
}

.badge {
  font-size: 0.75rem;
  padding: 0.25rem 0.5rem;
  border-radius: 0.6rem;
  border: 1px solid rgba(82, 150, 255, 0.4);
  color: #cce0ff;
  background: rgba(82, 150, 255, 0.1);
}

/* Scripture section styling */
.scripture {
  border-top: 1px dashed rgba(255, 255, 255, 0.15);
  margin-top: 0.6rem;
  padding-top: 0.6rem;
  font-size: 0.9rem;
}

.scripture .ref {
  color: var(--accent);
  font-weight: 600;
  margin-bottom: 0.25rem;
}

/* Footer styling */
.site-footer {
  color: var(--muted);
  text-align: center;
  padding: 2rem;
  font-size: 0.85rem;
}

/* Responsive adjustments */
@media (max-width: 600px) {
  .site-header {
    flex-direction: column;
    align-items: flex-start;
  }
  .controls {
    flex-wrap: wrap;
  }
  .grid {
    grid-template-columns: 1fr;
  }
}