/* css/pages/content-page.css */
.center {
  text-align: center;
  margin-top: 20px;
  margin-bottom: 20px;
}

.main-content-wrapper > .center:first-child {
    margin-top: 0;
}

.title {
  font-size: 2.2em;
  font-weight: bold;
  margin-bottom: 0.3em;
  color: var(--myblue);
}

.subtitle {
  font-size: 1.5em;
  margin-top: 0;
  margin-bottom: 2em;
  color: var(--darkgray);
  font-weight: 400;
}

.chapter-box, .section-box, .subsection-box, .key-info {
  border-radius: 4px;
  padding: 20px 30px;
  margin: 25px 0;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.05);
}

.chapter-box {
  background-color: #fdfdff;
  border: 1px solid #d1d9e6;
}

.chapter-title {
  font-size: 1.8em;
  font-weight: 700;
  color: var(--myblue);
  margin: 0 0 20px 0;
  border-bottom: 2px solid var(--myblue);
  padding-bottom: 10px;
}

.section-box {
  background-color: rgba(180, 0, 0, 0.03);
  border: 1px solid rgba(180, 0, 0, 0.2);
}

.section-title {
  font-size: 1.5em;
  font-weight: bold;
  color: var(--myred);
  margin: 0 0 15px 0;
}

.subsection-box {
  background-color: rgba(0, 120, 0, 0.03);
  border: 1px solid rgba(0, 120, 0, 0.2);
}

.subsection-title {
  font-size: 1.3em;
  font-weight: bold;
  color: var(--mygreen);
  margin: 0 0 10px 0;
}

.key-info {
  background-color: rgba(255, 140, 0, 0.05);
  border: 1px solid rgba(255, 140, 0, 0.3);
  border-left: 4px solid var(--myorange);
}

.key-info-title {
  font-size: 1.1em;
  font-weight: bold;
  color: var(--myorange);
  margin: 0 0 8px 0;
}

.leaderboard-section {
  margin-top: 40px;
  background-color: #f8f9fc;
  padding-top: 20px;
  padding-bottom: 30px;
}
.leaderboard-section .chapter-title {
  display: flex;
  align-items: center;
  justify-content: center;
}
.leaderboard-section .chapter-title i.fa-trophy {
  margin-right: 12px;
  font-size: 0.9em;
  color: var(--myorange);
}
.leaderboard-section table {
  width: 100%;
  margin-top: 20px;
  border-collapse: collapse;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}
.leaderboard-section th,
.leaderboard-section td {
  border: 1px solid #dee2e6;
  padding: 10px 14px;
  text-align: left;
  vertical-align: middle;
}
.leaderboard-section th {
  background-color: var(--mygreen);
  color: white;
  font-weight: bold;
  font-family: var(--font-secondary);
  text-transform: uppercase;
  font-size: 0.9em;
  letter-spacing: 0.5px;
}
.leaderboard-section tbody tr:nth-child(odd) {
  background-color: #ffffff;
}
.leaderboard-section tbody tr:nth-child(even) {
  background-color: #f9f9f9;
}
.leaderboard-section tbody tr:hover {
  background-color: #e9ecef;
}
.leaderboard-section td:nth-child(1) {
  text-align: center;
  font-weight: bold;
  color: var(--myorange);
}
.leaderboard-section td:nth-child(3),
.leaderboard-section td:nth-child(4) {
  text-align: center;
}
.under-construction-section {
    text-align: center;
    padding: 80px 20px;
    min-height: 65vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background-color: #f8f9fc;
    border-radius: 12px;
    margin-top: 40px;
    margin-bottom: 40px;
}
.construction-icon {
    font-size: 6em;
    color: var(--myorange);
    margin-bottom: 30px;
    animation: rocket-launch 2.5s ease-in-out infinite;
}
.under-construction-section h1 {
    font-size: 2.8em;
    color: var(--myblue);
    font-family: var(--font-secondary);
    font-weight: 800;
    margin-bottom: 20px;
}
.construction-message {
    font-size: 1.2em;
    color: #333;
    max-width: 650px;
    line-height: 1.7;
    margin-bottom: 10px;
}
.construction-sub-message {
    font-size: 1.1em;
    color: #555;
    max-width: 600px;
    line-height: 1.6;
    margin-bottom: 40px;
}
.construction-actions .cta-button {
    margin: 10px;
}
@keyframes rocket-launch {
    0% { transform: translateY(0) rotate(-45deg); }
    50% { transform: translateY(-20px) rotate(-45deg); }
    100% { transform: translateY(0) rotate(-45deg); }
}

