/* ================================
   CHAPTER STYLES - PURPLE/TEAL THEME (PHYSICS VERSION)
================================ */
.chapters-grid {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.chapter-container {
    background: linear-gradient(135deg, rgba(10, 15, 47, 0.9), rgba(5, 10, 30, 0.9));
    border: 1px solid rgba(160, 32, 240, 0.4);
    border-radius: 15px;
    padding: 0;
    overflow: hidden;
    backdrop-filter: blur(10px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
    width: 100%;
    box-sizing: border-box;
}

.chapter-container:hover {
    border-color: rgba(160, 32, 240, 0.8);
    box-shadow: 0 12px 40px rgba(160, 32, 240, 0.3);
}

.chapter-header {
    background: linear-gradient(135deg, rgba(160, 32, 240, 0.15), rgba(0, 191, 255, 0.1));
    padding: 1.5rem 2rem;
    border-bottom: 1px solid rgba(160, 32, 240, 0.3);
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.chapter-header:hover {
    background: linear-gradient(135deg, rgba(160, 32, 240, 0.2), rgba(0, 191, 255, 0.15));
}

.chapter-header h3 {
    color: #a020f0;
    margin: 0;
    font-size: 1.4rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
}

.chapter-header h3::before {
    content: "⚛️";
    font-size: 1.2rem;
}

.toggle-btn {
    background: linear-gradient(45deg, #a020f0, #00bfff);
    border: none;
    color: #ffffff;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 5px;
}

.toggle-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(160, 32, 240, 0.5);
}

.chapter-content {
    padding: 0;
    display: none !important;
}

.chapter-content.active {
    display: block !important;
}

.notes-section {
    padding: 2rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.notes-content {
    line-height: 1.8;
    color: #e0e0ff;
    font-size: 1.1rem;
}

.notes-content h1, .notes-content h2, .notes-content h3, .notes-content h4 {
    color: #00bfff;
    margin: 1.5rem 0 1rem 0;
}

.notes-content p {
    margin-bottom: 1rem;
}

.notes-content ul, .notes-content ol {
    margin: 1rem 0;
    padding-left: 2rem;
}

.notes-content li {
    margin-bottom: 0.5rem;
}

.notes-content code {
    background: rgba(0, 191, 255, 0.1);
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    color: #00bfff;
    font-family: 'Courier New', monospace;
}

.file-download-section {
    padding: 2rem;
    background: rgba(160, 32, 240, 0.05);
    border-top: 1px solid rgba(160, 32, 240, 0.2);
}

.file-info {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    border-left: 4px solid #a020f0;
}

.file-icon {
    font-size: 2rem;
    color: #a020f0;
}

.file-details h4 {
    color: #a020f0;
    margin: 0 0 0.5rem 0;
    font-size: 1.1rem;
}

.file-meta {
    color: #a0a0c0;
    font-size: 0.9rem;
}

.download-btn {
    background: linear-gradient(45deg, #a020f0, #00bfff);
    color: #ffffff;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: bold;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.download-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(160, 32, 240, 0.4);
}

.no-file-notice {
    text-align: center;
    padding: 1.5rem;
    color: #a0a0c0;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    border: 1px dashed rgba(255, 255, 255, 0.2);
}

.questions-section {
    padding: 2rem;
    background: rgba(0, 191, 255, 0.05);
}

.questions-section h4 {
    color: #00bfff;
    margin-bottom: 1rem;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.questions-section h4::before {
    content: "📐";
}

.questions-section ul {
    list-style: none;
    padding: 0;
}

.questions-section li {
    background: rgba(255, 255, 255, 0.05);
    margin: 0.5rem 0;
    padding: 1rem;
    border-radius: 8px;
    border-left: 3px solid #00bfff;
    transition: all 0.3s ease;
}

.questions-section li:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateX(5px);
}

/* Animation for content reveal */
@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.chapter-content.active {
    animation: slideDown 0.3s ease-out;
}

/* Responsive Design */
@media (max-width: 768px) {
    .chapter-header {
        padding: 1rem;
        flex-direction: column;
        gap: 1rem;
        align-items: flex-start;
    }

    .chapter-header h3 {
        font-size: 1.2rem;
    }

    .notes-section,
    .file-download-section,
    .questions-section {
        padding: 1.5rem;
    }

    .file-info {
        flex-direction: column;
        text-align: center;
        gap: 0.5rem;
    }
}