/* ========================================
   AI智剪 - 浅色专业风格
   ======================================== */

/* ---- 基础重置 ---- */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans SC", sans-serif;
    color: #1F2937;
    background: #F5F7FA;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ---- 动画 ---- */
@keyframes fadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(24px); }
    to   { opacity: 1; transform: translateY(0); }
}

@keyframes progressIndeterminate {
    0%   { transform: translateX(-100%); width: 40%; }
    50%  { width: 60%; }
    100% { transform: translateX(260%); width: 40%; }
}

.animate-fade-in {
    animation: fadeIn 0.5s ease-out both;
}

.animate-slide-up {
    animation: slideUp 0.45s ease-out both;
}

.animate-progress-indeterminate {
    animation: progressIndeterminate 1.5s ease-in-out infinite;
    position: relative;
}

/* ---- 白色卡片（glass-card 保留类名兼容） ---- */
.glass-card {
    background: #FFFFFF;
    border-radius: 16px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.06);
    border: 1px solid rgba(0, 0, 0, 0.04);
    transition: box-shadow 0.3s ease, transform 0.3s ease;
}

.glass-card:hover {
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

/* ---- 输入框 ---- */
.glass-input {
    background: #F9FAFB;
    border: 1.5px solid #E5E7EB;
    border-radius: 12px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
    color: #1F2937;
}

.glass-input::placeholder {
    color: #9CA3AF;
}

.glass-input:focus {
    background: #FFFFFF;
    border-color: #6C63FF;
    box-shadow: 0 0 0 3px rgba(108, 99, 255, 0.12);
    outline: none;
}

/* ---- 上传区域 ---- */
.upload-zone {
    background: #FAFBFF;
    border: 2px dashed #D1D5DB;
    border-radius: 16px;
    transition: all 0.3s ease;
}

.upload-zone:hover {
    background: #F0EEFF;
    border-color: #6C63FF;
    transform: translateY(-1px);
}

.upload-zone.drag-over {
    background: #EDE9FF;
    border-color: #6C63FF;
    box-shadow: 0 0 0 4px rgba(108, 99, 255, 0.1);
    transform: scale(1.01);
}

/* ---- 状态标签（Badge 胶囊） ---- */
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    white-space: nowrap;
    border-radius: 999px;
    padding: 3px 10px;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.5;
}

.status-badge::before {
    content: '';
    display: inline-block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
}

/* 待支付 - 灰色 */
.badge-pending,
.status-pending-payment {
    background: #F3F4F6;
    color: #6B7280;
    border: 1px solid #E5E7EB;
}

/* 已支付 - 蓝色 */
.badge-paid,
.status-paid {
    background: #EFF6FF;
    color: #3B82F6;
    border: 1px solid #BFDBFE;
}

/* 处理中 - 橙色 */
.badge-processing,
.status-processing {
    background: #FFF7ED;
    color: #F59E0B;
    border: 1px solid #FDE68A;
}

.status-processing::before {
    animation: pulse 1.5s ease-in-out infinite;
}

/* 已完成 - 绿色 */
.badge-completed,
.status-completed {
    background: #ECFDF5;
    color: #10B981;
    border: 1px solid #A7F3D0;
}

/* 已取消/退款 */
.status-cancelled,
.status-refunded {
    background: #F3F4F6;
    color: #9CA3AF;
    border: 1px solid #E5E7EB;
}

/* ---- 渐变文字 ---- */
.gradient-text-primary {
    background: linear-gradient(135deg, #6C63FF, #3B82F6);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* ---- Toast 通知 ---- */
.toast {
    pointer-events: auto;
    min-width: 280px;
    max-width: 380px;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-radius: 12px;
    padding: 12px 16px;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 14px;
    animation: slideUpToast 0.35s cubic-bezier(0.21, 1.02, 0.73, 1) both;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
}

@keyframes slideUpToast {
    from { opacity: 0; transform: translateY(12px) scale(0.95); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

.toast-hide {
    animation: slideDownToast 0.25s ease-in both;
}

@keyframes slideDownToast {
    from { opacity: 1; transform: translateY(0) scale(1); }
    to   { opacity: 0; transform: translateY(8px) scale(0.95); }
}

.toast-success {
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid #A7F3D0;
    color: #065F46;
}

.toast-error {
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid #FCA5A5;
    color: #991B1B;
}

.toast-info {
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid #93C5FD;
    color: #1E40AF;
}

.toast-warning {
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid #FDE68A;
    color: #92400E;
}

/* ---- 按钮通用 ---- */
.btn-primary {
    background: linear-gradient(135deg, #6C63FF, #3B82F6);
    color: #FFFFFF;
    font-weight: 600;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 16px rgba(108, 99, 255, 0.3);
}

.btn-primary:hover {
    box-shadow: 0 6px 24px rgba(108, 99, 255, 0.4);
    transform: translateY(-1px);
}

.btn-primary:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(108, 99, 255, 0.3);
}

.btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* ---- 进度条 ---- */
.progress-bar {
    height: 8px;
    background: #E5E7EB;
    border-radius: 4px;
    overflow: hidden;
}

.progress-bar-fill {
    height: 100%;
    background: linear-gradient(135deg, #6C63FF, #3B82F6);
    border-radius: 4px;
    transition: width 0.3s ease;
    position: relative;
}

.progress-bar-fill::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0.2);
    animation: pulse 1.5s ease-in-out infinite;
    border-radius: 4px;
}

/* ---- 下载按钮 ---- */
.download-btn {
    position: relative;
    overflow: hidden;
}

.download-btn::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.15), transparent);
    transform: translateX(-100%);
    transition: transform 0.6s ease;
}

