/* ========================================
   项目详情弹窗样式
   ======================================== */

/* 遮罩层 */
.project-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(12px);
    z-index: 9998;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
}

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

/* 弹窗主体 */
.project-modal {
    background: linear-gradient(145deg, rgba(20, 22, 40, 0.98), rgba(12, 14, 28, 0.98));
    border: 1px solid rgba(99, 102, 241, 0.15);
    border-radius: 20px;
    width: 100%;
    max-width: 720px;
    max-height: 85vh;
    overflow-y: auto;
    position: relative;
    transform: scale(0.9) translateY(20px);
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.5), 0 0 40px rgba(99, 102, 241, 0.08);
}

.project-modal-overlay.active .project-modal {
    transform: scale(1) translateY(0);
}

/* 滚动条美化 */
.project-modal::-webkit-scrollbar {
    width: 4px;
}

.project-modal::-webkit-scrollbar-track {
    background: transparent;
}

.project-modal::-webkit-scrollbar-thumb {
    background: rgba(99, 102, 241, 0.3);
    border-radius: 4px;
}

/* 关闭按钮 */
.project-modal-close {
    position: sticky;
    top: 16px;
    float: right;
    margin-right: 16px;
    z-index: 10;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(0, 0, 0, 0.4);
    color: rgba(255, 255, 255, 0.6);
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    backdrop-filter: blur(8px);
}

.project-modal-close:hover {
    background: rgba(239, 68, 68, 0.2);
    border-color: rgba(239, 68, 68, 0.4);
    color: #ef4444;
}

/* 头部区域 */
.project-modal-header {
    padding: 32px 32px 0;
    display: flex;
    align-items: flex-start;
    gap: 20px;
}

.project-modal-icon {
    font-size: 48px;
    flex-shrink: 0;
    width: 72px;
    height: 72px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 16px;
    background: rgba(99, 102, 241, 0.1);
    border: 1px solid rgba(99, 102, 241, 0.15);
}

.project-modal-header-info {
    flex: 1;
    min-width: 0;
}

.project-modal-category {
    display: inline-block;
    font-size: 12px;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 8px;
    opacity: 0.8;
}

.project-modal-title {
    font-size: 24px;
    font-weight: 700;
    color: var(--text);
    line-height: 1.3;
    margin: 0;
}

.project-modal-period {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.4);
    margin-top: 8px;
}

/* 内容区 */
.project-modal-body {
    padding: 24px 32px 32px;
}

/* 项目背景 */
.project-modal-bg {
    background: rgba(99, 102, 241, 0.06);
    border-left: 3px solid var(--accent);
    border-radius: 0 12px 12px 0;
    padding: 16px 20px;
    margin-bottom: 24px;
    font-size: 14px;
    line-height: 1.8;
    color: rgba(255, 255, 255, 0.7);
}

/* 分节标题 */
.project-modal-section-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text);
    margin: 24px 0 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.project-modal-section-title::before {
    content: '';
    display: inline-block;
    width: 4px;
    height: 16px;
    background: var(--accent);
    border-radius: 2px;
}

/* 核心工作列表 */
.project-modal-highlights {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.project-modal-highlights li {
    position: relative;
    padding-left: 20px;
    font-size: 14px;
    line-height: 1.8;
    color: rgba(255, 255, 255, 0.75);
}

.project-modal-highlights li::before {
    content: '▸';
    position: absolute;
    left: 0;
    color: var(--accent);
    font-weight: bold;
}

.project-modal-highlights li strong {
    color: rgba(255, 255, 255, 0.95);
    font-weight: 600;
}

/* 技术标签 */
.project-modal-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 20px;
}

/* 指标网格 */
.project-modal-metrics {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 12px;
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.project-modal-metric {
    text-align: center;
    padding: 16px 12px;
    border-radius: 12px;
    background: rgba(99, 102, 241, 0.06);
    border: 1px solid rgba(99, 102, 241, 0.1);
}

.project-modal-metric-value {
    font-size: 24px;
    font-weight: 700;
    color: #818cf8;
}

.project-modal-metric-label {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.45);
    margin-top: 4px;
}

/* 卡片点击交互提示 */
.project-card {
    cursor: pointer;
}

.project-card .project-body {
    position: relative;
}

.project-card .project-body::after {
    content: '查看详情 →';
    position: absolute;
    left: 20px;
    bottom: 16px;
    font-size: 12px;
    color: rgba(129, 140, 248, 0.8);
    opacity: 0;
    transition: opacity 0.15s ease, left 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}

.project-card:hover .project-body::after {
    opacity: 1;
    left: calc(100% - 100px);
}

.project-card:active {
    transform: scale(0.98);
}

/* 响应式 */
@media (max-width: 768px) {
    .project-modal-overlay {
        padding: 20px 12px;
    }

    .project-modal {
        max-height: 90vh;
        border-radius: 16px;
    }

    .project-modal-header {
        padding: 24px 20px 0;
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .project-modal-body {
        padding: 20px;
    }

    .project-modal-title {
        font-size: 20px;
    }

    .project-modal-metrics {
        grid-template-columns: repeat(2, 1fr);
    }
}