/* dark-mode.css */

body.dark-mode {
  background-color: #121212;
  color: #f0f0f0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

body.dark-mode header,
body.dark-mode footer,
body.dark-mode #menubar,
body.dark-mode #footermenu {
  background-color: #181818;
}

body.dark-mode #container,
body.dark-mode #main,
body.dark-mode #contents {
  background-color: #181818;
}


body.dark-mode #container {
  flex: 1;
  display: flex;
  flex-direction: column;
}

body.dark-mode #contents {
  flex: 1;
}

body.dark-mode footer {
  margin-top: auto;
}

body.dark-mode h1,
body.dark-mode h2,
body.dark-mode h3,
body.dark-mode h4 {
  color: #ffffff;
}

body.dark-mode a {
  color: #80bfff;
}
body.dark-mode a:hover {
  text-decoration: underline;
}

body.dark-mode .blog-post {
  background-color: #3a3a3a;
  color: #e0e0e0;
  padding: 24px;
  border-radius: 8px;
  border: 1px solid #333;
  box-shadow: 0 0 4px rgba(0, 0, 0, 0.4);
font-size: large;
}

body.dark-mode .blog-post h3 {
  color: #f8f8f8;
}

body.dark-mode .mail-meta {
  font-size: 12px;
  color: #999;
}

body.dark-mode hr {
  border-top: 1px dashed #444;
}

body.dark-mode .result-post {
  background-color: #2a2a2a;
  color: #f0f0f0;
  padding: 20px;
  border-radius: 8px;
  border: 1px solid #444;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.5);
  margin-bottom: 24px;
  transition: background-color 0.3s ease;
}

body.dark-mode .result-post a {
  color: #80bfff;
  text-decoration: none;
}

body.dark-mode .result-post a:hover {
  text-decoration: underline;
}

body.dark-mode .result-header h2 {
  color: #fff;
  font-size: 20px;
  margin-bottom: 24px;
  border-bottom: 1px solid #444;
  padding-bottom: 8px;
}

body.dark-mode .blog-post table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 20px;
  font-size: 20px;
  border: 1px solid #666;
}

body.dark-mode .blog-post th,
body.dark-mode .blog-post td {
  border: 1px solid #666;
  padding: 10px 14px;
  text-align: left;
  color: #f0f0f0;
}

body.dark-mode .blog-post th {
  background-color: #2a2a2a;
  font-weight: bold;
  color: #fff;
}

body.dark-mode.blog-post th {
  background-color: #2a2a2a;
  font-weight: bold;
  color: #fff;
}

body.dark-mode #container {
  flex: 1;
  display: flex;
  flex-direction: column;
}

body.dark-mode #contents {
  flex: 1;
}

body.dark-mode footer {
  margin-top: auto;
}

@media screen and (max-width: 520px) {
  html, body {
    height: 100%;
    min-height: 100vh;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
  }

  body.dark-mode #container {
    min-height: auto !important;
  }

  #contents {
    flex: 1; /* ← 中身が少ないときも高さが足りるように */
  }

  footer {
    margin-top: auto; /* ← 下にくっつける！ */
  }
}