/* =========================================================
   Tutorial Studio
   Application Launcher
========================================================= */

.app-launcher-btn {
    width: 40px;
    height: 40px;

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    gap: 5px;

    flex-shrink: 0;

    border: 1px solid #e2e8f0;
    border-radius: 11px;

    background: #ffffff;

    cursor: pointer;

    transition: all 0.2s ease;
}

.app-launcher-btn span {
    display: block;

    width: 18px;
    height: 2px;

    border-radius: 2px;

    background: #334155;

    transition: transform 0.2s ease,
        opacity 0.2s ease;
}

.app-launcher-btn:hover {
    background: #f1f5f9;
    border-color: #cbd5e1;
}

.app-launcher-btn.active {
    background: #eff6ff;
    border-color: #93c5fd;
}

.app-launcher-btn.active span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.app-launcher-btn.active span:nth-child(2) {
    opacity: 0;
}

.app-launcher-btn.active span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}


/* 遮罩 */

.app-launcher-overlay {
    position: fixed;
    inset: 0;

    z-index: 12000;

    background: rgba(15, 23, 42, 0.28);

    backdrop-filter: blur(3px);
}

.app-launcher-overlay[hidden] {
    display: none;
}


/* 主面板 */

.app-launcher-panel {
    position: fixed;

    top: 0;
    right: 0;
    bottom: 0;

    width: min(420px, 100vw);

    z-index: 12001;

    display: flex;
    flex-direction: column;

    background: #ffffff;

    box-shadow: -12px 0 45px rgba(15, 23, 42, 0.12);

    transform: translateX(105%);

    visibility: hidden;
    pointer-events: none;

    transition:
        transform 0.28s ease,
        visibility 0.28s ease;
}

.app-launcher-panel.open {
    transform: translateX(0);
    visibility: visible;
    pointer-events: auto;
}


/* 顶部 */

.app-launcher-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;

    padding: 28px 26px 22px;

    border-bottom: 1px solid #e2e8f0;

    background: linear-gradient(135deg,
            #f8fbff,
            #ffffff);
}

.app-launcher-eyebrow {
    margin-bottom: 9px;

    font-size: 10px;
    font-weight: 800;
    letter-spacing: 2px;

    color: #2563eb;
}

.app-launcher-header h2 {
    margin: 0;

    font-size: 25px;
    font-weight: 800;

    color: #0f172a;
}

.app-launcher-header p {
    margin: 8px 0 0;

    font-size: 13px;

    color: #64748b;
}

.app-launcher-close {
    width: 34px;
    height: 34px;

    border: none;
    border-radius: 9px;

    background: #f1f5f9;

    color: #475569;

    font-size: 17px;

    cursor: pointer;
}

.app-launcher-close:hover {
    background: #e2e8f0;
}


/* 内容 */

.app-launcher-content {
    flex: 1;

    min-height: 0;

    overflow-y: auto;

    padding: 24px;
}


/* 分类 */

.app-launcher-section {
    margin-bottom: 28px;
}

.app-launcher-section-title {
    display: flex;
    align-items: center;
    justify-content: space-between;

    margin-bottom: 14px;

    font-size: 13px;
    font-weight: 800;

    color: #334155;
}

.app-launcher-section-title span {
    font-size: 11px;
    font-weight: 500;

    color: #94a3b8;
}


/* 应用网格 */

.app-launcher-grid {
    display: grid;

    grid-template-columns: repeat(2, minmax(0, 1fr));

    gap: 12px;
}


/* 应用卡片 */

.app-launcher-item {
    display: flex;
    align-items: center;

    gap: 12px;

    min-width: 0;

    padding: 15px 12px;

    border: 1px solid #e2e8f0;
    border-radius: 14px;

    background: #ffffff;

    text-align: left;

    cursor: pointer;

    transition: all 0.2s ease;
}

.app-launcher-item:hover {
    border-color: #93c5fd;

    background: #f8fbff;

    transform: translateY(-2px);

    box-shadow: 0 6px 18px rgba(37, 99, 235, 0.08);
}

.app-launcher-icon {
    width: 40px;
    height: 40px;

    flex-shrink: 0;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 12px;

    background: #eff6ff;

    font-size: 21px;
}

.app-launcher-item-info {
    min-width: 0;
}

.app-launcher-item-name {
    font-size: 13px;
    font-weight: 750;

    color: #0f172a;
}

.app-launcher-item-desc {
    margin-top: 4px;

    font-size: 11px;

    color: #64748b;

    line-height: 1.5;
}


/* 底部 */

.app-launcher-footer {
    padding: 17px 24px;

    border-top: 1px solid #e2e8f0;

    font-size: 11px;
    text-align: center;

    color: #94a3b8;
}


/* 手机 */

@media (max-width: 600px) {

    .app-launcher-panel {
        width: min(380px, 100vw);
    }

    .app-launcher-content {
        padding: 18px;
    }

    .app-launcher-grid {
        gap: 10px;
    }

    .app-launcher-item {
        padding: 12px 9px;
        gap: 8px;
    }

    .app-launcher-icon {
        width: 35px;
        height: 35px;

        font-size: 18px;
    }

    .app-launcher-item-name {
        font-size: 12px;
    }

}