:root {
    --cd-bg-primary: #0a0a0f;
    --cd-bg-secondary: #12121a;
    --cd-glass-bg: rgba(255, 255, 255, 0.06);
    --cd-glass-bg-hover: rgba(255, 255, 255, 0.1);
    --cd-glass-border: rgba(255, 255, 255, 0.1);
    --cd-glass-border-hover: rgba(255, 255, 255, 0.15);
    --cd-text-primary: #ffffff;
    --cd-text-secondary: rgba(255, 255, 255, 0.7);
    --cd-text-tertiary: rgba(255, 255, 255, 0.45);
    --cd-accent: #6366f1;
    --cd-accent-2: #ec4899;
    --cd-accent-3: #06b6d4;
    --cd-accent-glow: rgba(99, 102, 241, 0.4);
    --cd-success: #10b981;
    --cd-warning: #f59e0b;
    --cd-danger: #ef4444;
    --cd-radius-sm: 6px;
    --cd-radius-md: 10px;
    --cd-radius-lg: 14px;
}

/* Main content area */
body.course-detail-layout .course-detail-main {
    padding-top: 16px;
}

/* Breadcrumb */
.course-breadcrumb {
    font-size: 12px;
    color: var(--cd-text-tertiary);
    margin-bottom: 16px;
}

.course-breadcrumb ol.breadcrumb {
    background: transparent;
    padding: 0;
    margin: 0;
}

.course-breadcrumb ol.breadcrumb li,
.course-breadcrumb ol.breadcrumb li a {
    color: var(--cd-text-secondary);
    text-decoration: none;
    transition: color 0.2s ease;
}

.course-breadcrumb ol.breadcrumb li a:hover {
    color: var(--cd-accent-3);
}

.course-breadcrumb ol.breadcrumb li.active {
    color: var(--cd-text-primary);
}

/* Course Header Card */
.course-header {
    background: var(--cd-glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--cd-glass-border);
    border-radius: var(--cd-radius-lg);
    padding: 24px;
    margin-bottom: 16px;
    display: flex;
    gap: 24px;
}

.course-cover {
    width: 320px;
    flex-shrink: 0;
    aspect-ratio: 16 / 10;
    border-radius: var(--cd-radius-md);
    overflow: hidden;
    position: relative;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
}

.course-cover::before {
    content: '';
    position: absolute;
    width: 120%;
    height: 120%;
    background: radial-gradient(circle at 30% 30%, rgba(255,255,255,0.25) 0%, transparent 60%);
    pointer-events: none;
}

.play-btn {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 56px;
    height: 56px;
    background: rgba(255,255,255,0.9);
    backdrop-filter: blur(10px);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 2;
}

.play-btn:hover {
    transform: translate(-50%, -50%) scale(1.1);
    background: white;
}

.play-btn svg {
    width: 24px;
    height: 24px;
    fill: var(--cd-accent);
    margin-left: 2px;
}

.course-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.course-meta-top {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
    flex-wrap: wrap;
}

.category-tag {
    padding: 3px 10px;
    background: rgba(99, 102, 241, 0.2);
    color: var(--cd-accent-3);
    font-size: 11px;
    font-weight: 600;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    text-decoration: none;
    transition: all 0.2s ease;
}

.category-tag:hover {
    background: rgba(99, 102, 241, 0.3);
    color: #ffffff;
    text-decoration: none;
}

