/* 基础样式 */
* {
    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: #2c3e50;
    background: linear-gradient(135deg, #f5f7fa 0%, #e4e8eb 100%);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

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

.nav {
    width: 100%;
    height: 100%;
}

.nav-content {
    width: 1200px;
    height: 100%;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-logo {
    height: 100%;
    display: flex;
    align-items: center;
}

.nav-logo a {
    color: #333;
    font-size: 20px;
    font-weight: bold;
    text-decoration: none;
}

.nav-menu {
    height: 100%;
}

.nav-menu ul {
    height: 100%;
    display: flex;
    align-items: center;
    margin: 0;
    padding: 0;
}

.nav-menu ul li {
    list-style: none;
    margin: 0 15px;
}

.nav-menu ul li a {
    color: #333;
    text-decoration: none;
    font-size: 15px;
    transition: color 0.3s;
}

.nav-menu ul li a:hover {
    color: #1890ff;
}

/* 主容器样式 */
.container {
    flex: 1;
    max-width: 1400px;
    margin: 2rem auto;
    padding: 0 2rem;
    margin-top: 80px;
}

h1 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: #2c3e50;
}

.usage-count {
    text-align: center;
    margin-bottom: 3rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.usage-label {
    color: #7f8c8d;
    font-size: 1.1rem;
}

.usage-number {
    background: linear-gradient(45deg, #1890ff, #40a9ff);
    color: white;
    font-size: 1.2rem;
    font-weight: bold;
    padding: 4px 12px;
    border-radius: 20px;
    box-shadow: 0 2px 8px rgba(24, 144, 255, 0.2);
    animation: pulse 2s infinite;
}

/* 工具容器样式 */
.tool-container {
    background: white;
    padding: 3rem;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
}

.editor-wrapper {
    display: flex;
    flex-direction: column;
    gap: 3rem;
}

/* 设置行样式 */
.settings-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
}

/* 上传区域样式 */
.upload-section {
    background: #f8f9fa;
    padding: 2.5rem;
    border-radius: 12px;
    height: 100%;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.section-header h3 {
    font-size: 1.4rem;
    color: #2c3e50;
    margin-right: auto;
}

/* 图片列表样式 */
.image-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 1rem;
    max-height: 400px;
    overflow-y: auto;
    padding: 1rem;
    background: white;
    border-radius: 8px;
    border: 2px dashed #e9ecef;
}

.image-item {
    position: relative;
    aspect-ratio: 1;
    border-radius: 8px;
    overflow: hidden;
    cursor: move;
}

.image-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.image-item .remove-btn {
    position: absolute;
    top: 5px;
    right: 5px;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s;
}

.image-item:hover .remove-btn {
    opacity: 1;
}

/* GIF设置样式 */
.gif-settings {
    background: #f8f9fa;
    padding: 2.5rem;
    border-radius: 12px;
    height: 100%;
}

.gif-settings h3 {
    font-size: 1.4rem;
    color: #2c3e50;
    margin-bottom: 1.5rem;
}

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

.settings-group label {
    min-width: 80px;
    color: #2c3e50;
}

.settings-group input[type="text"],
.settings-group input[type="number"],
.settings-group select {
    flex: 1;
    padding: 0.5rem;
    border: 1px solid #e9ecef;
    border-radius: 4px;
    font-size: 0.9rem;
}

.size-inputs {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.size-inputs input {
    width: 80px;
}

.icon-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    color: #666;
    transition: color 0.3s;
}

.icon-btn:hover {
    color: #1890ff;
}

/* 预览区域样式 */
.preview-section {
    background: white;
    padding: 3rem;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    width: 100%;
}

.preview-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #eee;
}

.preview-container {
    height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8f9fa;
    border-radius: 8px;
    margin-bottom: 2rem;
}

.preview-placeholder {
    text-align: center;
    color: #adb5bd;
}

.preview-placeholder svg {
    margin-bottom: 1rem;
}

/* 工具栏样式 */
.toolbar {
    display: flex;
    gap: 0.8rem;
    flex-wrap: wrap;
}

.tool-btn {
    padding: 0.5rem 1rem;
    min-width: 100px;
    justify-content: center;
    white-space: nowrap;
}

/* 添加图片按钮 */
#addImagesBtn {
    background: linear-gradient(45deg, #1890ff, #40a9ff);
    color: white;
    min-width: 120px;
}

#addImagesBtn:hover {
    background: linear-gradient(45deg, #40a9ff, #69c0ff);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(24, 144, 255, 0.3);
}

#addImagesBtn svg {
    width: 14px;
    height: 14px;
}

/* 清空按钮 */
#clearBtn {
    background: #f5f5f5;
    color: #666;
    border: 1px solid #e8e8e8;
    min-width: 80px;
}

#clearBtn:hover {
    background: #fafafa;
    color: #ff4d4f;
    border-color: #ff4d4f;
    transform: translateY(-1px);
}

/* 示例按钮 */
#demoBtn {
    background: #13c2c2;
    color: white;
    min-width: 80px;
}

#demoBtn:hover {
    background: #36cfc9;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(19, 194, 194, 0.3);
}

/* 按钮激活状态 */
.tool-btn:active {
    transform: translateY(1px);
}

/* 按钮禁用状态 */
.tool-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* 添加动画效果 */
@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
    }
}

#addImagesBtn {
    animation: pulse 2s infinite;
}

#addImagesBtn:hover {
    animation: none;
}

