/* CSS变量定义 */
:root {
    --bg-primary: #0a192f;
    --accent-primary: #64ffda;
    --accent-gradient-start: #ff3eec;
    --accent-gradient-end: #5e35b1;
    --text-primary: #ffffff;
    --text-secondary: #a8b2d1;
    --glass-bg: rgba(255, 255, 255, 0.1);
    --glass-border: rgba(255, 255, 255, 0.2);
    --shadow-primary: rgba(100, 255, 218, 0.3);
    --shadow-secondary: rgba(255, 62, 236, 0.3);
    --transition: all 0.3s ease;
}

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    /* iOS Safari兼容性修复 */
    -webkit-text-size-adjust: 100%;
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    user-select: none;
}

/* 背景层 */
.background-layer {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, 
        var(--bg-primary) 0%, 
        #1a2a3a 50%, 
        var(--bg-primary) 100%);
    z-index: -1;
    animation: backgroundMove 20s ease-in-out infinite;
}

@keyframes backgroundMove {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-20px); }
}

/* 导航栏 */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--glass-border);
    z-index: 9999;
    transition: var(--transition);
    /* iOS Safari兼容性修复 */
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
    -webkit-perspective: 1000;
    perspective: 1000;
    will-change: transform;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0.5rem 2rem;
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 1rem;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 1.3rem;
    font-weight: bold;
    color: var(--accent-primary);
    white-space: nowrap;
    text-decoration: none;
    transition: all 0.3s ease;
}

.nav-brand:hover {
    color: #ffffff;
    transform: translateY(-1px);
}

.nav-brand i {
    font-size: 1.5rem;
}

.nav-categories {
    display: flex;
    gap: 0.3rem;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.category-btn {
    background: transparent;
    border: 1px solid var(--glass-border);
    color: var(--text-secondary);
    padding: 0.3rem 0.6rem;
    border-radius: 15px;
    cursor: pointer;
    transition: var(--transition);
    font-size: 0.8rem;
    white-space: nowrap;
}

.category-btn:hover,
.category-btn.active {
    background: var(--accent-primary);
    color: var(--bg-primary);
    border-color: var(--accent-primary);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px var(--shadow-primary);
}

.search-container {
    position: relative;
    display: flex;
    align-items: center;
    max-width: 400px;
    width: 100%;
}

.search-container i {
    position: absolute;
    left: 1rem;
    color: var(--text-secondary);
    z-index: 1;
}

#searchInput {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    color: var(--text-primary);
    padding: 0.5rem 2.5rem 0.5rem 2rem;
    border-radius: 20px;
    width: 100%;
    transition: var(--transition);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    font-size: 0.9rem;
}

#searchInput:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 20px var(--shadow-primary);
    background: rgba(100, 255, 218, 0.1);
}

#searchInput::placeholder {
    color: var(--text-secondary);
}

.search-btn {
    position: absolute;
    right: 0.3rem;
    top: 50%;
    transform: translateY(-50%);
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-gradient-start));
    border: none;
    color: var(--bg-primary);
    width: 28px;
    height: 28px;
    border-radius: 50%;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    padding: 0;
    margin: 0;
    line-height: 1;
    box-sizing: border-box;
}

.search-btn:hover {
    transform: translateY(-50%) scale(1.1);
    box-shadow: 0 4px 15px var(--shadow-primary);
}

.search-btn:active {
    transform: translateY(-50%) scale(0.95);
}

.search-btn i {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    margin: 0;
    padding: 0;
    line-height: 1;
    font-size: inherit;
}

/* 主要内容 */
.main-content {
    margin-top: 60px;
    padding: 2rem 0;
    min-height: calc(100vh - 200px);
    /* iOS Safari兼容性修复 */
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
    position: relative;
    z-index: 1;
}

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

.page-header {
    text-align: center;
    margin-bottom: 3rem;
    position: relative;
    z-index: 1;
}

.page-header h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, var(--text-primary), var(--accent-primary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.page-header p {
    font-size: 1.2rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
}

/* 工具网格 */
.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.tool-card {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 15px;
    padding: 2rem;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.tool-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--accent-gradient-start), var(--accent-gradient-end));
    opacity: 0;
    transition: var(--transition);
}

.tool-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px var(--shadow-secondary);
    border-color: var(--accent-primary);
}

.tool-card:hover::before {
    opacity: 1;
}

.tool-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.tool-icon {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--accent-gradient-start), var(--accent-gradient-end));
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: white;
}