.category-tag.hot {
    background: linear-gradient(135deg, #ef4444, #f97316);
    color: white;
}

.category-tag.new {
    background: linear-gradient(135deg, #06b6d4, #6366f1);
    color: white;
}

.category-tag.free {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
}

.meta-text {
    font-size: 12px;
    color: var(--cd-text-tertiary);
}

.meta-text i {
    margin-right: 4px;
}

.course-title {
    font-size: 24px;
    font-weight: 700;
    line-height: 1.4;
    margin-bottom: 10px;
    letter-spacing: -0.3px;
    color: var(--cd-text-primary);
}

.course-subtitle {
    font-size: 13px;
    color: var(--cd-text-secondary);
    margin-bottom: 14px;
    line-height: 1.6;
}

.course-stats-row {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.course-stats-row .stat-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: var(--cd-text-secondary);
}

.course-stats-row .stat-item strong {
    color: var(--cd-text-primary);
    font-weight: 600;
}

.rating {
    display: flex;
    align-items: center;
    gap: 4px;
}

.stars {
    color: var(--cd-warning);
    font-size: 14px;
}

.course-action-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: auto;
    flex-wrap: wrap;
}

.price-box {
    display: flex;
    align-items: baseline;
    gap: 8px;
}

.current-price {
    font-size: 28px;
    font-weight: 700;
    background: linear-gradient(135deg, var(--cd-accent), var(--cd-accent-2));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.current-price.free {
    background: linear-gradient(135deg, var(--cd-success), #34d399);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.original-price {
    font-size: 14px;
    color: var(--cd-text-tertiary);
    text-decoration: line-through;
}

.discount-tag {
    padding: 2px 6px;
    background: var(--cd-danger);
    color: white;
    font-size: 10px;
    font-weight: 600;
    border-radius: 4px;
}

.btn-primary {
    padding: 10px 24px;
    background: linear-gradient(135deg, var(--cd-accent), var(--cd-accent-2));
    border: none;
    border-radius: var(--cd-radius-md);
    color: white;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px var(--cd-accent-glow);
}

.btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.btn-secondary {
    padding: 10px 16px;
    background: var(--cd-glass-bg);
    border: 1px solid var(--cd-glass-border);
    border-radius: var(--cd-radius-md);
    color: var(--cd-text-secondary);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.btn-secondary:hover {
    background: var(--cd-glass-bg-hover);
    color: var(--cd-text-primary);
    border-color: var(--cd-glass-border-hover);
}

/* Content Layout */
.content-layout {
    display: flex;
    gap: 16px;
}

.content-main {
    flex: 1;
    min-width: 0;
}

/* Tabs */
.tabs {
    background: var(--cd-glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--cd-glass-border);
    border-radius: var(--cd-radius-lg);
    overflow: hidden;
    margin-bottom: 16px;
}

.tab-header {
    display: flex;
    border-bottom: 1px solid var(--cd-glass-border);
    padding: 0 16px;
    overflow-x: auto;
}

.tab-item {
    padding: 12px 18px;
    font-size: 13px;
    font-weight: 500;
    color: var(--cd-text-tertiary);
    cursor: pointer;
    transition: all 0.2s ease;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
    white-space: nowrap;
}

.tab-item:hover {
    color: var(--cd-text-primary);
}

.tab-item.active {
    color: var(--cd-text-primary);
    border-bottom-color: var(--cd-accent);
}

.tab-content {
    padding: 24px;
}

.tab-pane {
    display: none;
}

.tab-pane.active {
    display: block;
}

/* Course Description */
.course-desc-section {
    margin-bottom: 28px;
}

.section-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--cd-text-primary);
}

.section-title::before {
    content: '';
    width: 4px;
    height: 16px;
    background: linear-gradient(180deg, var(--cd-accent), var(--cd-accent-2));
    border-radius: 2px;
}

.desc-text {
    font-size: 13px;
    color: var(--cd-text-secondary);
    line-height: 1.8;
}

.desc-text p {
    margin-bottom: 12px;
}

.desc-text img {
    max-width: 100%;
    height: auto;
    border-radius: var(--cd-radius-md);
}

/* FAQ */
.faq-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.faq-item {
    padding: 14px;
    background: var(--cd-glass-bg);
    border: 1px solid var(--cd-glass-border);
    border-radius: var(--cd-radius-md);
}

.faq-question {
    font-size: 13px;
    font-weight: 600;
    color: var(--cd-text-primary);
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.faq-q {
    width: 22px;
    height: 22px;
    background: linear-gradient(135deg, var(--cd-accent), var(--cd-accent-2));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    color: white;
    flex-shrink: 0;
}

.faq-answer {
    font-size: 12px;
    color: var(--cd-text-secondary);
    line-height: 1.6;
    padding-left: 30px;
}

/* Sidebar */
.content-sidebar {
    width: 300px;
    flex-shrink: 0;
}

.sidebar-card {
    background: var(--cd-glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--cd-glass-border);
    border-radius: var(--cd-radius-lg);
    padding: 16px;
    margin-bottom: 14px;
}

.sidebar-card h3 {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--cd-text-primary);
}

.sidebar-card h3 i {
    color: var(--cd-accent-3);
}

/* Price Card */
.price-card .price-large {
    font-size: 32px;
    font-weight: 700;
    background: linear-gradient(135deg, var(--cd-accent), var(--cd-accent-2));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 4px;
}

.price-card .price-large.free {
    background: linear-gradient(135deg, var(--cd-success), #34d399);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.price-card .price-desc {
    font-size: 12px;
    color: var(--cd-text-tertiary);
    margin-bottom: 14px;
}

.price-options {
    margin-bottom: 14px;
}

.price-option {
    padding: 10px 12px;
    border: 1px solid var(--cd-glass-border);
    border-radius: var(--cd-radius-md);
    margin-bottom: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--cd-glass-bg);
}

.price-option:hover {
    border-color: var(--cd-glass-border-hover);
}

.price-option.active {
    border-color: var(--cd-accent);
    background: rgba(99, 102, 241, 0.1);
}

.price-option-radio {
    width: 16px;
    height: 16px;
    border: 2px solid var(--cd-text-tertiary);
    border-radius: 50%;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.price-option.active .price-option-radio {
    border-color: var(--cd-accent);
}

.price-option-radio::after {
    content: '';
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--cd-accent);
    transform: scale(0);
    transition: transform 0.2s ease;
}

.price-option.active .price-option-radio::after {
    transform: scale(1);
}

.price-option-content {
    flex: 1;
}

.price-option-title {
    font-size: 13px;
    font-weight: 500;
    margin-bottom: 2px;
    color: var(--cd-text-primary);
}

.price-option-price {
    font-size: 12px;
    color: var(--cd-text-tertiary);
}

.price-option-price strong {
    color: var(--cd-text-primary);
    font-weight: 600;
}

.buy-btn {
    width: 100%;
    padding: 12px;
    background: linear-gradient(135deg, var(--cd-accent), var(--cd-accent-2));
    border: none;
    border-radius: var(--cd-radius-md);
    color: white;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
    margin-bottom: 8px;
    text-align: center;
    text-decoration: none;
    display: inline-block;
}

.buy-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px var(--cd-accent-glow);
    color: white;
    text-decoration: none;
}

.buy-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.svip-btn {
    width: 100%;
    padding: 10px;
    background: rgba(245, 158, 11, 0.15);
    border: 1px solid rgba(245, 158, 11, 0.3);
    border-radius: var(--cd-radius-md);
    color: var(--cd-warning);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
    text-align: center;
    text-decoration: none;
    display: inline-block;
}

.svip-btn:hover {
    background: rgba(245, 158, 11, 0.25);
    color: var(--cd-warning);
    text-decoration: none;
}

/* Info List */
.info-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.info-list li {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    font-size: 12px;
    border-bottom: 1px solid var(--cd-glass-border);
}

.info-list li:last-child {
    border-bottom: none;
}

.info-list .label {
    color: var(--cd-text-tertiary);
}

.info-list .value {
    color: var(--cd-text-secondary);
    font-weight: 500;
    text-align: right;
}

/* Teacher Card */
.teacher-info {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.teacher-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--cd-accent-2), var(--cd-accent));
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: 600;
    color: white;
    flex-shrink: 0;
}

