﻿:root {
    --primary: #FF6B6B;
    --secondary: #4ECDC4;
    --dark: #2D3047;
    --light: #F8F9FA;
}

.f-container {
    max-width: 1200px;
    margin: 20px auto;
}

.main-header {
    text-align: center;
    padding-top: 20px;
}

.model-container {
    position: relative;
}

.model-scroller {
    display: grid;
    grid-auto-flow: column;
    gap: 25px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    padding: 20px 0;
    -ms-overflow-style: none;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
}

    .model-scroller::-webkit-scrollbar {
        display: none;
    }

.model-card {
    scroll-snap-align: start;
    width: 280px;
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
    cursor: pointer;
}

    .model-card:hover {
        transform: translateY(-5px);
    }

    .model-card img {
        width: 100%;
        height: 300px;
        object-fit: cover;
        border-bottom: 2px solid var(--light);
    }

.model-info {
    padding: 15px;
    text-align: center;
}

    .model-info h3 {
        color: var(--dark);
        margin-bottom: 8px;
        font-size: 1.1em;
    }

    .model-info p {
        color: #666;
        font-size: 0.9em;
        line-height: 1.4;
    }

.scroll-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255,255,255,0.9);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.3s;
    z-index: 10;
}

.model-container:hover .scroll-arrow {
    opacity: 1;
}

.arrow-left {
    left: -20px;
}

.arrow-right {
    right: -20px;
}



.model-card.selected {
    box-shadow: 0 0 0 3px var(--primary);
}


#alert-message {
    color: #f44336;
    background-color: #f8d7da;
    border-radius: 5px;
    padding: 10px;
    margin-top: 20px;
    text-align: center;
}

.task-input-section, .task-list-section, .instructions-section {
    margin-top: 10px;
    width: 100%;
}

label {
    display: block;
    margin: 8px 0 4px;
    font-weight: bold;
}

.control-panel {
    background: white;
    border-radius: 16px;
    padding: 30px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

textarea {
    width: 100%;
    height: 80px;
    padding: 15px;
    border: 2px solid var(--light);
    border-radius: 8px;
    font-family: inherit;
    resize: vertical;
}

select {
    padding: 10px 15px;
    border: 2px solid var(--light);
    border-radius: 6px;
    width: 100%;
}

/* Preview Area */
.preview-container {
    background: white;
    border-radius: 16px;
    padding: 60px;
    text-align: center;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    margin: 40px 0;
    position: relative;
}

    .preview-container .loading {
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        text-align: center;
        z-index: 10;
        display: none;
    }

    .preview-container .spinner {
        width: 40px;
        height: 40px;
        border: 3px solid rgba(0,0,0,0.1);
        border-top: 3px solid #4ECDC4;
        border-radius: 50%;
        animation: spin 1s linear infinite;
        margin: 0 auto 15px;
    }

.progress-container {
    width: 200px;
    height: 8px;
    background: #eee;
    border-radius: 4px;
    overflow: hidden;
    margin: 10px auto;
}

.progress-bar {
    width: 0%;
    height: 100%;
    background: linear-gradient(90deg, #4ECDC4 0%, #45B7AF 100%);
    transition: width 0.3s ease;
}

.progress-text {
    font-size: 14px;
    color: #666;
    margin-top: 8px;
}

/* Loading screen styling */
#loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8); /* Semi-transparent black */
    color: white;
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

    /* Spinner animation */
    #loading-screen .spinner {
        width: 50px;
        height: 50px;
        border: 5px solid rgba(255, 255, 255, 0.3);
        border-top: 5px solid white;
        border-radius: 50%;
        animation: spin 1s linear infinite;
    }


/* 背景遮罩层 */
.modal {
    display: none; /* 默认隐藏 */
    position: fixed;
    z-index: 1;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    animation: fadeIn 0.3s ease-in-out;
}

/* 模态框内容 */
.modal-content {
    background-color: #fff;
    margin: 15% auto;
    padding: 20px;
    border-radius: 8px;
    max-width: 450px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    text-align: center;
    transition: all 0.3s ease-in-out;
}

    /* 标题样式 */
    .modal-content h2 {
        margin-bottom: 15px;
        font-size: 24px;
        color: #333;
        line-height: 1.4;
    }

    /* 内容文字样式 */
    .modal-content p {
        font-size: 16px;
        color: #666;
        margin-bottom: 20px;
    }

/* 按钮样式 */
.modal button {
    background-color: rgba(0, 0, 0, 0.1);
    color: #fff;
    border: none;
    padding: 7px 20px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    transition: background-color 0.3s ease;
}

/* 关闭按钮（×）样式 */
.close-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    font-size: 30px;
    cursor: pointer;
}


.website-introduction {
    background-color: white;
    padding: 10px 20px;
    font-family: Arial, sans-serif;
    color: #333;
}

.title {
    font-size: 2em;
    color: #222;
    text-align: center;
    margin-bottom: 20px;
}

.intro-text, .why-choose-text, .join-us {
    font-size: 1.1em;
    line-height: 1.6em;
    margin-bottom: 20px;
}

.section-title {
    text-align:center;
    font-size: 1.5em;
    color: #444;
    margin: 30px 0 15px;
}

.offerings {
    list-style: disc inside;
    margin-bottom: 20px;
}

    .offerings li {
        margin-bottom: 10px;
        line-height: 1.6em;
    }

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* Buttons */
.generate-btn {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: white;
    padding: 16px 40px;
    border: none;
    border-radius: 50px;
    font-size: 18px;
    cursor: pointer;
    transition: transform 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

    .generate-btn:hover {
        transform: scale(1.05);
    }


.action-buttons {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
}

.download-btn {
    background: linear-gradient(135deg, #4ECDC4 0%, #45B7AF 100%);
}

.generate-3d-btn {
    background: linear-gradient(135deg, #9B59B6 0%, #8E44AD 100%);
    margin-left: 12px;
}


@media (max-width: 768px) {
    textarea {
        height: 120px;
    }

    .f-container {
        max-width: 90%;
    }

    .model-card {
        width: calc(50vw - 40px);
    }

    .model-info h3 {
        font-size: 1em;
    }

    .model-info p {
        display: none;
    }

    .scroll-arrow {
        display: none;
    }

    .generate-btn {
        width: 100%;
        justify-content: center;
    }

    select {
        margin: 10px 0;
        width: 100%;
    }

    .action-buttons {
        width: 100%;
        flex-direction: column;
    }

    .generate-3d-btn,
    .download-btn {
        width: 100%;
        margin: 8px 0;
    }
}

@media (min-width: 1200px) {
    .model-scroller {
        grid-auto-columns: calc(25% - 20px);
    }
}
