/* 公共样式文件 - common.css */
/* 包含所有页面的通用样式和组件样式 */

/* CSS变量定义 */
:root {
    --primary-color: #667eea;
    --primary-light: #8b9cf7;
    --primary-dark: #4c63d2;
    --accent-color: #3182ce;
    --accent-hover: #2c5aa0;
    --bg-white: #ffffff;
    --bg-light: #f7fafc;
    --text-dark: #2d3748;
    --text-light: #718096;
    --shadow-light: rgba(45, 55, 72, 0.1);
    --shadow-medium: rgba(45, 55, 72, 0.15);
    --shadow-dark: rgba(45, 55, 72, 0.2);
    --border-radius: 15px;
    --border-radius-small: 10px;
    --border-radius-large: 20px;
}

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background: var(--bg-light);
    margin: 0;
    padding: 0;
    min-height: 100vh;
}

/* 容器样式 */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

.main-container {
    max-width: 1200px;
    margin: 20px auto;
    background: var(--bg-white);
    border-radius: var(--border-radius);
    box-shadow: 0 20px 40px var(--shadow-light);
    overflow: hidden;
    padding-bottom: 50px;
}

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

/* 卡片样式 */
.el-card {
    border: none;
    border-radius: var(--border-radius-large);
    box-shadow: 0 10px 40px var(--shadow-light);
    transition: all 0.3s ease;
}

.el-card:hover {
    box-shadow: 0 20px 60px var(--shadow-medium);
    transform: translateY(-5px);
}

.el-card__header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 100%);
    color: white;
    border-radius: var(--border-radius-large) var(--border-radius-large) 0 0;
    padding: 24px;
}

/* 头部样式 */
.header {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    color: white;
    padding: 30px;
    text-align: center;
}

.header h1 {
    margin: 0;
    font-size: 2.5em;
    font-weight: 300;
}

.header p {
    margin: 10px 0 0 0;
    opacity: 0.9;
    font-size: 1.1em;
}

/* Hero Section样式 */
.hero-section {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 50%, var(--primary-dark) 100%);
    color: white;
    padding: 80px 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="50" cy="50" r="1" fill="%23ffffff" opacity="0.05"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>') repeat;
    pointer-events: none;
}

.hero-content {
    position: relative;
    z-index: 2;
}

.hero-title {
    font-size: 3.2rem;
    font-weight: 700;
    margin-bottom: 24px;
    text-shadow: 2px 4px 8px rgba(0,0,0,0.3);
    letter-spacing: -0.02em;
}

/* 上传区域样式 */
.upload-area {
    border: 3px dashed #ddd;
    border-radius: var(--border-radius-small);
    padding: 60px 20px;
    text-align: center;
    background: #fafafa;
    transition: all 0.3s ease;
    cursor: pointer;
    margin-bottom: 30px;
}

.upload-area:hover {
    border-color: #4facfe;
    background: #f0f9ff;
}

.upload-area.dragover {
    border-color: #4facfe;
    background: #e6f7ff;
    transform: scale(1.02);
}

.upload-icon {
    font-size: 4em;
    color: #4facfe;
    margin-bottom: 20px;
}

.upload-text {
    font-size: 1.2em;
    color: #666;
    margin-bottom: 15px;
}

.upload-hint {
    color: #999;
    font-size: 0.9em;
}

/* Canvas容器样式 */
.canvas-container {
    position: relative;
    border: 3px dashed var(--primary-color);
    border-radius: 16px;
    background: var(--bg-white);
    min-height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    transition: all 0.3s ease;
    cursor: pointer;
}

.canvas-container:hover:not(.has-image) {
    border-color: var(--primary-light);
    background: rgba(102, 126, 234, 0.02);
    transform: translateY(-2px);
    box-shadow: 0 8px 30px var(--shadow-light);
}

.canvas-container.drag-over {
    border-color: var(--accent-color);
    background: rgba(49, 130, 206, 0.05);
    box-shadow: 0 0 0 4px rgba(49, 130, 206, 0.1);
}

/* 图片网格样式 */
.image-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 30px;
}

.image-item {
    border: 1px solid #eee;
    border-radius: var(--border-radius-small);
    overflow: hidden;
    background: white;
    box-shadow: 0 4px 12px var(--shadow-light);
    transition: all 0.3s ease;
}

.image-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px var(--shadow-medium);
}

/* 按钮样式 */
.btn {
    display: inline-block;
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 500;
    text-decoration: none;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    line-height: 1.5;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 100%);
    color: white;
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary-color) 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px var(--shadow-medium);
}

.btn-secondary {
    background: var(--bg-white);
    color: var(--text-dark);
    border: 2px solid var(--primary-color);
}

.btn-secondary:hover {
    background: var(--primary-color);
    color: white;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .container {
        padding: 0 16px;
    }
    
    .main-container {
        margin: 10px auto;
        border-radius: var(--border-radius-small);
    }
    
    .hero-title {
        font-size: 2.4rem;
    }
    
    .header h1 {
        font-size: 2em;
    }
    
    .image-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 15px;
    }
    
    .upload-area {
        padding: 40px 15px;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 2rem;
    }
    
    .header h1 {
        font-size: 1.8em;
    }
    
    .image-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
        gap: 10px;
    }
}

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

.fade-in {
    animation: fadeIn 0.6s ease-out;
}

/* 工具类 */
.text-center {
    text-align: center;
}

.text-left {
    text-align: left;
}

.text-right {
    text-align: right;
}

