/* ============================================
   AIom智能营销平台 - 高级视觉优化
   ============================================ */

/* 1. 渐变背景优化 */
body {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 50%, #e2e8f0 100%);
    background-attachment: fixed;
    min-height: 100vh;
    max-width: 1200px;
    margin: 0 auto;
}

/* 2. 玻璃拟态（Glassmorphism）卡片效果 */
.option-card,
.music-item,
.workflow-card {
    background: rgba(255, 255, 255, 0.85) !important;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.5) !important;
    box-shadow: 
        0 8px 32px rgba(15, 23, 42, 0.1),
        0 2px 8px rgba(15, 23, 42, 0.05),
        inset 0 1px 0 rgba(255, 255, 255, 0.8) !important;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1) !important;
    border-radius: 20px !important;
    overflow: hidden;
}

.option-card::before,
.music-item::before,
.workflow-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.6), transparent);
    pointer-events: none;
}

/* 3. 悬浮动画效果 */
.option-card:hover,
.music-item:hover,
.workflow-card:hover {
    transform: translateY(-8px) scale(1.02) !important;
    box-shadow: 
        0 20px 40px rgba(255, 107, 53, 0.15),
        0 8px 16px rgba(15, 23, 42, 0.1),
        0 4px 12px rgba(15, 23, 42, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.9) !important;
    border-color: rgba(255, 107, 53, 0.3) !important;
}

/* 4. 主按钮高级渐变效果 */
.btn-primary,
.menu-btn:hover {
    background: linear-gradient(135deg, #FF6B35 0%, #e55a2b 50%, #c84f1e 100%) !important;
    box-shadow: 
        0 4px 15px rgba(255, 107, 53, 0.4),
        0 2px 8px rgba(255, 107, 53, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.3) !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    border: none !important;
}

.btn-primary:hover,
.menu-btn:hover {
    transform: translateY(-2px) !important;
    box-shadow: 
        0 8px 25px rgba(255, 107, 53, 0.5),
        0 4px 12px rgba(255, 107, 53, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.4) !important;
}

/* 5. 输入框高级效果 */
.form-input {
    background: rgba(255, 255, 255, 0.9) !important;
    border: 2px solid rgba(229, 231, 235, 0.8) !important;
    border-radius: 16px !important;
    transition: all 0.3s ease !important;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.05) !important;
}

.form-input:focus {
    border-color: rgba(255, 107, 53, 0.5) !important;
    box-shadow: 
        0 0 0 4px rgba(255, 107, 53, 0.1),
        0 4px 12px rgba(255, 107, 53, 0.15) !important;
    background: rgba(255, 255, 255, 1) !important;
}

/* 6. 头部导航优化 */
.workspace-header,
.optimize-header {
    background: rgba(255, 255, 255, 0.9) !important;
    backdrop-filter: blur(20px) !important;
    -webkit-backdrop-filter: blur(20px) !important;
    border-bottom: 1px solid rgba(229, 231, 235, 0.6) !important;
    box-shadow: 
        0 4px 20px rgba(15, 23, 42, 0.08),
        0 1px 3px rgba(15, 23, 42, 0.05) !important;
}

/* 7. Logo图标渐变发光 */
.optimize-logo-icon,
.logo-icon {
    background: linear-gradient(135deg, #FF6B35 0%, #e55a2b 100%) !important;
    box-shadow: 
        0 4px 15px rgba(255, 107, 53, 0.4),
        0 0 20px rgba(255, 107, 53, 0.2) !important;
    animation: pulse-glow 3s ease-in-out infinite !important;
}

@keyframes pulse-glow {
    0%, 100% {
        box-shadow: 
            0 4px 15px rgba(255, 107, 53, 0.4),
            0 0 20px rgba(255, 107, 53, 0.2);
    }
    50% {
        box-shadow: 
            0 4px 20px rgba(255, 107, 53, 0.6),
            0 0 30px rgba(255, 107, 53, 0.4);
    }
}

/* 8. 媒体预览优化 */
.media-preview video,
.media-preview audio {
    border-radius: 16px !important;
    box-shadow: 
        0 4px 12px rgba(15, 23, 42, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.5) !important;
}

/* 9. 标签和状态徽章优化 */
.workflow-tag,
.option-card-meta span {
    background: linear-gradient(135deg, rgba(255, 107, 53, 0.1) 0%, rgba(255, 107, 53, 0.1) 100%) !important;
    border: 1px solid rgba(255, 107, 53, 0.2) !important;
    border-radius: 100px !important;
    color: #e55a2b !important;
    font-weight: 500 !important;
}

/* 10. 整体页面渐变装饰 */
.workspace-main::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 20%, rgba(255, 107, 53, 0.05) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(255, 107, 53, 0.05) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
}

