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

:root {
    --primary-color: #3b82f6;
    --primary-dark: #2563eb;
    --secondary-color: #8b5cf6;
    --text-color: #f8fafc;
    --background-color: #0f172a;
    --card-bg: rgba(30, 41, 59, 0.6);
    --border-color: rgba(148, 163, 184, 0.2);
    --shadow-color: rgba(0, 0, 0, 0.1);
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: var(--background-color);
    color: var(--text-color);
    line-height: 1.6;
    overflow-x: hidden;
    background-image: 
        radial-gradient(circle at 10% 20%, rgba(59, 130, 246, 0.1) 0%, transparent 20%),
        radial-gradient(circle at 80% 30%, rgba(139, 92, 246, 0.1) 0%, transparent 20%),
        radial-gradient(circle at 40% 70%, rgba(59, 130, 246, 0.1) 0%, transparent 20%);
    background-attachment: fixed;
}

/* 容器样式 */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 导航栏样式 */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    z-index: 100;
    transition: all 0.3s ease;
}

.header.scrolled {
    background: rgba(15, 23, 42, 0.95);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

/* 支持信息横幅样式 */
.support-banner {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    padding: 10px 0;
    text-align: center;
    color: white;
    font-size: 0.9rem;
    font-weight: 500;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    margin-top: 76px; /* 确保在固定导航栏下方显示 */
}

.support-banner a {
    color: inherit;
    text-decoration: none;
}

.header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px;
}

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

.logo-img {
    width: 36px;
    height: 36px;
    border-radius: 50%;
}

.logo-text {
    font-size: 20px;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav {
    display: flex;
    gap: 30px;
}

.nav-link {
    color: var(--text-color);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
    padding: 5px 0;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    transition: width 0.3s ease;
}

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

.nav-link:hover::after {
    width: 100%;
}

/* Hero区域样式 */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 80px 0;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 20% 30%, rgba(59, 130, 246, 0.2) 0%, transparent 30%),
        radial-gradient(circle at 80% 70%, rgba(139, 92, 246, 0.2) 0%, transparent 30%);
    z-index: -1;
    animation: floatBackground 20s ease-in-out infinite;
}

@keyframes floatBackground {
    0%, 100% {
        transform: translateY(0) scale(1);
    }
    50% {
        transform: translateY(-20px) scale(1.05);
    }
}

.hero .container {
    text-align: center;
    max-width: 800px;
}

.hero h1 {
    font-size: 4rem;
    font-weight: 800;
    margin-bottom: 20px;
    line-height: 1.2;
    background: linear-gradient(135deg, #f8fafc, #e2e8f0);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: fadeIn 1s ease-out;
}

.hero p {
    font-size: 1.2rem;
    color: #cbd5e1;
    margin-bottom: 40px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    animation: fadeIn 1s ease-out 0.2s both;
}

.hero-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
    animation: fadeIn 1s ease-out 0.4s both;
}

.btn {
    padding: 12px 30px;
    border: none;
    border-radius: 50px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(59, 130, 246, 0.4);
}

.btn-secondary {
    background: transparent;
    color: var(--text-color);
    border: 2px solid var(--border-color);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--primary-color);
    transform: translateY(-3px);
}

/* API接口区域样式 */
.api-section {
    padding: 100px 0;
    position: relative;
}

.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 15px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.section-subtitle {
    color: #cbd5e1;
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto;
}

.category-title {
    font-size: 1.8rem;
    font-weight: 600;
    margin-bottom: 30px;
    color: #e2e8f0;
    position: relative;
    padding-left: 15px;
    margin-top: 50px;
}

.category-title::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 5px;
    height: 80%;
    background: linear-gradient(180deg, var(--primary-color), var(--secondary-color));
    border-radius: 10px;
}

/* API网格布局 */
.api-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

/* API卡片样式 */
.api-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 15px;
    padding: 25px;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    position: relative;
    overflow: hidden;
}

.api-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
}

.api-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    border-color: rgba(59, 130, 246, 0.5);
}

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

.card-header h4 {
    font-size: 1.2rem;
    font-weight: 600;
    color: #f8fafc;
}

.tag {
    background: rgba(59, 130, 246, 0.1);
    color: var(--primary-color);
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
}

