/* 基础样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Microsoft YaHei', 'PingFang SC', 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(135deg, #f5f7fa 0%, #e4edf9 100%);
    color: #333;
    line-height: 1.6;
    min-height: 100vh;
}

/* 导航栏样式 */
.navbar {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 1.2rem 0;
    box-shadow: 0 4px 20px rgba(102, 126, 234, 0.2);
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(10px);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.nav-brand {
    flex: 1;
}

.nav-title {
    color: white;
    font-size: 1.8rem;
    font-weight: 600;
    margin: 0;
}

.nav-links {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
    justify-content: flex-end;
    align-items: center;
}

/* 下拉菜单样式 */
.dropdown {
    position: relative;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(-15px) scale(0.95);
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 16px;
    box-shadow: 0 12px 35px rgba(0,0,0,0.25);
    padding: 0.8rem 0;
    margin-top: 0.8rem;
    min-width: 220px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    z-index: 1000;
    border: 1px solid rgba(255,255,255,0.1);
}

.dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0) scale(1);
}

.dropdown-item {
    display: block;
    padding: 1rem 2rem;
    color: white;
    text-decoration: none;
    font-size: 1.05rem;
    font-weight: 500;
    transition: all 0.3s ease;
    white-space: nowrap;
    text-align: center;
    border-radius: 0;
    position: relative;
    overflow: hidden;
}

.dropdown-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
    transition: left 0.5s ease;
}

.dropdown-item:hover::before {
    left: 100%;
}

.dropdown-item:hover {
    background-color: rgba(255,255,255,0.18);
    transform: translateY(-3px);
    border-left: none;
    border-radius: 12px;
    margin: 0 0.8rem;
    box-shadow: 0 6px 20px rgba(0,0,0,0.2);
    letter-spacing: 0.5px;
}

.nav-link {
    color: white;
    text-decoration: none;
    font-size: 1rem;
    padding: 0.6rem 1.2rem;
    border-radius: 25px;
    transition: all 0.3s ease;
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.2);
}

.nav-link:hover {
    background-color: rgba(255,255,255,0.25);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

/* 主要内容区域 */
.main-content {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 2rem;
}

/* 介绍区域样式 */
.intro-section {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9ff 100%);
    border-radius: 20px;
    padding: 3rem;
    margin-bottom: 3.5rem;
    text-align: center;
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.15);
    border: 1px solid rgba(102, 126, 234, 0.1);
    position: relative;
    overflow: hidden;
}

.intro-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #667eea, #764ba2, #667eea);
    background-size: 200% 100%;
    animation: gradientShift 3s ease-in-out infinite;
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.intro-badge {
    display: inline-block;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    padding: 0.5rem 1.2rem;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.intro-stats {
    display: flex;
    justify-content: center;
    gap: 2.5rem;
    margin-top: 2rem;
    flex-wrap: wrap;
}

.stat-item {
    text-align: center;
}

.stat-number {
    display: block;
    font-size: 2rem;
    font-weight: 800;
    color: #667eea;
    line-height: 1;
}

.stat-label {
    display: block;
    font-size: 0.9rem;
    color: #6c757d;
    margin-top: 0.3rem;
}

.intro-title {
    font-size: 2.4rem;
    font-weight: 800;
    color: #2c3e50;
    margin-bottom: 1.2rem;
    background: linear-gradient(135deg, #2c3e50, #667eea);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.intro-description {
    font-size: 1.15rem;
    color: #555;
    max-width: 800px;
    margin: 0 auto;
    line-height: 1.8;
    font-weight: 400;
}

/* 分类区域样式 */
.category-section {
    margin-bottom: 4rem;
    padding: 2rem;
    background: white;
    border-radius: 18px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.08);
    border: 1px solid rgba(102, 126, 234, 0.05);
    transition: all 0.3s ease;
}

.category-section:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 35px rgba(102, 126, 234, 0.15);
}

.category-header {
    text-align: center;
    margin-bottom: 2rem;
}

.category-subtitle {
    font-size: 1.1rem;
    color: #6c757d;
    margin-top: 0.8rem;
    font-weight: 400;
}