.workspace-main > * {
    position: relative;
    z-index: 1;
}

/* 11. 弹窗高级效果 */
.custom-modal-content {
    background: rgba(255, 255, 255, 0.95) !important;
    backdrop-filter: blur(30px) !important;
    -webkit-backdrop-filter: blur(30px) !important;
    border: 1px solid rgba(255, 255, 255, 0.7) !important;
    box-shadow: 
        0 25px 50px rgba(15, 23, 42, 0.25),
        0 10px 20px rgba(15, 23, 42, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.9) !important;
    border-radius: 24px !important;
}

/* 12. 按钮点击波纹效果 */
.btn-primary:active,
.menu-btn:active {
    transform: translateY(0) scale(0.98) !important;
    box-shadow: 
        0 2px 8px rgba(255, 107, 53, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.3) !important;
}

/* 13. 选中状态优化 */
.option-card.selected {
    background: linear-gradient(135deg, rgba(255, 107, 53, 0.1) 0%, rgba(255, 107, 53, 0.1) 100%) !important;
    border-color: rgba(255, 107, 53, 0.4) !important;
    box-shadow: 
        0 8px 25px rgba(255, 107, 53, 0.2),
        0 0 0 3px rgba(255, 107, 53, 0.1) !important;
}

/* 14. 危险按钮优化 */
.btn-danger,
button[style*="background: #f87171"] {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%) !important;
    box-shadow: 
        0 4px 15px rgba(239, 68, 68, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.3) !important;
}

.btn-danger:hover,
button[style*="background: #f87171"]:hover {
    box-shadow: 
        0 8px 25px rgba(239, 68, 68, 0.5),
        inset 0 1px 0 rgba(255, 255, 255, 0.4) !important;
}

/* 15. 成功按钮优化 */
.btn-success,
button[style*="background: var(--success)"] {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%) !important;
    box-shadow: 
        0 4px 15px rgba(16, 185, 129, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.3) !important;
}

.btn-success:hover,
button[style*="background: var(--success)"]:hover {
    box-shadow: 
        0 8px 25px rgba(16, 185, 129, 0.5),
        inset 0 1px 0 rgba(255, 255, 255, 0.4) !important;
}

/* 16. 平滑滚动 */
html {
    scroll-behavior: smooth;
}

/* 17. 文本选择优化 */
::selection {
    background: rgba(255, 107, 53, 0.2);
    color: #e55a2b;
}

::-moz-selection {
    background: rgba(255, 107, 53, 0.2);
    color: #e55a2b;
}

/* ============================================
   新增高级视觉优化
   ============================================ */

/* 18. 滚动条美化 */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: rgba(226, 232, 240, 0.5);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #FF6B35 0%, #e55a2b 100%);
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(255, 107, 53, 0.3);
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #e55a2b 0%, #c84f1e 100%);
}

/* 19. 页面元素淡入动画 */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.option-card,
.music-item,
.workflow-card,
.step-card,
.profile-card {
    animation: fadeInUp 0.6s ease-out forwards;
}

/* 20. 卡片渐变边框效果 */
.option-card,
.music-item,
.workflow-card {
    position: relative;
}

