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

body {
    font-family: 'Microsoft YaHei', 'PingFang SC', 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px 0;
}

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

header {
    text-align: center;
    margin-bottom: 40px;
    color: white;
}

header h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

header p {
    font-size: 1.1rem;
    opacity: 0.9;
}

.form-container {
    background: white;
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
    backdrop-filter: blur(10px);
}

.form-section {
    margin-bottom: 40px;
    padding: 30px;
    border: 2px solid #f0f0f0;
    border-radius: 15px;
    background: #fafafa;
    transition: all 0.3s ease;
}

.form-section:hover {
    border-color: #667eea;
    box-shadow: 0 10px 25px rgba(102, 126, 234, 0.1);
}

.form-section h2 {
    color: #333;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 3px solid #667eea;
    font-size: 1.5rem;
}

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #555;
    font-size: 1rem;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s ease;
    font-family: inherit;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 80px;
}

.image-preview {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 15px;
    min-height: 120px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
    align-items: flex-start;
}

.image-preview img {
    width: 100px;
    height: 100px;
    object-fit: cover;
    border-radius: 8px;
    border: 2px solid #e1e5e9;
    transition: transform 0.3s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.image-preview img:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.image-upload-container {
    border: 2px dashed #ddd;
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    background: #f9f9f9;
    transition: all 0.3s ease;
    position: relative;
}

.image-upload-container:hover {
    border-color: #667eea;
    background: #f0f4ff;
}

.image-upload-container input[type="file"] {
    border: none;
    background: none;
    padding: 0;
    margin-bottom: 15px;
    width: 100%;
    cursor: pointer;
    opacity: 0;
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    z-index: 2;
}

.image-upload-container::before {
    content: "点击选择文件或拖拽文件到此处";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #666;
    font-size: 14px;
    pointer-events: none;
    z-index: 1;
    transition: opacity 0.3s ease;
}

/* 当图片预览区域有内容时隐藏提示文字 */
.image-upload-container:has(.image-preview:not(:empty))::before {
    opacity: 0;
}

/* 兼容性处理：当不支持:has()选择器时，使用JavaScript控制 */
.image-upload-container.has-images::before {
    opacity: 0;
}

.image-upload-container input[type="file"]:focus + .image-preview {
    border-color: #667eea;
}

/* 产品项样式优化 */
.product-item {
    background: white;
    padding: 25px;
    border-radius: 12px;
    border: 2px solid #e8f4fd;
    margin-bottom: 20px;
    position: relative;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.product-item:hover {
    border-color: #667eea;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.1);
}

.product-item h3 {
    color: #667eea;
    margin-bottom: 20px;
    font-size: 1.2rem;
    padding-bottom: 10px;
    border-bottom: 2px solid #f0f0f0;
}

.product-item .remove-product {
    position: absolute;
    top: 15px;
    right: 15px;
    background: #ff4757;
    color: white;
    border: none;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    cursor: pointer;
    font-size: 16px;
    transition: all 0.3s ease;
    z-index: 10;
}

.product-item .remove-product:hover {
    background: #ff3742;
    transform: scale(1.1);
}

.btn {
    padding: 12px 25px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(102, 126, 234, 0.3);
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background: #5a6268;
    transform: translateY(-2px);
}

.btn-reset {
    background: #dc3545;
    color: white;
    margin-left: 15px;
}

.btn-reset:hover {
    background: #c82333;
}

.form-actions {
    text-align: center;
    margin-top: 40px;
    padding-top: 30px;
    border-top: 2px solid #f0f0f0;
}

/* 复选框组样式 */
.checkbox-group {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-top: 10px;
}

.checkbox-item {
    display: flex;
    align-items: center;
    cursor: pointer;
    padding: 10px;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    background: white;
    transition: all 0.3s ease;
}

.checkbox-item:hover {
    border-color: #4facfe;
    background: #f0f8ff;
}

.checkbox-item input[type="checkbox"] {
    width: auto;
    margin-right: 10px;
    transform: scale(1.2);
}

.checkbox-item input[type="checkbox"]:checked + span {
    color: #4facfe;
    font-weight: 600;
}

/* 选择框样式 */
.form-group select {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s ease;
    font-family: inherit;
    background: white;
    cursor: pointer;
}

.form-group select:focus {
    outline: none;
    border-color: #4facfe;
    box-shadow: 0 0 0 3px rgba(79, 172, 254, 0.1);
}

.form-group select:hover {
    border-color: #4facfe;
}

/* 关键词推广模块特殊样式 */
.form-section:last-of-type {
    background: linear-gradient(135deg, #f8fbff 0%, #f0f8ff 100%);
    border-color: #4facfe;
}

.form-section:last-of-type h2 {
    color: #4facfe;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .container {
        padding: 0 15px;
    }
    
    .form-container {
        padding: 20px;
    }
    
    .form-section {
        padding: 20px;
    }
    
    header h1 {
        font-size: 2rem;
    }
    
    .btn {
        width: 100%;
        margin-bottom: 10px;
    }
    
    .btn-reset {
        margin-left: 0;
    }
}

/* 响应式复选框布局 */
@media (max-width: 768px) {
    .checkbox-group {
        grid-template-columns: 1fr;
    }
}

/* 成功提示样式 */
.success-message {
    background: linear-gradient(135deg, #4CAF50, #45a049);
    color: white;
    padding: 15px 20px;
    margin: 10px 0;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(76, 175, 80, 0.3);
    border-left: 5px solid #2E7D32;
    font-weight: 500;
    animation: slideInRight 0.5s ease-out;
}

.error-message {
    background: linear-gradient(135deg, #f44336, #d32f2f);
    color: white;
    padding: 15px 20px;
    margin: 10px 0;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(244, 67, 54, 0.3);
    border-left: 5px solid #C62828;
    font-weight: 500;
    animation: slideInRight 0.5s ease-out;
}

.info-message {
    background: linear-gradient(135deg, #2196F3, #1976D2);
    color: white;
    padding: 15px 20px;
    margin: 10px 0;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(33, 150, 243, 0.3);
    border-left: 5px solid #1565C0;
    font-weight: 500;
    animation: slideInRight 0.5s ease-out;
}

/* 详细成功信息样式 */
.success-details {
    background: linear-gradient(135deg, #4CAF50, #45a049);
    color: white;
    padding: 25px;
    margin: 20px 0;
    border-radius: 12px;
    box-shadow: 0 8px 25px rgba(76, 175, 80, 0.4);
    text-align: center;
    animation: slideInDown 0.6s ease-out;
    position: relative;
    overflow: hidden;
}

.success-details::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    animation: shimmer 2s infinite;
}

.success-icon {
    font-size: 48px;
    margin-bottom: 15px;
    animation: bounce 1s ease-in-out;
}

.success-details h3 {
    margin: 0 0 20px 0;
    font-size: 24px;
    font-weight: 600;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.success-items {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 20px;
}

.success-item {
    background: rgba(255,255,255,0.2);
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
    backdrop-filter: blur(10px);
    animation: fadeInUp 0.5s ease-out;
}

.success-tip {
    font-size: 14px;
    opacity: 0.9;
    font-style: italic;
    animation: pulse 2s infinite;
}

/* 动画效果 */
@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

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

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

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-10px);
    }
    60% {
        transform: translateY(-5px);
    }
}

@keyframes pulse {
    0% {
        opacity: 0.9;
    }
    50% {
        opacity: 0.6;
    }
    100% {
        opacity: 0.9;
    }
}

@keyframes shimmer {
    0% {
        left: -100%;
    }
    100% {
        left: 100%;
    }
}

/* 响应式设计 */
@media (max-width: 768px) {
    .success-details {
        padding: 20px;
        margin: 15px 0;
    }
    
    .success-icon {
        font-size: 36px;
    }
    
    .success-details h3 {
        font-size: 20px;
    }
    
    .success-items {
        gap: 8px;
    }
    
    .success-item {
        padding: 6px 12px;
        font-size: 13px;
    }
}

/* ===== 弹窗样式 ===== */

/* 弹窗遮罩层 */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    animation: fadeIn 0.3s ease-out;
}

/* 弹窗内容 */
.modal-content {
    background: white;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    max-width: 90%;
    width: 400px;
    animation: slideInUp 0.4s ease-out;
    overflow: hidden;
}

/* 弹窗头部 */
.modal-header {
    padding: 24px 24px 16px;
    text-align: center;
    border-bottom: 1px solid #f0f0f0;
}

.modal-icon {
    font-size: 48px;
    margin-bottom: 16px;
    animation: bounce 0.6s ease-out;
}

.modal-header h3 {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
    color: #333;
}

/* 弹窗主体 */
.modal-body {
    padding: 20px 24px;
    text-align: center;
}

.modal-body p {
    margin: 0;
    font-size: 16px;
    color: #666;
    line-height: 1.5;
}

/* 弹窗底部 */
.modal-footer {
    padding: 16px 24px 24px;
    display: flex;
    gap: 12px;
    justify-content: center;
}

/* 弹窗按钮 */
.modal-btn {
    padding: 10px 24px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 80px;
}

.success-btn {
    background: linear-gradient(135deg, #4CAF50, #45a049);
    color: white;
}

.success-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(76, 175, 80, 0.4);
}

.warning-btn {
    background: linear-gradient(135deg, #FF9800, #F57C00);
    color: white;
}

.warning-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 152, 0, 0.4);
}

.confirm-btn {
    background: linear-gradient(135deg, #2196F3, #1976D2);
    color: white;
}

.confirm-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(33, 150, 243, 0.4);
}

.cancel-btn {
    background: #f5f5f5;
    color: #666;
    border: 1px solid #ddd;
}

.cancel-btn:hover {
    background: #e8e8e8;
    transform: translateY(-2px);
}

/* 弹窗类型样式 */
.success-modal .modal-header {
    background: linear-gradient(135deg, #4CAF50, #45a049);
    color: white;
}

.success-modal .modal-header h3,
.success-modal .modal-header .modal-icon {
    color: white;
}

.warning-modal .modal-header {
    background: linear-gradient(135deg, #FF9800, #F57C00);
    color: white;
}

.warning-modal .modal-header h3,
.warning-modal .modal-header .modal-icon {
    color: white;
}

.confirm-modal .modal-header {
    background: linear-gradient(135deg, #9C27B0, #7B1FA2);
    color: white;
}

.confirm-modal .modal-header h3,
.confirm-modal .modal-header .modal-icon {
    color: white;
}

.progress-modal .modal-header {
    background: linear-gradient(135deg, #607D8B, #455A64);
    color: white;
}

.progress-modal .modal-header h3,
.progress-modal .modal-header .modal-icon {
    color: white;
}

.loading-modal .modal-header {
    background: linear-gradient(135deg, #00BCD4, #0097A7);
    color: white;
}

.loading-modal .modal-header h3,
.loading-modal .modal-header .modal-icon {
    color: white;
}

/* 进度条 */
.progress-bar {
    width: 100%;
    height: 8px;
    background: #f0f0f0;
    border-radius: 4px;
    margin-top: 16px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #4CAF50, #45a049);
    border-radius: 4px;
    animation: progressFill 2s ease-in-out infinite;
}

/* 加载动画 */
.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #00BCD4;
    border-radius: 50%;
    margin: 16px auto 0;
    animation: spin 1s linear infinite;
}

/* 通知样式 */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    padding: 16px 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    max-width: 350px;
    z-index: 10001;
    animation: slideInRight 0.4s ease-out;
}

.notification-icon {
    font-size: 20px;
    flex-shrink: 0;
}

.notification-content {
    flex: 1;
}

.notification-content p {
    margin: 0;
    font-size: 14px;
    color: #333;
    line-height: 1.4;
}

.notification-close {
    background: none;
    border: none;
    font-size: 18px;
    color: #999;
    cursor: pointer;
    padding: 0;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.notification-close:hover {
    background: #f5f5f5;
    color: #666;
}

/* 通知类型样式 */
.success-notification {
    border-left: 4px solid #4CAF50;
}

.error-notification {
    border-left: 4px solid #f44336;
}

.warning-notification {
    border-left: 4px solid #FF9800;
}

.info-notification {
    border-left: 4px solid #2196F3;
}

/* 动画效果 */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

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

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes progressFill {
    0% {
        width: 0%;
    }
    50% {
        width: 70%;
    }
    100% {
        width: 100%;
    }
}

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

/* 响应式弹窗 */
@media (max-width: 768px) {
    .modal-content {
        width: 90%;
        margin: 20px;
    }
    
    .modal-header {
        padding: 20px 20px 12px;
    }
    
    .modal-body {
        padding: 16px 20px;
    }
    
    .modal-footer {
        padding: 12px 20px 20px;
        flex-direction: column;
    }
    
    .modal-btn {
        width: 100%;
    }
    
    .notification {
        right: 10px;
        left: 10px;
        max-width: none;
    }
} 