/* CSS变量 - 主题色彩 */
:root {
    /* 浅色主题 */
    --primary-color: #2563eb;
    --primary-hover: #1d4ed8;
    --secondary-color: #64748b;
    --accent-color: #0ea5e9;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --error-color: #ef4444;
    
    --bg-primary: #ffffff;
    --bg-secondary: #f8fafc;
    --bg-tertiary: #f1f5f9;
    --border-color: #e2e8f0;
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-tertiary: #94a3b8;
    
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
    
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
}

/* 暗色主题 */
[data-theme="dark"] {
    --primary-color: #3b82f6;
    --primary-hover: #2563eb;
    --secondary-color: #64748b;
    --accent-color: #0ea5e9;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --error-color: #ef4444;
    
    --bg-primary: #0f172a;
    --bg-secondary: #1e293b;
    --bg-tertiary: #334155;
    --border-color: #475569;
    --text-primary: #f8fafc;
    --text-secondary: #cbd5e1;
    --text-tertiary: #94a3b8;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: var(--bg-secondary);
    color: var(--text-primary);
    line-height: 1.6;
    font-size: 16px;
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* 导航栏样式 */
.navbar {
    background-color: var(--bg-primary);
    border-bottom: 1px solid var(--border-color);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(20px);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    color: var(--text-primary);
    font-weight: 600;
    font-size: 1.25rem;
}

.nav-brand:hover {
    color: var(--primary-color);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 2rem;
    list-style: none;
}

.nav-link {
    text-decoration: none;
    color: var(--text-secondary);
    font-weight: 500;
    transition: color 0.2s ease;
}

.nav-link:hover {
    color: var(--primary-color);
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.theme-toggle, .lang-toggle {
    background: none;
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    padding: 0.5rem;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.theme-toggle:hover, .lang-toggle:hover {
    background-color: var(--bg-tertiary);
    border-color: var(--primary-color);
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 1.5rem;
    cursor: pointer;
}

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

/* 主页面容器 */
.main-wrapper {
    min-height: calc(100vh - 80px);
    padding: 2rem 0;
}

/* 头部样式 */
.hero-section {
    text-align: center;
    margin-bottom: 3rem;
    padding: 2rem 0;
}

.hero-title {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    line-height: 1.2;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.feature-badges {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 2rem;
}

.feature-badge {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    padding: 0.5rem 1rem;
    border-radius: var(--radius-lg);
    font-size: 0.875rem;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* 主要内容区域 */
main {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.section-card {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    padding: 2rem;
    box-shadow: var(--shadow-md);
    transition: all 0.3s ease;
}

.section-card:hover {
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-color);
}

.section-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.section-icon {
    width: 2.5rem;
    height: 2.5rem;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    color: white;
}

.section-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.section-subtitle {
    color: var(--text-secondary);
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

/* 上传区域样式 */
.upload-area {
    border: 2px dashed var(--border-color);
    border-radius: var(--radius-xl);
    padding: 3rem 2rem;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
    background: var(--bg-secondary);
    position: relative;
    overflow: hidden;
}

.upload-area:before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.upload-area:hover {
    border-color: var(--primary-color);
    transform: translateY(-2px);
}

.upload-area:hover:before {
    opacity: 0.05;
}

.upload-area.dragover {
    border-color: var(--primary-color);
    background: var(--bg-primary);
}

.upload-area.dragover:before {
    opacity: 0.1;
}

        .upload-content {
            position: relative;
            z-index: 1;
        }

.upload-icon {
    width: 4rem;
    height: 4rem;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    font-size: 1.5rem;
    color: white;
}

.upload-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.upload-subtitle {
    color: var(--text-secondary);
    font-size: 0.875rem;
}

/* 视频预览样式 */
.video-preview {
    margin-top: 1.5rem;
    text-align: center;
}

.video-preview video {
    max-width: 100%;
    max-height: 400px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-color);
}

.video-info {
    margin-top: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--bg-tertiary);
    padding: 1rem 1.5rem;
    border-radius: var(--radius-lg);
    font-weight: 500;
    color: var(--text-primary);
}

/* 按钮样式 */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    position: relative;
    overflow: hidden;
    line-height: 1;
    min-height: 2.5rem;
}

.btn:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
}

.btn-primary:hover:not(:disabled) {
    background: var(--primary-hover);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn-secondary {
    background: var(--bg-primary);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover:not(:disabled) {
    background: var(--bg-tertiary);
    border-color: var(--primary-color);
    transform: translateY(-1px);
}

.btn-success {
    background: var(--success-color);
    color: white;
}

.btn-success:hover:not(:disabled) {
    background: #059669;
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn-warning {
    background: var(--warning-color);
    color: white;
}

.btn-warning:hover:not(:disabled) {
    background: #d97706;
    transform: translateY(-1px);
}

.btn-danger {
    background: var(--error-color);
    color: white;
}

.btn-danger:hover:not(:disabled) {
    background: #dc2626;
    transform: translateY(-1px);
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none !important;
}

.btn-icon {
    font-size: 1rem;
}

.btn-lg {
    padding: 1rem 2rem;
    font-size: 1rem;
    min-height: 3rem;
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.75rem;
    min-height: 2rem;
}

/* 进度条样式 */
.progress-bar {
    position: relative;
    width: 100%;
    height: 8px;
    background: var(--bg-tertiary);
    border-radius: var(--radius-lg);
    margin: 1.5rem 0;
    overflow: hidden;
    box-shadow: inset 0 1px 2px rgba(0,0,0,0.1);
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
    border-radius: var(--radius-lg);
    width: 0%;
    transition: width 0.3s ease;
    position: relative;
    overflow: hidden;
}

.progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
    background: linear-gradient(
        90deg,
        rgba(255,255,255,0) 0%,
        rgba(255,255,255,0.3) 50%,
        rgba(255,255,255,0) 100%
    );
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.progress-text {
    text-align: center;
    margin-top: 1rem;
    font-weight: 500;
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.progress-percentage {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 0.75rem;
    font-weight: 600;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
}

/* 消息样式 */
.error-message, .success-message, .warning-message {
    padding: 1rem 1.5rem;
    border-radius: var(--radius-lg);
    margin: 1rem 0;
    font-weight: 500;
    border: 1px solid;
    animation: slideIn 0.3s ease;
}

.error-message {
    background: #fef2f2;
    color: #991b1b;
    border-color: #fca5a5;
}

.success-message {
    background: #f0fdf4;
    color: #166534;
    border-color: #86efac;
}

.warning-message {
    background: #fffbeb;
    color: #92400e;
    border-color: #fcd34d;
}

[data-theme="dark"] .error-message {
    background: #7f1d1d;
    color: #fca5a5;
    border-color: #991b1b;
}

[data-theme="dark"] .success-message {
    background: #14532d;
    color: #86efac;
    border-color: #166534;
}

[data-theme="dark"] .warning-message {
    background: #78350f;
    color: #fcd34d;
    border-color: #92400e;
}

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

/* 响应式设计 */
@media (max-width: 768px) {
    .nav-links {
        display: none;
    }

    .mobile-menu-btn {
        display: block;
    }

    .hero-title {
        font-size: 2rem;
    }

    .hero-subtitle {
        font-size: 1rem;
    }

    .container {
        padding: 0 1rem;
    }

    .section-card {
        padding: 1.5rem;
    }

    .upload-area {
        padding: 2rem 1rem;
    }

    .nav-actions {
        gap: 0.5rem;
    }

    .feature-badges {
        gap: 0.5rem;
    }

    .feature-badge {
        font-size: 0.75rem;
        padding: 0.375rem 0.75rem;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 1.75rem;
    }
    
    .section-card {
        padding: 1rem;
    }
    
    .btn {
        padding: 0.625rem 1rem;
        font-size: 0.8rem;
    }
}

/* 隐私条款和服务条款页面样式 */
.privacy-content, .terms-content {
    max-width: 800px;
    margin: 0 auto;
}

.privacy-content .section-header {
    margin-bottom: 3rem;
}

.privacy-section, .terms-section {
    margin-bottom: 2.5rem;
}

.privacy-section h2, .terms-section h2 {
    color: var(--primary-color);
    font-size: 1.5rem;
    margin-bottom: 1rem;
    font-weight: 600;
}

.privacy-section h3, .terms-section h3 {
    color: var(--text-primary);
    font-size: 1.25rem;
    margin: 1.5rem 0 0.75rem 0;
    font-weight: 500;
}

.privacy-section p, .terms-section p {
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 1rem;
}

.privacy-section ul, .terms-section ul {
    margin: 1rem 0 1rem 1.5rem;
}

.privacy-section li, .terms-section li {
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 0.5rem;
}

.privacy-update, .terms-update {
    color: var(--text-tertiary);
    font-size: 0.875rem;
    font-style: italic;
    margin-top: 0.5rem;
}

.contact-info {
    background: var(--bg-tertiary);
    padding: 1.5rem;
    border-radius: var(--radius-lg);
    margin-top: 1rem;
    border-left: 4px solid var(--primary-color);
}

.contact-info p {
    margin-bottom: 0.5rem;
    color: var(--text-primary);
    font-weight: 500;
}

.contact-info p:last-child {
    margin-bottom: 0;
    color: var(--text-secondary);
    font-weight: normal;
}

/* 页脚样式 */
.footer {
    background-color: var(--bg-primary);
    border-top: 1px solid var(--border-color);
    padding: 2rem 0;
    margin-top: 3rem;
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    text-align: center;
}

.footer-links {
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
    justify-content: center;
}

.footer-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.875rem;
    transition: color 0.2s ease;
}

.footer-links a:hover {
    color: var(--primary-color);
}

.footer-text {
    color: var(--text-tertiary);
    font-size: 0.875rem;
}

@media (max-width: 768px) {
    .footer-links {
        gap: 1rem;
    }
    
    .footer-links a {
        font-size: 0.8rem;
    }
}


/* 博客列表样式 */
.blog-posts {
    display: grid;
    gap: 2rem;
}

.blog-card {
    background-color: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.blog-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.blog-card-image {
    display: block;
    position: relative;
    padding-top: 56%;
    overflow: hidden;
    background: var(--bg-tertiary);
}

.blog-card-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.blog-card:hover .blog-card-image img {
    transform: scale(1.05);
}

.blog-card-body {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.blog-card-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.blog-card-category {
    background: rgba(37, 99, 235, 0.12);
    color: var(--primary-color);
    padding: 0.25rem 0.75rem;
    border-radius: 999px;
    font-weight: 600;
    font-size: 0.75rem;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.blog-card-title {
    font-size: 1.5rem;
    line-height: 1.3;
}

.blog-card-title a {
    color: var(--text-primary);
    text-decoration: none;
}

.blog-card-title a:hover {
    color: var(--primary-color);
}

.blog-card-excerpt {
    color: var(--text-secondary);
}

.blog-card-link {
    align-self: flex-start;
    font-weight: 600;
    color: var(--primary-color);
    text-decoration: none;
}

.blog-card-link:hover {
    text-decoration: underline;
}

@media (max-width: 640px) {
    .blog-card-body {
        padding: 1.25rem;
    }
}

/* 博客文章页布局 */
.article-wrapper {
    display: grid;
    grid-template-columns: minmax(0, 280px) minmax(0, 1fr);
    gap: 2.5rem;
    align-items: start;
}

.article-sidebar {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    position: sticky;
    top: 120px;
}

.sidebar-back {
    text-decoration: none;
    color: var(--primary-color);
    font-weight: 600;
}

.sidebar-card {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
}

.sidebar-card h3 {
    font-size: 1rem;
    margin-bottom: 1rem;
}

.sidebar-card ol {
    list-style: decimal;
    margin-left: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    font-size: 0.95rem;
}

.sidebar-card a {
    color: var(--text-secondary);
    text-decoration: none;
}

.sidebar-card a:hover {
    color: var(--primary-color);
}

.sidebar-card.highlight {
    border-color: rgba(37, 99, 235, 0.2);
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.08), rgba(14, 165, 233, 0.08));
}

.primary-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    color: #ffffff;
    border-radius: var(--radius-md);
    font-weight: 600;
    text-decoration: none;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    box-shadow: var(--shadow-sm);
}

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

.blog-article {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-md);
    padding: 2.5rem;
}

.article-header {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 2rem;
}

.article-category {
    font-size: 0.85rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    font-weight: 700;
    color: var(--primary-color);
}

.article-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.article-cover {
    margin: 0 0 2.5rem 0;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    background: var(--bg-tertiary);
}

.article-cover img {
    width: 100%;
    height: auto;
    max-height: 400px;
    object-fit: cover;
    display: block;
}

.article-cover figcaption {
    padding: 1rem 1.25rem;
    color: var(--text-secondary);
    background: rgba(15, 23, 42, 0.04);
}

.article-section + .article-section {
    margin-top: 2.5rem;
}

.article-section h2 {
    color: var(--primary-color);
    font-size: 1.5rem;
    margin-bottom: 1rem;
    font-weight: 600;
}

.article-section h3 {
    color: var(--text-primary);
    font-size: 1.25rem;
    margin: 1.5rem 0 0.75rem;
    font-weight: 500;
}

.article-section p {
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 1rem;
}

.article-section ul,
.article-section ol {
    margin: 1rem 0 1rem 1.5rem;
}

.article-section li {
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 0.5rem;
}

.article-image {
    margin: 2rem 0;
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: var(--bg-tertiary);
    box-shadow: var(--shadow-sm);
}

.article-image img {
    width: 100%;
    height: auto;
    max-height: 350px;
    object-fit: cover;
    display: block;
}

.article-image figcaption {
    padding: 0.85rem 1.25rem;
    font-size: 0.95rem;
    color: var(--text-secondary);
    background: rgba(15, 23, 42, 0.04);
}

.article-faq {
    display: grid;
    gap: 1.25rem;
}

.article-faq dt {
    font-weight: 600;
}

.article-faq dd {
    margin-left: 0;
    color: var(--text-secondary);
}

.article-cta {
    margin-top: 2rem;
    padding: 2rem;
    border-radius: var(--radius-lg);
    border: 1px solid rgba(37, 99, 235, 0.2);
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.1), rgba(14, 165, 233, 0.1));
    box-shadow: var(--shadow-sm);
}

.article-cta h3 {
    margin-bottom: 0.75rem;
}

.article-cta p {
    margin-bottom: 1.25rem;
    color: var(--text-secondary);
}

.article-footer {
    margin-top: 3rem;
    border-top: 1px solid var(--border-color);
    padding-top: 1.5rem;
}

.back-to-list {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
}

.back-to-list:hover {
    text-decoration: underline;
}

@media (max-width: 1024px) {
    .article-wrapper {
        grid-template-columns: 1fr;
    }

    .article-sidebar {
        position: static;
        order: -1;
    }
}

@media (max-width: 768px) {
    .blog-article {
        padding: 1.75rem;
    }

    .article-section h2 {
        font-size: 1.4rem;
    }
}

@media (max-width: 640px) {
    .article-section h2 {
        font-size: 1.3rem;
    }

    .article-wrapper {
        gap: 1.5rem;
    }
}
