:root {
    --primary-color: #2563eb;
    --primary-hover: #1d4ed8;
    --primary-light: #eff6ff;
    --text-color: #1e293b;
    --text-secondary: #64748b;
    --bg-color: #f8fafc;
    --card-bg: #ffffff;
    --border-color: #e2e8f0;
    --sidebar-bg: #1e293b;
    --sidebar-text: #94a3b8;
    --sidebar-active: #ffffff;
    --shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    --radius: 8px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.7;
}

a {
    text-decoration: none;
    color: inherit;
}

.layout {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 260px;
    background: var(--sidebar-bg);
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    overflow-y: auto;
    z-index: 100;
}

.sidebar-header {
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.logo {
    font-size: 24px;
}

.logo-img {
    width: 28px;
    height: 28px;
    object-fit: contain;
}

.site-title {
    font-size: 16px;
    font-weight: 600;
    color: white;
    cursor: pointer;
}

.sidebar-nav {
    padding: 16px 0;
}

.nav-section-title {
    padding: 8px 20px;
    font-size: 12px;
    font-weight: 600;
    color: var(--sidebar-text);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    color: var(--sidebar-text);
    transition: all 0.2s;
    border-left: 3px solid transparent;
}

.nav-item:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--sidebar-active);
}

.nav-item.active {
    background: rgba(255, 255, 255, 0.1);
    color: var(--sidebar-active);
    border-left-color: var(--primary-color);
}

.nav-number {
    font-size: 12px;
    font-weight: 600;
    color: var(--sidebar-text);
    width: 24px;
}

.nav-item:hover .nav-number,
.nav-item.active .nav-number {
    color: var(--primary-color);
}

.nav-text {
    font-size: 14px;
}

.main-content {
    flex: 1;
    margin-left: 260px;
    min-height: 100vh;
    transition: margin-right 0.3s ease;
}

.main-content.no-transition {
    transition: none !important;
}

body.right-sidebar-open .main-content {
    margin-right: 320px;
}

@media (max-width: 1400px) {
    body.right-sidebar-open .main-content {
        margin-right: 280px;
    }
}

@media (max-width: 1200px) {
    body.right-sidebar-open .main-content {
        margin-right: 0;
    }
}

.content-wrapper {
    max-width: 900px;
    margin: 0 auto;
    padding: 60px 40px;
}

.doc-header {
    margin-bottom: 48px;
    padding-bottom: 32px;
    border-bottom: 1px solid var(--border-color);
}

.doc-title {
    font-size: 42px;
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--text-color);
}

.doc-subtitle {
    font-size: 18px;
    color: var(--text-secondary);
}

.doc-intro {
    margin-bottom: 48px;
}

.doc-intro h2,
.doc-toc h2,
.resource-section h2 {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 16px;
    color: var(--text-color);
}

.doc-intro p {
    font-size: 16px;
    color: var(--text-secondary);
    line-height: 1.8;
}

.resource-section {
    margin-bottom: 48px;
}

.resource-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}

.resource-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 24px 16px;
    background: var(--card-bg);
    border-radius: var(--radius);
    border: 1px solid var(--border-color);
    text-decoration: none;
    transition: all 0.2s;
    text-align: center;
}

.resource-card:hover {
    border-color: var(--primary-color);
    box-shadow: var(--shadow);
    transform: translateY(-2px);
}

.resource-card-icon {
    width: 48px;
    height: 48px;
    background: var(--primary-light);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 500;
    color: var(--primary-color);
    margin-bottom: 12px;
}

.resource-card-icon-img {
    width: 48px;
    height: 48px;
    margin-bottom: 12px;
    object-fit: contain;
}

.resource-card-title {
    font-size: 15px;
    font-weight: 500;
    color: var(--text-color);
    margin-bottom: 4px;
}

.resource-card-desc {
    font-size: 12px;
    color: var(--text-secondary);
}

.resource-card-count {
    margin-top: 8px;
    padding: 2px 8px;
    background: var(--primary-light);
    color: var(--primary-color);
    border-radius: 4px;
    font-size: 11px;
    font-weight: 500;
}

.resource-detail-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
}

.resource-detail-modal.show {
    opacity: 1;
    visibility: visible;
}

