@import url('https://fonts.googleapis.com/css2?family=Varela+Round&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Fira+Sans&family=IBM+Plex+Sans&family=Inter&family=JetBrains+Mono&family=Noto+Sans&family=Recursive&family=Red+Hat+Display&family=LXGW+WenKai&display=swap');

:root {
  --bg: #0a0a13;
  --text: #f0f0f0;
  --accent: #ff67d1;
  --hover: #1a1c2c;
  --font-pixel: 'Varela Round', cursive;
}

/* THEME CLASSES WITH FONTS */
body.theme-debian-dark, body.theme-debian-light {
  --font-main: 'Fira Sans'; /* Modern, stable, designed by Mozilla */
}

body.theme-arch-dark, body.theme-arch-light {
  --font-main: 'JetBrains Mono'; /* Clean, technical, hacker vibe */
}

body.theme-fedora-dark, body.theme-fedora-light {
  --font-main: 'Red Hat Display'; /* Official Fedora/Red Hat branding */
}

body.theme-suse-dark, body.theme-suse-light {
  --font-main: 'LXGW WenKai'; /* OpenSUSE has strong Asian adoption; elegant and legible */
}

body.theme-slackware-dark, body.theme-slackware-light {
  --font-main: 'IBM Plex Sans'; /* Retro-modern for the oldest distro */
}

body.theme-bsd-dark, body.theme-bsd-light {
  --font-main: 'Noto Sans'; /* Highly legible, broad Unicode coverage */
}

body.theme-other-dark, body.theme-other-light {
  --font-main: 'Recursive'; /* Quirky, flexible, good for alt distros */
}

body.theme-all-dark, body.theme-all-light {
  --font-main: 'Inter'; /* Neutral, highly readable */
}

/* THEME MAP — apply body.theme-{name}-{light|dark} */
body.theme-debian-dark {
  --bg: #410110;
  --text: #ffffff;
  --accent: #c8102e;
  --hover: #7a0e2b;
  --credits: #ffffff
}
body.theme-debian-light {
  --bg: #fcfcfc;
  --text: #3a0c17;
  --accent: #000000;
  --hover: #7a0e2b;
  --credits: #ffffff
}

body.theme-arch-dark {
  --bg: #0e1a20;
  --text: #e0f7ff;
  --accent: #08c;
  --hover: #08c;
  --credits: #ffffff
}
body.theme-arch-light {
  --bg: #eaf7fc;
  --text: #0f1f27;
  --accent: #08c;
  --hover: #08c;
  --credits: #ffffff
}

body.theme-fedora-dark {
  --bg: #00254d;
  --text: #d0e6ff;
  --accent: #3c6eb4;
  --hover: #rgb(81 162 218);
  --credits: #ffffff
}
body.theme-fedora-light {
  --bg: #e7f0fa;
  --text: #0c1e3a;
  --accent: #3c6eb4;
  --hover: #a3c0e5;
  --credits: #ffffff
}

body.theme-suse-dark {
  --bg: #102c10;
  --text: #dbffe3;
  --accent: #69b40f;
  --hover: #4a8b0a;
  --credits: #ffffff
}
body.theme-suse-light {
  --bg: #effae1;
  --text: #1a321b;
  --accent: #69b40f;
  --hover: #a8d56a;
  --credits: #ffffff
}

body.theme-gentoo-dark {
  --bg: #1b1b3a;
  --text: #e0e0ff;
  --accent: #6c63ff;
  --hover: #5047e0;
  --credits: #ffffff
}
body.theme-gentoo-light {
  --bg: #f5f5ff;
  --text: #2b2b4c;
  --accent: #6c63ff;
  --hover: #cbc8ff;
  --credits: #ffffff
}

body.theme-slackware-dark {
  --bg: #1c1c1c;
  --text: #f8f8f2;
  --accent: #007c92;
  --hover: #0095a8;
  --credits: #ffffff;
}

body.theme-slackware-light {
  --bg: #f9f9f9;
  --text: #2e2e2e;
  --accent: #ffcc00;
  --hover: #ffe600;
  --credits: #000000;
}


