/* 重置和基础样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* 科技主题色彩 */
    --primary-blue: #00ffff;
    --primary-purple: #8b5cf6;
    --accent-pink: #ec4899;
    --accent-green: #10b981;
    --dark-bg: #0a0a0a;
    --darker-bg: #030303;
    --card-bg: rgba(20, 20, 30, 0.8);
    --glass-bg: rgba(255, 255, 255, 0.1);
    --text-primary: #ffffff;
    --text-secondary: #a1a1aa;
    --text-muted: #71717a;
    --border-glow: rgba(0, 255, 255, 0.3);
    --shadow-glow: 0 0 20px rgba(139, 92, 246, 0.3);
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--dark-bg);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
}

/* 宇宙背景效果 */
.cosmic-bg {
    position: relative;
    background: linear-gradient(135deg, #0a0a0a 0%, #1a0a2e 50%, #16213e 100%);
    min-height: 100vh;
}

.cosmic-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 20% 20%, rgba(120, 119, 198, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(139, 92, 246, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 40% 60%, rgba(0, 255, 255, 0.05) 0%, transparent 50%);
    pointer-events: none;
    z-index: 1;
}

/* 星空画布 */
.stars-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 2;
}

/* 加载器 */
.cyber-loading {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--dark-bg);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.5s ease;
}

.loading-text {
    font-family: 'JetBrains Mono', monospace;
    font-size: 1.2rem;
    color: var(--primary-blue);
    margin-bottom: 2rem;
    text-shadow: 0 0 10px var(--primary-blue);
}

.loading-bar {
    width: 300px;
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    overflow: hidden;
    position: relative;
}

.loading-progress {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-blue), var(--primary-purple));
    width: 0%;
    animation: loadingProgress 2s ease-in-out forwards;
    box-shadow: 0 0 10px var(--primary-blue);
}

@keyframes loadingProgress {
    to { width: 100%; }
}

/* 跳转链接 */
.skip-to-main {
    position: absolute;
    top: -100px;
    left: 20px;
    background: var(--primary-blue);
    color: var(--dark-bg);
    padding: 10px 20px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    z-index: 1000;
    transition: top 0.3s ease;
}

.skip-to-main:focus {
    top: 20px;
}

/* 主容器 */
.main-container {
    position: relative;
    z-index: 10;
    min-height: 100vh;
}

/* 顶部导航 */
.cyber-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background: rgba(10, 10, 10, 0.9);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(0, 255, 255, 0.2);
    transition: all 0.3s ease;
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 80px;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.brand-icon {
    width: 50px;
    height: 50px;
    background: linear-gradient(45deg, var(--primary-blue), var(--primary-purple));
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-glow);
}

.brand-icon i {
    font-size: 1.5rem;
    color: white;
}

.brand-text {
    display: flex;
    flex-direction: column;
}

.brand-title {
    font-size: 1.8rem;
    font-weight: 800;
    background: linear-gradient(45deg, var(--primary-blue), var(--primary-purple));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    font-family: 'JetBrains Mono', monospace;
}