.tool-title {
    font-size: 1.3rem;
    font-weight: bold;
    color: var(--accent-primary);
    margin-bottom: 0.5rem;
}

.tool-description {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    line-height: 1.5;
}

.tool-category {
    display: inline-block;
    background: transparent;
    border: 1px solid var(--accent-gradient-start);
    color: var(--accent-gradient-start);
    padding: 0.3rem 0.8rem;
    border-radius: 15px;
    font-size: 0.8rem;
    margin-bottom: 1.5rem;
    transition: var(--transition);
}

.tool-card:hover .tool-category {
    background: var(--accent-gradient-start);
    color: white;
}

.tool-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--bg-primary);
    color: var(--accent-primary);
    padding: 0.75rem 1.5rem;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
    border: 1px solid var(--accent-primary);
}

.tool-link:hover {
    background: var(--accent-primary);
    color: var(--bg-primary);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px var(--shadow-primary);
}

/* 页脚 */
.footer {
    background: linear-gradient(135deg, 
        rgba(10, 25, 47, 0.98) 0%, 
        rgba(26, 42, 58, 0.95) 30%,
        rgba(15, 30, 50, 0.98) 70%,
        rgba(10, 25, 47, 0.98) 100%);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border-top: 1px solid var(--glass-border);
    margin-top: 4rem;
    position: relative;
    overflow: hidden;
}

.footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, 
        transparent 0%, 
        var(--accent-gradient-start) 25%,
        var(--accent-primary) 50%,
        var(--accent-gradient-end) 75%,
        transparent 100%);
    animation: shimmer 3s ease-in-out infinite;
}

@keyframes shimmer {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 1; }
}

/* 页脚特色区域 */
.footer-featured {
    background: linear-gradient(135deg, 
        rgba(100, 255, 218, 0.1) 0%, 
        rgba(255, 62, 236, 0.1) 100%);
    border: 1px solid rgba(100, 255, 218, 0.2);
    border-radius: 20px;
    margin: 2rem 0;
    padding: 2.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.footer-featured::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(100, 255, 218, 0.05) 0%, transparent 70%);
    animation: rotate 20s linear infinite;
}

@keyframes rotate {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.featured-content {
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1;
    position: relative;
    text-align: center;
}

.featured-text h3 {
    font-size: 1.8rem;
    font-weight: bold;
    color: var(--accent-primary);
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-gradient-start));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.featured-text p {
    color: var(--text-secondary);
    font-size: 1.1rem;
    margin: 0;
}


.featured-stats {
    display: flex;
    gap: 2rem;
    z-index: 1;
    position: relative;
}

.stat-highlight {
    text-align: center;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    min-width: 100px;
}

.stat-highlight .stat-number {
    display: block;
    font-size: 1.8rem;
    font-weight: bold;
    color: var(--accent-primary);
    line-height: 1;
}

.stat-highlight .stat-label {
    display: block;
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-top: 0.25rem;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.footer-main {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr 1fr;
    gap: 3rem;
    padding: 4rem 0 3rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-section {
    display: flex;
    flex-direction: column;
}

.footer-brand-section {
    grid-column: 1;
}

.footer-brand {
    max-width: 100%;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.logo-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--accent-gradient-start), var(--accent-gradient-end));
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    color: white;
    box-shadow: 0 8px 25px rgba(100, 255, 218, 0.3);
}

.logo-text {
    display: flex;
    flex-direction: column;
}

.logo-name {
    font-size: 1.8rem;
    font-weight: bold;
    color: var(--accent-primary);
    line-height: 1;
}

.logo-tagline {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-top: 0.25rem;
}

.footer-description {
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 2rem;
    font-size: 0.95rem;
}

.footer-contact {
    margin-top: 0.75rem;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.5rem 0.75rem;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    font-size: 0.85rem;
    flex-wrap: wrap;
}

.contact-item i {
    color: var(--accent-primary);
    font-size: 1rem;
}

.contact-item span {
    color: var(--text-secondary);
    flex-shrink: 0;
    white-space: nowrap;
}

.contact-link {
    color: var(--accent-primary);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
    word-break: break-all;
    flex-shrink: 1;
}

.contact-link:hover {
    color: var(--accent-gradient-start);
    text-decoration: underline;
}

.contact-value {
    color: var(--text-primary);
    font-weight: 500;
}

