/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* 头部样式 */
.header {
    text-align: center;
    padding: 60px 20px;
    color: white;
}

.header h1 {
    font-size: 3rem;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

.header .subtitle {
    font-size: 1.2rem;
    opacity: 0.9;
}

/* 区域样式 */
.download-section,
.tutorial-section {
    background: white;
    border-radius: 16px;
    padding: 40px;
    margin-bottom: 30px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
}

.download-section h2,
.tutorial-section h2 {
    font-size: 2rem;
    margin-bottom: 30px;
    color: #667eea;
    border-bottom: 2px solid #667eea;
    padding-bottom: 10px;
}

/* 下载和介绍区域 - 共用容器两栏布局 */
.download-intro-wrapper {
    margin-bottom: 30px;
}

.download-intro-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    background: white;
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
}

.download-panel,
.intro-panel {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 24px;
    min-height: 300px;
}

.download-panel h2,
.intro-panel h2 {
    font-size: 1.3rem;
    margin-bottom: 20px;
    color: #667eea;
    border-bottom: 2px solid #667eea;
    padding-bottom: 10px;
}

/* 软件列表样式 */
.software-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* 软件卡片样式 */
.software-card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    transition: all 0.3s ease;
    border: 2px solid #e9ecef;
}

/* 软件卡片网格 */
.software-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
}

.software-card {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 24px;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.software-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    border-color: #667eea;
}

.software-icon {
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    margin-bottom: 16px;
}

.software-name {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 8px;
    color: #333;
}

.software-version {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 12px;
}

.software-size {
    color: #999;
    font-size: 0.85rem;
    margin-bottom: 16px;
}

.software-description {
    color: #555;
    font-size: 0.9rem;
    margin-bottom: 20px;
    line-height: 1.5;
}

.platform-badge {
    display: inline-block;
    padding: 4px 12px;
    background: #e9ecef;
    border-radius: 20px;
    font-size: 0.8rem;
    color: #495057;
    margin-bottom: 16px;
}

.platform-badge.android {
    background: #e8f5e9;
    color: #2e7d32;
}

/* 按钮样式 */
.btn {
    display: inline-block;
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    text-align: center;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.btn-block {
    width: 100%;
}

/* 教程网格 */
.tutorial-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 24px;
}

.tutorial-card {
    background: #f8f9fa;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.tutorial-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.tutorial-media {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    background: #e9ecef;
}

.tutorial-video {
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000;
}

.tutorial-title {
    padding: 16px;
    font-size: 1.1rem;
    font-weight: 500;
    color: #333;
}

.tutorial-type-badge {
    display: inline-block;
    padding: 4px 12px;
    background: #e3f2fd;
    color: #1976d2;
    border-radius: 20px;
    font-size: 0.8rem;
    margin-left: 16px;
}

/* 模态框样式 */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal-content {
    background: white;
    border-radius: 16px;
    padding: 40px;
    max-width: 400px;
    width: 90%;
    position: relative;
    animation: modalSlideIn 0.3s ease;
}

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

.modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    font-size: 28px;
    color: #999;
    cursor: pointer;
    transition: color 0.3s;
}

.modal-close:hover {
    color: #333;
}

.modal-content h3 {
    font-size: 1.5rem;
    margin-bottom: 12px;
    color: #333;
}

.modal-hint {
    color: #666;
    margin-bottom: 24px;
}

.modal-content input[type="password"] {
    width: 100%;
    padding: 14px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 1rem;
    margin-bottom: 16px;
    transition: border-color 0.3s;
}

.modal-content input[type="password"]:focus {
    outline: none;
    border-color: #667eea;
}

.error-text {
    color: #e53935;
    margin-top: 12px;
    font-size: 0.9rem;
}

/* 加载动画 */
.loading {
    text-align: center;
    padding: 40px;
    color: #999;
}

.loading::after {
    content: '';
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #667eea;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 1s linear infinite;
    margin-left: 10px;
    vertical-align: middle;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* 空状态 */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #999;
}

.empty-state-icon {
    font-size: 64px;
    margin-bottom: 20px;
}

/* 页脚 */
.footer {
    text-align: center;
    padding: 30px;
    color: white;
    opacity: 0.8;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .header h1 {
        font-size: 2rem;
    }
    
    .download-section,
    .tutorial-section {
        padding: 24px;
    }
}
