/* =====================================================
   GLOBAL RESET & VARIABLES
   ===================================================== */

/* # CSS Variables (Theme Colors & Sizes)
   Change these to restyle the whole site */
:root {
  --bg-main: #0f172a;              /* Main background */
  --bg-card: rgba(255, 255, 255, 0.08);
  --bg-glass: rgba(255, 255, 255, 0.12);

  --text-main: #e5e7eb;            /* Primary text */
  --text-muted: #9ca3af;           /* Secondary text */

  --accent: #38bdf8;               /* Accent color */
  --danger: #ef4444;               /* Error / danger */
  --success: #22c55e;              /* Success */

  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;

  --shadow-soft: 0 10px 25px rgba(0,0,0,0.25);
}

[data-theme="light"] {
  --bg-main: #f8fafc;
  --bg-card: #ffffff;
  --bg-glass: rgba(255, 255, 255, 0.75);
  --text-main: #0f172a;
  --text-muted: #475569;
  --accent: #2563eb;
  --danger: #ef4444;
  --success: #16a34a;
}

[data-theme="neutral"] {
  --bg-main: #0b1324;
  --bg-card: #111827;
  --bg-glass: rgba(255,255,255,0.06);
  --text-main: #e5e7eb;
  --text-muted: #9ca3af;
  --accent: #a855f7;
  --danger: #f43f5e;
  --success: #10b981;
}

/* # Reset default browser styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* =====================================================
   BASE ELEMENT STYLES
   ===================================================== */

body {
  background: var(--bg-main);
  color: var(--text-main);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.6;
  transition: background 0.3s ease, color 0.3s ease;
}

img {
  max-width: 100%;
  display: block;
}

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

a:hover {
  text-decoration: underline;
}

/* =====================================================
   TYPOGRAPHY
   ===================================================== */

h1 {
  font-size: clamp(2.5rem, 5vw, 4rem);
}

h2 {
  font-size: 2rem;
}

h3 {
  font-size: 1.3rem;
}

p {
  color: var(--text-muted);
  margin-top: 8px;
}

/* =====================================================
   LAYOUT HELPERS
   ===================================================== */

/* # Section container */
.section {
  max-width: 1100px;
  margin: auto;
  padding: 80px 20px;
}

/* # Flex utilities */
.flex {
  display: flex;
  gap: 20px;
}

.center {
  justify-content: center;
  align-items: center;
}

/* # Grid utilities */
.grid {
  display: grid;
  gap: 20px;
}

.grid-auto {
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

/* =====================================================
   HERO / BACKGROUND SECTION
   ===================================================== */

.hero {
  min-height: 100vh;
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.hero-overlay {
  background: rgba(0,0,0,0.6);
  padding: 60px;
  border-radius: var(--radius-lg);
}

/* =====================================================
   IMAGE + TEXT (WIKIPEDIA STYLE)
   ===================================================== */

.image-text {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 30px;
  align-items: start;
}

.image-text img {
  border-radius: var(--radius-md);
}

/* =====================================================
   CARDS
   ===================================================== */

.card {
  background: var(--bg-card);
  padding: 24px;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-soft);
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.3s ease, color 0.3s ease;
}

/* # Glass / blurry card */
.card.glass {
  background: var(--bg-glass);
  backdrop-filter: blur(10px);
}

/* =====================================================
   BUTTONS
   ===================================================== */

.btn {
  display: inline-block;
  margin-top: 12px;
  padding: 12px 20px;
  border-radius: 999px;
  background: var(--accent);
  color: #000;
  font-weight: 600;
  transition: transform 0.15s ease, opacity 0.15s ease;
}

.btn:hover {
  transform: translateY(-2px);
  opacity: 0.9;
  text-decoration: none;
}

/* =====================================================
   STATUS COLORS
   ===================================================== */

.text-danger {
  color: var(--danger);
}

.text-success {
  color: var(--success);
}

.text-muted {
  color: var(--text-muted);
}

/* # Message list (backend demo) */
.message-list {
  list-style: none;
  padding: 0;
  margin-top: 12px;
}

.message-list li {
  padding: 12px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.message-list li:last-child {
  border-bottom: none;
}

.message-list p {
  margin: 6px 0 0;
}

.message-meta {
  color: var(--text-muted);
  font-size: 12px;
}

/* =====================================================
   FOOTER
   ===================================================== */

footer {
  padding: 40px;
  text-align: center;
  font-size: 14px;
  color: var(--text-muted);
}

/* =====================================================
   RESPONSIVE DESIGN
   ===================================================== */

@media (max-width: 768px) {
  .image-text {
    grid-template-columns: 1fr;
  }

  .hero-overlay {
    padding: 40px 20px;
  }
}

/* =====================================================
   LEGEND (WHAT MEANS WHAT)
   ===================================================== */

/*
LEGEND:

:root
  → Global theme variables (colors, radius, shadows)

.section
  → Standard page container with max width

.flex / .center
  → Flexbox helpers for alignment

.grid / .grid-auto
  → Responsive grid layouts

.hero
  → Full-screen background image section

.hero-overlay
  → Dark overlay for readable text

.image-text
  → Side-by-side image + text layout (Wikipedia style)

.card
  → Standard content card

.card.glass
  → Blurred glassmorphism card

.btn
  → Button-style link

.text-danger / .text-success
  → Color-coded status text

@media
  → Mobile responsiveness rules
*/