.footer-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--accent-primary);
    margin-bottom: 1.5rem;
    position: relative;
    padding-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.footer-title i {
    font-size: 1rem;
    opacity: 0.8;
}

.footer-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 30px;
    height: 2px;
    background: linear-gradient(90deg, var(--accent-gradient-start), var(--accent-gradient-end));
    border-radius: 1px;
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links li {
    margin-bottom: 0.75rem;
}

.footer-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    transition: var(--transition);
    position: relative;
    padding: 0.5rem 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    border-radius: 8px;
    padding-left: 0.5rem;
    margin-left: -0.5rem;
}

.footer-link i {
    font-size: 0.8rem;
    opacity: 0.7;
    transition: var(--transition);
}

.footer-link::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 0;
    background: linear-gradient(90deg, var(--accent-primary), var(--accent-gradient-start));
    border-radius: 4px;
    transition: var(--transition);
    opacity: 0.1;
}

.footer-link:hover {
    color: var(--accent-primary);
    background: rgba(100, 255, 218, 0.05);
    padding-left: 0.75rem;
}

.footer-link:hover i {
    opacity: 1;
    color: var(--accent-primary);
}

.footer-link:hover::before {
    width: 3px;
    opacity: 1;
}

.footer-bottom {
    padding: 2rem 0;
}

.footer-bottom-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 2rem;
}

