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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #f5f7fa;
    min-height: 100vh;
    color: #333;
    line-height: 1.6;
    display: flex;
    flex-direction: column;
}

.navbar {
    background: #fff;
    border-bottom: 1px solid #e8e8e8;
    position: sticky;
    top: 0;
    z-index: 100;
}

.navbar-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 24px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.navbar-brand {
    display: flex;
    align-items: center;
    gap: 10px;
}

.brand-logo {
    width: 36px;
    height: 36px;
    object-fit: contain;
}

.brand-name {
    font-size: 20px;
    font-weight: 700;
    color: #333;
}

.navbar-menu {
    display: flex;
    gap: 24px;
}

.nav-link {
    color: #666;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: color 0.2s;
}

.nav-link:hover {
    color: #1677ff;
}

.hero-section {
    background: #eff1f2;
    padding: 40px 24px 48px;
    text-align: center;
}

.hero-title {
    font-size: 40px;
    font-weight: 700;
    color: #000000;
    margin-bottom: 16px;
    line-height: 1.4;
}

.gradient-text {
    background: linear-gradient(90deg, #1677ff, #722ed1, #eb2f96);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 18px;
    color: rgba(0, 0, 0, 0.65);
    max-width: 1200px;
    margin: 8px auto 0;
    line-height: 1.6;
}

.hero-subtitle strong {
    color: #1677ff;
    font-weight: 600;
}

.main-wrapper {
    flex: 1;
    padding: 32px 24px;
}

.content-container {
    max-width: 1400px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 420px 1fr;
    gap: 24px;
    min-height: calc(100vh - 64px - 80px);
}

.left-panel,
.right-panel {
    background: #fff;
    border-radius: 12px;
    border: 1px solid #e8e8e8;
    padding: 24px;
}

.panel-header {
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid #f0f0f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.panel-header h2 {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    margin-bottom: 0;
}

.panel-desc {
    font-size: 13px;
    color: #999;
}

.model-tabs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.model-tab {
    padding: 14px 16px;
    border: 2px solid #e8e8e8;
    border-radius: 10px;
    background: #fafafa;
    color: #666;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.model-tab:hover {
    border-color: #1677ff;
    color: #1677ff;
}

.model-tab.active {
    border-color: #1677ff;
    background: linear-gradient(135deg, #1677ff 0%, #722ed1 100%);
    color: #fff;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: #333;
    margin-bottom: 8px;
}

input[type="text"],
textarea {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid #d9d9d9;
    border-radius: 8px;
    background: #fff;
    color: #333;
    font-size: 14px;
    font-family: inherit;
    transition: all 0.2s;
}

input[type="text"]:focus,
textarea:focus {
    outline: none;
    border-color: #1677ff;
    box-shadow: 0 0 0 3px rgba(22, 119, 255, 0.1);
}

input[type="text"]::placeholder,
textarea::placeholder {
    color: #bfbfbf;
}

textarea {
    resize: vertical;
    min-height: 100px;
}

.form-tip {
    font-size: 12px;
    color: #999;
    margin-top: 6px;
}

.form-tip a {
    color: #1677ff;
    text-decoration: none;
}

.quality-options {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.quality-btn {
    padding: 10px;
    border: 2px solid #e8e8e8;
    border-radius: 8px;
    background: #fafafa;
    color: #666;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.quality-btn:hover {
    border-color: #1677ff;
    color: #1677ff;
}

.quality-btn.active {
    border-color: #1677ff;
    background: #1677ff;
    color: #fff;
}

.aspect-grid {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.aspect-category {
    display: flex;
    align-items: center;
    gap: 12px;
}

.category-label {
    width: 50px;
    font-size: 12px;
    color: #999;
    font-weight: 500;
}

.aspect-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.aspect-btn {
    padding: 6px 12px;
    border: 2px solid #e8e8e8;
    border-radius: 6px;
    background: #fafafa;
    color: #666;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    min-width: 50px;
}

.aspect-btn:hover {
    border-color: #1677ff;
    color: #1677ff;
}

.aspect-btn.active {
    border-color: #1677ff;
    background: #1677ff;
    color: #fff;
}

.generate-btn {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, #1677ff 0%, #722ed1 100%);
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 10px;
}

.generate-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(22, 119, 255, 0.35);
}

.generate-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.progress-container {
    margin-top: 20px;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: #f0f0f0;
    border-radius: 4px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #1677ff, #722ed1);
    border-radius: 4px;
    transition: width 0.3s;
    animation: progressPulse 2s infinite;
}

@keyframes progressPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

.progress-text {
    font-size: 13px;
    color: #666;
    text-align: center;
    margin-top: 10px;
}

.gallery-empty {
    text-align: center;
    padding: 80px 20px;
}

.empty-icon {
    font-size: 64px;
    margin-bottom: 20px;
    opacity: 0.5;
}

.gallery-empty p {
    font-size: 16px;
    color: #999;
    margin-bottom: 8px;
}

.empty-tip {
    font-size: 13px !important;
    color: #bfbfbf !important;
}

.image-gallery {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.gallery-item {
    position: relative;
    border-radius: 10px;
    overflow: hidden;
    aspect-ratio: 1;
    background: #f5f5f5;
    cursor: pointer;
    transition: all 0.3s;
}

.gallery-item:hover {
    transform: scale(1.02);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

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

.gallery-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 16px;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.7));
    opacity: 0;
    transition: opacity 0.3s;
    display: flex;
    justify-content: flex-end;
    align-items: center;
}

.gallery-item:hover .gallery-overlay {
    opacity: 1;
}

.gallery-actions {
    display: flex;
    gap: 10px;
}

.gallery-btn-text {
    background: rgba(255, 255, 255, 0.95);
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    color: #333;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.gallery-btn-text:hover {
    background: #1677ff;
    color: #fff;
    transform: scale(1.05);
}

.image-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 40px;
}

.image-modal.active {
    display: flex;
}

.modal-content {
    position: relative;
    max-width: 90%;
    max-height: 90vh;
}

.modal-content img {
    max-width: 100%;
    max-height: 80vh;
    border-radius: 10px;
}

.modal-close {
    position: absolute;
    top: -20px;
    right: -20px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: #fff;
    border: none;
    cursor: pointer;
    font-size: 18px;
    color: #333;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.modal-close:hover {
    background: #1677ff;
    color: #fff;
    transform: rotate(90deg);
}

.modal-actions {
    margin-top: 16px;
    text-align: center;
}

.download-btn-modal {
    display: inline-block;
    padding: 12px 32px;
    background: linear-gradient(135deg, #1677ff 0%, #722ed1 100%);
    color: #fff;
    text-decoration: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 500;
    transition: all 0.3s;
}

.download-btn-modal:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(22, 119, 255, 0.4);
}

.footer {
    background: #fff;
    padding: 20px 0;
    text-align: center;
    color: #999;
    font-size: 14px;
    border-top: 1px solid #e8e8e8;
}

@media (max-width: 1024px) {
    .content-container {
        grid-template-columns: 1fr;
    }
    
    .image-gallery {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .hero-title {
        font-size: 28px;
    }
    
    .hero-subtitle {
        font-size: 16px;
    }
    
    .main-wrapper {
        padding: 20px 16px;
    }
    
    .image-gallery {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .aspect-category {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
}

@media (max-width: 480px) {
    .image-gallery {
        grid-template-columns: 1fr;
    }
    
    .model-tabs {
        grid-template-columns: 1fr;
    }
    
    .navbar-menu {
        display: none;
    }
}
