/* ====== AFG Mirror Network — Shared Light & Dark Theme ====== */
/* === GLOBAL BASE === */
* {
  box-sizing: border-box;
  transition: background-color 0.3s ease, color 0.3s ease, backdrop-filter 0.3s ease;
}

body {
  font-family: "Segoe UI", Roboto, sans-serif;
  margin: 0;
  padding: 0;
  background-color: #f8f9fa;
  color: #333;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* === HEADER & FOOTER (with blur) === */
header,
footer {
  position: relative;
  backdrop-filter: blur(8px) saturate(150%);
  -webkit-backdrop-filter: blur(8px) saturate(150%);
  background-color: rgba(255, 255, 255, 0.75);
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
  padding: 1.2em 2em;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 10;
}

footer {
  border-top: 1px solid rgba(0, 0, 0, 0.1);
  border-bottom: none;
  text-align: center;
  justify-content: center;
  padding: 1.5em 1em;
  font-size: 0.9em;
  color: #666;
  margin-top: auto;
}

header h1 {
  font-size: 2em;
  margin: 0;
  font-weight: 700;
  color: #222;
  letter-spacing: 0.5px;
  text-shadow: 0 1px 1px rgba(0,0,0,0.05);
}

#themeToggle {
  background: none;
  border: none;
  font-size: 1.5em;
  cursor: pointer;
  transition: transform 0.2s ease;
}

#themeToggle:hover {
  transform: scale(1.1);
}

/* === MAIN === */
main {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 2em;
  gap: 2em;
}

/* === CARD === */
.card {
  background: rgba(255, 255, 255, 0.9);
  color: #333;
  border-radius: 16px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.08);
  padding: 2em;
  max-width: 750px;
  width: 100%;
  text-align: center;
  backdrop-filter: blur(4px);
}

.card h2 {
  margin-top: 0;
  font-size: 1.5em;
  color: #333;
}

p {
  color: #555;
  line-height: 1.6;
}

/* === BUTTONS === */
.buttons {
  display: flex;
  justify-content: center;
  gap: 1.5em;
  flex-wrap: wrap;
  margin-bottom: 1.5em;
}

a.btn {
  display: inline-block;
  padding: 1em 2em;
  border-radius: 10px;
  font-weight: bold;
  text-decoration: none;
  color: #fff;
  transition: background-color 0.2s ease, transform 0.2s ease;
}

a.btn:hover {
  transform: translateY(-2px);
}

.debian { background-color: #d70a53; }
.debian:hover { background-color: #b50945; }

.ubuntu { background-color: #e95420; }
.ubuntu:hover { background-color: #cf4a1d; }

.mint { background-color: #68c174; }
.mint:hover { background-color: #4dbe5c; }

/* === NETWORK SPEED === */
.speed {
  font-weight: bold;
  font-size: 1.1em;
  margin-top: 1em;
}

/* === CHART === */
.chart-card {
  padding: 2em;
}

.chart-container {
  position: relative;
  width: 100%;
  height: 400px;
}

/* === BACK BUTTON === */
.back-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5em;
  background: #007bff;
  color: #fff;
  padding: 0.7em 1.4em;
  border-radius: 8px;
  font-weight: bold;
  text-decoration: none;
  transition: background 0.3s ease, transform 0.2s ease, box-shadow 0.2s ease;
  margin-top: 1em;
}

.back-btn::before {
  content: "←";
  display: inline-block;
  transition: transform 0.2s ease;
}

.back-btn:hover {
  background: #0056b3;
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}

.back-btn:hover::before {
  transform: translateX(-3px);
}

/* === STATUS TAGS === */
.status {
  margin-top: 1em;
  font-weight: bold;
  font-size: 1.1em;
  padding: 0.4em 1em;
  border-radius: 6px;
  display: inline-block;
  border: 1px solid #ffc107;
  color: #856404;
  background-color: #fff8e1;
}

.status.ok {
  color: #155724;
  background-color: #d4edda;
  border: 1px solid #c3e6cb;
}

.status.old {
  color: #721c24;
  background-color: #f8d7da;
  border: 1px solid #f5c6cb;
}

/* === DARK THEME === */
body.dark {
  background-color: #0e0e0e;
  color: #e4e4e4;
}

body.dark header,
body.dark footer {
  background-color: rgba(30, 30, 30, 0.8);
  border-color: rgba(255, 255, 255, 0.1);
  color: #ccc;
  box-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

body.dark .card {
  background-color: rgba(32, 32, 32, 0.9);
  color: #ddd;
  box-shadow: 0 2px 10px rgba(255,255,255,0.05);
}

body.dark h1 {
  color: #fafafa;
  text-shadow: 0 1px 3px rgba(255,255,255,0.1);
}

body.dark h2 {
  color: #ddd;
}

body.dark p {
  color: #c8c8c8;
}

body.dark a.btn {
  color: #fff;
}

body.dark .back-btn {
  background-color: #2e7dfb;
  color: #fff;
}

body.dark .back-btn:hover {
  background-color: #5794ff;
  box-shadow: 0 4px 10px rgba(87,148,255,0.3);
}

/* DARK MODE STATUS DEFAULT */
body.dark .status {
  border: 1px solid #ffc107; /* sárga keret dark módban is */
  color: #ffecb3;
  background-color: #4a3f1a; /* sötét sárga háttér */
}

body.dark .status.ok {
  background-color: #214d26;
  color: #b8f1c0;
  border: 1px solid #2a7030;
}

body.dark .status.old {
  background-color: #5b2020;
  color: #f8d7da;
  border: 1px solid #8b2b2b;
}

body.dark a {
  color: #66aaff;
}

/* === AUTO SYSTEM DARK DETECTION === */
@media (prefers-color-scheme: dark) {
  body:not(.light):not(.dark) {
    background-color: #121212;
    color: #e4e4e4;
  }
}
