/* pattern-library.css - 纹样库程序页面样式 */
@import url("var.css");

.pattern-header {
    padding: 100px 0 60px;
    background: linear-gradient(135deg, #f5f7fa 0%, #e4e8f0 100%);
    text-align: center;
}

.pattern-header h1 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 20px;
    color: var(--text-color);
}

.pattern-header p {
    font-size: 1.2rem;
    color: var(--light-text);
    max-width: 800px;
    margin: 0 auto;
}

.program-overview {
    padding: 80px 0;
    background-color: white;
}

.overview-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 40px;
    margin-top: 50px;
}

.overview-card {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 40px 30px;
    border-radius: 15px;
    text-align: center;
    transition: var(--transition);
    border: 2px solid transparent;
}

.overview-card:hover {
    transform: translateY(-10px);
    border-color: var(--primary-color);
    box-shadow: var(--shadow);
}

.overview-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 25px;
}

.overview-icon i {
    font-size: 2.2rem;
    color: white;
}

.overview-card h3 {
    font-size: 1.6rem;
    font-weight: 700;
    margin-bottom: 10px;
    color: var(--text-color);
}

.overview-card p {
    color: var(--light-text);
    line-height: 1.7;
}

.ai-technology {
    padding: 80px 0;
    background-color: var(--light-bg);
}

.ai-content {
    display: flex;
    align-items: center;
    gap: 50px;
    flex-wrap: wrap;
}

.ai-text {
    flex: 1;
    min-width: 300px;
}

.ai-text h2 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 25px;
    color: var(--text-color);
}

.ai-text p {
    font-size: 1.1rem;
    line-height: 1.7;
    color: var(--light-text);
    margin-bottom: 20px;
}

.ai-features {
    margin-top: 30px;
}

.ai-feature {
    display: flex;
    align-items: flex-start;
    margin-bottom: 20px;
}

.ai-feature-icon {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 20px;
    flex-shrink: 0;
}

.ai-feature-icon i {
    color: white;
    font-size: 1.3rem;
}

.ai-feature-content h4 {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-color);
}

.ai-feature-content p {
    color: var(--light-text);
    margin-bottom: 0;
}

.ai-visual {
    flex: 1;
    min-width: 300px;
    text-align: center;
}

.ai-visual img {
    max-width: 100%;
    height: auto;
    border-radius: 15px;
    box-shadow: var(--shadow);
}

.function-details {
    padding: 80px 0;
    background-color: white;
}

.function-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 40px;
    justify-content: center;
}

.tab-btn {
    padding: 12px 30px;
    background-color: var(--light-bg);
    border: none;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-color);
    cursor: pointer;
    transition: var(--transition);
}

.tab-btn:hover {
    background-color: var(--primary-color);
    color: white;
}

.tab-btn.active {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
}

.tab-content {
    display: none;
    animation: fadeIn 0.5s ease;
}

.tab-content.active {
    display: block;
}

.function-item {
    display: flex;
    align-items: stretch;
    gap: 40px;
    margin-bottom: 60px;
    min-height: 400px;
    flex-wrap: wrap;
    padding: 0;
}

.function-item.reverse {
    flex-direction: row-reverse;
}

.function-image {
    flex: 1;
    min-width: 300px;
    min-height: 400px;
    background-color: #f8f9fa;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: var(--shadow);
    position: relative;
}

.function-image img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    object-position: center;
    display: block;
    transition: var(--transition);
}

.function-item:hover .function-image img {
    transform: scale(1.05);
}

.function-text {
    flex: 1;
    min-width: 300px;
}

.function-text h3 {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 20px;
    color: var(--text-color);
}

.function-text p {
    font-size: 1.1rem;
    line-height: 1.7;
    color: var(--light-text);
    margin-bottom: 20px;
}

.function-steps {
    margin-top: 20px;
}

.step {
    display: flex;
    align-items: flex-start;
    margin-bottom: 15px;
}

.step-number {
    width: 30px;
    height: 30px;
    background-color: var(--primary-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    margin-right: 15px;
    flex-shrink: 0;
}

.step-text {
    color: var(--text-color);
    line-height: 1.6;
}

.download-section {
    padding: 80px 0;
    background-color: var(--light-bg);
    text-align: center;
}

.download-card {
    background-color: white;
    padding: 60px 40px;
    border-radius: 20px;
    box-shadow: var(--shadow);
    max-width: 800px;
    margin: 0 auto;
}

.download-card h2 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 20px;
    color: var(--text-color);
}

.download-card p {
    font-size: 1.2rem;
    color: var(--light-text);
    margin-bottom: 40px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.download-info {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 30px;
    margin-bottom: 40px;
}

.info-item {
    text-align: center;
    min-width: 150px;
}

.info-item .number {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 10px;
}

.info-item .label {
    color: var(--light-text);
    font-size: 1rem;
}

.download-btn {
    display: inline-flex;
    align-items: center;
    gap: 15px;
    padding: 18px 45px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    text-decoration: none;
    border-radius: 50px;
    font-size: 1.2rem;
    font-weight: 700;
    transition: var(--transition);
    box-shadow: 0 10px 30px rgba(67, 97, 238, 0.3);
}

.download-btn:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(67, 97, 238, 0.4);
}

.download-btn i {
    font-size: 1.5rem;
}

.download-tip {
    margin-top: 25px;
    color: var(--light-text);
    font-size: 0.9rem;
    font-style: italic;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@media (max-width: 1200px) {
    .function-item {
        min-height: 450px;
    }

    .function-image {
        flex: 0 0 300px;
        min-height: 450px;
    }

    .function-text {
        min-height: 450px;
        padding: 40px 30px;
    }
}

@media (max-width: 992px) {
    .pattern-header h1 {
        font-size: 2.5rem;
    }

    .ai-content, .function-item {
        flex-direction: column;
    }

    .function-item.reverse {
        flex-direction: column;
    }

    .function-image, .function-text {
        width: 100%;
    }

    .download-card {
        padding: 40px 20px;
    }
}

@media (max-width: 768px) {
    .pattern-header {
        padding: 80px 0 40px;
    }

    .pattern-header h1 {
        font-size: 2.2rem;
    }

    .pattern-header p {
        font-size: 1.1rem;
    }

    .program-overview, .ai-technology, .function-details, .download-section {
        padding: 60px 0;
    }

    .overview-card {
        padding: 30px 20px;
    }

    .tab-btn {
        padding: 10px 20px;
        font-size: 0.9rem;
    }

    .function-text h3 {
        font-size: 1.6rem;
    }

    .download-card h2 {
        font-size: 2rem;
    }
}

@media (max-width: 576px) {
    .pattern-header h1 {
        font-size: 2rem;
    }

    .pattern-header p {
        font-size: 1rem;
    }

    .ai-text h2, .download-card h2 {
        font-size: 1.8rem;
    }

    .download-btn {
        padding: 15px 30px;
        font-size: 1.1rem;
    }

    .info-item {
        min-width: 120px;
    }

    .info-item .number {
        font-size: 2rem;
    }
}