/* 基础样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --secondary-gradient: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --accent-gradient: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    --dark-gradient: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    --glass-bg: rgba(255, 255, 255, 0.1);
    --glass-border: rgba(255, 255, 255, 0.2);
    --text-primary: #1a1a1a;
    --text-secondary: #6b7280;
    --text-light: rgba(255, 255, 255, 0.9);
    --shadow-soft: 0 8px 32px rgba(0, 0, 0, 0.1);
    --shadow-medium: 0 16px 64px rgba(0, 0, 0, 0.15);
    --shadow-strong: 0 24px 96px rgba(0, 0, 0, 0.2);
    --border-radius: 24px;
    --border-radius-small: 16px;
    --transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.7;
    color: var(--text-primary);
    overflow-x: hidden;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    font-weight: 400;
    letter-spacing: -0.01em;
    min-height: 100vh;
}

/* 顶部导航栏样式 */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: transparent;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    z-index: 1000;
    transition: transform 0.3s ease-in-out;
    transform: translateY(0);
}

.header.hidden {
    transform: translateY(-100%);
}

.header-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 24px;
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-image {
    height: 40px;
    width: auto;
    border-radius: 8px;
}

.logo-text {
    font-size: 24px;
    font-weight: 700;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.01em;
}

.contact-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: var(--primary-gradient);
    color: white;
    border: none;
    border-radius: var(--border-radius-small);
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: var(--shadow-soft);
}

.contact-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-medium);
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 24px;
}

/* 软件板块样式 */
.software-section {
    padding: 170px 0 120px 0;
    background: radial-gradient(circle at 20% 80%, rgba(120, 119, 198, 0.3) 0%, transparent 50%), radial-gradient(circle at 80% 20%, rgba(255, 119, 198, 0.3) 0%, transparent 50%), radial-gradient(circle at 40% 40%, rgba(120, 219, 255, 0.3) 0%, transparent 50%), linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    position: relative;
    overflow: hidden;
}

.software-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
}

.floating-elements {
    position: absolute;
    width: 100%;
    height: 100%;
}

.floating-element {
    position: absolute;
    border-radius: 50%;
    background: linear-gradient(45deg, rgba(102, 126, 234, 0.1), rgba(118, 75, 162, 0.1));
    animation: float 20s infinite linear;
}

.floating-element.element-1 {
    width: 120px;
    height: 120px;
    top: 10%;
    left: 10%;
    animation-delay: 0s;
}

.floating-element.element-2 {
    width: 80px;
    height: 80px;
    top: 20%;
    right: 15%;
    animation-delay: -5s;
}

.floating-element.element-3 {
    width: 100px;
    height: 100px;
    bottom: 30%;
    left: 20%;
    animation-delay: -10s;
}

.floating-element.element-4 {
    width: 60px;
    height: 60px;
    bottom: 20%;
    right: 25%;
    animation-delay: -15s;
}

.floating-element.element-5 {
    width: 140px;
    height: 140px;
    top: 50%;
    left: 50%;
    animation-delay: -8s;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px) rotate(0deg);
        opacity: 0.3;
    }
    50% {
        transform: translateY(-20px) rotate(180deg);
        opacity: 0.6;
    }
}

.section-header {
    text-align: center;
    margin-bottom: 80px;
    position: relative;
    z-index: 1;
}

.header-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--primary-gradient);
    color: white;
    padding: 12px 24px;
    border-radius: 50px;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 24px;
    box-shadow: var(--shadow-soft);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: var(--shadow-soft);
    }
    50% {
        transform: scale(1.05);
        box-shadow: var(--shadow-medium);
    }
}

.section-title {
    font-size: clamp(48px, 6vw, 72px);
    font-weight: 800;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 24px;
    letter-spacing: -0.02em;
    line-height: 1.1;
}

.section-subtitle {
    font-size: 20px;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto 40px;
    font-weight: 500;
}

