body {
  margin: 0;
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: #101319;
  color: #f5f7fb;
}
header {
  padding: 24px;
  text-align: center;
  background: #151c27;
  border-bottom: 1px solid #273046;
}
header h1 {
  margin: 0 0 8px;
  font-size: 1.9rem;
}
header p {
  margin: 4px 0;
  color: #9aa5b9;
}
.notice {
  padding: 24px;
  margin: 24px auto;
  max-width: 800px;
  background: #172134;
  border: 1px solid #2a3648;
  border-radius: 14px;
  text-align: center;
}
.gallery {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  padding: 24px;
  max-width: 1240px;
  margin: 0 auto;
  align-items: flex-start;
}
.gallery-column {
  display: flex;
  flex-direction: column;
  gap: 18px;
  flex: 1;
  min-width: 250px;
}
.card {
  background: #161d29;
  border: 1px solid #273046;
  border-radius: 18px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  width: 100%;
  margin: 0;
}
.card-preview {
  width: 100%;
  background: #0f1520;
}
.card-preview img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
  background: #0f1520;
}
.card-body {
  padding: 18px;
}
.card-body h2 {
  margin: 0 0 16px;
  font-size: 1rem;
  line-height: 1.4;
}
.card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 16px;
  border-radius: 12px;
  text-decoration: none;
  color: #f5f7fb;
  background: #4f7bff;
  transition: transform 0.16s ease, background 0.16s ease;
}
.button:hover {
  transform: translateY(-1px);
  background: #5f8bff;
}
.button.secondary {
  background: #1f2a40;
}
footer {
  padding: 16px 24px;
  text-align: center;
  color: #8b96ac;
}
.folder-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px;
  margin: 0 24px 24px;
}
.folder-card {
  display: block;
  padding: 18px;
  border-radius: 16px;
  background: #172134;
  border: 1px solid #273046;
  color: #f5f7fb;
  text-decoration: none;
  transition: transform 0.16s ease, border-color 0.16s ease;
}
.folder-card:hover {
  transform: translateY(-2px);
  border-color: #4f7bff;
}
.img-wrapper {
  position: relative;
  width: 100%;
  min-height: 220px;
  background: #0f1520;
  display: flex;
  justify-content: center;
  align-items: center;
}
.img-wrapper img {
  position: relative;
  width: 100%;
  height: auto;
  object-fit: cover;
  z-index: 1;
}
.loading-spinner {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 32px;
  height: 32px;
  border: 4px solid #273046;
  border-top-color: #4f7bff;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  z-index: 0;
}
@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}
.timeline-divider {
  max-width: 1240px;
  margin: 40px auto 0;
  padding: 0 24px;
}
.timeline-divider h2 {
  font-size: 1.5rem;
  color: #f5f7fb;
  margin: 0 0 12px;
}
.timeline-divider hr {
  border: none;
  border-top: 1px dashed #273046;
  margin: 0;
}
.layout-wrapper {
  display: flex;
  max-width: 1440px;
  margin: 0 auto;
  align-items: flex-start;
}
.parent-back-btn {
  position: absolute;
  top: 24px;
  left: 24px;
  color: #4f7bff;
  text-decoration: none;
  font-weight: 500;
  font-size: 1rem;
}
.parent-back-btn:hover {
  text-decoration: underline;
}
.sidebar-nav {
  position: sticky;
  top: 50vh;
  transform: translateY(-50%);
  width: 220px;
  flex-shrink: 0;
  margin: 24px 0 24px 24px;
  background: #172134;
  border: 1px solid #2a3648;
  border-radius: 14px;
  padding: 20px;
  box-sizing: border-box;
}
.section-download-btn {
  color: #8b96ac;
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  margin-left: 12px;
  transition: color 0.16s ease;
}
.section-download-btn:hover {
  color: #f5f7fb;
  text-decoration: underline;
}
.sidebar-nav h3 {
  margin: 0 0 16px 0;
  font-size: 1.1rem;
  color: #f5f7fb;
}
.sidebar-nav ul {
  list-style: none;
  padding: 0;
  margin: 0;
}
.sidebar-nav li {
  margin-bottom: 12px;
}
.sidebar-nav a {
  text-decoration: none;
  color: #8b96ac;
  font-size: 0.95rem;
  transition: color 0.2s ease;
}
.sidebar-nav a:hover {
  color: #4f7bff;
}
.main-content {
  flex: 1;
  min-width: 0;
}
@media (max-width: 900px) {
  .parent-back-btn {
    position: relative;
    top: 0;
    left: 0;
    display: inline-block;
    margin: 16px 0 0 24px;
    z-index: 10;
  }
  header {
    padding-top: 16px;
  }
  .layout-wrapper {
    flex-direction: column;
  }
  .sidebar-nav {
    position: sticky;
    top: 0;
    transform: none;
    width: 100%;
    margin: 0;
    padding: 12px 16px;
    border-radius: 0;
    border-left: none;
    border-right: none;
    border-top: none;
    border-bottom: 1px solid #2a3648;
    z-index: 100;
    
    display: flex;
    align-items: center;
    gap: 16px;
    
    /* 가로 스크롤 활성화 */
    overflow-x: auto;
    white-space: nowrap;
    -ms-overflow-style: none;
    scrollbar-width: none;
    
    /* 모바일에서 세련된 반투명 효과 (Glassmorphism) */
    background: rgba(23, 33, 52, 0.9);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
  }

  .sidebar-nav::-webkit-scrollbar {
    display: none;
  }

  .sidebar-nav h3 {
    margin: 0;
    font-size: 0.9rem;
    color: #9aa5b9;
    flex-shrink: 0;
  }

  .sidebar-nav ul {
    display: flex;
    flex-direction: row;
    gap: 8px;
  }

  .sidebar-nav li {
    margin-bottom: 0;
  }

  .sidebar-nav a {
    display: inline-block;
    padding: 6px 14px;
    background: #1f2a40;
    border: 1px solid #2a3648;
    border-radius: 20px;
    font-size: 0.85rem;
    color: #f5f7fb;
    transition: all 0.2s ease;
  }

  .sidebar-nav a:hover,
  .sidebar-nav a:active {
    background: #4f7bff;
    color: #fff;
    border-color: #4f7bff;
  }
}
.placeholder {
  min-height: 210px;
  display: grid;
  place-items: center;
  gap: 8px;
  padding: 24px;
  text-align: center;
  color: #c2c9d9;
  background: #0f1520;
}
.placeholder p {
  margin: 0;
}
pre {
  background: #111827;
  color: #d3dae6;
  padding: 16px;
  border-radius: 12px;
  overflow-x: auto;
}
.lightbox {
  display: none;
  position: fixed;
  z-index: 9999;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.85);
  justify-content: center;
  align-items: center;
  cursor: zoom-out;
}
.lightbox img {
  max-width: 95vw;
  max-height: 95vh;
  object-fit: contain;
  box-shadow: 0 4px 30px rgba(0,0,0,0.5);
  border-radius: 4px;
  display: none;
}

/* Data Warning Modal Styles */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  z-index: 10000;
  display: flex;
  justify-content: center;
  align-items: center;
}
.modal-content {
  background: #172134;
  border: 1px solid #2a3648;
  border-radius: 16px;
  padding: 28px;
  max-width: 90%;
  width: 360px;
  text-align: center;
  box-shadow: 0 10px 40px rgba(0,0,0,0.6);
}
.modal-content h2 {
  margin-top: 0;
  color: #ff6b6b;
  font-size: 1.3rem;
  margin-bottom: 12px;
}
.modal-content p {
  color: #c2c9d9;
  line-height: 1.6;
  margin-bottom: 24px;
  font-size: 0.95rem;
}
.modal-content .button {
  width: 100%;
  font-size: 1.05rem;
  padding: 12px;
}
.footer-text {
  margin: 0;
  font-size: 1rem;
  color: #8b96ac;
}