:root {
  --red: #c90000;
  --red-dark: #960000;
  --white: #ffffff;
  --bg: #f7f7f7;
  --text: #222222;
  --muted: #666666;
  --card: #ffffff;
  --border: #eeeeee;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
}

.container {
  max-width:1200px;
  margin: 0 auto;
}

.site-header {
  background: var(--red);
  color: var(--white);
  padding: 26px 0;
}

.header-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
}

.header-brand {
  min-width: 0;
}

.brand {
  display: inline-block;
  color: var(--white);
  font-size: 2rem;
  font-weight: 700;
  line-height: 1;
  text-decoration: none;
}

.brand:hover {
  color: var(--white);
  opacity: .92;
}

.tagline {
  margin: 9px 0 0;
  color: #ffeaea;
  font-size: 1.08rem;
}

.header-user {
  display: flex;
  align-items: center;
  gap: 18px;
}

.user-info {
  text-align:right;

    line-height:1.35;
}

.user-greeting {
  font-size: .82rem;
  opacity: .85;
}

.user-name {
  margin-top: 2px;
  font-size: 1rem;
}

.user-role {
  margin-top: 3px;
  font-size: .78rem;
  opacity: .85;
}

.logout-form {
  margin: 0;
}

.header-btn {
  background:transparent;

    color:white;

    border:2px solid rgba(255,255,255,.75);
}

.header-btn:hover {
  background:white;

    color:var(--red);
}

@media (max-width: 700px) {
  .header-content {
    flex-direction: column;
    align-items: flex-start;
  }

  .header-user {
    width: 100%;
    justify-content: space-between;
  }

  .user-info {
    align-items: flex-start;
  }

  .brand {
     font-size:2.4rem;

    font-weight:700;
  }

  .tagline {
    font-size: 1.2rem;
  }
}

.page-content {
  padding: 32px 0;
}

.site-footer {
  margin-top: 60px;
  padding: 32px 0;
  text-align: center;
  color: var(--muted);
  border-top: 1px solid #eee;
}

.site-footer strong {
  display: block;
  margin-bottom: 8px;
  color: var(--red);
}

.site-footer p {
  margin: 6px 0;
}

.card {
  background: var(--card);
  border-radius: 16px;
  padding: 20px;
  margin-bottom: 18px;
  box-shadow: 0 4px 14px rgba(0,0,0,.08);
  border: 1px solid var(--border);
}

.card h2 {
  margin-top: 8px;
}

.type {
  color: var(--red);
  font-weight: bold;
  text-transform: uppercase;
  font-size: .8rem;
}

a {
  color: var(--red);
  font-weight: bold;
}

.btn {
  display: inline-block;
  background: var(--red);
  color: white;
  padding: 10px 16px;
  border-radius: 8px;
  text-decoration: none;
}

.btn:hover {
  background: var(--red-dark);
}

.media-preview {
  width: 100%;
  margin-top: 12px;
  border-radius: 12px;
}

audio {
  width: 100%;
  margin-top: 12px;
}

.list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.list li {
  margin-bottom: 12px;
}

@media (max-width: 600px) {
  .site-header {
    padding: 20px 0;
  }

  .brand {
    font-size: 1.2rem;
  }

  .page-content {
    padding: 24px 0;
  }
}

.section-title {
  color: var(--red);
  margin-bottom: 12px;
  font-size: 1.2rem;
}

.chapter-hero h1 {
  margin-bottom: 8px;
}

.option {
  display: block;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  margin-bottom: 10px;
  cursor: pointer;
  background: #fff;
}

.option:hover {
  border-color: var(--red);
}

.journey-list{
    list-style:none;
    padding:0;
}

.journey-list li{
    padding:10px 0;
    border-bottom:1px solid #eee;
}

.done{
    color:#0a8f3c;
    font-weight:bold;
}

.pending{
    color:#999;
}

.result-card {
  text-align: center;
}

.score-box {
  background: #fff3f3;
  border: 1px solid #ffd0d0;
  border-radius: 16px;
  padding: 24px;
  margin: 24px 0;
}

.score-box strong {
  display: block;
  color: var(--red);
  font-size: 3rem;
}

.score-box span {
  color: var(--muted);
}

.academy-hero {
  background: linear-gradient(135deg, var(--red), var(--red-dark));
  color: white;
}

.academy-hero .type {
  color: white;
  opacity: .9;
}

.academy-hero h1 {
  font-size: 2rem;
  margin-bottom: 12px;
}

.academy-hero p {
  font-size: 1.1rem;
  max-width: 680px;
}

.page-title {
  margin: 28px 0 16px;
}

.collection-card h2 {
  margin-top: 0;
}
.collection-cover{

    width:100%;
    height:220px;

    object-fit:cover;

    border-radius:18px 18px 0 0;

    display:block;

}

.badge-card {
  border: 1px solid #ffd0d0;
}

.badge-box {
  display: flex;
  gap: 16px;
  align-items: center;
  background: #fff8f8;
  border-radius: 16px;
  padding: 18px;
}

.badge-icon {
  width: 56px;
  height: 56px;
  background: var(--red);
  color: white;
  border-radius: 999px;
  display: grid;
  place-items: center;
  font-size: 1.8rem;
  flex-shrink: 0;
}

.badge-box h3 {
  margin: 0 0 6px;
}