.resource-detail-content {
    background: var(--card-bg);
    border-radius: var(--radius);
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.resource-detail-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-color);
}

.resource-detail-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: var(--text-color);
}

.resource-detail-close {
    width: 32px;
    height: 32px;
    border: none;
    background: none;
    font-size: 24px;
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: all 0.2s;
}

.resource-detail-close:hover {
    background: var(--bg-color);
    color: var(--text-color);
}

.resource-detail-body {
    padding: 20px;
    overflow-y: auto;
    flex: 1;
}

.resource-detail-empty {
    text-align: center;
    padding: 40px 20px;
}

.resource-detail-empty .empty-icon {
    font-size: 48px;
    margin-bottom: 12px;
}

.resource-detail-empty .empty-text {
    font-size: 14px;
    color: var(--text-secondary);
}

.resource-detail-item {
    padding: 16px;
    background: var(--bg-color);
    border-radius: var(--radius);
    margin-bottom: 12px;
    border: 1px solid #333;
}

.resource-detail-item:last-child {
    margin-bottom: 0;
}

.resource-detail-item-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}

.resource-detail-item-title {
    font-size: 15px;
    font-weight: 500;
    color: var(--text-color);
}

.resource-detail-item-title-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.resource-item-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    background: var(--primary-light);
    border-radius: 4px;
    font-size: 12px;
    color: var(--primary-color);
}

.resource-item-icon-img {
    width: 24px;
    height: 24px;
    object-fit: contain;
}

.resource-detail-item-paid {
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 500;
    background: var(--primary-light);
    color: var(--primary-color);
}

.resource-detail-item-desc {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.5;
    margin-bottom: 12px;
}

.resource-detail-links {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.resource-detail-link {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: var(--card-bg);
    border-radius: 6px;
    text-decoration: none;
    transition: all 0.2s;
}

.resource-detail-link:hover {
    background: var(--primary-light);
}

.resource-detail-link .link-tag {
    padding: 2px 8px;
    background: var(--primary-color);
    color: white;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 500;
    white-space: nowrap;
}

.resource-detail-link .link-url {
    font-size: 12px;
    color: var(--text-secondary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

@media (max-width: 768px) {
    .resource-grid {
        grid-template-columns: repeat(4, 1fr);
    }
    
    .resource-card {
        padding: 12px 8px;
    }
    
    .resource-card-icon {
        width: 36px;
        height: 36px;
        font-size: 12px;
    }
    
    .resource-card-icon-img {
        width: 36px;
        height: 36px;
    }
    
    .resource-card-title {
        font-size: 12px;
    }
    
    .resource-card-desc {
        display: none;
    }
    
    .resource-card-count {
        font-size: 10px;
    }
}

@media (max-width: 480px) {
    .resource-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 8px;
    }
    
    .resource-card {
        padding: 10px 6px;
    }
    
    .resource-card-icon {
        width: 32px;
        height: 32px;
        font-size: 11px;
    }
    
    .resource-card-icon-img {
        width: 32px;
        height: 32px;
    }
    
    .resource-card-title {
        font-size: 11px;
    }
}

.toc-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.toc-item {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 20px 24px;
    background: var(--card-bg);
    border-radius: var(--radius);
    border: 1px solid var(--border-color);
    transition: all 0.2s;
}

.toc-item:hover {
    border-color: var(--primary-color);
    box-shadow: var(--shadow);
}

.toc-number {
    font-size: 14px;
    font-weight: 700;
    color: var(--primary-color);
    width: 32px;
    flex-shrink: 0;
}

.toc-content {
    flex: 1;
}

.toc-content h3 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 4px;
}

.toc-content p {
    font-size: 14px;
    color: var(--text-secondary);
}

.toc-arrow {
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s;
}

.toc-arrow svg {
    color: var(--text-secondary);
}

.toc-item:hover .toc-arrow {
    transform: translateX(4px);
}

.toc-item:hover .toc-arrow svg {
    color: var(--primary-color);
}

.doc-footer {
    margin-top: 48px;
    padding-top: 32px;
    border-top: 1px solid var(--border-color);
    text-align: right;
}

.btn-next {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: var(--primary-color);
    color: white;
    border-radius: var(--radius);
    font-size: 15px;
    font-weight: 500;
    transition: background 0.2s;
}

.btn-next:hover {
    background: var(--primary-hover);
}

.page-nav {
    display: flex;
    justify-content: space-between;
    margin-top: 48px;
    padding-top: 32px;
    border-top: 1px solid var(--border-color);
}

.page-nav-link {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 16px 24px;
    background: var(--card-bg);
    border-radius: var(--radius);
    border: 1px solid var(--border-color);
    transition: all 0.2s;
    max-width: 200px;
}

.page-nav-link:hover {
    border-color: var(--primary-color);
}

.page-nav-link.prev {
    text-align: left;
}

.page-nav-link.next {
    text-align: right;
    margin-left: auto;
}

.page-nav-label {
    font-size: 12px;
    color: var(--text-secondary);
}

.page-nav-title {
    font-size: 14px;
    font-weight: 500;
    color: var(--primary-color);
}

.page-header {
    margin-bottom: 40px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--border-color);
}

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

