/* style.css */

:root {
  --teal-dark: #27768A;
  --teal-soft: #589DA4;
  --green-dark: #748D44;
  --green-soft: #85A156;
  --cream: #F0F5E2;

  --font-main: 'Lato', sans-serif;

  --bg: #121c14;
  --text: #F0F5E2;
  --primary: #27768A;
  --accent: #85A156;
  --card-bg: #1e2a1d;
  --text-main: #1b1b1b;
  --text-dim: #555;
  --text-strong: #000; /* Add for light mode (dark text) */
  --bg-main: var(--cream);
  --bg-card: #ffffff;
  --bg-header: #ffffff;
  --link: var(--teal-dark);
  --link-hover: var(--green-soft);
}

body {
  font-family: var(--font-main);
  background-color: var(--bg-main);
  color: var(--text-main);
  transition: background-color 0.3s ease, color 0.3s ease;
  line-height: 1.6;
  margin: 0;
  padding: 0;
}

body.dark-mode {
  --bg-main: #1a1e1b;
  --bg-card: #2a2e2b;
  --bg-header: #232823;
  --text-main: #f0f5e2;
  --text-dim: #a0a0a0;
  --text-strong: #ffffff; /* Add for dark mode (bright white) */
  --link: #85A156;
  --link-hover: #d4ffaf;
}

a {
  color: var(--link);
  text-decoration: none;
}

a:hover {
  color: var(--link-hover);
}

.site-header {
  background: var(--bg-header);
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 2rem;
  border-bottom: 2px solid var(--teal-dark);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.logo {
  font-size: 2rem;
  font-weight: bold;
  color: var(--teal-dark);
}

.logo span {
  color: var(--green-dark);
}

.main-nav a {
  margin-left: 1.5rem;
  font-weight: 700;
  text-transform: uppercase;
  font-size: 0.9rem;
}

#themeToggle {
  margin-left: 1rem;
  font-size: 1rem;
  padding: 0.5rem;
  background: none;
  border: none;
  cursor: pointer;
}

.hero {
  text-align: center;
  padding: 3rem 1rem;
  background: url('images/hero.png') center center / cover no-repeat;
  color: #fff;
  width: 100%;
  max-width: none;
}

.hero-text h1 {
  font-size: 2.8rem;
}

.hero-text p {
  font-size: 1.2rem;
  margin-top: 1rem;
}

section {
  padding: 3rem 2rem;
  max-width: 1100px;
  margin: auto;
}

h2 {
  font-size: 1.8rem;
  margin-bottom: 1rem;
  color: var(--green-dark);
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
}

.card {
  background: var(--bg-card);
  padding: 1.5rem;
  border-radius: 10px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
}

ul {
  padding-left: 1.5rem;
  margin-top: 1rem;
  list-style: disc;
}

.code-block pre {
  background-color: #2a2e2b;
  color: #f0f5e2;
  padding: 1rem;
  border-left: 4px solid var(--green-soft);
  font-family: monospace;
  font-size: 0.95rem;
  border-radius: 5px;
  margin-bottom: 1rem;
  overflow-x: auto;
}

body:not(.dark-mode) .code-block pre {
  background-color: #e8ebe6;
  color: #1b1b1b;
}

.recipe img {
  width: 100%;
  max-width: 400px;
  border-radius: 8px;
  margin: 1rem 0;
  border: 2px solid var(--green-soft);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0.6rem 1.25rem;
  background: var(--green-dark);
  color: white;
  font-weight: bold;
  border: none;
  border-radius: 6px;
  margin-top: 0.5rem;
  transition: background 0.3s ease;
  text-decoration: none;
  text-align: center;
  vertical-align: middle;
  line-height: 1.2;
}

.btn img {
  height: 20px;
  width: auto;
  vertical-align: middle;
  margin-bottom: 2px;
}

.btn:hover {
  background: var(--teal-dark);
}

.site-footer {
  text-align: center;
  padding: 2rem;
  background: var(--bg-header);
  color: var(--text-dim);
  font-size: 0.9rem;
  border-top: 1px solid #ccc;
}

#server-status {
  padding: 2rem 1rem;
  text-align: center;
}

.server-box {
  background: var(--card-bg);
  border-radius: 12px;
  padding: 1rem 2rem;
  margin-bottom: 2rem;
  display: inline-block;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
  font-size: 1rem;
}

.server-wrapper-top {
  max-width: 300px; /* adjust width as needed */
  margin: 2rem auto; /* centers the wrapper */
  padding: 0 1rem;   /* mobile-friendly side padding */
}

.server-box-top {
  background: var(--card-bg);
  border-radius: 12px;
  padding: 1rem 2rem;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
  font-size: 1rem;
  text-align: center;
}


.stat-grid {
  display: flex;
  justify-content: center;
  gap: 2rem;
  flex-wrap: wrap;
}

#system-resources,
#network-usage {
  background-color: var(--card-bg);
  color: var(--text);
  border-radius: 12px;
  padding: 1.5rem 2rem;
  font-family: 'Lato', monospace;
  min-width: 280px;
  box-shadow: 0 0 8px rgba(0, 0, 0, 0.3);
}