/* Responsive cho Content Pages */
@media (max-width: 1024px) {
    .title { font-size: 2em; }
    .subtitle { font-size: 1.3em; }
    .chapter-title { font-size: 1.6em; }
}
@media (max-width: 768px) {
    .title { font-size: 1.8em; }
    .subtitle { font-size: 1.2em; }
    .chapter-box, .section-box, .subsection-box, .key-info {
        padding: 15px;
    }
    .chapter-title { font-size: 1.5em; }
    .section-title { font-size: 1.3em; }
    .subsection-title { font-size: 1.15em; }
}

/* css/pages/content-page.css */

.content-page-layout {
    display: grid;
    grid-template-columns: 1fr 250px; /* Bố cục nội dung chính và sidebar */
    gap: 2.5rem;
    align-items: flex-start;
}

@media (max-width: 1024px) {
    .content-page-layout {
        grid-template-columns: 1fr; /* Sidebar sẽ được xử lý bằng JS trên mobile */
    }
}

.content-title {
    font-size: 2.5rem;
    font-weight: 800;
    text-align: center;
    margin-bottom: 0.5rem;
}

.content-subtitle {
    font-size: 1.1rem;
    color: var(--color-text-secondary);
    text-align: center;
    margin-bottom: 3rem;
}

/* Base style for content boxes */
.content-box {
    border-radius: var(--border-radius-soft);
    padding: 1.5rem 2rem;
    margin: 1.5rem 0;
    border: 1px solid var(--color-border);
}

.chapter-box {
    background-color: var(--color-surface);
    border-left: 4px solid var(--color-primary);
}

.chapter-title {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--color-primary);
    margin: 0 0 1rem 0;
}

.section-box {
    background-color: var(--color-surface-soft);
    border-left: 4px solid var(--color-accent);
    margin-top: 2rem;
}

.section-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--color-accent);
    margin: 0 0 1.25rem 0;
}

.subsection-box {
    background-color: hsla(145, 63%, 42%, 0.05);
    border-left: 3px solid var(--color-success);
    padding: 1.25rem;
    margin-top: 1rem;
}

.subsection-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--color-success);
    margin: 0 0 1rem 0;
}

/* MathJax block style */
div.math {
  display: block;
  text-align: center;
  margin: 1rem auto;
  padding: 0.75rem 1.25rem;
  background-color: hsl(220, 50%, 90%); /* Slightly darker background */
  border: 1px solid var(--color-primary); /* Use primary color for border */
  border-radius: var(--border-radius-hard);
  width: fit-content;
  max-width: 100%;
  overflow-x: auto;
}

/* For inline formulas (inside a sentence) */
span.math {
  background-color: hsl(220, 60%, 92%); /* Slightly darker inline background */
  padding: 0.1em 0.4em;
  border: 1px solid var(--color-accent); /* Use accent color for inline border */
  border-radius: 4px;
  font-size: 0.95em;
}

/* Bảng trong content-page */
.content-page-layout table {
    box-shadow: none;
    border: 1px solid var(--color-border);
}

.content-page-layout th {
    background-color: var(--color-primary);
    color: white;
    font-weight: 600;
}

/* Thêm vào cuối file: css/pages/content-page.css */

.table-responsive-wrapper {
    overflow-x: auto; /* Cho phép cuộn ngang trên mobile */
    margin: 1.5rem 0;
}

.content-page-layout table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
    box-shadow: var(--shadow-subtle);
    border-radius: var(--border-radius-soft);
    overflow: hidden; /* Giúp bo góc các ô */
    border: 1px solid var(--color-border);
}

.content-page-layout th,
.content-page-layout td {
    padding: 0.75rem 1rem;
    text-align: left;
    border-bottom: 1px solid var(--color-border);
}

.content-page-layout th {
    background-color: var(--color-primary);
    color: white;
    font-weight: 600;
}

.content-page-layout tbody tr:last-of-type td {
    border-bottom: none; /* Bỏ đường kẻ ở dòng cuối cùng */
}

.content-page-layout tbody tr:hover {
    background-color: hsla(210, 100%, 50%, 0.03); /* Hiệu ứng khi di chuột qua */
}