.copyright-main {
    display: flex;
    align-items: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.footer-copyright p {
    color: var(--text-secondary);
    margin: 0;
    font-size: 0.9rem;
}

.footer-badges {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.75rem;
    background: rgba(100, 255, 218, 0.1);
    border: 1px solid rgba(100, 255, 218, 0.2);
    border-radius: 15px;
    font-size: 0.8rem;
    color: var(--accent-primary);
    font-weight: 500;
}

.footer-disclaimer {
    font-size: 0.8rem !important;
    color: rgba(168, 178, 209, 0.7) !important;
    margin-top: 1rem !important;
    line-height: 1.5;
    max-width: 600px;
}

/* 申请外链部分样式 */
.footer-links-section {
    margin: 1.5rem 0;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.links-section-title {
    font-size: 1rem;
    color: var(--accent-primary);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.links-section-title i {
    font-size: 1.1rem;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
}

.contact-item i {
    color: var(--accent-primary);
    width: 16px;
    text-align: center;
}

.contact-label {
    color: var(--text-secondary);
    font-weight: 500;
    min-width: 40px;
}

.contact-link {
    color: var(--accent-primary);
    text-decoration: none;
    transition: var(--transition);
}

.contact-link:hover {
    color: var(--accent-gradient-start);
    text-decoration: underline;
}

.contact-value {
    color: var(--text-primary);
    font-weight: 500;
}

.footer-stats {
    display: flex;
    gap: 2rem;
}

.stat-item {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.stat-number {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--accent-primary);
    line-height: 1;
}

.stat-label {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-top: 0.25rem;
}

/* 页脚响应式设计 */
@media (max-width: 1024px) {
    .footer-featured {
        flex-direction: column;
        text-align: center;
        gap: 2rem;
    }
    
    .featured-content {
        text-align: center;
    }
    
    .featured-stats {
        justify-content: center;
    }
    
    .footer-main {
        grid-template-columns: 2fr 1fr 1fr;
        gap: 2rem;
    }
    
    .footer-section:nth-child(4),
    .footer-section:nth-child(5) {
        grid-column: 1 / -1;
        margin-top: 1rem;
    }
    
    .footer-section:nth-child(4) {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 2rem;
    }
}

@media (max-width: 768px) {
    .footer-featured {
        padding: 2rem;
        margin: 1rem 0;
    }
    
    .featured-text h3 {
        font-size: 1.5rem;
    }
    
    
    .featured-stats {
        flex-wrap: wrap;
        gap: 1rem;
    }
    
    .stat-highlight {
        min-width: 80px;
        padding: 0.75rem;
    }
    
    .footer-main {
        grid-template-columns: 1fr;
        gap: 2rem;
        padding: 3rem 0 2rem;
    }
    
    .footer-section:nth-child(4) {
        grid-template-columns: 1fr;
    }
    
    .footer-bottom-content {
        flex-direction: column;
        text-align: center;
        gap: 1.5rem;
    }
    
    .copyright-main {
        flex-direction: column;
        gap: 1rem;
    }
    
    .footer-stats {
        justify-content: center;
        flex-wrap: wrap;
        gap: 1rem;
    }
    
    .footer-brand {
        max-width: 100%;
    }
    
    .footer-social {
        justify-content: center;
    }
    
    .contact-item {
        font-size: 0.8rem;
        padding: 0.4rem 0.6rem;
        gap: 0.3rem;
    }
    
    .contact-item i {
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .footer-content {
        padding: 0 1rem;
    }
    
    .footer-main {
        padding: 2rem 0 1.5rem;
    }
    
    .footer-stats {
        gap: 1rem;
    }
    
    .stat-item {
        min-width: 60px;
    }
    
    .social-link {
        width: 35px;
        height: 35px;
    }
}

/* iOS Safari专用修复 */
@supports (-webkit-touch-callout: none) {
    .navbar {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        width: 100% !important;
        z-index: 99999 !important;
        -webkit-transform: translate3d(0, 0, 0) !important;
        transform: translate3d(0, 0, 0) !important;
    }
    
    .main-content {
        margin-top: 120px !important;
        padding-top: 2rem !important;
    }
    
    .page-header {
        margin-top: 0 !important;
        padding-top: 2rem !important;
    }
}

/* iOS Safari视口修复 */
@supports (height: 100dvh) {
    .main-content {
        min-height: calc(100dvh - 120px);
    }
}

/* iOS Safari JavaScript检测类 */
.ios-safari .navbar {
    position: fixed !important;
    top: 0 !important;
    z-index: 99999 !important;
    -webkit-transform: translate3d(0, 0, 0) !important;
    transform: translate3d(0, 0, 0) !important;
}

.ios-safari .main-content {
    margin-top: 140px !important;
    padding-top: 1rem !important;
}

/* iOS Safari移动端特殊处理 */
@media screen and (max-width: 768px) and (-webkit-min-device-pixel-ratio: 2) {
    .navbar {
        position: fixed !important;
        top: 0 !important;
        z-index: 99999 !important;
        -webkit-transform: translate3d(0, 0, 0) !important;
        transform: translate3d(0, 0, 0) !important;
    }
    
    .main-content {
        margin-top: 140px !important;
        padding-top: 1rem !important;
    }
}

/* 响应式设计 */
@media (max-width: 768px) {
    .nav-container {
        grid-template-columns: 1fr;
        gap: 0.5rem;
        padding: 0.4rem 1rem;
    }
    
    .search-container {
        order: 1;
        max-width: 100%;
    }
    
    .nav-categories {
        order: 2;
        display: flex;
        overflow-x: auto;
        overflow-y: hidden;
        white-space: nowrap;
        gap: 0.3rem;
        padding: 0.5rem 0;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        -ms-overflow-style: none;
    }
    
    .nav-categories::-webkit-scrollbar {
        display: none;
    }
    
    .category-btn {
        font-size: 0.75rem;
        padding: 0.25rem 0.5rem;
        flex-shrink: 0;
        white-space: nowrap;
    }
    
    #searchInput {
        font-size: 0.85rem;
        padding: 0.4rem 2rem 0.4rem 1.5rem;
    }
    
    .search-btn {
        width: 24px;
        height: 24px;
        font-size: 0.7rem;
        padding: 0;
        margin: 0;
        line-height: 1;
    }
    
    .search-btn i {
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        font-size: inherit;
        line-height: 1;
    }
    
    /* 移动端工具网格优化 */
    .tools-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
        padding: 0 1rem;
    }
    
    .tool-card {
        padding: 1rem;
        margin: 0;
    }
    
    .tool-card h3 {
        font-size: 1rem;
        line-height: 1.3;
    }
    
    .tool-card p {
        font-size: 0.85rem;
        line-height: 1.4;
    }
    
    /* 移动端页面头部优化 */
    .page-header {
        padding: 2rem 1rem;
        text-align: center;
    }
    
    .page-header h1 {
        font-size: 2rem;
        line-height: 1.2;
    }
    
    .page-header p {
        font-size: 1rem;
        line-height: 1.4;
    }
    
    /* 移动端容器优化 */
    .container {
        padding: 0 1rem;
    }
    
    /* 移动端搜索框优化 */
    #searchInput {
        font-size: 16px; /* 防止iOS缩放 */
        width: 100%;
    }
    
    .main-content {
        margin-top: 80px;
        padding: 1rem 0;
        /* iOS Safari视口高度修复 */
        min-height: calc(100vh - 80px);
        min-height: calc(100dvh - 80px);
    }
    
    .page-header h1 {
        font-size: 2rem;
    }
    
    .tools-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .tool-card {
        padding: 1.5rem;
    }
}

/* iOS Safari小屏幕特殊处理 */
@media screen and (max-width: 480px) and (-webkit-min-device-pixel-ratio: 2) {
    .navbar {
        position: fixed !important;
        top: 0 !important;
        z-index: 99999 !important;
        -webkit-transform: translate3d(0, 0, 0) !important;
        transform: translate3d(0, 0, 0) !important;
    }
    
    .main-content {
        margin-top: 160px !important;
        padding-top: 1rem !important;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 1rem;
    }
    
    .nav-container {
        padding: 0.3rem 0.8rem;
    }
    
    .nav-brand {
        font-size: 1.1rem;
    }
    
    .nav-brand i {
        font-size: 1.3rem;
    }
    
    .category-btn {
        font-size: 0.7rem;
        padding: 0.2rem 0.4rem;
    }
    
    .main-content {
        margin-top: 100px;
        padding: 1rem 0;
        /* iOS Safari视口高度修复 */
        min-height: calc(100vh - 100px);
        min-height: calc(100dvh - 100px);
    }
    
    .page-header h1 {
        font-size: 1.8rem;
    }
    
    .tool-card {
        padding: 1rem;
        margin: 0 0 1rem 0;
        min-height: auto;
        display: flex;
        flex-direction: column;
    }
    
    .tool-card .tool-actions {
        margin-top: auto;
        display: flex;
        flex-wrap: wrap;
        gap: 0.5rem;
        align-items: center;
        justify-content: space-between;
    }
    
    /* 移动端搜索框优化 */
    #searchInput {
        font-size: 16px; /* 防止iOS缩放 */
        width: 100%;
    }
    
    /* 移动端工具网格优化 */
    .tools-grid {
        grid-template-columns: 1fr;
        gap: 0.8rem;
        padding: 0 0.5rem;
    }
    
    .tool-card h3 {
        font-size: 0.9rem;
        line-height: 1.2;
    }
    
    .tool-card p {
        font-size: 0.8rem;
        line-height: 1.3;
    }
    
    /* 移动端按钮优化 */
    .tool-card .visit-btn {
        padding: 0.4rem 0.8rem;
        font-size: 0.8rem;
    }
    
    /* 移动端分类标签优化 */
    .tool-card .category-tag {
        font-size: 0.7rem;
        padding: 0.2rem 0.4rem;
    }
    
    /* 移动端导航优化 */
    .navbar {
        height: auto;
        min-height: 80px;
        /* iOS Safari专用修复 */
        position: -webkit-sticky;
        position: sticky;
        top: 0;
        -webkit-transform: translateZ(0);
        transform: translateZ(0);
    }
    
    .search-container {
        order: 1;
        width: 100%;
        margin: 0.5rem 0;
    }
    
    .nav-brand {
        order: 2;
        text-align: center;
    }
    
    .category-buttons {
        order: 3;
        display: flex;
        overflow-x: auto;
        overflow-y: hidden;
        white-space: nowrap;
        gap: 0.3rem;
        padding: 0.5rem 0;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        -ms-overflow-style: none;
    }
    
    .category-buttons::-webkit-scrollbar {
        display: none;
    }
    
    .category-btn {
        flex-shrink: 0;
        white-space: nowrap;
    }
    
    /* 移动端申请外链样式 */
    .footer-links-section {
        margin: 1rem 0;
        padding: 0.8rem;
    }
    
    .contact-info {
        gap: 0.6rem;
    }
    
    .contact-item {
        font-size: 0.85rem;
        flex-wrap: wrap;
    }
    
    .contact-label {
        min-width: 35px;
    }
}

