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

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  line-height: 1.6;
  background: var(--primary-bg);
  color: var(--text-primary);
  overflow-x: hidden;
  transition: background-color 0.6s ease, color 0.4s ease;
}

/* -------- VARIABLES (Dark / Light) -------- */
:root {
  --primary-bg: #0e0e0e; /* Xbox dark dashboard look */
  --secondary-bg: #1c1c1c;
  --accent-bg: #242424;

  --text-primary: #ffffff;
  --text-secondary: #a0a0a0;
  --text-accent: #76b900; /* Official Xbox green */

  --border-color: #2a2a2a;

  --glass-bg: rgba(30, 30, 30, 0.8);
  --glass-border: rgba(255, 255, 255, 0.08);

  --button-bg: #107c10; /* Xbox button green */
  --button-hover: #0e700e; /* Slightly darker green hover */

  --shadow-color: rgba(0, 0, 0, 0.5);

  /* Gradients (Fluent + Xbox green glow) */
  --gradient-primary: linear-gradient(135deg, #76b900 0%, #107c10 100%);
  --gradient-secondary: linear-gradient(135deg, #7ed957 0%, #0b4f0b 100%);
}

body.light-mode {
  --primary-bg: #f4f4f4;
  --secondary-bg: #ffffff;
  --accent-bg: #eaeaea;

  --text-primary: #111111;
  --text-secondary: #444444;
  --text-accent: #107c10;

  --glass-bg: rgba(255, 255, 255, 0.85);
  --glass-border: rgba(0, 0, 0, 0.08);

  --button-bg: #107c10;
  --button-hover: #0b5e0b;

  --shadow-color: rgba(0, 0, 0, 0.1);

  --gradient-primary: linear-gradient(135deg, #76b900 0%, #4caf50 100%);
  --gradient-secondary: linear-gradient(135deg, #a5d6a7 0%, #81c784 100%);
}

/* -------- BACKGROUND LAYERS -------- */
.background-layers {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
}
.mica-layer {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(
      circle at 20% 20%,
      rgba(118, 185, 0, 0.18) 0%,
      /* Xbox green */ transparent 50%
    ),
    radial-gradient(
      circle at 80% 80%,
      rgba(16, 124, 16, 0.15) 0%,
      /* darker Xbox green */ transparent 50%
    ),
    radial-gradient(
      circle at 40% 60%,
      rgba(7, 94, 7, 0.1) 0%,
      /* subtle emerald tint */ transparent 55%
    );
  animation: floatAnim 25s ease-in-out infinite;
}
@keyframes floatAnim {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-20px);
  }
}
.gradient-overlay {
  width: 100%;
  height: 100%;
  background: linear-gradient(
    135deg,
    transparent 0%,
    rgba(102, 126, 234, 0.05) 50%,
    transparent 100%
  );
  position: absolute;
}

/* -------- HEADER -------- */
header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 2rem;
  background: var(--glass-bg);
  border-bottom: 1px solid var(--glass-border);
  backdrop-filter: blur(20px);
  position: sticky;
  top: 0;
  z-index: 99;
  box-shadow: 0 2px 12px var(--shadow-color);
}
.logo-container {
  display: flex;
  align-items: center;
  gap: 1rem;
}
.logo-container img {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  box-shadow: 0 2px 10px var(--shadow-color);
}
.logo-container h1 {
  font-size: 1.6rem;
  font-weight: 600;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
#theme-toggle {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  padding: 0.6rem;
  border-radius: 10px;
  cursor: pointer;
  font-size: 1.2rem;
  transition: all 0.3s ease;
}
#theme-toggle:hover {
  transform: translateY(-2px);
  box-shadow: 0 2px 10px var(--shadow-color);
}

/* -------- MAIN -------- */
main {
  max-width: 1000px;
  margin: 0 auto;
  padding: 2rem;
}