.breadcrumb a {
    color: var(--primary-color);
    text-decoration: none;
}

.breadcrumb a:hover {
    text-decoration: underline;
}

.page-title {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--text-color);
}

.page-desc {
    font-size: 16px;
    color: var(--text-secondary);
}

.section {
    margin-bottom: 48px;
}

.section-header {
    margin-bottom: 20px;
}

.section-title {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--primary-color);
    display: inline-block;
}

.video-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.video-player-card {
    background: var(--card-bg);
    border-radius: var(--radius);
    border: 1px solid var(--border-color);
    overflow: hidden;
    transition: all 0.2s;
}

.video-player-card:hover {
    border-color: var(--primary-color);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.video-player-header {
    padding: 16px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    cursor: pointer;
    user-select: none;
}

.video-player-title {
    font-size: 15px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
    min-width: 0;
    overflow: hidden;
    color: var(--text-color);
}

.video-player-title span:last-child {
    word-wrap: break-word;
    word-break: break-all;
}

.video-player-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
    white-space: nowrap;
}

.video-player-link {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: var(--primary-light);
    color: var(--primary-color);
    border-radius: var(--radius);
    font-size: 13px;
    transition: all 0.2s;
}

.video-player-card:hover .video-player-link {
    background: var(--primary-color);
    color: white;
}

.keypoint-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.keypoint-item {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 20px;
    background: var(--card-bg);
    border-radius: var(--radius);
    border: 1px solid var(--border-color);
}

.keypoint-number {
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 14px;
    flex-shrink: 0;
}

.keypoint-content {
    flex: 1;
}

.keypoint-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 8px;
}

.keypoint-text {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.6;
}

.keypoint-simple {
    margin-bottom: 32px;
}

.keypoint-simple-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
    padding-bottom: 12px;
    position: relative;
}

.keypoint-simple-title::before {
    content: '✦';
    color: var(--primary-color);
    font-size: 16px;
}

.keypoint-simple-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100px;
    height: 2px;
    background: var(--primary-color);
    opacity: 0.3;
}

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

.keypoint-simple-list li {
    font-size: 15px;
    color: var(--text-color);
    line-height: 1.8;
    margin-bottom: 10px;
    padding-left: 20px;
    position: relative;
}

.keypoint-simple-list li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 10px;
    width: 6px;
    height: 6px;
    background: var(--primary-color);
    border-radius: 50%;
}

.keypoint-simple-list li:last-child {
    margin-bottom: 0;
}

.resource-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.resource-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 20px;
    background: var(--card-bg);
    border-radius: var(--radius);
    border: 1px solid var(--border-color);
    transition: all 0.2s;
}

.resource-item:hover {
    border-color: var(--primary-color);
}

.resource-icon {
    width: 40px;
    height: 40px;
    background: var(--bg-color);
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
}

.resource-info {
    flex: 1;
    min-width: 0;
    overflow: hidden;
}

.resource-title {
    font-size: 15px;
    font-weight: 500;
    margin-bottom: 4px;
    word-wrap: break-word;
    word-break: break-all;
}

.resource-desc {
    font-size: 13px;
    color: var(--text-secondary);
}