.category-title {
    font-size: 2.1rem;
    font-weight: 800;
    color: #2c3e50;
    margin-bottom: 0;
    display: inline-block;
    position: relative;
    padding: 0.5rem 1.5rem;
    background: linear-gradient(135deg, #f8f9ff 0%, #eef1ff 100%);
    border-radius: 15px;
    border: 2px solid rgba(102, 126, 234, 0.2);
}

.category-title::before {
    content: '';
    position: absolute;
    top: -3px;
    left: -3px;
    right: -3px;
    bottom: -3px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    border-radius: 18px;
    z-index: -1;
    opacity: 0.1;
}

/* 卡片网格布局 */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

/* 卡片样式 */
.card {
    background: white;
    border-radius: 18px;
    padding: 2rem;
    text-decoration: none;
    color: inherit;
    box-shadow: 0 8px 25px rgba(0,0,0,0.08);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 1px solid #eef1ff;
    display: block;
    position: relative;
    overflow: hidden;
    text-align: center;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background: linear-gradient(90deg, #667eea, #764ba2);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s ease;
}

.card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.03) 0%, transparent 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.card:hover {
    transform: translateY(-10px) scale(1.03);
    box-shadow: 0 15px 40px rgba(102, 126, 234, 0.2);
    border-color: #667eea;
}

.card:hover::before {
    transform: scaleX(1);
}

.card:hover::after {
    opacity: 1;
}

.card-title {
    font-size: 1.3rem;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 1.2rem;
    transition: all 0.3s ease;
    line-height: 1.4;
    position: relative;
}

.card:hover .card-title {
    color: #667eea;
    transform: translateY(-3px);
}

.card-title::after {
    content: '↗';
    position: absolute;
    right: -20px;
    opacity: 0;
    transition: all 0.3s ease;
    font-size: 1.1rem;
}

.card:hover .card-title::after {
    opacity: 1;
    right: -25px;
}

.card-description {
    font-size: 1rem;
    color: #6c757d;
    line-height: 1.7;
    font-weight: 400;
    position: relative;
    padding-left: 0;
    text-align: center;
}

/* 页脚样式 */
.footer {
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    color: white;
    text-align: center;
    padding: 3rem;
    margin-top: 4rem;
    position: relative;
}

.footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, #667eea, #764ba2);
}

.footer p {
    font-size: 0.9rem;
}

/* 返回顶部按钮 */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 55px;
    height: 55px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    opacity: 0;
    transform: translateY(30px) scale(0.8);
    z-index: 1000;
    font-size: 1.3rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.back-to-top.show {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.back-to-top:hover {
    transform: translateY(-8px) scale(1.15);
    box-shadow: 0 12px 30px rgba(102, 126, 234, 0.6);
}

.back-to-top.clicked {
    animation: bounce 0.6s ease;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0) scale(1); }
    40% { transform: translateY(-15px) scale(1.1); }
    60% { transform: translateY(-8px) scale(1.05); }
}

/* 滚动进度指示器 */
.scroll-indicator {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    background: linear-gradient(90deg, #667eea, #764ba2);
    width: 0%;
    z-index: 1001;
    transition: width 0.1s ease;
    box-shadow: 0 0 10px rgba(102, 126, 234, 0.5);
}

/* 卡片状态样式 */
.card.hovered {
    transform: translateY(-12px) scale(1.04);
    box-shadow: 0 20px 50px rgba(102, 126, 234, 0.25);
}

.card.clicked {
    transform: translateY(-5px) scale(0.98);
    transition: all 0.1s ease;
}

/* 分类区域进入视口动画 */
.category-section {
    opacity: 0;
    transform: translateY(50px);
    transition: all 0.8s ease-out;
}

.category-section.in-view {
    opacity: 1;
    transform: translateY(0);
}

/* 页面加载动画 */
body.page-loaded .category-section {
    animation: slideInUp 0.8s ease-out forwards;
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 增强卡片悬停效果 */
.card {
    position: relative;
    overflow: hidden;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.05) 0%, transparent 100%);
    opacity: 0;
    transition: opacity 0.4s ease;
    z-index: 1;
}

.card:hover::before {
    opacity: 1;
}

.card:hover .card-title {
    color: #667eea;
    transform: translateX(10px) scale(1.02);
}

/* 增强分类区域标题效果 */
.category-title {
    position: relative;
    display: inline-block;
    transition: all 0.3s ease;
}

