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

:root {
    --primary-color: #2563eb;
    --primary-dark: #1d4ed8;
    --secondary-color: #64748b;
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --background: #ffffff;
    --background-secondary: #f8fafc;
    --border-color: #e2e8f0;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    --gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background: var(--background);
}

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

/* 导航栏 */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    z-index: 1000;
    border-bottom: 1px solid var(--border-color);
}

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

.nav-logo h2 {
    font-weight: 700;
    font-size: 1.5rem;
    color: var(--text-primary);
}

.text-primary {
    color: var(--primary-color);
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-menu a {
    text-decoration: none;
    color: var(--text-primary);
    font-weight: 500;
    transition: color 0.3s ease;
    position: relative;
}

.nav-menu a:hover {
    color: var(--primary-color);
}

.nav-menu a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: width 0.3s ease;
}

.nav-menu a:hover::after {
    width: 100%;
}

/* 移动端汉堡菜单 */
.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background: var(--text-primary);
    margin: 3px 0;
    transition: 0.3s;
}

/* Hero区域 */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding-top: 70px;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
}

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

.hero-title {
    font-size: 3.5rem;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
}

.hero-description {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: 2.5rem;
    line-height: 1.7;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
}

/* 按钮样式 */
.btn {
    display: inline-block;
    padding: 0.875rem 2rem;
    border-radius: 0.5rem;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    cursor: pointer;
}

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

.btn-primary:hover {
    background: var(--primary-dark);
    border-color: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-outline {
    background: transparent;
    color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-outline:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

/* Hero图像区域 */
.hero-image {
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
}

.hero-graphic {
    position: relative;
    width: 400px;
    height: 400px;
}

.floating-card {
    position: absolute;
    background: white;
    padding: 1.5rem;
    border-radius: 1rem;
    box-shadow: var(--shadow-lg);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    animation: float 6s ease-in-out infinite;
}

.floating-card i {
    font-size: 2rem;
    color: var(--primary-color);
}

.floating-card span {
    font-weight: 600;
    color: var(--text-primary);
}

.card-1 {
    top: 50px;
    left: 50px;
    animation-delay: 0s;
}

.card-2 {
    top: 200px;
    right: 30px;
    animation-delay: 2s;
}

.card-3 {
    bottom: 80px;
    left: 80px;
    animation-delay: 4s;
}

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

/* 区域标题 */
.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-header h2 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

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

/* 服务区域 */
.services {
    padding: 6rem 0;
    background: var(--background);
}

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

.service-card {
    background: white;
    padding: 3rem 2rem;
    border-radius: 1rem;
    text-align: center;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
    border: 1px solid var(--border-color);
}

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

.service-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
}

.service-icon i {
    font-size: 2rem;
    color: white;
}

.service-card h3 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.service-card p {
    color: var(--text-secondary);
    line-height: 1.7;
}

/* 工具区域 */
.tools {
    padding: 5rem 0;
    background: var(--background);
}

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

.tool-card {
    background: white;
    padding: 2rem;
    border-radius: 1rem;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
    text-align: center;
    border: 1px solid var(--border-color);
}

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

.tool-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
}

.tool-icon i {
    font-size: 2rem;
    color: white;
}

.tool-card h3 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

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

.tool-actions {
    margin-top: 1.5rem;
}

.btn-sm {
    padding: 0.5rem 1.5rem;
    font-size: 0.875rem;
}

/* 工具模态框 */
.tool-modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
}

