body.darkmode {
  background: #181818;
  color: #f5f5f5;
}
body.darkmode header {
  background: #232323;
  border-bottom: 1px solid #333;
}
body.darkmode .logo,
body.darkmode .main-nav a {
  color: #ffe082;
}
body.darkmode .main-nav a:hover {
  color: #fff;
}
body.darkmode main {
  background: none;
}
body.darkmode .featured,
body.darkmode .card {
  background: #232323;
  box-shadow: 0 2px 16px rgba(0,0,0,0.22);
}
body.darkmode .featured-content h2,
body.darkmode .card-content h3 {
  color: #ffe082;
}
body.darkmode .card-content p {
  color: #e0e0e0;
}
body.darkmode .highlight {
  color: #ff5252;
}
body.darkmode .important {
  color: #ffe082;
}
body.darkmode .rainbow-text {
  filter: brightness(1.2) contrast(1.1);
}
body.darkmode footer {
  background: #232323;
  color: #aaa;
  border-top: 1px solid #333;
}
/* 다크모드 토글 버튼 */
.darkmode-btn {
  position: fixed;
  right: 32px;
  bottom: 32px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 4px 16px rgba(0,0,0,0.18);
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 999;
  transition: background 0.2s, box-shadow 0.2s, transform 0.2s;
}
.darkmode-btn:hover {
  background: #222;
  box-shadow: 0 6px 24px rgba(229,57,53,0.18);
  transform: scale(1.08);
}
.darkmode-btn svg {
  display: block;
}

/* 다크모드 테마 */
body.darkmode {
  background: #181818;
  color: #f5f5f5;
}
body.darkmode header {
  background: #232323;
  border-bottom: 1px solid #333;
}
body.darkmode .logo {
  color: #fff;
}
body.darkmode nav a {
  color: #ffb300;
}
body.darkmode nav a:hover {
  color: #fff;
}
body.darkmode main {
  background: none;
}
body.darkmode .featured, body.darkmode .card {
  background: #232323;
  box-shadow: 0 2px 16px rgba(0,0,0,0.22);
}
body.darkmode .featured-content h2, body.darkmode .card-content h3 {
  color: #ffb300;
}
body.darkmode .card-content p {
  color: #e0e0e0;
}
body.darkmode .highlight {
  color: #ff5252;
}
body.darkmode .essential {
  color: #ffe082;
}
body.darkmode footer {
  background: #232323;
  color: #aaa;
  border-top: 1px solid #333;
}
body {
  background: #f7f7f9;
  color: #222;
  font-family: 'Noto Sans KR', 'Segoe UI', 'Malgun Gothic', Arial, sans-serif;
  margin: 0;
  padding: 0;
  min-height: 100vh;
}

header {
  background: #fff;
  border-bottom: 1px solid #ececec;
  padding: 0;
  position: sticky;
  top: 0;
  z-index: 100;
}
.container.header-flex {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.5rem 1rem;
}
.logo {
  font-size: 2.2rem;
  font-weight: 900;
  color: #222;
  letter-spacing: 1px;
}
nav a {
  color: #e63076;
  text-decoration: none;
  margin: 0 1.2rem;
  font-weight: 700;
  font-size: 1.1rem;
  transition: color 0.2s;
}
nav a:hover {
  color: #222;
  text-decoration: underline;
}
main {
  max-width: 1100px;
  margin: 2.5rem auto 0 auto;
  padding: 0 1rem;
}
.featured {
  display: flex;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 2px 16px rgba(0,0,0,0.06);
  overflow: hidden;
  margin-bottom: 2.5rem;
}
.featured-img {
  width: 320px;
  height: 220px;
  object-fit: cover;
  flex-shrink: 0;
}
.featured-content {
  padding: 2rem 2rem 2rem 2rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.featured-content h2 {
  color: #222;
  font-size: 2rem;
  margin: 0 0 1rem 0;
}
.card-list {
  display: flex;
  gap: 2rem;
  flex-wrap: wrap;
  justify-content: flex-start;
}
.card {
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.07);
  overflow: hidden;
  width: 340px;
  display: flex;
  flex-direction: column;
  margin-bottom: 2rem;
  transition: box-shadow 0.2s;
}
.card:hover {
  box-shadow: 0 4px 24px rgba(229,57,53,0.13);
}
.card img {
  width: 100%;
  height: 180px;
  object-fit: cover;
}
.card-content {
  padding: 1.2rem 1.2rem 1.5rem 1.2rem;
}
.card-content h3 {
  margin: 0 0 0.7rem 0;
  color: #222;
  font-size: 1.25rem;
}
.card-content p {
  color: #444;
  font-size: 1rem;
  line-height: 1.7;
}
.highlight {
  color: #222;
  font-weight: bold;
}
.important {
  color: #fc0000;
  font-weight: bold;
}
.essential {
  color: #59ff44;
  font-weight: bold;
}
.rainbow-text {
  background: linear-gradient(90deg, #ff0000, #ff9900, #ffee00, #33ff00, #00cfff, #3300ff, #ff00cc, #ff0000);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-fill-color: transparent;
  font-weight: bold;
}
footer {
  text-align: center;
  color: #888888;
  padding: 1.5rem 0 1rem 0;
  border-top: 1px solid #ececec;
  margin-top: 3rem;
  font-size: 1rem;
  background: #fff;
}
@media (max-width: 900px) {
  .container.header-flex, main {
    max-width: 100%;
  }
  .featured {
    flex-direction: column;
    align-items: stretch;
  }
  .featured-img {
    width: 100%;
    height: 180px;
  }
  .card-list {
    flex-direction: column;
    gap: 1.5rem;
  }
  .card {
    width: 100%;
  }
}
