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

:root {
    --primary-color: #6366f1;
    --primary-hover: #4f46e5;
    --bg-color: #f8fafc;
    --card-bg: #ffffff;
    --text-main: #1e293b;
    --text-secondary: #64748b;
    --border-color: #e2e8f0;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --transition: all 0.3s ease;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: var(--text-main);
    line-height: 1.6;
}

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

/* 头部 */
.header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    padding: 2rem 0;
    box-shadow: var(--shadow-sm);
    text-align: center;
}

.logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
}

.logo-icon {
    width: 48px;
    height: 48px;
    object-fit: contain;
}

.logo h1 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-main);
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.tagline {
    color: var(--text-secondary);
    font-size: 1.1rem;
}

/* 主要内容 */
.main {
    padding: 3rem 0;
}

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

.tool-card {
    background: var(--card-bg);
    border-radius: 16px;
    padding: 2rem;
    text-decoration: none;
    color: inherit;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.tool-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), #8b5cf6);
    transform: scaleX(0);
    transition: var(--transition);
}

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

.tool-card:hover::before {
    transform: scaleX(1);
}

.tool-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.tool-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-main);
    margin-bottom: 0.5rem;
}

.tool-desc {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-bottom: 1rem;
    line-height: 1.5;
}

.tool-link {
    color: var(--primary-color);
    font-weight: 500;
    font-size: 0.9rem;
    transition: var(--transition);
}

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

/* 底部 */
.footer {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    padding: 2rem 0;
    text-align: center;
    color: var(--text-secondary);
    box-shadow: 0 -1px 2px 0 rgba(0, 0, 0, 0.05);
}

.footer p {
    margin-bottom: 0.5rem;
}

.beian a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: var(--transition);
}

.beian a:hover {
    color: var(--primary-color);
    text-decoration: underline;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .logo h1 {
        font-size: 1.5rem;
    }

    .logo-icon {
        font-size: 2rem;
    }

    .tagline {
        font-size: 1rem;
    }

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

    .tool-card {
        padding: 1.5rem;
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
    .tools-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* 腾讯广告联盟样式 */
.ad-section {
    background: var(--card-bg);
    border-radius: 16px;
    padding: 20px;
    box-shadow: var(--shadow-md);
    margin-top: 2rem;
}

.ad-title {
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 15px;
    color: var(--text-secondary);
    text-align: center;
}

#ad-container {
    min-height: 150px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.custom-ad-container {
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
}

.ad-content {
    padding: 15px;
}

.ad-headline {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
}

.ad-description {
    font-size: 14px;
    color: #666;
    margin-bottom: 12px;
    line-height: 1.5;
}

.cta-button {
    padding: 8px 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s;
}

.cta-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.ad-image {
    width: 100%;
    margin-bottom: 15px;
}

.ad-image img {
    width: 100%;
    height: auto;
    border-radius: 8px;
}

.ad-video {
    width: 100%;
    margin-bottom: 15px;
}

.ad-video video {
    width: 100%;
    border-radius: 8px;
}

.advertiser {
    font-size: 12px;
    color: #999;
    margin-top: 8px;
}

.ad-loading {
    text-align: center;
    color: var(--text-secondary);
    padding: 40px;
}

.ad-error {
    text-align: center;
    color: #f44336;
    padding: 20px;
    display: none;
}