.badge-box p {
  margin: 0;
  color: var(--muted);
}

.book-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 22px;
  margin-bottom: 28px;
}

.book-card {
  display: block;
  background: white;
  border-radius: 18px;
  overflow: hidden;
  text-decoration: none;
  color: var(--text);
  box-shadow: 0 4px 14px rgba(0,0,0,.08);
  border: 1px solid var(--border);
  transition: transform .2s ease, box-shadow .2s ease;
}

.book-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 22px rgba(0,0,0,.12);
}

.book-cover {
  aspect-ratio: 3 / 4;
  background: #fff3f3;
  display: flex;
  align-items: center;
  justify-content: center;
}

.book-cover img,
.book-header-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.book-placeholder {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, var(--red), var(--red-dark));
  color: white;
  display: grid;
  place-items: center;
  font-size: 3rem;
}

.book-info {
  padding: 16px;
}

.book-info h3 {
  margin: 0 0 8px;
}

.book-info p {
  margin: 0;
  color: var(--muted);
  font-size: .9rem;
}

.book-header-card {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 22px;
  align-items: center;
}

.book-header-cover {
  aspect-ratio: 3 / 4;
  border-radius: 14px;
  overflow: hidden;
  background: #fff3f3;
}

.chapter-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 18px;
  margin-bottom: 28px;
}

.chapter-card {
  display: block;
  min-height: 190px;
  background: white;
  color: var(--text);
  text-decoration: none;
  border-radius: 18px;
  padding: 20px;
  border: 1px solid var(--border);
  box-shadow: 0 4px 14px rgba(0,0,0,.08);
  transition: transform .2s ease, box-shadow .2s ease;
}

.chapter-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 22px rgba(0,0,0,.12);
}

.chapter-number {
  display: inline-block;
  color: var(--red);
  font-weight: bold;
  font-size: .85rem;
  margin-bottom: 12px;
}

.chapter-card h3 {
  margin: 0 0 10px;
}

.chapter-card p {
  margin: 0;
  color: var(--muted);
  font-size: .95rem;
}

.chapter-card {
    min-height: 190px;

    padding: 22px;

    border-radius: 18px;

    background-color: #fff;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;

    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);

    text-decoration: none;
    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease;
}

.chapter-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 26px rgba(0, 0, 0, 0.12);
}

.book-presentation-video {
    margin: 32px 0 36px;
    padding: 24px;

    background: #ffffff;

    border-radius: 18px;

    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.08);
}

.book-video-info {
    margin-bottom: 18px;
}

.book-video-info .section-label {
    display: block;

    margin-bottom: 8px;

    color: #d00000;

    font-size: 13px;
    font-weight: 700;
}

.book-video-info h2 {
    margin: 0 0 10px;

    font-size: 24px;
}

.book-video-info p {
    margin: 0;

    color: #555;

    line-height: 1.5;
}

.book-video-player {
    position: relative;

    width: 100%;

    aspect-ratio: 16 / 9;

    overflow: hidden;

    border-radius: 14px;

    background: #111;
}

.book-video-player iframe {
    width: 100%;
    height: 100%;

    border: 0;

    display: block;
}

@media (max-width: 640px) {
  .book-header-card {
    grid-template-columns: 1fr;
  }

  .book-header-cover {
    max-width: 180px;
  }
}

.analytics-card {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: center;
}

.access-count {
  min-width: 110px;
  text-align: center;
  background: #fff3f3;
  border-radius: 16px;
  padding: 18px;
}

.access-count strong {
  display: block;
  color: var(--red);
  font-size: 2.4rem;
}

.access-count span {
  color: var(--muted);
  font-size: .9rem;
}

@media (max-width: 640px) {
  .analytics-card {
    flex-direction: column;
    align-items: flex-start;
  }

  .access-count {
    width: 100%;
  }
}

.analytics-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 18px;
  margin-bottom: 28px;
}

.stat-card {
  text-align: center;
}

.stat-card strong {
  display: block;
  color: var(--red);
  font-size: 2.6rem;
}

.stat-card span {
  color: var(--muted);
}

.top-actions{
    margin:20px 0 30px;
    display:flex;
    gap:12px;
    flex-wrap:wrap;
}

.teacher-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(90px, 1fr));
  gap: 12px;
  min-width: 340px;
}

.teacher-stats div {
  background: #fff3f3;
  border-radius: 14px;
  padding: 14px;
  text-align: center;
}

.teacher-stats strong {
  display: block;
  color: var(--red);
  font-size: 1.8rem;
}

.teacher-stats span {
  color: var(--muted);
  font-size: .85rem;
}

@media (max-width: 700px) {
  .teacher-stats {
    width: 100%;
    min-width: 0;
    grid-template-columns: 1fr;
  }
}

.footer {

    margin-top:60px;

    padding:35px 20px;

    text-align:center;

    color:#666;

    border-top:1px solid #ececec;

    background:#fafafa;

}

.footer strong{

    display:block;

    color:var(--red);

    font-size:1.2rem;

    margin-bottom:12px;

}

.footer p{

    margin:6px 0;

}

.footer small{

    display:block;

    margin-top:16px;

    color:#999;

}

.footer-links{

    margin:18px 0;

}

.footer-links a{

    text-decoration:none;

    color:var(--red);

    font-weight:600;

}

.footer-links a:hover{

    text-decoration:underline;

}