.course-details-section {
  --private: #7c4fe0;
  --private-dark: #6633cc;
  --private-soft: #f2edfd;

  background: linear-gradient(135deg, #ffffff 0%, #f8fafc 50%, #e2e8f0 100%);
  min-height: 100vh;
  padding: 8rem 0 4rem;
}

.course-details-section .container {
  max-width: 1080px;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  color: var(--text-secondary);
  text-decoration: none;
  margin-bottom: 18px;
  font-weight: 500;
}

.back-link:hover {
  color: var(--text-primary);
}

.back-link svg {
  width: 15px;
  height: 15px;
}

.layout {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 24px;
  align-items: start;
}

@media (max-width: 820px) {
  .layout {
    grid-template-columns: 1fr;
  }
}

.card {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: 0 1px 2px rgba(16, 24, 32, 0.04), 0 8px 24px rgba(16, 24, 32, 0.05);
  overflow: hidden;
}

.main-card {
  padding: 32px;
}

@media (max-width: 560px) {
  .main-card {
    padding: 22px;
  }
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.03em;
  padding: 6px 12px;
  border-radius: 999px;
  text-transform: uppercase;
}

.badge svg {
  width: 13px;
  height: 13px;
}

.badge.public {
  background: rgba(8, 145, 178, 0.1);
  color: var(--primary-dark);
}

.badge.private {
  background: var(--private-soft);
  color: var(--private-dark);
}

.main-card .course-title {
  font-size: 30px;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin: 16px 0 4px;
  line-height: 1.2;
  color: var(--text-primary);
}

@media (max-width: 560px) {
  .main-card .course-title {
    font-size: 24px;
  }
}

.instructor-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 14px 0 20px;
}

.instructor-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--primary-color);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 13px;
  flex-shrink: 0;
}

.instructor-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
}

.instructor-role {
  font-size: 12px;
  color: var(--text-secondary);
}

.course-description {
  font-size: 15px;
  line-height: 1.65;
  color: var(--text-secondary);
  margin-bottom: 24px;
  white-space: pre-line;
}

.divider {
  height: 1px;
  background: var(--border);
  margin: 24px 0;
}

.section-label {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-light);
  margin-bottom: 14px;
}

.detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

@media (max-width: 560px) {
  .detail-grid {
    grid-template-columns: 1fr;
  }
}

.detail-item {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 14px;
  background: #fafbfc;
  border: 1px solid var(--border);
  border-radius: 10px;
}

.detail-icon {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: rgba(8, 145, 178, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--primary-dark);
}

.detail-icon svg {
  width: 17px;
  height: 17px;
}

.detail-item.private .detail-icon {
  background: rgba(124, 79, 224, 0.1);
  color: var(--private);
}

.detail-text .label {
  font-size: 11px;
  color: var(--text-light);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 2px;
}

.detail-text .value {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  word-break: break-word;
}

.domain-notice {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  background: var(--private-soft);
  border: 1px solid #d9c9f0;
  border-radius: 10px;
  padding: 12px 14px;
  font-size: 13px;
  color: var(--private-dark);
  margin-top: 18px;
  line-height: 1.5;
}

.domain-notice svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  margin-top: 1px;
}

.domain-notice b {
  color: var(--private);
}

.sidebar {
  position: sticky;
  top: 24px;
}

.sidebar .card + .card {
  margin-top: 16px;
}

.price-card {
  padding: 24px;
}

.price-icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(8, 145, 178, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 14px;
  color: var(--primary-color);
}

.price-card.private .price-icon {
  background: rgba(124, 79, 224, 0.1);
  color: var(--private);
}

.price-icon svg {
  width: 22px;
  height: 22px;
}

.price-title {
  text-align: center;
  font-weight: 600;
  font-size: 15px;
  margin-bottom: 16px;
  color: var(--text-primary);
}

.price-box {
  background: #fafbfc;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 16px;
  margin-bottom: 18px;
}

.price-amount {
  font-size: 28px;
  font-weight: 700;
  text-align: center;
  color: var(--text-primary);
}

.price-amount.free {
  color: #16a34a;
}