.resource-item .video-link-btn {
    flex-shrink: 0;
    white-space: nowrap;
}

.resource-multi {
    flex-wrap: wrap;
}

.resource-multi .resource-info {
    width: 100%;
}

.multi-links {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 12px;
}

.multi-link-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: var(--bg-color);
    border-radius: 6px;
    text-decoration: none;
    transition: all 0.2s;
}

.multi-link-item:hover {
    background: var(--primary-light);
}

.link-url {
    font-size: 12px;
    color: var(--text-secondary);
    word-break: break-all;
}

.cloud-tag {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    background: var(--primary-light);
    color: var(--primary-color);
    border-radius: 4px;
    font-size: 11px;
    font-weight: 500;
    white-space: nowrap;
    flex-shrink: 0;
}

.empty-state {
    text-align: center;
    padding: 40px 20px;
    background: var(--card-bg);
    border-radius: var(--radius);
    border: 1px dashed var(--border-color);
}

.empty-icon {
    font-size: 48px;
    margin-bottom: 12px;
}

.empty-title {
    font-size: 16px;
    font-weight: 500;
    margin-bottom: 8px;
}

.empty-desc {
    font-size: 14px;
    color: var(--text-secondary);
}

.download-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 20px;
    background: var(--card-bg);
    border-radius: var(--radius);
    border: 1px solid var(--border-color);
    transition: all 0.2s;
    text-decoration: none;
    color: inherit;
}

.download-item:hover {
    border-color: var(--primary-color);
    background: var(--primary-light);
}

.download-icon {
    width: 44px;
    height: 44px;
    background: linear-gradient(135deg, var(--primary-color), #4f46e5);
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: white;
    flex-shrink: 0;
}

.download-info {
    flex: 1;
}

.download-title {
    font-size: 15px;
    font-weight: 500;
    margin-bottom: 4px;
}

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

.download-btn {
    padding: 8px 16px;
    background: var(--primary-color);
    color: white;
    border-radius: var(--radius);
    font-size: 13px;
    transition: all 0.2s;
}

.download-item:hover .download-btn {
    background: #4f46e5;
}

.exercise-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.exercise-item {
    padding: 20px;
    background: var(--card-bg);
    border-radius: var(--radius);
    border: 1px solid var(--border-color);
}

.exercise-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.exercise-title {
    font-size: 15px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
}

.exercise-badge {
    padding: 2px 8px;
    background: var(--primary-light);
    color: var(--primary-color);
    border-radius: 4px;
    font-size: 11px;
    font-weight: 500;
}

.exercise-badge.medium {
    background: #fef3c7;
    color: #d97706;
}

.exercise-badge.hard {
    background: #fee2e2;
    color: #dc2626;
}

.exercise-desc {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 12px;
}

.exercise-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 12px;
    border-top: 1px solid var(--border-color);
}

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

.exercise-link {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: var(--primary-light);
    color: var(--primary-color);
    border-radius: var(--radius);
    font-size: 13px;
    text-decoration: none;
    transition: all 0.2s;
}

.exercise-link:hover {
    background: var(--primary-color);
    color: white;
}

.exercise-item {
    display: flex;
    gap: 16px;
    padding: 16px 20px;
    background: var(--card-bg);
    border-radius: var(--radius);
    border: 1px solid var(--border-color);
}

.exercise-number {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--primary-light);
    color: var(--primary-color);
    border-radius: 50%;
    font-size: 13px;
    font-weight: 600;
    flex-shrink: 0;
}

.exercise-content {
    flex: 1;
}

.exercise-question {
    font-size: 14px;
    color: var(--text-color);
    line-height: 1.6;
    margin-bottom: 12px;
}

.exercise-options {
    margin-bottom: 12px;
}

.exercise-option {
    font-size: 13px;
    color: var(--text-secondary);
    padding: 4px 0;
    line-height: 1.5;
}

.exercise-option .option-label {
    color: var(--primary-color);
    font-weight: 500;
    margin-right: 8px;
}

.exercise-answer {
    font-size: 13px;
    color: #10b981;
    font-weight: 500;
    padding-top: 8px;
    border-top: 1px dashed var(--border-color);
}