.download-btn:hover::after {
    transform: translateX(100%);
}

/* ---- 滚动条美化 ---- */
* {
    scrollbar-width: thin;
    scrollbar-color: rgba(108, 99, 255, 0.25) transparent;
}

::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: rgba(108, 99, 255, 0.25);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(108, 99, 255, 0.45);
}

/* ---- 文字行数限制 ---- */
.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ---- 选中文字颜色 ---- */
::selection {
    background: rgba(108, 99, 255, 0.25);
    color: #1F2937;
}

/* ---- 视频容器 ---- */
video {
    background: #000;
    border-radius: 12px;
}

video::-webkit-media-controls {
    background: rgba(0, 0, 0, 0.5);
}

/* ---- 底部安全区域 ---- */
.safe-bottom {
    padding-bottom: calc(env(safe-area-inset-bottom, 0px) + 16px);
}

/* ---- 底部固定支付栏 ---- */
.fixed-pay-bar {
    position: fixed;
    bottom: 56px;
    left: 0;
    right: 0;
    z-index: 40;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-top: 1px solid #E5E7EB;
    padding: 12px 16px;
    padding-bottom: calc(12px + env(safe-area-inset-bottom, 0px));
}

@media (min-width: 640px) {
    .fixed-pay-bar {
        bottom: 0;
    }
}
    padding-bottom: calc(12px + env(safe-area-inset-bottom, 0px));
    box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.06);
}

/* ---- 步骤指示器 ---- */
.step-indicator {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.step-dot {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
    transition: all 0.3s ease;
    background: #E5E7EB;
    color: #9CA3AF;
}

.step-dot.active {
    background: linear-gradient(135deg, #6C63FF, #3B82F6);
    color: #FFFFFF;
    box-shadow: 0 2px 8px rgba(108, 99, 255, 0.35);
}

.step-dot.done {
    background: #10B981;
    color: #FFFFFF;
}

.step-line {
    width: 32px;
    height: 2px;
    background: #E5E7EB;
    transition: background 0.3s ease;
}

.step-line.done {
    background: linear-gradient(135deg, #6C63FF, #3B82F6);
}

/* ---- 流程步骤圆形图标 ---- */
.flow-step-icon {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #6C63FF, #3B82F6);
    color: #FFFFFF;
    box-shadow: 0 4px 16px rgba(108, 99, 255, 0.3);
    margin: 0 auto 12px;
}

.flow-step-connector {
    flex: 1;
    height: 2px;
    background: linear-gradient(90deg, #6C63FF, #3B82F6);
    opacity: 0.3;
    margin-top: 28px;
}

/* ---- 底部导航栏 ---- */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 50;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-top: 1px solid #E5E7EB;
    padding-bottom: env(safe-area-inset-bottom, 0px);
}

.bottom-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    padding: 10px 0;
    font-size: 10px;
    color: #9CA3AF;
    transition: color 0.2s ease;
    text-decoration: none;
    min-height: 56px;
    justify-content: center;
}

.bottom-nav-item.active,
.bottom-nav-item:hover {
    color: #6C63FF;
}

.bottom-nav-item svg {
    width: 20px !important;
    height: 20px !important;
    max-width: 20px !important;
    max-height: 20px !important;
    flex-shrink: 0;
}

/* ---- 全局 Loading 遮罩 ---- */
.global-loading {
    position: fixed;
    inset: 0;
    z-index: 200;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ---- 响应式 ---- */
@media (max-width: 640px) {
    .glass-card {
        border-radius: 14px;
    }
    
    .upload-zone {
        border-radius: 14px;
    }
}