body.theme-bsd-dark {
  --bg: #2b0f14;
  --text: #ffeeee;
  --accent: #ff3b30;
  --hover: #e32d25;
  --credits: #ffffff
}
body.theme-bsd-light {
  --bg: #fff5f5;
  --text: #4c0a0a;
  --accent: #ff3b30;
  --hover: #ffb0aa;
  --credits: #ffffff
}

body.theme-other-dark {
  --bg: #1c1c1c;
  --text: #eeeeee;
  --accent: #ffaa00;
  --hover: #cc8800;
  --credits: #ffffff
}
body.theme-other-light {
  --bg: #fef9ec;
  --text: #332b00;
  --accent: #ffaa00;
  --hover: #ffe0a3;
  --credits: #ffffff
}

body.theme-all-dark {
  --bg: #0a0a13;
  --text: #f0f0f0;
  --accent: #ffffff;
  --hover: #4fb722;
  --credits: #ffffff
}
body.theme-all-light {
  --bg: #f8f0fa;
  --text: #3f2c3d;
  --accent: #000000;
  --hover: #69b40f;
  --credits: #ffffff
}

/* Universal styles using CSS variables */
* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-main);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  transition: background 0.4s ease, color 0.4s ease;
}

header {
  padding: 2rem 1rem 1rem;
  text-align: center;
  position: relative;
}

header h1 {
  font-family: var(--font-pixel);
  font-size: 4.5rem;
  color: var(--accent);
  /*text-shadow: 0 0 6px var(--accent);*/
}

header p {
  font-size: 2rem;
  color: var(--text);
  margin-top: 0.5rem;
}

#dmbutton {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: none;
  border: none;
  cursor: pointer;
}

#dmimg {
  width: 32px;
  height: 32px;
}

main {
  flex: 1;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.action {
  text-align: center;
}

#random-button {
  font-family: var(--font-pixel);
  font-size: 1.5em;
  padding: 1rem 2rem;
  background: var(--accent);
  border: none;
  border-radius: 15px;
  color: white;
  cursor: pointer;
  /*box-shadow: 0 0 10px var(--accent);*/
  transition: transform 0.2s;
}

#random-button:hover {
  transform: scale(1.05);
}

.families, .eol {
  text-align: center;
}

.family-buttons, .eol-buttons {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
  padding: 1rem 0;
}

.family-button {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: var(--hover);
  border: 1px solid var(--accent);
  padding: 0.5rem;
  border-radius: 10px;
  cursor: pointer;
  width: 80px;
  transition: background 0.2s, transform 0.2s;
  color: var(--text);
}

.family-button img {
  width: 40px;
  height: 40px;
  margin-bottom: 0.25rem;
}

.family-button span {
  font-size: 0.95rem;
  font-family: var(--font-pixel);
  text-align: center;
}

.family-button:hover {
  background: var(--accent);
  transform: scale(1.05);
  color: white;
}

.family-button.active-family,
button.active-eol {
  background-color: var(--accent);
  color: white !important;
  /*box-shadow: 0 0 8px var(--accent);*/
  transform: scale(1.05);
}

.eol-buttons button {
  font-family: var(--font-pixel);
  padding: 0.75rem 1rem;
  border: none;
  background: var(--hover);
  border-radius: 10px;
  color: white;
  cursor: pointer;
  transition: background 0.2s;
}

.eol-buttons button:hover {
  background: var(--accent);
}

footer {
  text-align: center;
  padding: 2rem 1rem;
  background: var(--hover);
  margin-top: auto;
}

.footer-icons {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 1rem;
}

.footer-icons img {
  width: 32px;
  height: 32px;
  /*filter: drop-shadow(0 0 5px var(--accent));*/
}

.credits {
  font-size: 0.8rem;
  font-family: var(--font-pixel);
  color: var(--credits);
}

.credits a{
  color: var(--credits )
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

@media (max-width: 600px) {
  .family-button {
    width: 70px;
  }
  #random-button {
    width: 90%;
  }
}