/* ===== ACADEMY MODE — Medical/Scientific Theme ===== */

/* Academy Modal */
.academy-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(6px);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 32px;
    opacity: 0;
    transition: opacity 0.25s ease;
}

.academy-overlay.active {
    opacity: 1;
}

.academy-modal {
    width: 100%;
    max-width: 1200px;
    max-height: 88vh;
    background: #161B22;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    border: 1px solid #30363D;
    transform: scale(0.95) translateY(10px);
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.academy-modal.active {
    transform: scale(1) translateY(0);
    opacity: 1;
}

.academy-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 36px;
    height: 36px;
    border: none;
    background: rgba(255, 255, 255, 0.08);
    color: #8B949E;
    font-size: 24px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
}

.academy-close:hover {
    background: rgba(207, 34, 46, 0.2);
    color: #CF222E;
}

.academy-content {
    display: grid;
    grid-template-columns: 2fr 3fr;
    height: 88vh;
    max-height: 850px;
}

/* Left: Video + Actions */
.academy-video-section {
    padding: 32px;
    background: #0F1419;
    display: flex;
    flex-direction: column;
    gap: 20px;
    overflow-y: auto;
}

.academy-title-row {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.academy-title {
    font-size: 24px;
    font-weight: 700;
    color: #E6EDF3;
    letter-spacing: -0.3px;
}

.academy-category-badge {
    padding: 5px 12px;
    background: rgba(43, 124, 233, 0.15);
    color: #2B7CE9;
    border: 1px solid rgba(43, 124, 233, 0.3);
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    display: inline-block;
}

.academy-video-container {
    flex-shrink: 0;
    background: #000;
    border-radius: 10px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 240px;
    border: 1px solid #30363D;
    aspect-ratio: 16 / 9;
}

.academy-video-player {
    width: 100%;
    height: 100%;
    min-height: 240px;
}

.academy-video-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    color: #484F58;
    padding: 40px;
}

.academy-video-placeholder svg {
    width: 60px;
    height: 60px;
    opacity: 0.3;
}

/* Workflow Button */
.academy-workflow-btn {
    width: 100%;
    padding: 14px 24px;
    background: linear-gradient(135deg, #1A5FB4 0%, #2B7CE9 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.25s ease;
    box-shadow: 0 4px 12px rgba(43, 124, 233, 0.25);
}

.academy-workflow-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(43, 124, 233, 0.35);
}

/* Description */
.academy-description {
    padding: 16px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 10px;
    border-left: 3px solid #2B7CE9;
}

.academy-description h4 {
    font-size: 12px;
    color: #8B949E;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    margin-bottom: 8px;
    font-weight: 600;
}

.academy-description p {
    font-size: 13px;
    line-height: 1.6;
    color: #8B949E;
}

/* Methods Summary */
.academy-methods-summary {
    padding: 16px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 10px;
}

.academy-methods-summary h4 {
    font-size: 12px;
    color: #8B949E;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    margin-bottom: 10px;
    font-weight: 600;
}

.academy-methods-summary ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.academy-methods-summary li {
    font-size: 13px;
    color: #8B949E;
    padding: 5px 0 5px 18px;
    position: relative;
    transition: color 0.15s ease;
}

.academy-methods-summary li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 50%;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #2B7CE9;
    transform: translateY(-50%);
}

.academy-methods-summary li:hover {
    color: #E6EDF3;
}

/* Right: Theory */
.academy-theory-section {
    padding: 32px;
    overflow-y: auto;
    background: #161B22;
    border-left: 1px solid #30363D;
}

.academy-theory-section::-webkit-scrollbar {
    width: 6px;
}

.academy-theory-section::-webkit-scrollbar-track {
    background: transparent;
}

.academy-theory-section::-webkit-scrollbar-thumb {
    background: #30363D;
    border-radius: 3px;
}

.academy-section-title {
    font-size: 14px;
    font-weight: 700;
    color: #62A0EA;
    margin-bottom: 14px;
    margin-top: 24px;
    display: flex;
    align-items: center;
    gap: 8px;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    border-bottom: 1px solid rgba(43, 124, 233, 0.15);
    padding-bottom: 8px;
}

.academy-section-title:first-child {
    margin-top: 0;
}

.academy-text {
    font-size: 13px;
    line-height: 1.8;
    color: #C9D1D9;
    margin-bottom: 16px;
}

.academy-text p {
    margin-bottom: 8px;
}

.latex-content {
    background: rgba(43, 124, 233, 0.03);
    padding: 16px 20px;
    border-radius: 8px;
    border-left: 3px solid rgba(43, 124, 233, 0.4);
    font-size: 13.5px;
    line-height: 1.9;
    color: #C9D1D9;
}

.latex-content p {
    margin-bottom: 10px;
}

.latex-content .katex-display {
    margin: 16px 0;
    padding: 12px 16px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 6px;
    border: 1px solid rgba(43, 124, 233, 0.1);
    overflow-x: auto;
}

