/* CSS Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* 全局样式 */
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f5f5;
}

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

/* 广告位样式 */
.top-ad {
    background-color: #fff;
    padding: 10px;
    text-align: center;
    border-bottom: 1px solid #eee;
}

.middle-ad {
    background-color: #fff;
    padding: 20px;
    text-align: center;
    margin: 20px auto;
    max-width: 1200px;
}

.bottom-ad {
    background-color: #fff;
    padding: 10px;
    text-align: center;
    border-top: 1px solid #eee;
}

.ad-placeholder {
    background-color: #f0f0f0;
    padding: 10px;
    border-radius: 4px;
    color: #999;
}

/* 导航栏样式 */
.navbar {
    background-color: #fff;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 60px;
}

.nav-logo {
    font-size: 1.5rem;
    font-weight: bold;
    color: #2c3e50;
}

.nav-menu {
    display: flex;
    gap: 30px;
}

.nav-link {
    text-decoration: none;
    color: #333;
    font-weight: 500;
    transition: color 0.3s ease;
}

.nav-link:hover,
.nav-link.active {
    color: #3498db;
}

.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

.bar {
    width: 25px;
    height: 3px;
    background-color: #333;
    margin: 3px 0;
    transition: 0.3s;
}

/* 主要内容样式 */
.main-content {
    margin-top: 60px;
}

/* 英雄区域样式 */
.hero {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    text-align: center;
    padding: 80px 20px;
    margin-bottom: 40px;
}

.hero h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    animation: fadeInDown 1s ease;
}

.hero p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    opacity: 0.9;
    animation: fadeInUp 1s ease 0.2s both;
}

.cta-button {
    display: inline-block;
    background-color: #fff;
    color: #667eea;
    padding: 12px 30px;
    text-decoration: none;
    border-radius: 25px;
    font-weight: bold;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    animation: fadeIn 1s ease 0.4s both;
}

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

/* 工具区域样式 */
.tools-section {
    padding: 60px 0;
    background-color: white;
}

.tools-section h2 {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 3rem;
    color: #2c3e50;
}

.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    margin-top: 2rem;
}

.tool-card {
    background: white;
    border-radius: 10px;
    padding: 30px;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
    border: 1px solid #eee;
}

.tool-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
}

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

.tool-card h3 {
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
    color: #2c3e50;
}

.tool-card p {
    color: #666;
    font-size: 0.9rem;
}

/* 工具详情样式 */
.tool-detail {
    padding: 40px 0;
    background-color: white;
}

.back-button {
    background-color: #3498db;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    margin-bottom: 20px;
    font-size: 1rem;
    transition: background-color 0.3s ease;
}

.back-button:hover {
    background-color: #2980b9;
}

.tool-description {
    background-color: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    border-left: 4px solid #3498db;
}

.tool-input {
    margin-bottom: 30px;
}

.file-drop-area {
    border: 2px dashed #ddd;
    border-radius: 10px;
    padding: 40px;
    text-align: center;
    margin-bottom: 20px;
    background-color: #fafafa;
    transition: border-color 0.3s ease;
    cursor: pointer;
}

.file-drop-area.dragover {
    border-color: #3498db;
    background-color: #f0f8ff;
}

.file-drop-text {
    font-size: 1.1rem;
    color: #666;
    margin-bottom: 15px;
}

.browse-button {
    background-color: #3498db;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1rem;
    transition: background-color 0.3s ease;
}

.browse-button:hover {
    background-color: #2980b9;
}

.file-list {
    margin: 20px 0;
}

.file-item {
    background-color: #f8f9fa;
    padding: 10px;
    margin: 5px 0;
    border-radius: 5px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.remove-file {
    background-color: #e74c3c;
    color: white;
    border: none;
    padding: 5px 10px;
    border-radius: 3px;
    cursor: pointer;
    font-size: 0.8rem;
}

.controls {
    margin: 20px 0;
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    align-items: center;
}

.controls label {
    display: flex;
    align-items: center;
    gap: 5px;
    font-weight: 500;
}

.controls input[type="number"],
.controls select {
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
}

.action-button {
    background-color: #27ae60;
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: bold;
    transition: background-color 0.3s ease;
}

.action-button:hover {
    background-color: #229954;
}

.action-button:disabled {
    background-color: #bdc3c7;
    cursor: not-allowed;
}

.result-section {
    margin-top: 30px;
    padding: 20px;
    background-color: #e8f5e8;
    border-radius: 8px;
    border: 1px solid #d4edda;
}

.download-button {
    display: inline-block;
    background-color: #27ae60;
    color: white;
    padding: 12px 25px;
    text-decoration: none;
    border-radius: 5px;
    font-weight: bold;
    transition: background-color 0.3s ease;
}

.download-button:hover {
    background-color: #229954;
}

/* 关于我们部分 */
.about-section {
    padding: 60px 0;
    background-color: #f8f9fa;
}

.about-section h2 {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 2rem;
    color: #2c3e50;
}

.about-section p {
    text-align: center;
    font-size: 1.1rem;
    color: #666;
    max-width: 800px;
    margin: 0 auto;
    line-height: 1.8;
}

/* 页脚样式 */
.footer {
    background-color: #2c3e50;
    color: white;
    text-align: center;
    padding: 20px 0;
    margin-top: 40px;
}

.footer p {
    margin: 0;
}

/* 响应式设计 */
@media screen and (max-width: 768px) {
    .hamburger {
        display: flex;
    }

    .nav-menu {
        position: fixed;
        left: -100%;
        top: 60px;
        flex-direction: column;
        background-color: white;
        width: 100%;
        text-align: center;
        transition: 0.3s;
        box-shadow: 0 10px 27px rgba(0,0,0,0.05);
        padding: 20px 0;
    }

    .nav-menu.active {
        left: 0;
    }

    .tools-grid {
        grid-template-columns: 1fr;
        padding: 0 20px;
    }

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

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

    .controls {
        flex-direction: column;
        align-items: stretch;
    }

    .controls label {
        justify-content: space-between;
    }

    .container {
        padding: 0 15px;
    }

    .main-content {
        margin-top: 60px;
    }

    .tools-section,
    .about-section {
        padding: 40px 0;
    }

    .tool-card {
        padding: 20px;
    }
}

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

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

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

    .cta-button {
        padding: 10px 20px;
        font-size: 0.9rem;
    }

    .tool-card {
        padding: 15px;
    }

    .tool-icon {
        font-size: 2.5rem;
    }

    .tool-card h3 {
        font-size: 1.1rem;
    }

    .controls {
        gap: 10px;
    }
}

/* 动画效果 */
@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* 加载动画 */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* 状态提示 */
.success {
    color: #27ae60;
    font-weight: bold;
}

.error {
    color: #e74c3c;
    font-weight: bold;
}

.warning {
    color: #f39c12;
    font-weight: bold;
}

/* 水印工具样式 */
.watermark-options label {
    cursor: pointer;
    transition: color 0.2s;
}

.watermark-options label:hover {
    color: #3498db;
}

#textWatermarkOptions,
#imageWatermarkOptions {
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    margin: 10px 0;
    border: 1px solid #e0e0e0;
}

#keywordInputArea {
    padding: 10px 0 0 24px;
}

/* 新工具卡片颜色区分 */
.tool-card:nth-child(7) .tool-icon { color: #27ae60; }
.tool-card:nth-child(8) .tool-icon { color: #3498db; }
.tool-card:nth-child(9) .tool-icon { color: #9b59b6; }