/* 广告位样式 */
.ad-section {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid #eee;
}

.ad-wrapper {
    width: 100%;
    height: 120px;
    background: #f8f9fa;
    border: 2px dashed #e9ecef;
    border-radius: 8px;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.ad-placeholder {
    color: #adb5bd;
    font-size: 16px;
}

/* 底部版权样式 */
.footer {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.05);
    padding: 1.5rem 0;
    margin-top: 4rem;
}

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

.footer p {
    color: #7f8c8d;
    font-size: 0.9rem;
    line-height: 1.8;
}

.footer a {
    color: #3498db;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer a:hover {
    color: #2980b9;
}

/* 导航右侧按钮样式 */
.nav-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.login-btn, .register-btn {
    text-decoration: none;
    font-size: 14px;
    padding: 6px 20px;
    border-radius: 4px;
    transition: all 0.3s;
}

.login-btn {
    color: #333;
}

.login-btn:hover {
    color: #1890ff;
}

.register-btn {
    color: #fff;
    background-color: #1890ff;
}

.register-btn:hover {
    background-color: #40a9ff;
}

/* 响应式设计 */
@media (max-width: 1400px) {
    .container {
        max-width: 1200px;
    }
}

@media (max-width: 1200px) {
    .nav-content {
        width: 100%;
        padding: 0 2rem;
    }
    
    .settings-row {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .nav-content {
        flex-direction: column;
        padding: 10px;
    }
    
    .nav-menu ul {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .nav-menu ul li {
        margin: 5px 10px;
    }
    
    .header {
        height: auto;
    }
    
    .container {
        margin-top: 120px;
    }
    
    .nav-right {
        margin-top: 10px;
        margin-bottom: 5px;
    }
    
    .tool-container {
        padding: 1.5rem;
    }
    
    .preview-container {
        height: 300px;
    }
} 

/* 添加旋转动画 */
@keyframes rotate {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

.rotating {
    animation: rotate 1s linear infinite;
} 

/* 响应式调整 */
@media (max-width: 480px) {
    .section-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .toolbar {
        width: 100%;
        justify-content: flex-start;
    }

    .tool-btn {
        flex: 1;
        min-width: 0;
    }
} 

/* 预览和下载按钮样式 */
.preview-header .toolbar {
    gap: 1rem;
}

/* 预览按钮 */
#previewBtn {
    background: linear-gradient(45deg, #722ed1, #8c51e4);
    color: white;
    border: none;
    min-width: 120px;
    padding: 0.6rem 1.2rem;
    border-radius: 8px;
    font-weight: 500;
    box-shadow: 0 2px 6px rgba(114, 46, 209, 0.2);
    transition: all 0.3s ease;
}

#previewBtn:hover {
    background: linear-gradient(45deg, #8c51e4, #a76af5);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(114, 46, 209, 0.3);
}

#previewBtn:active {
    transform: translateY(1px);
}

#previewBtn svg {
    width: 16px;
    height: 16px;
}

/* 下载按钮 */
#downloadBtn {
    background: linear-gradient(45deg, #52c41a, #73d13d);
    color: white;
    border: none;
    min-width: 120px;
    padding: 0.6rem 1.2rem;
    border-radius: 8px;
    font-weight: 500;
    box-shadow: 0 2px 6px rgba(82, 196, 26, 0.2);
    transition: all 0.3s ease;
}

#downloadBtn:hover {
    background: linear-gradient(45deg, #73d13d, #95de64);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(82, 196, 26, 0.3);
}

#downloadBtn:active {
    transform: translateY(1px);
}

#downloadBtn svg {
    width: 16px;
    height: 16px;
}

/* 禁用状态 */
#previewBtn:disabled,
#downloadBtn:disabled {
    background: #f5f5f5;
    color: #bfbfbf;
    border: 1px solid #d9d9d9;
    box-shadow: none;
    cursor: not-allowed;
    transform: none;
}

/* 生成中状态 */
#previewBtn.generating {
    background: linear-gradient(45deg, #faad14, #ffc53d);
    color: white;
    box-shadow: 0 2px 6px rgba(250, 173, 20, 0.2);
}

/* 添加响应式调整 */
@media (max-width: 480px) {
    .preview-header .toolbar {
        width: 100%;
        justify-content: space-between;
    }

    #previewBtn,
    #downloadBtn {
        flex: 1;
        min-width: 0;
        padding: 0.6rem 0.8rem;
    }
} 

/* 进度条样式 */
.progress-container {
    margin-bottom: 1.5rem;
    padding: 1.5rem;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: #e9ecef;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 0.8rem;
}

.progress {
    width: 0;
    height: 100%;
    background: linear-gradient(45deg, #1890ff, #40a9ff);
    border-radius: 4px;
    transition: width 0.3s ease;
}

.progress-text {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #666;
    font-size: 0.9rem;
}

.cancel-btn {
    background: none;
    border: none;
    color: #ff4d4f;
    cursor: pointer;
    font-size: 0.9rem;
    padding: 4px 8px;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.cancel-btn:hover {
    background: #fff2f0;
    color: #ff7875;
}

/* 生成中的进度条动画 */
@keyframes progress-animation {
    0% {
        background-position: 0% 50%;
    }
    100% {
        background-position: 100% 50%;
    }
}

.progress.generating {
    background: linear-gradient(45deg, #1890ff, #40a9ff, #69c0ff);
    background-size: 200% 200%;
    animation: progress-animation 1s linear infinite;
} 