/* 打字机效果样式 */
.typewriter-text {
    border-right: 2px solid var(--primary-color);
    animation: blink-caret 1s step-end infinite;
    min-height: 1.5em; /* 防止高度变化 */
    height: 1.5em; /* 固定高度 */
    display: flex;
    align-items: center;
    justify-content: center;
}

/* 光标闪烁动画 */
@keyframes blink-caret {
    from, to { border-color: transparent; }
    50% { border-color: var(--primary-color); }
}

.section-stats {
    display: flex;
    justify-content: center;
    gap: 48px;
    margin-top: 40px;
}

.stat-item {
    text-align: center;
}

.stat-number {
    display: block;
    font-size: 32px;
    font-weight: 800;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 8px;
}

.stat-label {
    font-size: 14px;
    color: var(--text-secondary);
    font-weight: 500;
}

.software-showcase {
    position: relative;
    z-index: 1;
}

/* Tab切换样式 */
.software-tabs {
    display: flex;
    justify-content: center;
    margin-bottom: 40px;
    gap: 0;
}

.tab-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(0, 0, 0, 0.1);
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
    font-weight: 500;
    color: #666;
    position: relative;
    backdrop-filter: blur(10px);
}

.tab-item:first-child {
    border-radius: 25px 0 0 25px;
}

.tab-item:last-child {
    border-radius: 0 25px 25px 0;
}

.tab-item:not(:first-child) {
    border-left: none;
}

.tab-item.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-color: transparent;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.tab-item:hover:not(.active) {
    background: rgba(255, 255, 255, 0.9);
    color: #333;
}

.tab-item i {
    font-size: 16px;
}

.software-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;

}

.software-card {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: var(--border-radius);
    padding: 20px;
    position: relative;
    overflow: hidden;
    transition: var(--transition);
    opacity: 0;
    transform: translateY(40px);
    animation: fadeInUp 0.8s ease-out forwards;
}

.software-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-strong);
}

/* 灰色禁用卡片样式 */
.software-card.card-disabled {
    opacity: 0.5;
    filter: grayscale(100%);
    cursor: not-allowed;
}

.software-card.card-disabled:hover {
    transform: none;
    box-shadow: var(--shadow-soft);
}

.software-card.card-disabled .software-cover {
    cursor: not-allowed;
}

.software-card.card-disabled .cover-overlay {
    display: none;
}

.fade-in {
    animation-delay: var(--animation-delay, 0s);
}

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.card-glow {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--card-gradient, var(--primary-gradient));
    opacity: 0;
    transition: var(--transition);
    border-radius: var(--border-radius);
}

.software-card:hover .card-glow {
    opacity: 0.1;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 16px;
}

.card-title-section {
    display: flex;
    align-items: center;
    gap: 8px;
}

.card-title-section i {
    font-size: 16px;
    color: var(--text-secondary);
}

.card-status {
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.status-free {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
}

.status-premium {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: white;
}

.software-cover {
    position: relative;
    border-radius: var(--border-radius-small);
    overflow: hidden;
    margin-bottom: 16px;
    cursor: pointer;
    aspect-ratio: 16/9;
}

.cover-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition), opacity 0.3s ease;
    opacity: 0;
}

.cover-image.loaded {
    opacity: 1;
}

.cover-image.error {
    opacity: 0.5;
}

.software-card:hover .cover-image {
    transform: scale(1.05);
}

/* 懒加载占位符样式 */
.image-placeholder {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #f0f0f0 0%, #e0e0e0 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.3s ease;
    z-index: 1;
}

.placeholder-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    color: #999;
    font-size: 14px;
}

.placeholder-content i {
    font-size: 24px;
    opacity: 0.6;
}

.placeholder-content span {
    font-size: 12px;
    opacity: 0.8;
}

.cover-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(0,0,0,0.4), rgba(0,0,0,0.6));
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: var(--transition);
}

.software-cover:hover .cover-overlay {
    opacity: 1;
}

.play-button {
    width: 80px;
    height: 80px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: var(--text-primary);
    transition: var(--transition);
    transform: scale(0.8);
}

.software-cover:hover .play-button {
    transform: scale(1);
}

.overlay-content {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    color: white;
    text-align: center;
}