/* Hero section */
.hero-section {
  text-align: center;
  padding: 2.5rem 1rem;
  margin-bottom: 2rem;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  backdrop-filter: blur(20px);
  box-shadow: 0 6px 20px var(--shadow-color);
}
.hero-content h2 {
  font-size: 2rem;
  margin-bottom: 0.8rem;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.hero-content p {
  color: var(--text-secondary);
  font-size: 1.05rem;
  max-width: 700px;
  margin: 0.5rem auto;
}

.disclaimer {
  font-style: italic;
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-top: 0.8rem;
}

.disclaimer a {
  color: var(--text-accent);
  text-decoration: underline;
}

.disclaimer a:hover {
  color: var(--button-hover);
}

/* Generic section box */
.section-box {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  backdrop-filter: blur(20px);
  padding: 2rem;
  box-shadow: 0 6px 20px var(--shadow-color);
  margin-bottom: 2rem;
}
.section-box h2 {
  margin-bottom: 1rem;
  font-size: 1.5rem;
  color: var(--text-primary);
}

/* -------- FILTER BAR -------- */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-top: 1rem;
  margin-bottom: 1rem;
}

.filter-bar input,
.filter-bar button {
  padding: 0.6rem 0.8rem;
  border-radius: 8px;
  border: 1px solid var(--glass-border);
  background: var(--glass-bg);
  color: var(--text-primary);
  font-family: inherit;
  font-size: 1rem;
}

.filter-bar input:focus {
  outline: 2px solid var(--text-accent);
}

.filter-bar button {
  background: var(--button-bg);
  color: #fff;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, transform 0.2s;
}

.filter-bar button:hover {
  background: var(--button-hover);
  transform: translateY(-2px);
}

/* -------- RELEASES LIST -------- */
.releases-list {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  margin-top: 1.5rem;
}
.release-card {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 14px;
  padding: 1rem;
  box-shadow: 0 4px 16px var(--shadow-color);
  transition: transform 0.25s, box-shadow 0.25s;
}
.release-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 6px 20px var(--shadow-color);
}
.release-title {
  font-size: 1.15rem;
  font-weight: 600;
  margin-bottom: 0.3rem;
}
.release-title a {
  color: var(--text);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s;
}

.release-title a:hover {
  color: var(--button-hover);
  text-decoration: underline;
}
.release-changes {
  font-size: 0.95rem;
  color: var(--text-secondary);
  margin-bottom: 0.8rem;
  white-space: pre-wrap; /* preserves line breaks if changes have them */
}
.release-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.8rem;
}

.release-tag {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-accent);
}

.release-tag a {
  color: var(--text-accent);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s;
}

.release-tag a:hover {
  color: var(--button-hover);
  text-decoration: underline;
}

.release-tag code {
  background: var(--accent-bg);
  padding: 0.15rem 0.3rem;
  border-radius: 6px;
  font-family: monospace;
  font-size: 0.9rem;
  color: var(--text-primary);
}

.release-date {
  font-size: 0.9rem;
  color: var(--text-secondary);
}
.download-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.download-links a {
  flex: 1;
  text-align: center;
  padding: 0.6rem;
  background: var(--button-bg);
  border-radius: 8px;
  color: white;
  text-decoration: none;
  font-weight: 600;
  transition: background 0.2s, transform 0.2s;
}
.download-links a:hover {
  background: var(--button-hover);
  transform: translateY(-2px);
}

/* -------- FOOTER -------- */
footer {
  background: var(--glass-bg);
  border-top: 1px solid var(--glass-border);
  padding: 1rem;
  text-align: center;
  backdrop-filter: blur(20px);
  border-radius: 16px 16px 0 0;
  margin-top: 2rem;
}

/* -------- RESPONSIVE -------- */
@media (max-width: 768px) {
  header {
    padding: 0.8rem 1.2rem;
  }
  .logo-container h1 {
    font-size: 1.3rem;
  }
  main {
    padding: 1rem;
  }
  .release-title {
    font-size: 1rem;
  }
}