.price-amount span {
  font-size: 16px;
  color: var(--text-secondary);
  font-weight: 500;
}

.price-sub {
  text-align: center;
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 2px;
}

.price-total {
  display: flex;
  justify-content: space-between;
  border-top: 1px dashed var(--border);
  margin-top: 12px;
  padding-top: 12px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
}

.btn-enroll {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 13px;
  border: none;
  border-radius: 8px;
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  text-decoration: none;
  transition: background 0.2s;
}

.btn-enroll svg {
  width: 16px;
  height: 16px;
}

.btn-enroll.teal {
  background: var(--primary-color);
}

.btn-enroll.teal:hover {
  background: var(--primary-dark);
}

.btn-enroll.purple {
  background: var(--private);
}

.btn-enroll.purple:hover {
  background: #6633cc;
}

.login-note {
  text-align: center;
  font-size: 12.5px;
  color: var(--text-secondary);
  margin-top: 14px;
}

.login-note a {
  color: var(--primary-dark);
  font-weight: 600;
  text-decoration: none;
}

.login-note.private a {
  color: var(--private);
}

.verify-card {
  padding: 24px;
}

.verify-notice {
  background: #fdf1dc;
  border: 1px solid #f3dfb0;
  border-radius: 10px;
  padding: 14px 16px;
  font-size: 12.5px;
  line-height: 1.6;
  color: #b8790f;
  text-align: center;
  margin-bottom: 20px;
}

.verify-notice b {
  color: #8f5c08;
}

.verify-field {
  margin-bottom: 14px;
}

.verify-field label {
  display: block;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-light);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 6px;
}

.verify-field input {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 13px;
  color: var(--text-primary);
  background: #fff;
  font-family: inherit;
  transition: border-color 0.2s;
}

.verify-field input.mono {
  font-family: 'JetBrains Mono', monospace;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  text-align: center;
}

.verify-field input:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(8, 145, 178, 0.1);
}

.verify-field input::placeholder {
  color: var(--text-light);
  font-family: inherit;
}

.verify-divider {
  border: none;
  border-top: 1px dashed var(--border);
  margin: 18px 0;
}

.btn-gradient {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 14px;
  border: none;
  border-radius: 8px;
  background: linear-gradient(90deg, var(--primary-dark) 0%, var(--primary-color) 100%);
  color: #fff;
  font-weight: 700;
  font-size: 14.5px;
  cursor: pointer;
  font-family: inherit;
  box-shadow: 0 6px 14px rgba(8, 145, 178, 0.28);
  transition: background 0.2s;
}

.btn-gradient svg {
  width: 16px;
  height: 16px;
}

.btn-gradient:hover {
  background: linear-gradient(90deg, #0e7490 0%, #0891b2 100%);
}

.enrolled-status {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px;
  background: #e4f6ec;
  color: #227a4a;
  border-radius: 10px;
  margin-bottom: 16px;
  font-size: 14px;
  font-weight: 600;
}

.enrolled-status svg {
  width: 20px;
  height: 20px;
}

.login-prompt {
  text-align: center;
}

.login-prompt p {
  color: var(--text-secondary);
  font-size: 14px;
  margin-bottom: 16px;
}

.login-prompt .btn {
  margin-bottom: 10px;
  width: 100%;
  justify-content: center;
}

.verify-card .btn-outline {
  width: 100%;
  justify-content: center;
  margin-top: 10px;
}

.is-hidden {
  display: none;
}

@media (max-width: 768px) {
  .course-details-section {
    padding: 7rem 0 3rem;
  }
}

@media (max-width: 820px) {
  .sidebar {
    position: static;
  }
}

.qr-pay {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
  padding: 12px;
  background: #fff;
  border: 1px solid var(--border, #e2e8f0);
  border-radius: 12px;
  text-align: center;
}

.qr-pay img {
  width: 160px;
  height: 160px;
  object-fit: contain;
  border-radius: 8px;
  background: #fff;
}

.qr-pay-caption {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-light, #64748b);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.price-card.private .qr-pay {
  border-color: rgba(124, 58, 237, 0.35);
}

.price-card:not(.private) .qr-pay {
  border-color: rgba(13, 148, 136, 0.35);
}