.exercise-pdf-section {
    background: white;
    border-radius: var(--radius);
    border: 1px solid var(--border-color);
    overflow: hidden;
}

.exercise-pdf-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    background: var(--bg-color);
    border-bottom: 1px solid var(--border-color);
}

.exercise-pdf-header h3 {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-color);
    margin: 0;
}

.pdf-download-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: var(--primary-color);
    color: white;
    border-radius: var(--radius);
    font-size: 13px;
    text-decoration: none;
    transition: all 0.2s;
}

.pdf-download-btn:hover {
    background: var(--primary-dark);
}

.exercise-pdf-desc {
    padding: 16px 20px;
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.6;
    margin: 0;
    background: #f8f9fa;
    border-bottom: 1px solid var(--border-color);
}

.exercise-pdf-viewer {
    position: relative;
    width: 100%;
    min-height: 600px;
    background: #f5f5f5;
}

.exercise-pdf-viewer iframe {
    width: 100%;
    height: 600px;
    border: none;
}

.pdf-fallback {
    display: none;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    padding: 40px;
    background: white;
    border-radius: var(--radius);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.pdf-fallback p {
    font-size: 14px;
    color: var(--text-secondary);
}

.pdf-fallback a {
    color: var(--primary-color);
    text-decoration: underline;
}

@media (max-width: 900px) {
    .exercise-pdf-header {
        flex-direction: column;
        gap: 12px;
        text-align: center;
    }
    
    .exercise-pdf-viewer iframe {
        height: 400px;
    }
}

.disclaimer {
    margin-top: 32px;
    margin-bottom: 32px;
    padding: 16px 20px;
    background: #f8f9fa;
    border-radius: var(--radius);
    border: 1px solid #e0e0e0;
}

.disclaimer p {
    font-size: 13px;
    color: #666;
    line-height: 1.8;
    margin: 0;
    text-align: left;
}

.disclaimer-title {
    font-size: 14px;
    font-weight: 600;
    color: #444;
    margin-bottom: 10px;
    text-align: left;
}

.disclaimer-content {
    font-size: 13px;
    font-weight: 400;
    color: #666;
    line-height: 1.8;
    text-align: left;
}

.disclaimer-content p {
    margin-bottom: 8px;
    text-align: left;
}

.disclaimer-content p:last-child {
    margin-bottom: 0;
}

.resource-tip {
    font-size: 12px;
    color: var(--text-secondary);
    margin-top: 12px;
    opacity: 0.8;
    line-height: 1.6;
}

.toast {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: var(--text-color);
    color: white;
    padding: 12px 24px;
    border-radius: var(--radius);
    font-size: 14px;
    z-index: 1000;
    opacity: 0;
    transition: all 0.3s;
}

.toast.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

.mobile-header {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 56px;
    background: var(--sidebar-bg);
    z-index: 100;
    padding: 0 16px;
    align-items: center;
    justify-content: space-between;
}

.mobile-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    color: white;
    font-weight: 600;
    cursor: pointer;
}

.menu-toggle {
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    padding: 8px;
}

@media (max-width: 900px) {
    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s;
    }

    .sidebar.open {
        transform: translateX(0);
    }

    .main-content {
        margin-left: 0;
    }

    .mobile-header {
        display: flex;
    }

    .content-wrapper {
        padding: 80px 20px 40px;
    }

    .doc-title {
        font-size: 32px;
    }

    .page-nav {
        flex-direction: column;
        gap: 12px;
    }

    .page-nav-link {
        max-width: none;
    }

    .page-nav-link.next {
        text-align: left;
        margin-left: 0;
    }
}

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
}

.modal-overlay.show {
    opacity: 1;
    visibility: visible;
}

.modal-box {
    background: white;
    border-radius: 12px;
    padding: 24px;
    width: 320px;
    max-width: 90%;
    transform: scale(0.9);
    transition: transform 0.3s;
}

.modal-overlay.show .modal-box {
    transform: scale(1);
}

.modal-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 20px;
    text-align: center;
}

.modal-input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s;
}

.modal-input:focus {
    border-color: var(--primary-color);
}