/* 加载动画 */
.loading {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 200px;
}

.loading::after {
    content: '';
    width: 40px;
    height: 40px;
    border: 3px solid var(--glass-border);
    border-top: 3px solid var(--accent-primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 空状态 */
.empty-state {
    text-align: center;
    padding: 3rem;
    color: var(--text-secondary);
}

.empty-state i {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: var(--accent-primary);
}

.empty-state h3 {
    margin-bottom: 1rem;
    color: var(--text-primary);
}

/* 面包屑导航 */
.breadcrumb {
    margin-bottom: 2rem;
    padding: 1rem 0;
}

.breadcrumb-list {
    display: flex;
    align-items: center;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 0.5rem;
}

.breadcrumb-item {
    display: flex;
    align-items: center;
}

.breadcrumb-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-secondary);
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    transition: var(--transition);
    font-size: 0.9rem;
}

.breadcrumb-link:hover {
    color: var(--accent-primary);
    background: rgba(100, 255, 218, 0.1);
}

.breadcrumb-item.active {
    color: var(--text-primary);
    font-weight: 500;
    padding: 0.5rem 1rem;
}

.breadcrumb-separator {
    color: var(--text-secondary);
    font-size: 0.8rem;
}

/* 页面介绍 */
.page-intro {
    color: var(--text-secondary);
    font-size: 1.1rem;
    line-height: 1.6;
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: rgba(100, 255, 218, 0.05);
    border: 1px solid rgba(100, 255, 218, 0.1);
    border-radius: 12px;
}