.brand-subtitle {
    font-size: 0.75rem;
    color: var(--text-secondary);
    font-family: 'JetBrains Mono', monospace;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* 导航链接 */
.nav-links {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.nav-link {
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    padding: 0.5rem 1rem;
    border-radius: 8px;
}

.nav-link::before {
    content: attr(data-text);
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    opacity: 0;
    background: linear-gradient(45deg, var(--primary-blue), var(--primary-purple));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 700;
    transition: opacity 0.3s ease;
}

.nav-link:hover {
    color: transparent;
    transform: translateY(-2px);
}

.nav-link:hover::before {
    opacity: 1;
}

.nav-link i {
    font-size: 1rem;
    transition: transform 0.3s ease;
}

.nav-link:hover i {
    transform: scale(1.2);
}

.nav-button {
    background: var(--glass-bg);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: var(--text-secondary);
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.nav-button:hover {
    background: var(--primary-blue);
    color: var(--dark-bg);
    box-shadow: 0 0 20px rgba(0, 255, 255, 0.5);
    transform: translateY(-2px);
}

/* 英雄区域 */
.hero-section {
    padding: 12rem 2rem 6rem;
    text-align: center;
    max-width: 1400px;
    margin: 0 auto;
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
}

.hero-title {
    font-size: clamp(3rem, 8vw, 6rem);
    font-weight: 900;
    line-height: 1.1;
    margin-bottom: 2rem;
    font-family: 'Inter', sans-serif;
}

.title-line {
    display: block;
    background: linear-gradient(135deg, var(--text-primary) 0%, var(--text-secondary) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.highlight-text {
    background: linear-gradient(135deg, var(--primary-blue) 0%, var(--primary-purple) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 0 30px rgba(0, 255, 255, 0.3);
    position: relative;
}

.hero-description {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: 3rem;
    line-height: 1.6;
}

/* 搜索容器 */
.search-container {
    margin-bottom: 3rem;
}

.search-wrapper {
    position: relative;
    max-width: 600px;
    margin: 0 auto;
}

.search-input {
    width: 100%;
    height: 60px;
    background: var(--card-bg);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 0 60px 0 24px;
    font-size: 1.1rem;
    color: var(--text-primary);
    outline: none;
    transition: all 0.3s ease;
    backdrop-filter: blur(20px);
    font-family: 'Inter', sans-serif;
}

.search-input::placeholder {
    color: var(--text-muted);
}

.search-input:focus {
    border-color: var(--primary-blue);
    box-shadow: 0 0 30px rgba(0, 255, 255, 0.3);
    transform: translateY(-2px);
}

.search-icon {
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 1.2rem;
    transition: all 0.3s ease;
}

.search-input:focus + .search-icon {
    color: var(--primary-blue);
    transform: translateY(-50%) scale(1.1);
}

.search-result-info {
    margin-top: 1rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
    text-align: center;
}

/* 快速访问 */
.quick-access {
    margin-bottom: 4rem;
}

.quick-label {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
}

.quick-links {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.quick-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: var(--glass-bg);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.quick-link:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.quick-link.github:hover {
    border-color: #333;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.quick-link.stackoverflow:hover {
    border-color: #f48024;
    box-shadow: 0 10px 30px rgba(244, 128, 36, 0.3);
}

.quick-link.mdn:hover {
    border-color: #83d0f2;
    box-shadow: 0 10px 30px rgba(131, 208, 242, 0.3);
}

.quick-link.google:hover {
    border-color: #4285f4;
    box-shadow: 0 10px 30px rgba(66, 133, 244, 0.3);
}

/* 主要内容 */
.main-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
}

.content-section {
    margin-bottom: 6rem;
}

.section-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 3rem;
    position: relative;
}

.section-title {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
}

.section-icon {
    font-size: 1.5rem;
    background: linear-gradient(45deg, var(--primary-blue), var(--primary-purple));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.section-indicator {
    flex: 1;
    height: 2px;
    background: linear-gradient(90deg, var(--primary-blue), transparent);
    border-radius: 1px;
}

/* 趋势网格 */
.trending-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.trending-card {
    position: relative;
    background: var(--card-bg);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 2rem;
    transition: all 0.4s ease;
    backdrop-filter: blur(20px);
    overflow: hidden;
    cursor: pointer;
}

.trending-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, transparent 0%, rgba(0, 255, 255, 0.1) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.trending-card:hover::before {
    opacity: 1;
}

.trending-card:hover {
    transform: translateY(-8px);
    border-color: var(--border-glow);
    box-shadow: var(--shadow-glow);
}

.trending-card.featured {
    background: linear-gradient(135deg, var(--card-bg) 0%, rgba(139, 92, 246, 0.1) 100%);
    border-color: var(--primary-purple);
}

.card-glow {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at center, rgba(0, 255, 255, 0.1) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.trending-card:hover .card-glow {
    opacity: 1;
}

.card-content {
    position: relative;
    z-index: 2;
}

.card-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(45deg, var(--primary-blue), var(--primary-purple));
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    box-shadow: 0 8px 25px rgba(139, 92, 246, 0.3);
}

.card-icon i {
    font-size: 1.5rem;
    color: white;
}

.card-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
}

.card-description {
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.card-tags {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.tag {
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.tag.hot {
    background: linear-gradient(45deg, #ff6b6b, #ffd93d);
    color: #000;
}

.tag.free {
    background: linear-gradient(45deg, #51cf66, #69db7c);
    color: #000;
}

.tag.new {
    background: linear-gradient(45deg, var(--primary-blue), var(--primary-purple));
    color: white;
}

.tag.seo {
    background: linear-gradient(45deg, #ff8cc8, #ff6b9d);
    color: white;
}

.tag.price {
    background: linear-gradient(45deg, #ffd93d, #ffec8c);
    color: #000;
}

.tag.recommended {
    background: linear-gradient(45deg, #a78bfa, #c084fc);
    color: white;
}

.tag.ai {
    background: linear-gradient(45deg, #667eea, #764ba2);
    color: white;
}

.tag.fast {
    background: linear-gradient(45deg, #f093fb, #f5576c);
    color: white;
}

.tag.jamstack {
    background: linear-gradient(45deg, #4facfe, #00f2fe);
    color: white;
}

.card-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--primary-blue);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
}

.card-link:hover {
    color: var(--primary-purple);
    transform: translateX(5px);
}

/* 工具网格 */
.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 2rem;
}

.tool-category {
    background: var(--card-bg);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 2rem;
    backdrop-filter: blur(20px);
    transition: all 0.3s ease;
}

.tool-category:hover {
    border-color: var(--border-glow);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    transform: translateY(-5px);
}

.category-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
}

.category-icon {
    width: 50px;
    height: 50px;
    background: linear-gradient(45deg, var(--primary-blue), var(--primary-purple));
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 25px rgba(139, 92, 246, 0.3);
}

.category-icon i {
    font-size: 1.2rem;
    color: white;
}

.category-title {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text-primary);
}

.category-content {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.tool-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    transition: all 0.3s ease;
}

.tool-card:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--primary-blue);
    transform: translateX(10px);
}

.tool-info {
    flex: 1;
}

.tool-name {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.tool-desc {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.4;
}

.tool-tags {
    display: flex;
    gap: 0.5rem;
    margin-right: 1rem;
}

.tool-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: var(--glass-bg);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    color: var(--text-secondary);
    text-decoration: none;
    transition: all 0.3s ease;
}

.tool-link:hover {
    background: var(--primary-blue);
    color: var(--dark-bg);
    transform: scale(1.1);
    box-shadow: 0 0 15px rgba(0, 255, 255, 0.5);
}

/* 底部 */
.cyber-footer {
    margin-top: 6rem;
    padding: 3rem 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    background: var(--card-bg);
    backdrop-filter: blur(20px);
}

.footer-content {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.footer-text {
    color: var(--text-secondary);
}

.footer-links {
    display: flex;
    gap: 2rem;
}

.footer-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    background: none;
    border: none;
    cursor: pointer;
}

.footer-link:hover {
    color: var(--primary-blue);
    transform: translateY(-2px);
}

/* 响应式设计 */
@media (max-width: 1200px) {
    .trending-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    }
    
    .tools-grid {
        grid-template-columns: 1fr;
    }
    
    .nav-container {
        padding: 0 1.5rem;
    }
}

/* 平板设备优化 */
@media (max-width: 1024px) {
    .hero-section {
        padding: 8rem 2rem 4rem;
    }
    
    .hero-title {
        font-size: 3rem;
    }
    
    .search-wrapper {
        max-width: 500px;
    }
    
    .quick-links {
        gap: 1rem;
    }
    
    .trending-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 2rem;
    }
}

/* 移动设备优化 */
@media (max-width: 768px) {
    .nav-container {
        padding: 0 1rem;
        height: 70px;
    }
    
    .brand-title {
        font-size: 1.5rem;
    }
    
    .brand-subtitle {
        font-size: 0.7rem;
    }
    
    .nav-links {
        gap: 0.5rem;
    }
    
    .nav-link {
        padding: 0.5rem;
        min-width: 40px;
    }
    
    .nav-link span {
        display: none;
    }
    
    .nav-button {
        padding: 0.5rem;
        min-width: 40px;
    }
    
    .hero-section {
        padding: 8rem 1rem 3rem;
        text-align: center;
    }
    
    .hero-title {
        font-size: 2.5rem;
        line-height: 1.2;
    }
    
    .hero-description {
        font-size: 1rem;
        margin: 1rem 0 2rem;
    }
    
    .search-wrapper {
        max-width: 100%;
    }
    
    .search-input {
        font-size: 16px; /* 防止iOS缩放 */
        padding: 1rem 3rem 1rem 1rem;
    }
    
    .quick-access {
        margin-top: 2rem;
    }
    
    .quick-links {
        flex-wrap: wrap;
        justify-content: center;
        gap: 0.8rem;
    }
    
    .quick-link {
        padding: 0.8rem 1rem;
        font-size: 0.9rem;
    }
    
    .main-content {
        padding: 0 1rem;
    }
    
    .section-title {
        font-size: 1.5rem;
    }
    
    .trending-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .trending-card {
        padding: 1.5rem;
        margin: 0;
    }
    
    .card-title {
        font-size: 1.2rem;
    }
    
    .card-description {
        font-size: 0.9rem;
    }
    
    .tools-grid {
        gap: 1.5rem;
    }
    
    .tool-category {
        padding: 1.5rem;
    }
    
    .category-title {
        font-size: 1.2rem;
    }
    
    .tool-card {
        padding: 1rem;
    }
    
    .tool-name {
        font-size: 0.95rem;
    }
    
    .tool-desc {
        font-size: 0.85rem;
    }
    
    .footer-content {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }
    
    .footer-links {
        justify-content: center;
        flex-wrap: wrap;
        gap: 1rem;
    }
}

/* 小屏幕手机优化 */
@media (max-width: 480px) {
    .nav-container {
        height: 60px;
        padding: 0 0.8rem;
    }
    
    .brand-icon {
        width: 40px;
        height: 40px;
    }
    
    .brand-icon i {
        font-size: 1.2rem;
    }
    
    .brand-title {
        font-size: 1.3rem;
    }
    
    .brand-subtitle {
        display: none;
    }
    
    .nav-links {
        gap: 0.3rem;
    }
    
    .nav-link, .nav-button {
        padding: 0.4rem;
        min-width: 36px;
    }
    
    .hero-section {
        padding: 7rem 0.8rem 2.5rem;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-description {
        font-size: 0.9rem;
        margin: 0.8rem 0 1.5rem;
    }
    
    .search-input {
        padding: 0.9rem 2.5rem 0.9rem 0.9rem;
        font-size: 16px;
    }
    
    .search-icon {
        right: 0.9rem;
        font-size: 0.9rem;
    }
    
    .quick-label {
        font-size: 0.8rem;
    }
    
    .quick-link {
        padding: 0.6rem 0.8rem;
        font-size: 0.8rem;
    }
    
    .main-content {
        padding: 0 0.8rem;
    }
    
    .content-section {
        margin-bottom: 2rem;
    }
    
    .section-title {
        font-size: 1.3rem;
    }
    
    .trending-card, .tool-category {
        padding: 1.2rem;
    }
    
    .card-icon, .category-icon {
        width: 50px;
        height: 50px;
    }
    
    .card-icon i, .category-icon i {
        font-size: 1.2rem;
    }
    
    .card-title, .category-title {
        font-size: 1.1rem;
    }
    
    .card-description {
        font-size: 0.85rem;
    }
    
    .card-tags {
        gap: 0.4rem;
        margin: 0.8rem 0;
    }
    
    .tag {
        padding: 0.3rem 0.6rem;
        font-size: 0.7rem;
    }
    
    .card-link, .tool-link {
        padding: 0.7rem 1rem;
        font-size: 0.85rem;
    }
    
    .tool-card {
        padding: 0.8rem;
    }
    
    .tool-name {
        font-size: 0.9rem;
    }
    
    .tool-desc {
        font-size: 0.8rem;
    }
}

/* 触摸设备优化 */
.touch-device .nav-link,
.touch-device .nav-button,
.touch-device .card-link,
.touch-device .tool-link,
.touch-device .quick-link {
    min-height: 44px; /* iOS推荐的最小触摸目标 */
    display: flex;
    align-items: center;
    justify-content: center;
}

.touch-device .search-input {
    min-height: 44px;
}

/* 设备特定样式 */
.device-mobile .cosmic-overlay {
    background: 
        radial-gradient(circle at 20% 20%, rgba(120, 119, 198, 0.05) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(139, 92, 246, 0.05) 0%, transparent 50%);
}

.device-mobile .stars-canvas {
    opacity: 0.3; /* 移动端减少星空效果以提升性能 */
}

.small-screen .hero-section {
    padding-top: 6rem;
}

.small-screen .trending-grid {
    grid-template-columns: 1fr;
}

/* 横屏手机优化 */
@media (max-width: 768px) and (orientation: landscape) {
    .hero-section {
        padding: 6rem 1rem 2rem;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-description {
        margin: 0.5rem 0 1rem;
    }
    
    .quick-access {
        margin-top: 1rem;
    }
}

/* 动画效果 */
@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

@keyframes glow {
    0%, 100% { box-shadow: 0 0 20px rgba(0, 255, 255, 0.3); }
    50% { box-shadow: 0 0 30px rgba(0, 255, 255, 0.6); }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 滚动条 */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--darker-bg);
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, var(--primary-blue), var(--primary-purple));
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, var(--primary-purple), var(--accent-pink));
}

/* 页面加载动画 */
.trending-card,
.tool-category {
    animation: fadeInUp 0.6s ease-out forwards;
}

.trending-card:nth-child(1) { animation-delay: 0.1s; }
.trending-card:nth-child(2) { animation-delay: 0.2s; }
.trending-card:nth-child(3) { animation-delay: 0.3s; }
.trending-card:nth-child(4) { animation-delay: 0.4s; }

.tool-category:nth-child(1) { animation-delay: 0.2s; }
.tool-category:nth-child(2) { animation-delay: 0.4s; }
.tool-category:nth-child(3) { animation-delay: 0.6s; }

/* 搜索建议 */
.search-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--card-bg);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    margin-top: 8px;
    max-height: 300px;
    overflow-y: auto;
    backdrop-filter: blur(20px);
    z-index: 1000;
    display: none;
}

.search-suggestions.show {
    display: block;
}

.suggestion-item {
    padding: 12px 20px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s ease;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.suggestion-item:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
}

.suggestion-item:last-child {
    border-bottom: none;
}

/* 特殊效果 */
.brand-icon {
    animation: glow 3s ease-in-out infinite;
}

.highlight-text {
    animation: float 6s ease-in-out infinite;
}

/* 隐藏类 */
.hidden {
    display: none !important;
}

/* 响应式指示器样式 */
#responsive-indicator {
    font-family: 'JetBrains Mono', monospace;
    background: rgba(0, 0, 0, 0.9) !important;
    border: 1px solid rgba(0, 255, 255, 0.3);
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 20px rgba(0, 255, 255, 0.2);
    transition: opacity 0.5s ease;
}

#responsive-indicator i {
    color: var(--primary-blue);
    text-shadow: 0 0 5px var(--primary-blue);
}

/* 移动端优化样式 */
.mobile-optimized .trending-card,
.mobile-optimized .tool-card {
    transition: transform 0.1s ease;
}

.mobile-optimized .search-input:focus {
    transform: none; /* 移动端不需要放大效果 */
}

/* 防止移动端双击缩放 */
.mobile-optimized {
    touch-action: manipulation;
}

/* 移动端滚动优化 */
@media (max-width: 768px) {
    body {
        -webkit-overflow-scrolling: touch;
    }
    
    .main-content {
        scroll-behavior: smooth;
    }
}

/* 高分辨率屏幕优化 */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .brand-icon,
    .card-icon,
    .category-icon {
        image-rendering: -webkit-optimize-contrast;
        image-rendering: crisp-edges;
    }
} 