.modal-buttons {
    display: flex;
    gap: 12px;
    margin-top: 20px;
}

.modal-btn {
    flex: 1;
    padding: 12px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
}

.modal-btn.primary {
    background: var(--primary-color);
    color: white;
}

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

.modal-btn.secondary {
    background: var(--bg-color);
    color: var(--text-color);
}

.modal-btn.secondary:hover {
    background: var(--border-color);
}

.file-number-tag {
    color: #52c41a;
    font-size: 12px;
    margin-left: 8px;
    font-weight: normal;
    cursor: help;
    position: relative;
    display: inline-block;
}

.file-number-tag:hover::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.85);
    color: white;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 12px;
    white-space: nowrap;
    z-index: 1000;
    pointer-events: none;
    animation: fadeIn 0.2s ease;
}

.file-number-tag:hover::before {
    content: '';
    position: absolute;
    bottom: calc(100% + 2px);
    left: 50%;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-top-color: rgba(0, 0, 0, 0.85);
    z-index: 1000;
    pointer-events: none;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(4px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

@media (max-width: 768px) {
    .file-number-tag:active::after {
        content: attr(data-tooltip);
        position: fixed;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        background: rgba(0, 0, 0, 0.85);
        color: white;
        padding: 12px 16px;
        border-radius: 8px;
        font-size: 14px;
        white-space: nowrap;
        z-index: 10000;
        pointer-events: none;
    }
}

.right-sidebar {
    position: fixed;
    right: 0;
    top: 0;
    height: 100vh;
    width: 320px;
    background: #fff;
    box-shadow: -2px 0 8px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    transform: translateX(100%);
    transition: transform 0.3s ease;
    display: flex;
    flex-direction: column;
}

.right-sidebar.no-transition {
    transition: none !important;
}

.right-sidebar.collapsed {
    transform: translateX(100%);
}

.right-sidebar.expanded {
    transform: translateX(0);
}

.right-sidebar-toggle {
    position: absolute;
    left: -30px;
    top: 50%;
    transform: translateY(-50%);
    width: 30px;
    height: 60px;
    background: #fff;
    border: none;
    border-radius: 8px 0 0 8px;
    box-shadow: -2px 0 8px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.right-sidebar-toggle:hover {
    background: #f5f5f5;
}

.right-sidebar-toggle svg {
    transition: transform 0.3s ease;
}

.right-sidebar.expanded .right-sidebar-toggle svg {
    transform: rotate(180deg);
}

.right-sidebar-content {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
}

.sidebar-tool-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    background: #2563eb;
    color: #fff;
    border-radius: 8px;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s;
    margin-bottom: 16px;
}

.sidebar-tool-btn:hover {
    background: #1d4ed8;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.3);
}

.sidebar-tool-btn svg {
    flex-shrink: 0;
}

.sidebar-section {
    margin-bottom: 24px;
    padding-bottom: 24px;
    border-bottom: 1px solid #eee;
}

.sidebar-section:last-child {
    border-bottom: none;
}

.calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.calendar-title {
    font-size: 14px;
    font-weight: 600;
    color: #333;
}

.calendar-nav-btn {
    width: 28px;
    height: 28px;
    border: 1px solid #ddd;
    background: #fff;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    color: #666;
    transition: all 0.2s;
}

.calendar-nav-btn:hover {
    background: #f5f5f5;
    border-color: #1890ff;
    color: #1890ff;
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 2px;
    margin-bottom: 8px;
}

.calendar-day-header {
    text-align: center;
    font-size: 12px;
    color: #999;
    padding: 2px 0;
    font-weight: 500;
}

.calendar-day {
    text-align: center;
    padding: 6px 4px;
    font-size: 12px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
    color: #333;
}

.calendar-day:hover {
    background: #f5f5f5;
}

.calendar-day.other-month {
    color: #ccc;
}

.calendar-day.today {
    background: #e6f7ff;
    color: #1890ff;
    font-weight: 600;
}

.calendar-day.checked {
    background: #52c41a;
    color: #fff;
    font-weight: 600;
}

.calendar-day.today.checked {
    background: #52c41a;
    color: #fff;
}

.checkin-btn {
    width: 100%;
    padding: 10px;
    background: #1890ff;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
}

.checkin-btn:hover {
    background: #40a9ff;
}

.checkin-btn:disabled {
    background: #d9d9d9;
    cursor: not-allowed;
}

.notes-textarea {
    width: 100%;
    min-height: 250px;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 13px;
    line-height: 1.6;
    resize: vertical;
    font-family: inherit;
    transition: border-color 0.2s;
}

.notes-textarea:focus {
    outline: none;
    border-color: #1890ff;
}

.timer-display {
    text-align: center;
    font-size: 24px;
    font-weight: 700;
    font-family: 'SF Mono', 'Monaco', 'Courier New', monospace;
    color: #333;
    padding: 16px;
    background: #f5f5f5;
    border-radius: 12px;
    margin-bottom: 16px;
    letter-spacing: 1px;
    word-break: break-all;
    overflow-wrap: break-word;
    line-height: 1.4;
}

.timer-controls {
    display: flex;
    gap: 12px;
    margin-bottom: 16px;
    justify-content: center;
}

.timer-btn {
    width: 56px;
    height: 56px;
    border: none;
    background: #fff;
    border-radius: 50%;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 500;
}

.timer-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

.timer-btn:active {
    transform: translateY(0);
}

.timer-btn:first-child {
    background: #1890ff;
    color: #fff;
}

.timer-btn:first-child:hover {
    background: #40a9ff;
}

.timer-btn:nth-child(2) {
    background: #faad14;
    color: #fff;
}

.timer-btn:nth-child(2):hover {
    background: #ffc53d;
}

.timer-btn:nth-child(3) {
    background: #ff4d4f;
    color: #fff;
}

.timer-btn:nth-child(3):hover {
    background: #ff7875;
}

.timer-mode {
    display: flex;
    gap: 0;
    margin-bottom: 16px;
    background: #f5f5f5;
    border-radius: 24px;
    padding: 4px;
    align-items: center;
}

.timer-mode-btn {
    flex: 1;
    padding: 8px 16px;
    border: none;
    background: transparent;
    border-radius: 20px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
    color: #666;
}

.timer-mode-btn.active {
    background: #fff;
    color: #1890ff;
}

.timer-mode-btn:hover:not(.active) {
    color: #1890ff;
}

.sound-toggle-btn {
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 50%;
    background: #52c41a;
    color: #fff;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 4px;
    flex-shrink: 0;
}

.sound-toggle-btn:hover {
    transform: scale(1.1);
}

.sound-toggle-btn.disabled {
    background: #ff4d4f;
}

.sound-toggle-btn svg {
    display: block;
}

.countdown-input {
    display: flex;
    gap: 8px;
    background: #f5f5f5;
    padding: 12px;
    border-radius: 12px;
}

.countdown-input input {
    flex: 1;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
    text-align: center;
    background: #fff;
    transition: all 0.3s;
}

.countdown-input input:focus {
    outline: none;
    border-color: #1890ff;
}

.timer-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 10000;
}

.timer-modal.show {
    display: flex;
}

.timer-modal-content {
    background: #fff;
    border-radius: 16px;
    padding: 32px;
    text-align: center;
    max-width: 320px;
    width: 90%;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from {
        transform: translateY(-20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.timer-modal-icon {
    font-size: 48px;
    margin-bottom: 16px;
    animation: float 2s ease-in-out infinite;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

.timer-modal-title {
    font-size: 20px;
    font-weight: 600;
    color: #333;
    margin: 0 0 12px 0;
}

.timer-modal-message {
    font-size: 14px;
    color: #666;
    margin: 0 0 24px 0;
    line-height: 1.6;
}

.timer-modal-btn {
    width: 100%;
    padding: 12px;
    background: #1890ff;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
}

.timer-modal-btn:hover {
    background: #40a9ff;
}

@media (max-width: 1200px) {
    .right-sidebar {
        width: 280px;
    }
    
    .timer-display {
        font-size: 20px;
        padding: 12px;
        letter-spacing: 0.5px;
    }
    
    .timer-btn {
        width: 48px;
        height: 48px;
        font-size: 12px;
    }
}

@media (max-width: 768px) {
    .right-sidebar {
        display: none;
    }
}
