/* 课程商城 */
.section-title--spaced { margin-top: 2rem; }

.dim-table { width: 100%; border-collapse: collapse; }
.dim-table th, .dim-table td { padding: 0.6rem; border-bottom: 1px solid #4f46e5; text-align: left; }
.cart-table th:nth-child(2), .cart-table td:nth-child(2) { text-align: center; }
.cart-table th { color: #a78bfa; font-weight: 600; }
.cart-table .btn-sm {
    padding: 0.3rem 0.85rem;
    border-radius: 20px;
    border: 1px solid rgba(139, 92, 246, 0.55);
    background: rgba(255, 255, 255, 0.06);
    color: #e2e8ff;
    font-size: 0.8rem;
    cursor: pointer;
}
.cart-table .btn-sm:hover {
    background: rgba(139, 92, 246, 0.28);
    border-color: #a78bfa;
}
.form-inline { display: inline; }
.form-block-mt { margin-top: 1rem; }

.course-card-item {
    display: flex;
    flex-direction: column;
    transition: border-color 0.2s, transform 0.2s;
}
.course-card-item:hover {
    border-color: rgba(167, 139, 250, 0.55);
    transform: translateY(-4px);
}
.course-card-open {
    flex: 1;
    width: 100%;
    text-align: left;
    cursor: pointer;
    padding: 0;
    border: none;
    background: none;
    color: inherit;
    font: inherit;
    outline: none;
}
.course-card-open:focus-visible {
    outline: 2px solid rgba(167, 139, 250, 0.7);
    outline-offset: 4px;
    border-radius: 8px;
}
.course-card-open h3 {
    font-size: 1.15rem;
    font-weight: 700;
    color: #e9d5ff;
    margin: 0 0 0.5rem;
    line-height: 1.35;
}
.course-card-open:hover .course-detail-hint {
    color: #c4b5fd;
}
.course-desc {
    font-size: 0.85rem;
    color: #b9c2e6;
    margin: 0 0 0.5rem;
    line-height: 1.55;
}
.course-meta { font-size: 0.8rem; color: #94a3b8; margin: 0; }
.course-detail-hint {
    display: inline-block;
    margin-top: 10px;
    font-size: 0.75rem;
    color: #8b9bb8;
}
.course-add-form {
    position: relative;
    z-index: 1;
}

/* 弹窗：居中 + 深色玻璃风格 */
.course-detail-dialog {
    border: none;
    padding: 0;
    margin: 0;
    max-width: none;
    max-height: none;
    width: 100%;
    height: 100%;
    overflow: visible;
    background: transparent;
    color: #c8d2e0;
}
.course-detail-dialog::backdrop {
    background: rgba(2, 3, 8, 0.72);
    backdrop-filter: blur(6px);
}
.course-detail-dialog[open] {
    display: flex;
    align-items: center;
    justify-content: center;
    position: fixed;
    inset: 0;
}
.course-detail-panel {
    width: min(640px, calc(100vw - 32px));
    max-height: min(85vh, 720px);
    display: flex;
    flex-direction: column;
    background: rgba(12, 16, 30, 0.96);
    border: 1px solid rgba(139, 92, 246, 0.45);
    border-radius: 1.25rem;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(79, 70, 229, 0.15);
    overflow: hidden;
}
.course-detail-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    padding: 18px 20px 14px;
    border-bottom: 1px solid rgba(120, 130, 150, 0.25);
    flex-shrink: 0;
}
.course-detail-head h2 {
    margin: 0;
    font-size: 1.2rem;
    color: #e9d5ff;
    line-height: 1.4;
    flex: 1;
}
.course-detail-close {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    border: 1px solid rgba(139, 92, 246, 0.45);
    background: rgba(255, 255, 255, 0.05);
    color: #c4b5fd;
    cursor: pointer;
    font-size: 1rem;
    padding: 0;
    transition: background 0.2s, color 0.2s, border-color 0.2s;
}
.course-detail-close:hover {
    background: rgba(139, 92, 246, 0.25);
    border-color: #a78bfa;
    color: #fff;
}
.course-detail-meta {
    padding: 10px 20px 0;
    font-size: 0.85rem;
    color: #94a3b8;
    flex-shrink: 0;
}
.course-detail-price {
    padding: 6px 20px 12px;
    font-size: 1.5rem;
    font-weight: 700;
    color: #f5b042;
    flex-shrink: 0;
}
.course-detail-body {
    padding: 0 20px 12px;
    overflow-y: auto;
    flex: 1;
    min-height: 0;
    font-size: 0.95rem;
    line-height: 1.65;
    color: #c8d2e0;
}
.course-detail-body p { margin: 0 0 0.75em; }
.course-detail-body ul,
.course-detail-body ol {
    margin: 0 0 0.75em 1.25em;
}
.course-detail-body a {
    color: #a78bfa;
}
.course-detail-body img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
}
/* 富文本里常见的白底段落，强制贴合深色主题 */
.course-detail-body,
.course-detail-body * {
    background-color: transparent !important;
}
.course-detail-body p,
.course-detail-body li,
.course-detail-body span,
.course-detail-body div {
    color: #c8d2e0 !important;
}
.course-detail-body h1,
.course-detail-body h2,
.course-detail-body h3,
.course-detail-body h4 {
    color: #e9d5ff !important;
    margin: 0.75em 0 0.35em;
}
.course-detail-foot {
    flex-shrink: 0;
    padding: 12px 20px 18px;
    border-top: 1px solid rgba(120, 130, 150, 0.2);
    text-align: center;
}
.course-detail-close-btn {
    min-width: 120px;
    padding: 10px 28px;
    border-radius: 48px;
    border: 1px solid rgba(139, 92, 246, 0.6);
    background: rgba(255, 255, 255, 0.05);
    color: #e2e8ff;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: 0.2s;
}
.course-detail-close-btn:hover {
    background: rgba(139, 92, 246, 0.25);
    border-color: #a78bfa;
}