.card-content {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.img-preview {
    width: 100%;
    min-height: 200px;
    height: 200px;
    border-radius: 10px;
    overflow: hidden;
    position: relative;
    cursor: pointer;
    background: rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
}

.img-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.img-preview:hover img {
    transform: scale(1.05);
}

.img-preview::after {
    content: '点击刷新';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.6);
    color: white;
    padding: 8px;
    text-align: center;
    font-size: 0.85rem;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.img-preview:hover::after {
    opacity: 1;
}

.url-container {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 15px;
    width: 100%;
}

.url-container input {
    flex: 1;
    padding: 10px 15px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.1);
    color: var(--text-color);
    font-size: 0.9rem;
    outline: none;
    transition: border-color 0.3s ease;
    min-width: 0;
    word-break: break-all;
}

.url-container input:focus {
    border-color: var(--primary-color);
}

.copy-btn {
    padding: 10px 20px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.copy-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
}

/* 更新日志样式 */
.changelog-section {
    padding: 100px 0;
    background: rgba(15, 23, 42, 0.5);
}

.changelog-content {
    max-width: 800px;
    margin: 0 auto;
}

.changelog-item {
    margin-bottom: 40px;
    padding: 25px;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 15px;
    transition: all 0.3s ease;
}

.changelog-item:hover {
    border-color: var(--primary-color);
    transform: translateX(5px);
}

.changelog-item .date {
    display: inline-block;
    background: rgba(59, 130, 246, 0.1);
    color: var(--primary-color);
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 15px;
}

.changes h4 {
    font-size: 1.2rem;
    color: #f8fafc;
    margin-bottom: 10px;
}

.changes ul {
    list-style: none;
    padding-left: 0;
}

.changes li {
    padding: 8px 0;
    padding-left: 25px;
    position: relative;
    color: #cbd5e1;
}

.changes li::before {
    content: '•';
    position: absolute;
    left: 0;
    color: var(--primary-color);
    font-size: 1.5rem;
    line-height: 0.8;
}

/* 页脚样式 */
.footer {
    background: rgba(15, 23, 42, 0.8);
    border-top: 1px solid var(--border-color);
    padding: 60px 0;
}

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

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

.footer-logo-img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
}

.footer-logo-text {
    font-size: 24px;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.footer-links {
    display: flex;
    gap: 30px;
    flex-wrap: wrap;
    justify-content: center;
}

.footer-link {
    color: #cbd5e1;
    text-decoration: none;
    transition: color 0.3s ease;
}

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

.footer-copyright {
    color: #94a3b8;
    font-size: 0.9rem;
}

/* 图片模态框样式 */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.9);
    justify-content: center;
    align-items: center;
    transition: opacity 0.3s ease;
}

.modal.show {
    display: flex;
    opacity: 1;
}

.modal-content {
    position: relative;
    margin: auto;
    padding: 20px;
    max-width: 90%;
    max-height: 90%;
}

.modal-img {
    max-width: 100%;
    max-height: 80vh;
    border-radius: 4px;
    object-fit: contain;
}

.close {
    position: absolute;
    top: 15px;
    right: 25px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    transition: 0.3s;
    cursor: pointer;
    z-index: 1001;
}

.close:hover,
.close:focus {
    color: #bbb;
    text-decoration: none;
    cursor: pointer;
}

/* Toast通知样式 */
.toast {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%);
    color: white;
    padding: 12px 24px;
    border-radius: 50px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.3s ease, transform 0.3s ease;
    font-weight: 500;
}

.toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(-10px);
}

/* 响应式设计 */
@media (max-width: 768px) {
    .hero h1 {
        font-size: 2.5rem;
    }
    
    .hero p {
        font-size: 1rem;
    }
    
    .hero-buttons {
        flex-direction: column;
        gap: 15px;
    }
    
    .btn {
        width: 100%;
        max-width: 300px;
        margin: 0 auto;
    }
    
    .api-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .nav {
        gap: 15px;
    }
    
    .nav-link {
        font-size: 0.9rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .category-title {
        font-size: 1.5rem;
    }
    
    .footer-links {
        gap: 15px;
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    .hero h1 {
        font-size: 2rem;
    }
    
    .header .container {
        padding: 15px;
    }
    
    .logo-text {
        font-size: 18px;
    }
    
    .api-card {
        padding: 20px;
    }
    
    .img-preview {
        height: 150px;
    }
    
    .url-container {
        flex-direction: column;
        gap: 10px;
        margin-top: 15px;
    }
    
    .url-container input {
        width: 100%;
    }
    
    .copy-btn {
        width: 100%;
    }
}