/* ProblemBank Detail Page Styles */
@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+KR:wght@300;400;500;700&family=Source+Code+Pro:wght@400;500&display=swap');

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Noto Sans KR', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  line-height: 1.8;
  color: #1a1a2e;
  background: #f8f9fc;
}

/* Back button */
.back-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 20px;
  margin: 24px auto 0;
  max-width: 900px;
  font-size: 0.9rem;
  color: #5a6072;
  text-decoration: none;
  transition: color 0.2s;
}

.back-btn:hover {
  color: #1a1a2e;
}

.back-btn-wrap {
  display: block;
  max-width: 948px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Header */
.page-header {
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
  color: #fff;
  padding: 48px 24px 40px;
  margin-bottom: 0;
}

.page-header .container {
  max-width: 900px;
  margin: 0 auto;
}

.page-header h1 {
  font-size: 1.75rem;
  font-weight: 700;
  line-height: 1.4;
  margin-bottom: 8px;
}

.page-header .subtitle {
  font-size: 1.05rem;
  font-weight: 300;
  opacity: 0.85;
  margin-bottom: 16px;
}

/* Tags */
.tag {
  display: inline-block;
  padding: 4px 14px;
  border-radius: 20px;
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.3px;
  text-transform: uppercase;
}

.tag-gdl {
  background: rgba(66, 133, 244, 0.2);
  color: #93bbff;
  border: 1px solid rgba(66, 133, 244, 0.35);
}

.tag-tunneling {
  background: rgba(156, 39, 176, 0.2);
  color: #ce93d8;
  border: 1px solid rgba(156, 39, 176, 0.35);
}

.tag-ai {
  background: rgba(234, 67, 53, 0.2);
  color: #f5a0a0;
  border: 1px solid rgba(234, 67, 53, 0.35);
}

/* Main content */
.content {
  max-width: 900px;
  margin: 0 auto;
  padding: 40px 24px 80px;
}

/* Sections */
.content h2 {
  font-size: 1.4rem;
  font-weight: 700;
  color: #1a1a2e;
  margin-top: 48px;
  margin-bottom: 16px;
  padding-bottom: 8px;
  border-bottom: 2px solid #e2e6ef;
}

.content h2:first-child {
  margin-top: 0;
}

.content h3 {
  font-size: 1.15rem;
  font-weight: 600;
  color: #2c3e5a;
  margin-top: 32px;
  margin-bottom: 12px;
}

.content h4 {
  font-size: 1.02rem;
  font-weight: 600;
  color: #3d5178;
  margin-top: 24px;
  margin-bottom: 8px;
}

.content p {
  margin-bottom: 14px;
  font-size: 0.97rem;
  color: #2a2a40;
}

/* Lists */
.content ul, .content ol {
  margin: 8px 0 16px 24px;
  font-size: 0.95rem;
}

.content li {
  margin-bottom: 6px;
  color: #2a2a40;
}

.content li ul, .content li ol {
  margin-top: 4px;
  margin-bottom: 4px;
}

/* Inline code */
.content code {
  font-family: 'Source Code Pro', 'Menlo', 'Consolas', monospace;
  background: #eef1f8;
  color: #3d5178;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.88em;
}

/* Code blocks */
.content pre {
  background: #1e2235;
  color: #d4daf0;
  padding: 20px 24px;
  border-radius: 8px;
  overflow-x: auto;
  margin: 16px 0;
  font-size: 0.88rem;
  line-height: 1.6;
}

.content pre code {
  background: none;
  color: inherit;
  padding: 0;
  border-radius: 0;
  font-size: inherit;
}

/* Math (monospace rendering) */
.math {
  font-family: 'Source Code Pro', 'Menlo', monospace;
  font-size: 0.92em;
  color: #3d5178;
}

/* Tables */
.table-wrap {
  overflow-x: auto;
  margin: 16px 0;
}

.content table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
  margin: 16px 0;
}

.content thead {
  background: #e8ecf4;
}

.content th {
  text-align: left;
  padding: 12px 14px;
  font-weight: 600;
  color: #1a1a2e;
  border-bottom: 2px solid #c9d0e0;
  white-space: nowrap;
}

.content td {
  padding: 10px 14px;
  border-bottom: 1px solid #e2e6ef;
  color: #2a2a40;
  vertical-align: top;
}

.content tbody tr:hover {
  background: #f0f3fa;
}

/* Blockquote */
.content blockquote {
  border-left: 4px solid #4285f4;
  background: #f0f4ff;
  padding: 16px 20px;
  margin: 16px 0;
  border-radius: 0 8px 8px 0;
  font-size: 0.95rem;
  color: #2c3e5a;
}

/* Horizontal rule */
.content hr {
  border: none;
  border-top: 2px solid #e2e6ef;
  margin: 40px 0;
}

/* Strong / bold */
.content strong {
  font-weight: 600;
  color: #1a1a2e;
}

/* Emphasis */
.content em {
  font-style: italic;
  color: #3d5178;
}

/* Links */
.content a {
  color: #4285f4;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s;
}

.content a:hover {
  border-bottom-color: #4285f4;
}

/* Responsive */
@media (max-width: 640px) {
  .page-header {
    padding: 32px 16px 28px;
  }

  .page-header h1 {
    font-size: 1.35rem;
  }

  .page-header .subtitle {
    font-size: 0.95rem;
  }

  .content {
    padding: 28px 16px 60px;
  }

  .content h2 {
    font-size: 1.2rem;
    margin-top: 36px;
  }

  .content h3 {
    font-size: 1.05rem;
  }

  .content table {
    font-size: 0.82rem;
  }

  .content th, .content td {
    padding: 8px 10px;
  }

  .back-btn {
    margin-top: 16px;
  }
}

@media (max-width: 400px) {
  .page-header h1 {
    font-size: 1.15rem;
  }

  .content {
    padding: 20px 12px 48px;
  }
}