.page-intro a {
    color: var(--accent-primary);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
}

.page-intro a:hover {
    color: var(--accent-gradient-start);
    text-decoration: underline;
}

/* 相关链接 */
.related-links {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.related-link-item {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 1.5rem;
    transition: var(--transition);
}

.related-link-item:hover {
    background: rgba(100, 255, 218, 0.05);
    border-color: var(--accent-primary);
    transform: translateY(-2px);
}

.related-link {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    text-decoration: none;
    color: inherit;
}

.related-link i {
    font-size: 1.5rem;
    color: var(--accent-primary);
    margin-bottom: 0.5rem;
}

.related-link span {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.related-link p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.5;
    margin: 0;
}

/* 页面内容样式 */
.page-content {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem;
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    margin-bottom: 3rem;
}

.page-content h1 {
    font-size: 2.5rem;
    font-weight: bold;
    color: var(--accent-primary);
    margin-bottom: 2rem;
    text-align: center;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-gradient-start));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.content-section {
    margin-bottom: 2.5rem;
}

.content-section h2 {
    font-size: 1.5rem;
    color: var(--accent-primary);
    margin-bottom: 1rem;
    border-bottom: 2px solid var(--accent-primary);
    padding-bottom: 0.5rem;
}

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

.content-section ul {
    color: var(--text-secondary);
    line-height: 1.8;
    padding-left: 1.5rem;
}

.content-section li {
    margin-bottom: 0.5rem;
}

.contact-info {
    margin-top: 1rem;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
    padding: 0.75rem 1rem;
    background: rgba(100, 255, 218, 0.1);
    border: 1px solid rgba(100, 255, 218, 0.2);
    border-radius: 10px;
}

.contact-item i {
    color: var(--accent-primary);
    font-size: 1.1rem;
    width: 20px;
}

.contact-item span {
    color: var(--text-secondary);
    font-weight: 500;
}

/* 帮助中心特定样式 */
.help-section {
    margin-bottom: 3rem;
}

.help-section h2 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.5rem;
    color: var(--accent-primary);
    margin-bottom: 1.5rem;
    border-bottom: 2px solid var(--accent-primary);
    padding-bottom: 0.5rem;
}

.faq-item, .guide-item {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    border-radius: 10px;
    padding: 1.5rem;
    margin-bottom: 1rem;
    transition: var(--transition);
}

.faq-item:hover, .guide-item:hover {
    background: rgba(100, 255, 218, 0.05);
    border-color: var(--accent-primary);
    transform: translateY(-2px);
}

.faq-item h3, .guide-item h3 {
    color: var(--accent-primary);
    font-size: 1.1rem;
    margin-bottom: 0.75rem;
    font-weight: 600;
}

.faq-item p, .guide-item p {
    color: var(--text-secondary);
    line-height: 1.6;
    margin: 0;
}

/* 资讯页面样式 */
.news-item, .trend-item, .review-item {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    border-radius: 10px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    transition: var(--transition);
}

.news-item:hover, .trend-item:hover, .review-item:hover {
    background: rgba(100, 255, 218, 0.05);
    border-color: var(--accent-primary);
    transform: translateY(-2px);
}

.news-item h3, .trend-item h3, .review-item h3 {
    color: var(--accent-primary);
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.news-date {
    color: var(--accent-gradient-start);
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 0.75rem;
}

.news-item p, .trend-item p, .review-item p {
    color: var(--text-secondary);
    line-height: 1.6;
    margin: 0;
}

/* 滚动条样式 */
::-webkit-scrollbar {
    width: 8px;
}

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

::-webkit-scrollbar-thumb {
    background: var(--accent-primary);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--accent-gradient-start);
}