/* Class 11 Physics chapter pages */
:root {
    --physics-blue: #1d4ed8;
    --physics-ink: #0f172a;
    --physics-line: #dbeafe;
    --physics-soft: #eff6ff;
    --physics-warm: #fff7ed;
}

.physics-hero {
    background: linear-gradient(135deg, #eff6ff 0%, #ffffff 52%, #fff7ed 100%);
    border: 1px solid var(--physics-line);
    border-radius: 12px;
    padding: clamp(20px, 4vw, 36px);
    margin-bottom: 24px;
}

.physics-hero .eyebrow {
    color: var(--physics-blue);
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0;
    font-size: 0.82rem;
}

.physics-hero h1 {
    color: var(--physics-ink);
    line-height: 1.14;
    margin: 10px 0 12px;
}

.physics-hero p {
    color: #475569;
    line-height: 1.75;
    max-width: 820px;
}

.physics-facts {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: 12px;
    margin: 22px 0;
}

.physics-fact {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 14px;
}

.physics-fact span {
    display: block;
    color: #64748b;
    font-size: 0.82rem;
    font-weight: 800;
}

.physics-fact strong {
    display: block;
    color: #111827;
    line-height: 1.35;
    margin-top: 6px;
}

.physics-toc {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 18px 0 30px;
}

.physics-toc a {
    background: var(--physics-soft);
    border: 1px solid var(--physics-line);
    border-radius: 999px;
    color: var(--physics-blue);
    font-size: 0.9rem;
    font-weight: 800;
    padding: 8px 12px;
    text-decoration: none;
}

.physics-source h2 {
    margin-top: 30px;
}

.physics-source h3 {
    color: #1e40af;
    line-height: 1.35;
}

.physics-source p {
    line-height: 1.78;
}

.physics-question {
    border: 1px solid #e5e7eb;
    border-left: 4px solid var(--physics-blue);
    border-radius: 8px;
    background: #ffffff;
    padding: 16px;
    margin: 18px 0;
}

.physics-answer {
    background: #f8fafc;
    border-radius: 8px;
    color: #334155;
    line-height: 1.75;
    margin-top: 12px;
    padding: 14px;
}

.physics-note {
    background: var(--physics-warm);
    border-left: 4px solid #f97316;
    border-radius: 8px;
    color: #7c2d12;
    line-height: 1.7;
    padding: 16px;
}

.physics-pdf-frame {
    width: 100%;
    min-height: 580px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    background: #f8fafc;
}

.physics-chapter-nav {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 10px;
    margin-top: 18px;
}

.physics-chapter-nav a {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    color: #1f2937;
    font-weight: 800;
    padding: 12px;
    text-decoration: none;
}

.physics-chapter-nav a.active,
.physics-chapter-nav a:hover {
    background: var(--physics-soft);
    border-color: var(--physics-blue);
    color: var(--physics-blue);
}

.physics-full-text {
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    color: #334155;
    line-height: 1.65;
    margin-top: 18px;
    max-height: 420px;
    overflow: auto;
    padding: 16px;
    white-space: pre-wrap;
    word-break: break-word;
}

.physics-download-panel {
    align-items: center;
    background: #ffffff;
    border: 1px solid #dbeafe;
    border-radius: 10px;
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    justify-content: space-between;
    margin: 18px 0 24px;
    padding: 16px;
}

.physics-download-panel strong {
    color: var(--physics-ink);
}

.physics-download-panel span {
    color: #64748b;
    display: block;
    font-size: 0.92rem;
    margin-top: 4px;
}

.physics-coin-btn {
    background: var(--physics-blue);
    border: 0;
    border-radius: 8px;
    color: #ffffff;
    cursor: pointer;
    font-weight: 800;
    padding: 11px 16px;
}

.physics-coin-btn:hover {
    background: #1e40af;
}

body.dark-mode .physics-hero,
body.dark-theme .physics-hero {
    background: linear-gradient(135deg, #111827 0%, #0f172a 56%, #1e293b 100%) !important;
    border-color: #334155 !important;
}

body.dark-mode .physics-hero h1,
body.dark-theme .physics-hero h1,
body.dark-mode .physics-download-panel strong,
body.dark-theme .physics-download-panel strong,
body.dark-mode .physics-fact strong,
body.dark-theme .physics-fact strong {
    color: #f8fafc !important;
}

body.dark-mode .physics-hero p,
body.dark-theme .physics-hero p,
body.dark-mode .physics-download-panel span,
body.dark-theme .physics-download-panel span,
body.dark-mode .physics-fact span,
body.dark-theme .physics-fact span,
body.dark-mode .physics-answer,
body.dark-theme .physics-answer,
body.dark-mode .physics-full-text,
body.dark-theme .physics-full-text {
    color: #cbd5e1 !important;
}

body.dark-mode .physics-fact,
body.dark-theme .physics-fact,
body.dark-mode .physics-question,
body.dark-theme .physics-question,
body.dark-mode .physics-answer,
body.dark-theme .physics-answer,
body.dark-mode .physics-full-text,
body.dark-theme .physics-full-text,
body.dark-mode .physics-download-panel,
body.dark-theme .physics-download-panel,
body.dark-mode .physics-chapter-nav a,
body.dark-theme .physics-chapter-nav a {
    background: rgba(17, 24, 39, 0.94) !important;
    border-color: #334155 !important;
}

body.dark-mode .physics-toc a,
body.dark-theme .physics-toc a,
body.dark-mode .physics-chapter-nav a.active,
body.dark-theme .physics-chapter-nav a.active,
body.dark-mode .physics-chapter-nav a:hover,
body.dark-theme .physics-chapter-nav a:hover {
    background: rgba(37, 99, 235, 0.18) !important;
    border-color: rgba(96, 165, 250, 0.45) !important;
    color: #bfdbfe !important;
}

body.dark-mode .physics-note,
body.dark-theme .physics-note {
    background: rgba(249, 115, 22, 0.12) !important;
    border-color: #f97316 !important;
    color: #fed7aa !important;
}

@media (max-width: 640px) {
    .physics-hero {
        padding: 18px;
    }

    .physics-toc {
        display: grid;
        grid-template-columns: 1fr 1fr;
    }

    .physics-toc a {
        border-radius: 8px;
        text-align: center;
    }

    .physics-facts {
        grid-template-columns: 1fr;
    }

    .physics-pdf-frame {
        min-height: 420px;
    }
}
