/* NewUI 5 CSS File (open source */

/* Uses a font stack that feels Windows */
:root {
  --primary-gradient:
    radial-gradient(1000px 700px at 20% 15%, rgba(120, 210, 255, 0.55) 0%, rgba(120, 210, 255, 0.10) 55%, transparent 70%),
    radial-gradient(900px 650px at 85% 5%, rgba(110, 255, 235, 0.35) 0%, rgba(110, 255, 235, 0.08) 55%, transparent 70%),
    linear-gradient(180deg, #0b2a4a 0%, #061a2f 55%, #041324 100%);

  --navbar-height: 64px;
  --footer-height: 50px;
  --section-padding: 2.5rem 1.5rem;
  --infobox-width: 320px;

  /* Aero glass */
  --glass-bg: rgba(255, 255, 255, 0.14);
  --glass-border: rgba(255, 255, 255, 0.28);
  --glass-border-strong: rgba(255, 255, 255, 0.42);
  --glass-inner-highlight: rgba(255, 255, 255, 0.22);

  /* Surfaces */
  --card-bg: rgba(255, 255, 255, 0.12);
  --card-hover-bg: rgba(255, 255, 255, 0.18);

  /* Text */
  --text-light: rgba(245, 252, 255, 0.92);
  --text-dark: #0a1420;

  /* Aero accents */
  --accent: #40c8ff;
  --accent-2: #2ef0d0;

  /* Controls */
  --button-bg: rgba(70, 200, 255, 0.28);
  --button-hover-bg: rgba(70, 200, 255, 0.42);
  --link-color: rgba(140, 230, 255, 0.95);

  /* Shadows/glows */
  --shadow-soft: 0 10px 34px rgba(0, 0, 0, 0.28);
  --shadow-panel: 0 18px 60px rgba(0, 0, 0, 0.35);
  --glow: 0 0 0 1px rgba(64, 200, 255, 0.20), 0 0 24px rgba(64, 200, 255, 0.24);
  --glow-strong: 0 0 0 1px rgba(64, 200, 255, 0.35), 0 0 36px rgba(64, 200, 255, 0.42);

  --radius-lg: 18px;
  --radius-md: 15px;
  --radius-sm: 10px;
}

/* Dark mode stuff */
body.dark-mode {
  --glass-bg: rgba(10, 18, 30, 0.30);
  --glass-border: rgba(255, 255, 255, 0.16);
  --glass-border-strong: rgba(255, 255, 255, 0.22);
  --glass-inner-highlight: rgba(255, 255, 255, 0.10);

  --card-bg: rgba(10, 18, 30, 0.26);
  --card-hover-bg: rgba(10, 18, 30, 0.34);

  --text-light: rgba(235, 249, 255, 0.92);
  --link-color: rgba(120, 225, 255, 0.95);

  --button-bg: rgba(64, 200, 255, 0.22);
  --button-hover-bg: rgba(64, 200, 255, 0.34);
}

body {
  min-height: 100vh;
  font-family: "Segoe UI", "Segoe UI Variable", Tahoma, Arial, sans-serif;
  color: var(--text-light);
  background: var(--primary-gradient);
  transition: background 0.4s ease, color 0.3s ease;
}

/* Aero glass utility: bevel + inner highlight + blur */
.glass {
  background: linear-gradient(
      180deg,
      rgba(255,255,255,0.20) 0%,
      rgba(255,255,255,0.12) 35%,
      rgba(255,255,255,0.08) 100%
    );
  background-color: var(--glass-bg);
  border-radius: var(--radius-lg);
  border: 1px solid var(--glass-border);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(18px) saturate(1.35);
  -webkit-backdrop-filter: blur(18px) saturate(1.35);
  position: relative;
  overflow: hidden;
}

/* Inner bevel highlight */
.glass::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  box-shadow:
    inset 0 1px 0 var(--glass-inner-highlight),
    inset 0 0 0 1px rgba(255,255,255,0.06);
}