.academy-method-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(43, 124, 233, 0.12);
    border-radius: 10px;
    padding: 18px;
    margin-bottom: 14px;
}

.academy-method-card h4 {
    font-size: 14px;
    font-weight: 600;
    color: #E6EDF3;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

/* Collapsible theory sections inside modal */
.academy-method-card .theory-collapsible {
    margin-bottom: 6px;
    border: 1px solid rgba(255, 255, 255, 0.04);
    border-radius: 6px;
    overflow: hidden;
}

.academy-method-card .theory-collapsible summary {
    padding: 10px 14px;
    font-size: 13px;
    font-weight: 600;
    color: #8B949E;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.02);
    transition: all 0.15s ease;
    list-style: none;
    display: flex;
    align-items: center;
    gap: 8px;
}

.academy-method-card .theory-collapsible summary::before {
    content: "\25B8";
    font-size: 10px;
    transition: transform 0.15s ease;
    color: #2B7CE9;
}

.academy-method-card .theory-collapsible[open] summary::before {
    transform: rotate(90deg);
}

.academy-method-card .theory-collapsible summary:hover {
    color: #E6EDF3;
    background: rgba(43, 124, 233, 0.06);
}

.academy-method-card .theory-collapsible[open] summary {
    color: #E6EDF3;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.academy-method-card .theory-collapsible-content {
    padding: 14px;
}

/* Empty State */
.academy-empty-state {
    padding: 48px 20px;
    text-align: center;
    color: #484F58;
}

.academy-empty-state p {
    font-size: 14px;
    margin: 8px 0;
}

/* Academy Page (standalone) */
.academy-page {
    height: calc(100vh - var(--header-height, 52px));
    overflow-y: auto;
    background: #0F1419;
}

.academy-hero {
    text-align: center;
    padding: 60px 40px;
    background: linear-gradient(180deg, rgba(43, 124, 233, 0.06) 0%, transparent 100%);
    border-bottom: 1px solid #30363D;
}

.academy-hero-title {
    font-size: 40px;
    font-weight: 800;
    margin-bottom: 12px;
    line-height: 1.2;
    color: #E6EDF3;
}

.gradient-text {
    background: linear-gradient(135deg, #1A5FB4 0%, #2B7CE9 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.academy-hero-subtitle {
    font-size: 16px;
    color: #8B949E;
    margin-bottom: 32px;
    font-weight: 400;
}

.academy-stats {
    display: flex;
    justify-content: center;
    gap: 48px;
    margin-top: 32px;
}

.stat-number {
    font-size: 36px;
    font-weight: 700;
    color: #2B7CE9;
}

.stat-label {
    font-size: 12px;
    color: #484F58;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: 4px;
}

/* Modules Container */
.academy-modules-container {
    padding: 48px 40px;
    max-width: 1400px;
    margin: 0 auto;
}

.academy-category-section { margin-bottom: 60px; }

.academy-category-title {
    font-size: 22px;
    font-weight: 700;
    color: #E6EDF3;
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
}

.academy-modules-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 16px;
}

.academy-module-card {
    background: #1C2128;
    border: 1px solid #30363D;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.2s ease;
}

.academy-module-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
    border-color: rgba(43, 124, 233, 0.4);
}

.academy-card-header {
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    background: rgba(43, 124, 233, 0.06);
}

.academy-card-icon {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, #1A5FB4 0%, #2B7CE9 100%);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.academy-card-icon svg {
    width: 28px;
    height: 28px;
    color: white;
}

.academy-card-badges {
    display: flex;
    flex-direction: column;
    gap: 4px;
    align-items: flex-end;
}

.badge-video {
    background: rgba(207, 34, 46, 0.12);
    color: #CF222E;
    border: 1px solid rgba(207, 34, 46, 0.2);
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-theory {
    background: rgba(43, 124, 233, 0.12);
    color: #2B7CE9;
    border: 1px solid rgba(43, 124, 233, 0.2);
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.academy-card-body { padding: 20px; }

.academy-card-title {
    font-size: 16px;
    font-weight: 600;
    color: #E6EDF3;
    margin-bottom: 8px;
}

.academy-card-description {
    font-size: 13px;
    color: #8B949E;
    line-height: 1.5;
    margin-bottom: 12px;
}

.academy-card-methods {
    font-size: 12px;
    color: #484F58;
    font-weight: 500;
}

/* App Header (Academy page mode) */
.app-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 56px;
    padding: 0 24px;
    background: #161B22;
    border-bottom: 1px solid #30363D;
    z-index: 1000;
}

.app-nav-tab.active {
    background: rgba(43, 124, 233, 0.15);
    color: #2B7CE9;
}

/* Responsive */
@media (max-width: 1200px) {
    .academy-content {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .academy-overlay {
        padding: 16px;
    }

    .academy-modal {
        max-height: 95vh;
    }

    .academy-content {
        height: 95vh;
    }

    .academy-hero {
        padding: 40px 20px;
    }

    .academy-hero-title {
        font-size: 28px;
    }
}