.overlay-content p {
    font-size: 12px;
    margin: 0;
    font-weight: 500;
}

.progress-ring {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.progress-svg {
    transform: rotate(-90deg);
}

.progress-bg {
    fill: none;
    stroke: rgba(255, 255, 255, 0.3);
    stroke-width: 3;
}

.progress-bar {
    fill: none;
    stroke: var(--progress-color, white);
    stroke-width: 3;
    stroke-linecap: round;
    stroke-dasharray: 125.6;
    stroke-dashoffset: calc(125.6 - (125.6 * var(--progress)) / 100);
    transition: stroke-dashoffset 0.5s ease, stroke 0.3s ease;
}

.progress-text {
    position: absolute;
    font-size: 10px;
    font-weight: 600;
    color: var(--text-primary);
}

.status-text {
    margin-top: 8px;
    font-size: 12px;
    font-weight: 500;
    color: var(--text-secondary);
    text-align: center;
    padding: 4px 8px;
    background: rgba(255, 255, 255, 0.6);
    border-radius: 12px;
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.software-info {
    position: relative;
    z-index: 2;
    padding: 20px;
    display: flex;
    gap: 16px;
    align-items: flex-start;
}

.info-left {
    flex-shrink: 0;
}

.info-right {
    flex: 1;
}

.software-title {
    font-size: 18px;
    font-weight: 700;
    margin: 0;
    color: var(--text-primary);
}

.software-description {
    color: var(--text-secondary);
    margin: 0 0 8px 0;
    line-height: 1.5;
    font-size: 14px;
    /* 固定为3行显示，确保卡片对齐 */
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    height: 63px; /* 3行 × 21px行高 (14px字体 × 1.5行高) */
    text-overflow: ellipsis;
}

.software-meta {
    display: flex;
    align-items: center;
    gap: 12px;
}

.update-date {
    font-size: 12px;
    color: var(--text-secondary);
    opacity: 0.8;
}

.software-features {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 24px;
}

.feature-tag {
    background: rgba(102, 126, 234, 0.1);
    color: #667eea;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
}

.software-progress {
    margin-bottom: 24px;
}

.progress-label {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-size: 14px;
    font-weight: 500;
}

.progress-track {
    height: 6px;
    background: rgba(102, 126, 234, 0.1);
    border-radius: 3px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: var(--primary-gradient);
    border-radius: 3px;
    transition: width 0.8s ease;
}

.software-actions {
    display: flex;
    gap: 12px;
}

.btn {
    padding: 12px 24px;
    border: none;
    border-radius: var(--border-radius-small);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    font-size: 14px;
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background: var(--primary-gradient);
    color: white;
    box-shadow: var(--shadow-soft);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-medium);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.8);
    color: var(--text-primary);
    border: 1px solid rgba(102, 126, 234, 0.2);
}

.btn-secondary:hover {
    background: rgba(102, 126, 234, 0.1);
    transform: translateY(-2px);
}

.btn-card {
    flex: 1;
    justify-content: center;
}

.showcase-footer {
    text-align: center;
    padding: 40px;
    background: rgba(255, 255, 255, 0.5);
    border-radius: var(--border-radius);
    backdrop-filter: blur(10px);
}

.footer-text {
    color: var(--text-secondary);
    margin-bottom: 20px;
    font-size: 16px;
}

/* 模态框样式 */
.modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
}

.modal-content {
    background: white;
    margin: 5% auto;
    padding: 40px;
    border-radius: var(--border-radius);
    width: 90%;
    max-width: 600px;
    position: relative;
    box-shadow: var(--shadow-strong);
}

.modal-content.small {
    max-width: 400px;
}

/* 软件详情弹窗样式 */
.software-detail-modal {
    max-width: 600px;
    padding: 0;
    overflow: hidden;
}