/* Optional: subtle noise/shine sweep */
.glass::after {
  content: "";
  position: absolute;
  inset: -40% -40% auto -40%;
  height: 120%;
  transform: rotate(-12deg);
  pointer-events: none;
  opacity: 0.10;
  background: radial-gradient(circle at 30% 30%, rgba(255,255,255,0.55), transparent 60%);
}

/* Navbar: Aero titlebar-ish */
nav.navbar {
  height: var(--navbar-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.5rem;
  position: sticky;
  top: 0;
  z-index: 1000;

  background: rgba(255,255,255,0.12);
  border-bottom: 1px solid rgba(255,255,255,0.22);
  box-shadow: 0 10px 30px rgba(0,0,0,0.28);
  backdrop-filter: blur(18px) saturate(1.35);
  -webkit-backdrop-filter: blur(18px) saturate(1.35);
}

nav.navbar .nav-links {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

nav.navbar a {
  color: rgba(240, 252, 255, 0.92);
  text-decoration: none;
  font-weight: 600;
  padding: 0.45em 0.8em;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.10);
  background: rgba(255,255,255,0.06);
  transition: transform 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}

nav.navbar a:hover {
  transform: translateY(-1px);
  background: rgba(64, 200, 255, 0.18);
  box-shadow: var(--glow);
}

/* Aero button (mode toggle + generic buttons) */
nav.navbar .mode-toggle,
.button, button {
  color: rgba(245, 252, 255, 0.96);
  font-weight: 700;
  border: 1px solid rgba(255,255,255,0.22);
  border-radius: 10px;
  padding: 0.7em 1.2em;
  cursor: pointer;

  background:
    linear-gradient(180deg, rgba(255,255,255,0.28) 0%, rgba(255,255,255,0.10) 45%, rgba(255,255,255,0.06) 100%),
    radial-gradient(120% 120% at 20% 10%, rgba(64,200,255,0.22), transparent 60%),
    rgba(70, 200, 255, 0.16);

  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.24),
    inset 0 -1px 0 rgba(0,0,0,0.22),
    0 10px 26px rgba(0,0,0,0.26);

  transition: transform 0.16s ease, box-shadow 0.16s ease, filter 0.16s ease;
}

nav.navbar .mode-toggle:hover,
.button:hover, button:hover {
  transform: translateY(-1px);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.30),
    inset 0 -1px 0 rgba(0,0,0,0.24),
    0 14px 34px rgba(0,0,0,0.30),
    var(--glow-strong);
  filter: brightness(1.04);
}

nav.navbar .mode-toggle:active,
.button:active, button:active {
  transform: translateY(0px);
  box-shadow:
    inset 0 2px 10px rgba(0,0,0,0.22),
    0 8px 18px rgba(0,0,0,0.22);
}

/* Sections/layout (keep your existing structure) */
section {
  padding: var(--section-padding);
  margin: 1rem auto;
  max-width: 900px;
  width: 100%;
  box-sizing: border-box;
}

.main-flex {
  display: flex;
  gap: 2rem;
  align-items: flex-start;
  max-width: 1100px;
  width: 100%;
  margin: 2rem auto 0 auto;
  box-sizing: border-box;
}

.main-flex section { flex: 2 1 0; min-width: 0; }

.main-flex .infobox {
  flex: 1 1 var(--infobox-width);
  min-width: 250px;
  max-width: 380px;
  margin-top: 0;
  position: static;
}

@media (max-width: 1000px) {
  .main-flex { flex-direction: column; gap: 1.5rem; max-width: 98vw; }
  .main-flex .infobox { max-width: 100%; width: 100%; }
}

/* Infobox: a slightly stronger panel */
.glass.infobox {
  border: 1px solid var(--glass-border-strong);
  box-shadow: var(--shadow-panel);
}

/* Cards: Aero “tiles” */
.cards {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
  justify-content: center;
}