.teacher-detail h4 {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 2px;
    color: var(--cd-text-primary);
}

.teacher-detail p {
    font-size: 11px;
    color: var(--cd-text-tertiary);
    margin: 0;
}

.teacher-desc {
    font-size: 12px;
    color: var(--cd-text-secondary);
    line-height: 1.6;
    margin: 0;
}

/* Related posts override */
body.course-detail-layout .related-posts {
    margin-top: 20px;
}

body.course-detail-layout .related-posts h3.u-border-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--cd-text-primary);
    border: none;
}

body.course-detail-layout .related-posts h3.u-border-title::before {
    content: '';
    width: 4px;
    height: 16px;
    background: linear-gradient(180deg, var(--cd-accent), var(--cd-accent-2));
    border-radius: 2px;
}

body.course-detail-layout .related-posts .row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

body.course-detail-layout .related-posts .row > div[class*="col-"] {
    width: 100%;
    max-width: 100%;
    flex: none;
    padding: 0;
}

body.course-detail-layout .related-posts .post {
    background: var(--cd-glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--cd-glass-border);
    border-radius: var(--cd-radius-md);
    overflow: hidden;
    transition: all 0.3s ease;
}

body.course-detail-layout .related-posts .post:hover {
    transform: translateY(-3px);
    border-color: var(--cd-glass-border-hover);
    box-shadow: 0 8px 20px rgba(0,0,0,0.25);
}

