/* ==================== 项目详情模态框样式 ==================== */

.project-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 10000;
    overflow-y: auto;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.project-modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 1;
    animation: modalFadeIn 0.3s ease;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.modal-content {
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
    border-radius: 20px;
    max-width: 1200px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    margin: 20px;
    box-shadow: 0 20px 60px rgba(249, 115, 22, 0.3);
    border: 1px solid rgba(249, 115, 22, 0.2);
    animation: modalSlideIn 0.4s ease;
}

@keyframes modalSlideIn {
    from {
        transform: translateY(50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    border: none;
    background: rgba(249, 115, 22, 0.1);
    color: var(--primary-teal, #F97316);
    font-size: 28px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.modal-close:hover {
    background: var(--primary-teal, #F97316);
    color: white;
    transform: rotate(90deg);
}

.modal-header {
    padding: 40px 40px 20px;
    border-bottom: 1px solid rgba(249, 115, 22, 0.1);
}

.modal-title {
    font-size: 32px;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary-teal, #F97316), var(--accent-gold, #FCD34D));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 15px;
}

.modal-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.modal-tags .tag {
    padding: 6px 16px;
    background: rgba(249, 115, 22, 0.1);
    border: 1px solid rgba(249, 115, 22, 0.3);
    border-radius: 20px;
    font-size: 14px;
    color: var(--primary-teal, #F97316);
}

.modal-body {
    padding: 30px 40px 40px;
}

.modal-description {
    font-size: 16px;
    line-height: 1.8;
    color: #ccc;
    margin-bottom: 30px;
}

/* ==================== 媒体内容样式 ==================== */

.modal-media {
    margin-bottom: 40px;
}

/* 单张图片 */
.single-image {
    border-radius: 12px;
    overflow: hidden;
    max-height: 600px;
}

.single-image img {
    width: 100%;
    height: auto;
    display: block;
}

/* 图片画廊 */
.image-gallery {
    width: 100%;
}

.gallery-main {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    background: #000;
    margin-bottom: 20px;
}

.gallery-image {
    position: relative;
    min-height: 400px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.gallery-image img {
    width: 100%;
    height: auto;
    max-height: 600px;
    object-fit: contain;
}

.gallery-caption {
    text-align: center;
    padding: 15px;
    color: #aaa;
    font-size: 14px;
    background: rgba(0, 0, 0, 0.5);
    width: 100%;
}

.gallery-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 50px;
    border: none;
    background: rgba(249, 115, 22, 0.8);
    color: white;
    font-size: 32px;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 5;
    display: flex;
    align-items: center;
    justify-content: center;
}

.gallery-nav:hover {
    background: var(--primary-teal, #F97316);
}

.gallery-prev {
    left: 10px;
    border-radius: 0 8px 8px 0;
}

.gallery-next {
    right: 10px;
    border-radius: 8px 0 0 8px;
}

.gallery-thumbnails {
    display: flex;
    gap: 15px;
    overflow-x: auto;
    padding: 10px 0;
}

.gallery-thumbnails::-webkit-scrollbar {
    height: 6px;
}

.gallery-thumbnails::-webkit-scrollbar-track {
    background: rgba(249, 115, 22, 0.1);
    border-radius: 3px;
}

.gallery-thumbnails::-webkit-scrollbar-thumb {
    background: var(--primary-teal, #F97316);
    border-radius: 3px;
}

.thumbnail {
    min-width: 100px;
    height: 80px;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.3s ease;
    opacity: 0.6;
}

.thumbnail:hover {
    opacity: 0.8;
}

.thumbnail.active {
    border-color: var(--primary-teal, #F97316);
    opacity: 1;
    box-shadow: 0 0 15px rgba(249, 115, 22, 0.5);
}

.thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* 视频容器 */
.video-container {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%; /* 16:9 比例 */
    border-radius: 12px;
    overflow: hidden;
    background: #000;
}

.video-container iframe,
.video-container video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* Three.js 容器 */
.threejs-container {
    position: relative;
    width: 100%;
    height: 600px;
    border-radius: 12px;
    overflow: hidden;
    background: #000;
    border: 1px solid rgba(249, 115, 22, 0.2);
}

.threejs-container iframe {
    width: 100%;
    height: 100%;
}

/* 外部链接 */
.external-link {
    text-align: center;
    padding: 60px 40px;
    background: rgba(249, 115, 22, 0.05);
    border-radius: 12px;
    border: 2px dashed rgba(249, 115, 22, 0.3);
}

.link-info p {
    font-size: 18px;
    color: #ccc;
    margin-bottom: 25px;
}

.link-button {
    display: inline-block;
    padding: 15px 40px;
    background: linear-gradient(135deg, var(--primary-teal, #F97316), #ea580c);
    color: white;
    text-decoration: none;
    border-radius: 25px;
    font-size: 16px;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(249, 115, 22, 0.3);
}

.link-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(249, 115, 22, 0.5);
}

/* 占位符样式 */
.image-placeholder,
.video-placeholder,
.threejs-placeholder,
.link-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 300px;
    background: rgba(249, 115, 22, 0.05);
    border: 2px dashed rgba(249, 115, 22, 0.2);
    border-radius: 12px;
    color: #888;
    font-size: 18px;
    text-align: center;
    flex-direction: column;
    gap: 10px;
}

.image-placeholder-small {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    background: rgba(249, 115, 22, 0.05);
    border: 1px dashed rgba(249, 115, 22, 0.2);
    color: #666;
    font-size: 12px;
}

.no-media {
    text-align: center;
    padding: 40px;
    color: #888;
}

/* ==================== 规格参数 ==================== */

.specs-section {
    margin-bottom: 30px;
}

.specs-section h3 {
    font-size: 22px;
    color: var(--primary-teal, #F97316);
    margin-bottom: 20px;
}

.specs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
}

.spec-item {
    display: flex;
    justify-content: space-between;
    padding: 15px 20px;
    background: rgba(249, 115, 22, 0.05);
    border-radius: 8px;
    border: 1px solid rgba(249, 115, 22, 0.1);
}

.spec-label {
    color: #aaa;
    font-size: 14px;
}

.spec-value {
    color: white;
    font-weight: 600;
    font-size: 14px;
}

/* ==================== 特性列表 ==================== */

.features-section,
.awards-section,
.results-section,
.benefits-section {
    margin-bottom: 30px;
}

.features-section h3,
.awards-section h3,
.results-section h3,
.benefits-section h3 {
    font-size: 22px;
    color: var(--primary-teal, #F97316);
    margin-bottom: 15px;
}

.features-list,
.awards-list,
.results-list,
.benefits-list {
    list-style: none;
    padding: 0;
}

.features-list li,
.awards-list li,
.results-list li,
.benefits-list li {
    padding: 12px 20px 12px 45px;
    margin-bottom: 10px;
    background: rgba(249, 115, 22, 0.05);
    border-left: 3px solid var(--primary-teal, #F97316);
    border-radius: 6px;
    color: #ddd;
    position: relative;
    transition: all 0.3s ease;
}

.features-list li:hover,
.awards-list li:hover,
.results-list li:hover,
.benefits-list li:hover {
    background: rgba(249, 115, 22, 0.1);
    transform: translateX(5px);
}

.features-list li::before,
.awards-list li::before,
.results-list li::before,
.benefits-list li::before {
    content: "✓";
    position: absolute;
    left: 15px;
    color: var(--primary-teal, #F97316);
    font-weight: bold;
    font-size: 18px;
}

.awards-list li::before {
    content: "🏆";
}

.results-list li::before {
    content: "📊";
}

.benefits-list li::before {
    content: "⭐";
}

/* ==================== 响应式设计 ==================== */

@media (max-width: 768px) {
    .modal-content {
        width: 95%;
        max-height: 95vh;
        margin: 10px;
    }

    .modal-header {
        padding: 30px 20px 15px;
    }

    .modal-title {
        font-size: 24px;
    }

    .modal-body {
        padding: 20px;
    }

    .modal-close {
        width: 36px;
        height: 36px;
        font-size: 24px;
        top: 15px;
        right: 15px;
    }

    .specs-grid {
        grid-template-columns: 1fr;
    }

    .gallery-nav {
        width: 40px;
        height: 40px;
        font-size: 24px;
    }

    .gallery-image {
        min-height: 250px;
    }

    .threejs-container {
        height: 400px;
    }
}

@media (max-width: 480px) {
    .modal-title {
        font-size: 20px;
    }

    .modal-description {
        font-size: 14px;
    }

    .gallery-thumbnails {
        gap: 10px;
    }

    .thumbnail {
        min-width: 80px;
        height: 60px;
    }
}

/* ==================== 滚动条样式 ==================== */

.modal-content::-webkit-scrollbar {
    width: 8px;
}

.modal-content::-webkit-scrollbar-track {
    background: rgba(249, 115, 22, 0.1);
}

.modal-content::-webkit-scrollbar-thumb {
    background: var(--primary-teal, #F97316);
    border-radius: 4px;
}

.modal-content::-webkit-scrollbar-thumb:hover {
    background: #ea580c;
}