.card {
  background: var(--card-bg);
  border-radius: var(--radius-md);
  border: 1px solid rgba(255,255,255,0.18);
  box-shadow: var(--shadow-soft);
  padding: 1.25rem;
  min-width: 230px;
  max-width: 340px;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: transform 0.20s ease, box-shadow 0.20s ease, background 0.20s ease;
}

/* Card glossy top highlight */
.card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 42%;
  background: linear-gradient(180deg, rgba(255,255,255,0.20), transparent);
  pointer-events: none;
}

.card:hover {
  transform: translateY(-8px) scale(1.02);
  background: var(--card-hover-bg);
  box-shadow: var(--shadow-panel), var(--glow);
}

/* Links */
a {
  color: var(--link-color);
  text-decoration: none;
  font-weight: 600;
}
a:hover {
  text-decoration: underline;
  filter: brightness(1.05);
}

/* Text carousel: keep but more aero */
.text-carousel {
  display: flex;
  align-items: center;
  gap: 1.2rem;
  border-radius: var(--radius-lg);
  padding: 1.1rem 1.4rem;

  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.18);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(18px) saturate(1.35);
  -webkit-backdrop-filter: blur(18px) saturate(1.35);
}

.text-carousel .carousel-content {
  flex: 1;
  font-size: 1.05em;
  color: var(--text-light);
}

.text-carousel .carousel-button {
  border-radius: 10px;
}

/* Tables: glass + subtle zebra */
table {
  width: 100%;
  margin: 2rem 0;
  border-collapse: separate;
  border-spacing: 0;
  background: rgba(255,255,255,0.12);
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.18);
  box-shadow: var(--shadow-soft);
  color: var(--text-light);
}

th, td {
  padding: 0.95em 1.1em;
  border-bottom: 1px solid rgba(255,255,255,0.14);
  text-align: left;
}

th {
  background: rgba(64,200,255,0.16);
  color: rgba(245,252,255,0.96);
  font-weight: 800;
}

tr:nth-child(even) td {
  background: rgba(255,255,255,0.04);
}

tr:hover td {
  background: rgba(64,200,255,0.10);
}

/* Dropdowns */
.dropdown { position: relative; display: inline-block; }

.dropdown-menu {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  min-width: 190px;
  background: rgba(255,255,255,0.14);
  border: 1px solid rgba(255,255,255,0.20);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-panel);
  backdrop-filter: blur(18px) saturate(1.35);
  -webkit-backdrop-filter: blur(18px) saturate(1.35);
  padding: 0.5rem 0;
  display: none;
  z-index: 999;
}

.dropdown-menu a {
  display: block;
  padding: 0.65em 1em;
  color: rgba(245,252,255,0.92);
  text-decoration: none;
  transition: background 0.18s ease, box-shadow 0.18s ease;
}

.dropdown-menu a:hover {
  background: rgba(64,200,255,0.18);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.14);
}

.dropdown:hover .dropdown-menu { display: block; }

/* Code blocks */
.code-block {
  background: rgba(0,0,0,0.20);
  border: 1px solid rgba(255,255,255,0.14);
  border-radius: var(--radius-md);
  padding: 1em;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Courier New", monospace;
  overflow-x: auto;
  color: rgba(245,252,255,0.92);
}

/* Footer */
footer.footer {
  height: var(--footer-height);
  display: flex;
  align-items: center;
  justify-content: center;

  background: rgba(255,255,255,0.10);
  border-top: 1px solid rgba(255,255,255,0.18);
  color: rgba(235,249,255,0.78);
  margin-top: 3rem;

  backdrop-filter: blur(18px) saturate(1.35);
  -webkit-backdrop-filter: blur(18px) saturate(1.35);
}

/* Mobile tweaks */
@media (max-width: 600px) {
  nav.navbar {
    flex-direction: column;
    height: auto;
    padding: 1rem;
    gap: 0.75rem;
  }
  nav.navbar .nav-links { gap: 0.75rem; }
  section { padding: 1.2rem 0.75rem; max-width: 100vw; }
  .cards { flex-direction: column; gap: 1.1rem; }
}