body.course-detail-layout .related-posts .post .entry-media {
    aspect-ratio: 16 / 10;
    overflow: hidden;
}

body.course-detail-layout .related-posts .post .entry-media a {
    display: block;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
}

body.course-detail-layout .related-posts .post .entry-wrapper {
    padding: 10px;
}

body.course-detail-layout .related-posts .post .entry-title {
    font-size: 12px;
    font-weight: 500;
    margin-bottom: 4px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

body.course-detail-layout .related-posts .post .entry-title a {
    color: var(--cd-text-primary);
    text-decoration: none;
}

body.course-detail-layout .related-posts .post .entry-footer {
    font-size: 11px;
    color: var(--cd-text-tertiary);
}

/* Comments tab dark theme */
body.course-detail-layout #tab-comments {
    color: var(--cd-text-secondary);
}

body.course-detail-layout #tab-comments .comment-list .comment-body {
    background: var(--cd-glass-bg);
    border: 1px solid var(--cd-glass-border);
    border-radius: var(--cd-radius-md);
    padding: 14px;
    margin-bottom: 10px;
}

body.course-detail-layout #tab-comments .comment-author {
    color: var(--cd-text-primary);
}

body.course-detail-layout #tab-comments .comment-metadata {
    color: var(--cd-text-tertiary);
}

body.course-detail-layout #tab-comments .comment-content {
    color: var(--cd-text-secondary);
}

body.course-detail-layout #tab-comments .reply a {
    color: var(--cd-accent-3);
}

/* Responsive */
@media (max-width: 1100px) {
    .content-layout {
        flex-direction: column;
    }

    .content-sidebar {
        width: 100%;
    }

    .course-header {
        flex-direction: column;
    }

    .course-cover {
        width: 100%;
    }
}

@media (max-width: 991px) {
    body.course-detail-layout .course-detail-main {
        margin-left: 170px;
    }
}

@media (max-width: 768px) {
    body.course-detail-layout .course-detail-main {
        margin-left: 0;
        padding: 16px;
    }

    .course-header {
        padding: 16px;
    }

    .course-title {
        font-size: 20px;
    }

    .course-action-row {
        flex-direction: column;
        align-items: stretch;
    }

    .btn-primary,
    .btn-secondary {
        width: 100%;
        justify-content: center;
    }

    .tab-content {
        padding: 16px;
    }

    body.course-detail-layout .related-posts .row {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    body.course-detail-layout .related-posts .row {
        grid-template-columns: 1fr;
    }
}

/* Mobile sidebar toggle */
.course-sidebar-toggle {
    display: none;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    margin-right: 10px;
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 8px;
    color: rgba(255, 255, 255, 0.85);
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.course-sidebar-toggle:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.18);
    color: #ffffff;
}

@media (max-width: 768px) {
    body.course-detail-layout .course-sidebar {
        position: fixed;
        top: 52px;
        left: 0;
        bottom: 0;
        width: 220px;
        height: calc(100vh - 52px);
        margin-bottom: 0;
        padding: 14px 0;
        background: rgba(12, 12, 20, 0.95);
        border-right: 1px solid rgba(255, 255, 255, 0.1);
        border-radius: 0;
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        z-index: 60;
        overflow-y: auto;
        scrollbar-width: none;
        -ms-overflow-style: none;
    }

    body.course-detail-layout .course-sidebar::-webkit-scrollbar {
        display: none;
    }

    body.course-detail-layout .course-sidebar.open {
        transform: translateX(0);
        box-shadow: 4px 0 20px rgba(0, 0, 0, 0.3);
    }

    body.course-detail-layout .course-sidebar .nav-section {
        display: block;
        width: 100%;
        vertical-align: initial;
    }

    .course-sidebar-toggle {
        display: inline-flex;
    }
}