.category-title:hover {
    transform: translateY(-2px);
    text-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.category-title::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 3px;
    background: linear-gradient(90deg, #667eea, #764ba2);
    border-radius: 2px;
    transition: width 0.3s ease;
}

.category-title:hover::after {
    width: 80%;
}

/* 增强介绍区域效果 */
.intro-section {
    position: relative;
    overflow: hidden;
}

.intro-section::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at top right, rgba(102, 126, 234, 0.1) 0%, transparent 50%);
    pointer-events: none;
}

/* 响应式设计 */

/* 平板设备优化 */
@media (min-width: 769px) and (max-width: 1024px) {
    .main-content {
        padding: 0 1.5rem;
    }
    
    .intro-section {
        padding: 2.5rem;
    }
    
    .cards-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.8rem;
    }
    
    .category-section {
        padding: 1.8rem;
    }
    
    .nav-links {
        gap: 1.2rem;
    }
    
    .dropdown-menu {
        min-width: 140px;
    }
    
    .dropdown-item {
        padding: 0.7rem 1.2rem;
        font-size: 0.9rem;
    }
}

/* 大屏幕优化 */
@media (min-width: 1200px) {
    .main-content {
        max-width: 1400px;
    }
    
    .cards-grid {
        grid-template-columns: repeat(4, 1fr);
    }
    
    .intro-stats {
        gap: 3rem;
    }
}
@media (max-width: 768px) {
    .nav-container {
        flex-direction: column;
        gap: 1.5rem;
        text-align: center;
    }
    
    .nav-brand {
        margin-bottom: 0.5rem;
    }
    
    .nav-links {
        flex-wrap: wrap;
        justify-content: center;
        gap: 0.8rem;
    }
    
    .nav-title {
        font-size: 1.6rem;
    }
    
    .nav-link {
        padding: 0.6rem 1.1rem;
        font-size: 0.95rem;
    }
    
    .dropdown {
        position: relative;
    }
    
    .dropdown-menu {
        position: absolute;
        top: 100%;
        left: 50%;
        transform: translateX(-50%) translateY(-10px);
        right: auto;
        min-width: 130px;
    }
    
    .dropdown:hover .dropdown-menu {
        transform: translateX(-50%) translateY(0);
    }
    
    .dropdown-item {
        padding: 0.6rem 1rem;
        font-size: 0.9rem;
        text-align: center;
    }
    
    .main-content {
        padding: 0 1.2rem;
        margin: 1.5rem auto;
    }
    
    .intro-section {
        padding: 2rem 1.2rem;
        margin-bottom: 2.5rem;
    }
    
    .intro-badge {
        font-size: 0.8rem;
        padding: 0.4rem 1rem;
    }
    
    .intro-title {
        font-size: 1.9rem;
    }
    
    .intro-description {
        font-size: 1rem;
    }
    
    .intro-stats {
        gap: 1.5rem;
    }
    
    .stat-number {
        font-size: 1.7rem;
    }
    
    .category-section {
        padding: 1.5rem;
        margin-bottom: 3rem;
    }
    
    .category-header {
        margin-bottom: 1.5rem;
    }
    
    .category-title {
        font-size: 1.7rem;
        padding: 0.4rem 1.2rem;
    }
    
    .category-subtitle {
        font-size: 1rem;
    }
    
    .cards-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .card {
        padding: 1.7rem;
    }
    
    .card-title {
        font-size: 1.2rem;
    }
}

@media (max-width: 480px) {
    .navbar {
        padding: 1rem 0;
    }
    
    .nav-title {
        font-size: 1.4rem;
    }
    
    .nav-link {
        padding: 0.5rem 0.9rem;
        font-size: 0.9rem;
        margin: 0.2rem;
    }
    
    .main-content {
        padding: 0 1rem;
    }
    
    .intro-section {
        padding: 1.8rem 1rem;
        margin-bottom: 2rem;
    }
    
    .intro-badge {
        font-size: 0.75rem;
        padding: 0.3rem 0.8rem;
        margin-bottom: 1.2rem;
    }
    
    .intro-title {
        font-size: 1.6rem;
    }
    
    .intro-description {
        font-size: 0.95rem;
    }
    
    .intro-stats {
        gap: 1.2rem;
    }
    
    .stat-item {
        flex: 1;
        min-width: 80px;
    }
    
    .stat-number {
        font-size: 1.5rem;
    }
    
    .stat-label {
        font-size: 0.8rem;
    }
    
    .category-section {
        padding: 1.2rem;
        margin-bottom: 2.5rem;
    }
    
    .category-header {
        margin-bottom: 1.2rem;
    }
    
    .category-title {
        font-size: 1.5rem;
        padding: 0.3rem 1rem;
    }
    
    .category-subtitle {
        font-size: 0.95rem;
        margin-top: 0.6rem;
    }
    
    .cards-grid {
        gap: 1.2rem;
    }
    
    .card {
        padding: 1.5rem;
    }
    
    .card-title {
        font-size: 1.15rem;
        margin-bottom: 1rem;
    }
    
    .card-description {
        font-size: 0.95rem;
        padding-left: 0.8rem;
    }
    
    .footer {
        padding: 2rem 1rem;
    }
}