.tool-modal-content {
    background-color: white;
    margin: 2% auto;
    padding: 0;
    border-radius: 1rem;
    width: 95%;
    max-width: 1200px;
    max-height: 90vh;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.tool-modal-header {
    background: var(--primary-color);
    color: white;
    padding: 1.5rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.tool-modal-header h3 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 600;
}

.tool-modal-close {
    font-size: 2rem;
    font-weight: bold;
    cursor: pointer;
    line-height: 1;
    transition: opacity 0.3s ease;
}

.tool-modal-close:hover {
    opacity: 0.7;
}

.tool-modal-body {
    padding: 2rem;
    max-height: 75vh;
    overflow-y: auto;
}

/* 工具内容样式 */
.tool-content {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.tool-input-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.tool-input-group label {
    font-weight: 600;
    color: var(--text-primary);
}

.tool-input-group input,
.tool-input-group textarea,
.tool-input-group select {
    padding: 0.75rem;
    border: 2px solid var(--border-color);
    border-radius: 0.5rem;
    font-family: inherit;
    transition: border-color 0.3s ease;
}

.tool-input-group input:focus,
.tool-input-group textarea:focus,
.tool-input-group select:focus {
    outline: none;
    border-color: var(--primary-color);
}

.tool-output {
    background: var(--background-secondary);
    border: 2px solid var(--border-color);
    border-radius: 0.5rem;
    padding: 1rem;
    min-height: 200px;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 0.875rem;
    white-space: pre-wrap;
    word-break: break-all;
}

.tool-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.color-preview {
    width: 100px;
    height: 100px;
    border: 2px solid var(--border-color);
    border-radius: 0.5rem;
    margin: 1rem 0;
}

.qr-output {
    text-align: center;
    padding: 2rem;
}

.qr-output canvas {
    max-width: 100%;
    height: auto;
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
}

/* 图片裁剪工具样式 */
.image-crop-container {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.drop-zone {
    border: 3px dashed var(--border-color);
    border-radius: 1rem;
    padding: 3rem 2rem;
    text-align: center;
    background: var(--background-secondary);
    transition: all 0.3s ease;
    cursor: pointer;
}

.drop-zone:hover,
.drop-zone.dragover {
    border-color: var(--primary-color);
    background: rgba(37, 99, 235, 0.05);
}

.drop-zone i {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.drop-zone p {
    color: var(--text-secondary);
    font-size: 1.125rem;
    margin-bottom: 0.5rem;
}

.drop-zone small {
    color: var(--text-secondary);
    font-size: 0.875rem;
}

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

.image-crop-item {
    background: white;
    border: 2px solid var(--border-color);
    border-radius: 1rem;
    padding: 1rem;
    position: relative;
}

.image-crop-item h4 {
    margin-bottom: 1rem;
    color: var(--text-primary);
    font-size: 1rem;
    font-weight: 600;
    text-align: center;
    word-break: break-all;
}

.crop-canvas-container {
    position: relative;
    display: inline-block;
    margin: 0 auto;
    background: #f0f0f0;
    border-radius: 0.5rem;
    overflow: hidden;
}

.crop-canvas {
    display: block;
    max-width: 100%;
    height: auto;
}

.crop-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.crop-selection {
    position: absolute;
    border: 2px solid var(--primary-color);
    background: rgba(37, 99, 235, 0.1);
    cursor: move;
    pointer-events: all;
    min-width: 50px;
    min-height: 50px;
}

.crop-selection::before {
    content: '';
    position: absolute;
    top: -1px;
    left: -1px;
    right: -1px;
    bottom: -1px;
    border: 1px solid white;
    pointer-events: none;
}

.crop-handle {
    position: absolute;
    width: 10px;
    height: 10px;
    background: var(--primary-color);
    border: 2px solid white;
    border-radius: 50%;
    cursor: pointer;
}

.crop-handle.nw { top: -5px; left: -5px; cursor: nw-resize; }
.crop-handle.ne { top: -5px; right: -5px; cursor: ne-resize; }
.crop-handle.sw { bottom: -5px; left: -5px; cursor: sw-resize; }
.crop-handle.se { bottom: -5px; right: -5px; cursor: se-resize; }
.crop-handle.n { top: -5px; left: 50%; transform: translateX(-50%); cursor: n-resize; }
.crop-handle.s { bottom: -5px; left: 50%; transform: translateX(-50%); cursor: s-resize; }
.crop-handle.w { top: 50%; left: -5px; transform: translateY(-50%); cursor: w-resize; }
.crop-handle.e { top: 50%; right: -5px; transform: translateY(-50%); cursor: e-resize; }

.crop-controls {
    margin-top: 1rem;
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    flex-wrap: wrap;
}

.crop-controls button {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

.aspect-ratio-select {
    padding: 0.5rem;
    border: 2px solid var(--border-color);
    border-radius: 0.5rem;
    font-size: 0.875rem;
    background: white;
    color: var(--text-primary);
    cursor: pointer;
    transition: border-color 0.3s ease;
}

.aspect-ratio-select:focus {
    outline: none;
    border-color: var(--primary-color);
}

.crop-info {
    margin-top: 0.5rem;
    text-align: center;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.batch-controls {
    margin-top: 2rem;
    text-align: center;
    padding-top: 2rem;
    border-top: 2px solid var(--border-color);
}

.batch-controls .btn {
    margin: 0 0.5rem;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: var(--border-color);
    border-radius: 4px;
    margin: 1rem 0;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: var(--primary-color);
    width: 0%;
    transition: width 0.3s ease;
}

.download-links {
    margin-top: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    align-items: center;
}

.download-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: var(--background-secondary);
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    text-decoration: none;
    color: var(--text-primary);
    font-size: 0.875rem;
    transition: all 0.3s ease;
}

.download-link:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

/* 关于我们区域 */
.about {
    padding: 6rem 0;
    background: var(--background-secondary);
}

.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.about-text .section-header {
    text-align: left;
    margin-bottom: 2rem;
}

.about-description p {
    font-size: 1.125rem;
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 2rem;
}

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

.stat-item {
    text-align: center;
}

.stat-item h3 {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.stat-item p {
    color: var(--text-secondary);
    font-weight: 600;
}

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

.image-placeholder {
    width: 300px;
    height: 300px;
    background: white;
    border-radius: 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-lg);
    gap: 1rem;
}

.image-placeholder i {
    font-size: 4rem;
    color: var(--primary-color);
}

.image-placeholder p {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
}

/* 联系我们区域 */
.contact {
    padding: 6rem 0;
    background: var(--background);
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.contact-icon {
    width: 60px;
    height: 60px;
    background: var(--primary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.contact-icon i {
    font-size: 1.5rem;
    color: white;
}

.contact-details h4 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.contact-details p {
    color: var(--text-secondary);
    font-size: 1.125rem;
}

/* 表单样式 */
.contact-form {
    background: white;
    padding: 3rem;
    border-radius: 1rem;
    box-shadow: var(--shadow-lg);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 1rem;
    border: 2px solid var(--border-color);
    border-radius: 0.5rem;
    font-family: inherit;
    font-size: 1rem;
    transition: border-color 0.3s ease;
    background: var(--background);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

.form-group textarea {
    resize: vertical;
}

/* 页脚 */
.footer {
    background: var(--text-primary);
    color: white;
    padding: 3rem 0 1rem;
}

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

.footer-left h3 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.footer-left p {
    color: #94a3b8;
}

.social-links {
    display: flex;
    gap: 1rem;
}

.social-links a {
    width: 40px;
    height: 40px;
    background: var(--primary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    text-decoration: none;
    transition: all 0.3s ease;
}

.social-links a:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid #334155;
}

.footer-bottom p {
    color: #94a3b8;
}



/* 微信二维码样式 */
.wechat-qr {
    margin-top: 1rem;
    padding: 0.5rem;
    background: white;
    border-radius: 0.5rem;
    display: inline-block;
    box-shadow: var(--shadow);
}

.wechat-qr img {
    max-width: 150px;
    height: auto;
    display: block;
}

/* 页脚链接组 */
.footer-links {
    display: flex;
    gap: 3rem;
}

.footer-link-group h4 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 1.25rem;
    color: var(--text-primary);
}

.footer-link-group ul {
    list-style: none;
}

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

.footer-link-group a {
    text-decoration: none;
    color: var(--text-secondary);
    transition: color 0.3s ease;
}

.footer-link-group a:hover {
    color: var(--primary-color);
}

/* 响应式设计 */
@media (max-width: 768px) {
    .hamburger {
        display: flex;
    }
    
    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background-color: white;
        width: 100%;
        text-align: center;
        transition: 0.3s;
        box-shadow: var(--shadow);
        padding: 2rem 0;
    }
    
    .nav-menu.active {
        left: 0;
    }
    
    .hero-container {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 2rem;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-buttons {
        justify-content: center;
        flex-wrap: wrap;
    }
    
    .services-grid {
        grid-template-columns: 1fr;
    }
    
    .tools-grid {
        grid-template-columns: 1fr;
    }
    
    .images-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .tool-modal-content {
        width: 98%;
        margin: 5% auto;
        max-height: 95vh;
    }
    
    .tool-modal-body {
        padding: 1.5rem;
        max-height: 80vh;
    }
    
    .about-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .stats {
        justify-content: center;
    }
    
    .contact-content {
        grid-template-columns: 1fr;
    }
    
    .footer-content {
        flex-direction: column;
        gap: 2rem;
        text-align: center;
    }
    
    .container {
        padding: 0 1rem;
    }
    

    
    .footer-links {
        flex-direction: column;
        gap: 2rem;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 2rem;
    }
    
    .section-header h2 {
        font-size: 2rem;
    }
    
    .service-card {
        padding: 2rem 1.5rem;
    }
    
    .contact-form {
        padding: 2rem;
    }
    
    .hero-graphic {
        width: 300px;
        height: 300px;
    }
    
    .floating-card {
        padding: 1rem;
    }
    
    .stats {
        flex-direction: column;
        gap: 1rem;
    }
} 