.software-detail-header {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 24px 32px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.software-detail-icon {
    width: 60px;
    height: 60px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
}

.software-detail-title h2 {
    margin: 0 0 8px 0;
    font-size: 24px;
    font-weight: 600;
}

.software-detail-meta {
    display: flex;
    align-items: center;
    gap: 16px;
    font-size: 14px;
}

.detail-progress {
    background: rgba(255, 255, 255, 0.2);
    padding: 4px 12px;
    border-radius: 20px;
    font-weight: 600;
}

.detail-update-date {
    opacity: 0.9;
}

.software-detail-body {
    padding: 32px;
}

.detail-description {
    margin-bottom: 24px;
}

.detail-description p {
    font-size: 16px;
    line-height: 1.6;
    color: #555;
    margin: 0;
}

.detail-info {
    display: flex;
    gap: 24px;
    margin-bottom: 24px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 12px;
}

.detail-info-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.detail-label {
    font-weight: 600;
    color: #666;
}

.detail-value {
    color: #333;
    font-weight: 500;
}

.detail-features h4 {
    margin: 0 0 16px 0;
    color: #333;
    font-size: 18px;
}

.features-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 12px;
}

.feature-item {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 12px 16px;
    border-radius: 8px;
    text-align: center;
    font-size: 14px;
    font-weight: 500;
}

.close {
    position: absolute;
    right: 20px;
    top: 20px;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    color: var(--text-secondary);
    transition: var(--transition);
}

.close:hover {
    color: var(--text-primary);
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-top: 20px;
}

.contact-form input,
.contact-form textarea {
    padding: 12px 16px;
    border: 1px solid rgba(102, 126, 234, 0.2);
    border-radius: var(--border-radius-small);
    font-family: inherit;
    font-size: 14px;
    transition: var(--transition);
}

.contact-form input:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.contact-form textarea {
    min-height: 100px;
    resize: vertical;
}

/* Footer样式 */
.footer {
    background: #2c3e50;
    color: #ecf0f1;
    padding: 20px 0;

}

.footer-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-left,
.footer-right,.footer-right a {
    font-size: 14px;
    color: #bdc3c7;
    text-decoration: none;
}

.footer-left {
    font-weight: 500;
}

.footer-right {
    font-weight: 400;
}

/* 响应式设计 */
/* 大屏幕 - 4列 */
@media (min-width: 1200px) {
    .software-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 24px;
    }
}

/* 中等屏幕 - 3列 */
@media (max-width: 1199px) and (min-width: 992px) {
    .software-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 20px;
    }
}

/* 小屏幕 - 2列 */
@media (max-width: 991px) and (min-width: 769px) {
    .software-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
}

/* 手机屏幕 - 1列 */
@media (max-width: 768px) {
    .header-container {
        padding: 0 16px;
    }

    .logo-text {
        font-size: 20px;
    }

    .contact-btn {
        padding: 10px 16px;
        font-size: 13px;
    }

    .contact-btn span {
        display: none;
    }

    .software-section {
        padding: 140px 0 80px 0;
    }

    .software-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .section-stats {
        flex-direction: column;
        gap: 24px;
    }

    .software-actions {
        flex-direction: column;
    }

    .modal-content {
        margin: 10% auto;
        padding: 24px;
        width: 95%;
    }

    .footer-container {
        flex-direction: column;
        gap: 12px;
        text-align: center;
        padding: 0 16px;
    }

    .footer-left,
    .footer-right {
        font-size: 13px;
    }
}

/* 加载状态样式 */
.loading-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    text-align: center;
    grid-column: 1 / -1; /* 占据整个网格宽度 */
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(102, 126, 234, 0.1);
    border-left: 4px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-container p {
    color: var(--text-secondary);
    font-size: 16px;
    margin: 0;
}

/* 错误状态样式 */
.error-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    text-align: center;
    grid-column: 1 / -1; /* 占据整个网格宽度 */
    background: rgba(239, 68, 68, 0.05);
    border: 1px solid rgba(239, 68, 68, 0.1);
    border-radius: var(--border-radius);
    margin: 20px;
}

.error-container i {
    font-size: 48px;
    color: #ef4444;
    margin-bottom: 16px;
}

.error-container p {
    color: var(--text-secondary);
    font-size: 16px;
    margin: 0;
}