/* 加载动画 */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.category-section {
    animation: fadeInUp 0.8s ease-out;
}

#download-section { animation-delay: 0.1s; }
#tutorial-section { animation-delay: 0.2s; }
#voice-section { animation-delay: 0.3s; }
#ai-tools-section { animation-delay: 0.4s; }
#extras-section { animation-delay: 0.5s; }

.intro-badge {
    animation: slideInLeft 0.6s ease-out;
}

.stat-item {
    animation: fadeInUp 0.8s ease-out;
}

.stat-item:nth-child(1) { animation-delay: 0.3s; }
.stat-item:nth-child(2) { animation-delay: 0.4s; }
.stat-item:nth-child(3) { animation-delay: 0.5s; }

.card {
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.card:active {
    animation: pulse 0.3s ease;
}

/* 点击波纹效果 */
.click-ripple {
    position: absolute;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(102, 126, 234, 0.4) 0%, rgba(102, 126, 234, 0) 70%);
    transform: scale(0);
    animation: ripple-animation 0.8s cubic-bezier(0.165, 0.84, 0.44, 1);
    pointer-events: none;
}

@keyframes ripple-animation {
    0% {
        transform: scale(0);
        opacity: 1;
    }
    100% {
        transform: scale(8);
        opacity: 0;
    }
}

/* 悬停高亮效果 */
.highlight {
    animation: highlight-pulse 2s infinite;
}

@keyframes highlight-pulse {
    0%, 100% { 
        box-shadow: 0 8px 25px rgba(102, 126, 234, 0.15); 
        border-color: rgba(102, 126, 234, 0.3);
    }
    50% { 
        box-shadow: 0 12px 35px rgba(102, 126, 234, 0.25); 
        border-color: rgba(102, 126, 234, 0.5);
    }
}

/* 加载状态动画 */
.loading {
    position: relative;
    overflow: hidden;
}

.loading::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    animation: loading-shine 1.5s infinite;
}

@keyframes loading-shine {
    0% { left: -100%; }
    100% { left: 100%; }
}

/* 性能优化 */
.card, .nav-link, .back-to-top {
    will-change: transform, box-shadow;
}

/* 减少重绘 */
.category-section, .intro-section {
    contain: layout style paint;
}

/* 滚动条美化 */
::-webkit-scrollbar {
    width: 12px;
}

::-webkit-scrollbar-track {
    background: linear-gradient(to bottom, #f8f9fa, #e9ecef);
    border-radius: 6px;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #667eea, #764ba2);
    border-radius: 6px;
    border: 2px solid transparent;
    background-clip: content-box;
    transition: all 0.3s ease;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #5a6fd8, #6a4190);
    background-clip: content-box;
    transform: scaleX(1.1);
}

/* Firefox滚动条 */
* {
    scrollbar-width: thin;
    scrollbar-color: #667eea #f1f1f1;
}

/* 选中文本样式 */
::selection {
    background: rgba(102, 126, 234, 0.3);
    color: #2c3e50;
}

::-moz-selection {
    background: rgba(102, 126, 234, 0.3);
    color: #2c3e50;
}

/* 焦点样式优化 */
:focus-visible {
    outline: 2px solid #667eea;
    outline-offset: 2px;
    border-radius: 4px;
}

/* 打印样式 */
@media print {
    .navbar, .back-to-top, .scroll-indicator {
        display: none !important;
    }
    
    body {
        background: white !important;
    }
    
    .category-section {
        break-inside: avoid;
        box-shadow: none !important;
        border: 1px solid #ddd !important;
    }
}