/* ===== 全局样式重置 ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', 'Microsoft YaHei', sans-serif;
}

/* ===== 全局变量 ===== */
:root {
    --primary: #3b82f6;
    --primary-dark: #2563eb;
    --secondary: #8b5cf6;
    --secondary-dark: #7c3aed;
    --success: #10b981;
    --success-dark: #059669;
    --warning: #f59e0b;
    --danger: #ef4444;
    --bg-dark: #0f172a;
    --bg-card: rgba(30, 41, 59, 0.7);
    --bg-card-solid: #1e293b;
    --text-light: #f8fafc;
    --text-muted: #94a3b8;
    --text-dim: #cbd5e1;
    --border-color: #334155;
    --border-light: #475569;
    --gradient-primary: linear-gradient(135deg, var(--primary), var(--secondary));
    --gradient-blue: linear-gradient(to right, var(--primary), var(--primary-dark));
    --gradient-purple: linear-gradient(to right, var(--secondary), var(--secondary-dark));
    --gradient-green: linear-gradient(to right, var(--success), var(--success-dark));
    --gradient-orange: linear-gradient(to right, #f59e0b, #d97706);
    --shadow-sm: 0 5px 15px rgba(0, 0, 0, 0.2);
    --shadow-md: 0 10px 25px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 15px 35px rgba(59, 130, 246, 0.2);
    --transition: all 0.3s ease;
}

/* ===== 基础样式 ===== */
body {
    background-color: var(--bg-dark);
    color: var(--text-light);
    line-height: 1.6;
    overflow-x: hidden;
}

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

/* ===== 导航栏 ===== */
header {
    background-color: rgba(15, 23, 42, 0.95);
    padding: 20px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid var(--border-color);
    backdrop-filter: blur(10px);
    transition: var(--transition);
}

header.scrolled {
    padding: 10px 0;
    background-color: rgba(15, 23, 42, 0.98);
    box-shadow: var(--shadow-sm);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

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

.logo-img {
    width: 40px;
    height: 40px;
    background: var(--gradient-primary);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: bold;
    color: white;
    transition: var(--transition);
}

.logo:hover .logo-img {
    transform: rotate(360deg);
}

.logo-text {
    font-size: 28px;
    font-weight: 700;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

nav ul {
    display: flex;
    list-style: none;
    gap: 30px;
}

nav a {
    color: var(--text-dim);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
    font-size: 18px;
    position: relative;
}

nav a:after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -5px;
    left: 0;
    background: var(--gradient-blue);
    transition: var(--transition);
}

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

nav a:hover:after {
    width: 100%;
}

/* ===== 主标题区域 ===== */
.hero {
    padding: 100px 0;
    text-align: center;
    background: radial-gradient(circle at top right, rgba(59, 130, 246, 0.15), transparent 50%),
                radial-gradient(circle at bottom left, rgba(139, 92, 246, 0.15), transparent 50%);
    position: relative;
    overflow: hidden;
}

.hero h1 {
    font-size: 3.5rem;
    margin-bottom: 20px;
    line-height: 1.2;
    animation: fadeInUp 1s ease;
}

.hero p {
    font-size: 1.3rem;
    color: var(--text-muted);
    max-width: 700px;
    margin: 0 auto;
    animation: fadeInUp 1s ease 0.2s both;
}

.highlight {
    color: #60a5fa;
    font-weight: 700;
    position: relative;
    display: inline-block;
}

.highlight:after {
    content: '';
    position: absolute;
    width: 100%;
    height: 8px;
    bottom: 5px;
    left: 0;
    background: rgba(59, 130, 246, 0.3);
    z-index: -1;
}

/* ===== 主要区域样式 ===== */
section {
    padding: 80px 0;
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 60px;
    position: relative;
    animation: fadeIn 1s ease;
}

.section-title:after {
    content: '';
    position: absolute;
    width: 80px;
    height: 4px;
    background: var(--gradient-primary);
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    border-radius: 2px;
    transition: var(--transition);
}

.section-title:hover:after {
    width: 120px;
}

/* ===== 三级加密卡片 ===== */
.levels-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.level-card {
    background: var(--bg-card);
    border-radius: 16px;
    padding: 40px 30px;
    text-align: center;
    border: 1px solid var(--border-color);
    position: relative;
    overflow: hidden;
    transition: var(--transition);
}

.level-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
}

.level-card:hover .level-icon {
    transform: scale(1.1) rotate(360deg);
}

.level-badge {
    display: inline-block;
    padding: 6px 18px;
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 700;
    margin-bottom: 20px;
}

.level-1 .level-badge {
    background: rgba(16, 185, 129, 0.15);
    color: var(--success);
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.level-2 .level-badge {
    background: rgba(245, 158, 11, 0.15);
    color: var(--warning);
    border: 1px solid rgba(245, 158, 11, 0.3);
}

.level-3 .level-badge {
    background: rgba(239, 68, 68, 0.15);
    color: var(--danger);
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.level-icon {
    font-size: 48px;
    margin-bottom: 20px;
    transition: var(--transition);
}

.level-1 .level-icon { color: var(--success); }
.level-2 .level-icon { color: var(--warning); }
.level-3 .level-icon { color: var(--danger); }

.level-card h3 {
    font-size: 1.6rem;
    margin-bottom: 10px;
}

.level-tag {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 15px;
}

.level-card > p:last-child {
    color: var(--text-dim);
    line-height: 1.7;
}

.level-1 { border-top: 4px solid var(--success); }
.level-2 { border-top: 4px solid var(--warning); }
.level-3 { border-top: 4px solid var(--danger); }

/* ===== 产品卡片 ===== */
.products {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 40px;
}

.product-card {
    background: var(--bg-card);
    border-radius: 16px;
    padding: 40px 30px;
    width: 100%;
    max-width: 500px;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
    border: 1px solid var(--border-color);
    position: relative;
    overflow: hidden;
    animation: fadeInUp 1s ease;
    animation-fill-mode: both;
}

.product-card:nth-child(2) {
    animation-delay: 0.2s;
}

.product-card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary);
}

.product-icon {
    font-size: 48px;
    margin-bottom: 25px;
    color: var(--primary);
    transition: var(--transition);
}

.product-card:hover .product-icon {
    transform: scale(1.1) rotate(360deg);
}

.product-card h3 {
    font-size: 1.8rem;
    margin-bottom: 15px;
}

.product-card p {
    color: var(--text-dim);
    margin-bottom: 15px;
}

.product-links {
    margin-top: 20px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.product-link {
    display: inline-block;
    color: white;
    text-decoration: none;
    padding: 15px 30px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1.1rem;
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
    text-align: center;
}

.product-link:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

.product-link i {
    margin-right: 10px;
}

.gitee-link {
    background: linear-gradient(to right, #c71d23, #a0171c);
}

/* ===== 技术栈标签 ===== */
.tech-stack {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 10px;
}

.tech-tag {
    display: inline-block;
    padding: 6px 14px;
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.3);
    border-radius: 50px;
    font-size: 0.85rem;
    color: #60a5fa;
    transition: var(--transition);
}

.tech-tag:hover {
    background: rgba(59, 130, 246, 0.2);
    transform: translateY(-2px);
}

/* ===== 特点区域 ===== */
.features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.feature {
    background: rgba(30, 41, 59, 0.5);
    padding: 30px;
    border-radius: 12px;
    border-left: 4px solid var(--primary);
    transition: var(--transition);
    animation: fadeInUp 1s ease;
    animation-fill-mode: both;
}

.feature:nth-child(1) { animation-delay: 0s; }
.feature:nth-child(2) { animation-delay: 0.1s; }
.feature:nth-child(3) { animation-delay: 0.2s; }
.feature:nth-child(4) { animation-delay: 0.3s; }
.feature:nth-child(5) { animation-delay: 0.4s; }
.feature:nth-child(6) { animation-delay: 0.5s; }

.feature:hover {
    transform: translateX(10px);
    background: rgba(30, 41, 59, 0.8);
    border-left-width: 8px;
}

.feature h3 {
    color: #60a5fa;
    margin-bottom: 15px;
    font-size: 1.4rem;
}

.feature i {
    margin-right: 10px;
    transition: var(--transition);
}

.feature:hover i {
    transform: rotate(360deg);
}

/* ===== 开源区域 ===== */
.oss-section {
    background: radial-gradient(circle at center, rgba(139, 92, 246, 0.08), transparent 70%);
}

/* ===== 页脚 ===== */
footer {
    background-color: rgba(15, 23, 42, 0.98);
    padding: 60px 0 30px;
    border-top: 1px solid var(--border-color);
    margin-top: 60px;
}

.footer-content {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 40px;
    margin-bottom: 40px;
}

.footer-section {
    flex: 1;
    min-width: 220px;
}

.footer-section h3 {
    font-size: 1.3rem;
    margin-bottom: 20px;
    color: #60a5fa;
    position: relative;
    padding-bottom: 10px;
}

.footer-section h3:after {
    content: '';
    position: absolute;
    width: 50px;
    height: 2px;
    background: var(--gradient-primary);
    bottom: 0;
    left: 0;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 10px;
}

.footer-section ul li a {
    color: var(--text-muted);
    text-decoration: none;
    transition: var(--transition);
}

.footer-section ul li a:hover {
    color: var(--primary);
    padding-left: 5px;
}

.footer-section p {
    color: var(--text-dim);
    margin-bottom: 8px;
}

.copyright {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid var(--border-color);
    color: var(--text-muted);
}

/* ===== 回到顶部按钮 ===== */
#backToTop {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: var(--gradient-primary);
    color: white;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    display: none;
    font-size: 20px;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    z-index: 999;
}

#backToTop:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

/* ===== 动画 ===== */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

/* ===== 响应式设计 ===== */
@media (max-width: 1024px) {
    .hero h1 {
        font-size: 3rem;
    }

    .section-title {
        font-size: 2.2rem;
    }

    .levels-grid {
        grid-template-columns: 1fr;
        max-width: 500px;
        margin: 0 auto;
    }
}

@media (max-width: 768px) {
    .nav-container {
        flex-direction: column;
        gap: 20px;
    }

    nav ul {
        flex-wrap: wrap;
        justify-content: center;
        gap: 15px;
    }

    nav a {
        font-size: 16px;
    }

    .hero h1 {
        font-size: 2.5rem;
    }

    .hero p {
        font-size: 1.1rem;
    }

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

    .product-card {
        padding: 30px 20px;
    }

    .features {
        grid-template-columns: 1fr;
    }

    .footer-content {
        flex-direction: column;
        gap: 30px;
    }
}

@media (max-width: 480px) {
    .hero {
        padding: 60px 0;
    }

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

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

    .section-title {
        font-size: 1.8rem;
    }

    .product-card h3 {
        font-size: 1.5rem;
    }

    .product-link {
        padding: 12px 20px;
        font-size: 1rem;
    }

    .feature {
        padding: 20px;
    }

    #backToTop {
        width: 40px;
        height: 40px;
        font-size: 16px;
        bottom: 20px;
        right: 20px;
    }
}

/* ===== 自定义滚动条 ===== */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--bg-dark);
}

::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary);
}

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