.option-card::after,
.music-item::after,
.workflow-card::after {
    content: '';
    position: absolute;
    inset: -1px;
    border-radius: 20px;
    padding: 1px;
    background: linear-gradient(135deg, 
        rgba(255, 107, 53, 0.1) 0%, 
        rgba(255, 107, 53, 0.1) 50%, 
        rgba(255, 107, 53, 0.1) 100%);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.option-card:hover::after,
.music-item:hover::after,
.workflow-card:hover::after {
    opacity: 1;
}

/* 21. 文字渐变效果 */
h1, h2, h3, .optimize-logo-text {
    background: linear-gradient(135deg, #1e293b 0%, #334155 50%, #1e293b 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* 22. 更好的阴影层次 */
.option-card,
.music-item,
.workflow-card,
.step-card,
.profile-card {
    box-shadow: 
        0 1px 2px rgba(15, 23, 42, 0.03),
        0 4px 12px rgba(15, 23, 42, 0.06),
        0 16px 40px rgba(15, 23, 42, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.9) !important;
}

/* 23. 媒体预览悬浮放大效果 */
.media-preview video,
.media-preview audio,
.media-preview img {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.media-preview video:hover,
.media-preview img:hover {
    transform: scale(1.03);
    box-shadow: 
        0 8px 24px rgba(15, 23, 42, 0.2),
        0 4px 12px rgba(15, 23, 42, 0.1) !important;
}

/* 24. 按钮光效流动动画 */
.btn-primary,
.menu-btn {
    position: relative;
    overflow: hidden;
}

.btn-primary::before,
.menu-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.3),
        transparent
    );
    animation: shimmer 3s infinite;
}

@keyframes shimmer {
    0% {
        left: -100%;
    }
    100% {
        left: 100%;
    }
}

/* 25. 卡片悬浮时的背景光效 */
.option-card:hover,
.music-item:hover,
.workflow-card:hover {
    background: rgba(255, 255, 255, 0.95) !important;
}

.option-card:hover::before,
.music-item:hover::before,
.workflow-card:hover::before {
    background: linear-gradient(135deg, 
        rgba(255, 107, 53, 0.08) 0%, 
        rgba(255, 107, 53, 0.08) 100%);
}

/* 26. 更好的排版间距 */
p, span, div {
    line-height: 1.6;
}

h1, h2, h3 {
    letter-spacing: -0.02em;
}

/* 27. 步骤数字优化 */
.step-number {
    background: linear-gradient(135deg, #FF6B35 0%, #e55a2b 100%) !important;
    box-shadow: 
        0 4px 15px rgba(255, 107, 53, 0.4),
        0 0 20px rgba(255, 107, 53, 0.2) !important;
    transition: all 0.3s ease !important;
}

.step-number.active {
    transform: scale(1.1);
    animation: pulse-glow 2s ease-in-out infinite;
}

/* 28. 输入框浮动标签效果增强 */
.form-input:focus + label,
.form-input:not(:placeholder-shown) + label {
    transform: translateY(-24px) scale(0.85);
    color: #FF6B35;
    font-weight: 600;
}

/* 29. 菜单按钮优化 */
.menu-btn {
    background: linear-gradient(135deg, #FF6B35 0%, #e55a2b 100%) !important;
    color: white !important;
    -webkit-text-fill-color: white !important;
    border: none !important;
    box-shadow: 0 4px 15px rgba(255, 107, 53, 0.4), 0 2px 8px rgba(255, 107, 53, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.3) !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.menu-btn:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 8px 25px rgba(255, 107, 53, 0.5), 0 4px 12px rgba(255, 107, 53, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.4) !important;
}

.menu-btn.active {
    transform: scale(1.05) !important;
    box-shadow: 0 8px 30px rgba(255, 107, 53, 0.6), 0 4px 15px rgba(255, 107, 53, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.4) !important;
}

.menu-btn.logout {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%) !important;
    box-shadow: 0 4px 15px rgba(239, 68, 68, 0.4), 0 2px 8px rgba(239, 68, 68, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.3) !important;
}

.menu-btn.logout:hover {
    box-shadow: 0 8px 25px rgba(239, 68, 68, 0.5), 0 4px 12px rgba(239, 68, 68, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.4) !important;
}

/* 30. 全局视觉增强 */
* {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

img {
    image-rendering: -webkit-optimize-contrast;
}

/* 31. 加载状态优化 */
@keyframes pulse-loading {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

.loading,
[class*="loading"] {
    animation: pulse-loading 1.5s ease-in-out infinite;
}