.mb-20 {
    margin-bottom: 20px;
}

.mt-20 {
    margin-top: 20px;
}

.p-20 {
    padding: 20px;
}

.hidden {
    display: none;
}

.flex {
    display: flex;
}

.flex-center {
    display: flex;
    align-items: center;
    justify-content: center;
}

.flex-between {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* Header组件样式 */
.header {
    background: #ffffff;
    border-bottom: 1px solid #e8eaed;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 0;
}

.header .container {
    padding: 0 24px;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
    max-width: 1200px;
    margin: 0 auto;
}

.logo {
    display: flex;
    align-items: center;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
}

.logo:hover {
    transform: translateY(-1px);
}

.logo img {
    height: 40px;
    margin-right: 12px;
    filter: drop-shadow(0 2px 4px rgba(102, 126, 234, 0.2));
}

.logo-text {
    font-size: 24px;
    font-weight: 700;
    color: var(--primary-color);
    text-decoration: none;
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 20px;
}

.nav-item {
    display: inline-flex;
    align-items: center;
    padding: 12px 20px;
    color: #5f6368;
    text-decoration: none;
    font-weight: 500;
    font-size: 14px;
    border-radius: var(--border-radius-small);
    transition: all 0.3s ease;
    position: relative;
}

.nav-item:hover {
    background: #f8f9fa;
    color: var(--primary-color);
    transform: translateY(-1px);
}

.nav-item.active {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    color: white;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.nav-item.active:hover {
    background: linear-gradient(135deg, var(--primary-dark), var(--primary-color));
    color: white;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    color: white;
    padding: 10px 20px;
    border-radius: var(--border-radius-small);
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--primary-dark), var(--primary-color));
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
    color: white;
    text-decoration: none;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .header-content {
        height: 60px;
        padding: 0 16px;
    }
    
    .logo-text {
        font-size: 20px;
    }
    
    .nav-menu {
        display: none;
    }
    
    .header-actions {
        gap: 8px;
    }
    
    .btn-primary {
        padding: 8px 16px;
        font-size: 13px;
    }
}

@media (max-width: 480px) {
    .header-content {
        height: 55px;
        padding: 0 12px;
    }
    
    .logo img {
        height: 32px;
        margin-right: 8px;
    }
    
    .logo-text {
        font-size: 18px;
    }
    
    .btn-primary {
        padding: 6px 12px;
        font-size: 12px;
    }
}

/* ===== FOOTER STYLES ===== */
.site-footer {
    background: linear-gradient(135deg, #2d3748 0%, #4a5568 100%);
    color: white;
    margin-top: 60px;
    position: relative;
}

.footer-content {
    padding: 60px 0 20px;
}

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

.footer-main {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 40px;
}

.footer-section h3 {
    color: #4facfe;
    font-size: 1.8rem;
    margin-bottom: 16px;
    font-weight: 600;
}

.footer-section h4 {
    color: #e2e8f0;
    font-size: 1.1rem;
    margin-bottom: 20px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.footer-section p {
    color: #a0aec0;
    line-height: 1.6;
    margin-bottom: 20px;
}

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

.footer-links li {
    margin-bottom: 12px;
}

.footer-links a {
    color: #cbd5e0;
    text-decoration: none;
    transition: all 0.3s ease;
    display: inline-block;
    position: relative;
}

.footer-links a:hover {
    color: #4facfe;
    transform: translateX(5px);
}

.footer-links a::before {
    content: '';
    position: absolute;
    left: -15px;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 2px;
    background: #4facfe;
    transition: width 0.3s ease;
}

.footer-links a:hover::before {
    width: 10px;
}

.footer-bottom {
    border-top: 1px solid #4a5568;
    padding: 30px 0;
}

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

.footer-bottom p {
    color: #a0aec0;
    margin: 0;
    font-size: 0.9rem;
}

.footer-bottom-links {
    display: flex;
    gap: 30px;
}

.footer-bottom-links a {
    color: #cbd5e0;
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.3s ease;
}

.footer-bottom-links a:hover {
    color: #4facfe;
}

/* Contact Email Icon */
.footer-email-icon {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 1000;
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    border-radius: 50%;
    padding: 15px;
    box-shadow: 0 10px 30px rgba(79, 172, 254, 0.3);
    transition: all 0.3s ease;
    text-decoration: none;
}

.footer-email-icon:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(79, 172, 254, 0.4);
}

.email-icon svg {
    display: block;
    width: 24px;
    height: 24px;
}

.email-icon svg path {
    fill: white;
}

/* Responsive Footer */
@media (max-width: 768px) {
    .footer-main {
        grid-template-columns: 1fr;
        gap: 30px;
        text-align: center;
    }
    
    .footer-bottom-content {
        flex-direction: column;
        text-align: center;
    }
    
    .footer-bottom-links {
        justify-content: center;
    }
    
    .footer-email-icon {
        bottom: 20px;
        right: 20px;
        padding: 12px;
    }
    
    .email-icon svg {
        width: 20px;
        height: 20px;
    }
}

@media (max-width: 480px) {
    .footer-content {
        padding: 40px 0 20px;
    }
    
    .footer-container {
        padding: 0 16px;
    }
    
    .footer-main {
        gap: 25px;
    }
    
    .footer-section h3 {
        font-size: 1.5rem;
    }
    
    .footer-section h4 {
        font-size: 1rem;
    }
    
    .footer-bottom-links {
        gap: 20px;
    }
}