.bar-container {
  background-color: #222;
  border-radius: 6px;
  overflow: hidden;
  margin: 6px 0 12px;
  height: 10px;
}

.bar-fill {
  height: 100%;
  width: 0%;
  background: var(--accent);
  transition: width 0.6s ease-in-out;
}

.fade-emoji {
  display: inline-block;
  animation: fadeEmoji 2.4s ease-in-out infinite alternate;
}

@keyframes fadeEmoji {
  from { opacity: 0.5; }
  to { opacity: 1; }
}

/* Modal styles */
.modal {
  display: none;
  position: fixed;
  z-index: 2000;
  left: 0; top: 0;
  width: 100%; height: 100%;
  overflow: auto;
  background-color: rgba(0, 0, 0, 0.6);
}

.modal-content {
  background-color: var(--bg-card);
  margin: 10% auto;
  padding: 2rem;
  border-radius: 10px;
  width: 90%;
  max-width: 500px;
  color: var(--text-main);
  position: relative;
}

body.dark-mode .modal-content {
  background-color: var(--bg-header);
  color: var(--text);
}

#modal-close {
  position: absolute;
  top: 10px;
  right: 16px;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--text-dim);
}

#modal-links a {
  display: block;
  margin-top: 1rem;
  font-weight: bold;
  color: var(--link);
}

#modal-links a:hover {
  color: var(--link-hover);
}

.modal-section {
  margin-top: 1.5rem;
  font-size: 1.1rem;
  font-weight: bold;
  color: var(--text-strong);
  border-bottom: 1px solid #ccc;
  padding-bottom: 0.25rem;
  margin-bottom: 0.5rem;
}

body.dark-mode .modal-section {
  color: var(--text);
  border-bottom: 1px solid #444;
}

@media (max-width: 600px) {
  .hero img {
    max-width: 180px;
    height: auto;
    margin-top: 1rem;
  }

  .about-text {
    text-align: left;
    padding: 0 1rem;
  }

  .about-header img {
    max-width: 100px;
    height: auto;
  }
  
  .about-image img {
	max-width: 200px;
	height: auto;
  }

  .hero-text h1 {
    font-size: 2rem;
  }

  .hero-text p {
    font-size: 1rem;
  }

  .site-footer {
    padding: 1rem;
    font-size: 0.8rem;
  }

  .recipe-gallery img {
    max-width: 100%;
  }

  .about-wrapper {
    flex-direction: column;
    gap: 2rem;
  }
}


@media (max-width: 768px) {
  .site-header {
    flex-direction: column;
    align-items: flex-start;
    padding: 1rem;
  }
  .main-nav {
    flex-direction: column;
    width: 100%;
    margin-top: 1rem;
  }
  .main-nav a,
  #themeToggle {
    margin: 0.5rem 0;
    font-size: 1rem;
  }
  .card-grid,
  .stat-grid {
    flex-direction: column;
    display: flex;
  }
}

.about-wrapper {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 3rem;
  max-width: 1200px;
  margin: auto;
}

.about-header {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.about-header img {
  height: 64px;
}

.about-text h2 {
  margin-bottom: 1.5rem;
}

.about-disclaimer {
  width: 100%;
  text-align: center;
  font-size: 0.9rem;
  color: var(--text-main);
  margin-top: 3rem;
  line-height: 1.6;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

.about-disclaimer em {
  display: block;
  font-style: italic;
  margin-top: 0.5rem;
}

body.dark-mode .about-disclaimer {
  color: var(--text);
}

.status-card {
  background-color: var(--bg-card);
  padding: 1.5rem;
  border-radius: 12px;
  box-shadow: 0 0 15px rgba(0,0,0,0.15);
  transition: background-color 0.3s ease, box-shadow 0.3s ease;
  color: var(--text-main);
}

body.dark-mode .status-card {
  background-color: var(--card-bg);
  box-shadow: 0 0 15px rgba(0,0,0,0.3);
  color: var(--text);
}

.server-box {
  background-color: #ffffff;
  color: #1b1b1b;
  padding: 1rem 2rem;
  border-radius: 12px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.1);
  text-align: center;
  max-width: 300px;
  margin: 2rem auto;
  font-weight: bold;
  transition: background-color 0.3s ease, color 0.3s ease;
}

body.dark-mode .server-box {
  background-color: #1e2a1d;
  color: #f0f5e2;
}

#recipes h2,
#recipes p {
  text-align: left;
}

.recipe-gallery {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: flex-start;
  align-items: flex-start; /* THIS aligns items to the top */
}

.recipe-gallery img {
  height: 150px;
  max-width: 300px; /* Limit width if needed */
  object-fit: contain;
  border-radius: 6px;
  box-shadow: 0 0 10px rgba(0,0,0,0.2);
  align-self: flex-start;
  vertical-align: top;
  margin: 0;
  padding: 0;
}

.recipe-gallery img:hover {
  transform: scale(1.05);
}


