/* 云纸社 - 参考米哈游风格 - 深色科技感设计 – 未改动业务逻辑 */

:root {
    /* 深色主题色系 */
    --bg-dark: #0a0a0a;
    --bg-darker: #000000;
    --bg-card: rgba(20, 20, 30, 0.8);
    --bg-card-hover: rgba(30, 40, 60, 0.9);
    /* 主色调 - 蓝色系（科技感） */
    --primary-blue: #4A9DD4;
    --primary-light-blue: #6BB0E8;
    --primary-dark-blue: #2E7AB8;
    --accent-cyan: #00D6C2;
    /* 辅助色 */
    --accent: #4A9DD4;
    --accent-hover: #6BB0E8;
    --accent2: #2E7AB8;
    --accent2-hover: #1E5A8A;
    /* 背景色 */
    --paper: rgba(20, 20, 30, 0.95);
    --paper-light: rgba(30, 30, 40, 0.9);
    --paper-gray: #333;
    /* 文字色 */
    --text-primary: #FFFFFF;
    --text-secondary: rgba(255, 255, 255, 0.7);
    --text-muted: rgba(255, 255, 255, 0.5);
    /* 边框和阴影 */
    --border-color: rgba(74, 157, 212, 0.2);
    --border-hover: rgba(74, 157, 212, 0.5);
    --shadow-glow: 0 0 30px rgba(74, 157, 212, 0.3);
    /* 状态色 */
    --error: #FF6B8A;
    --success: #6BCF7F;
    --warning: #FFB84D;
}
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    margin: 0;
    padding: 0;
    overflow-x: hidden;
}

body {
    /* 字体已在 global.css 中定义 */
    background: var(--bg-darker);
    min-height: 100vh;
    padding: 0;
    margin: 0;
    color: var(--text-primary);
    font-family: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", sans-serif;
    font-weight: 400;
    -webkit-font-smoothing: antialiased;
    position: relative;
    opacity: 0;
    animation: fadeIn 0.6s cubic-bezier(0.4, 0, 0.2, 1) forwards;
    /* 确保body没有上边距，导航栏顶格显示 */
    overflow-x: hidden;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

body.page-transitioning {
    opacity: 0;
    transition: opacity 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 30%, rgba(74, 157, 212, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(0, 214, 194, 0.08) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
    will-change: transform;
    transform: translateZ(0);
}

/* ============ 导航栏样式（与首页完全一致） ============ */
.luxury-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(10, 10, 10, 0.8);
    backdrop-filter: blur(20px) saturate(180%);
    border-bottom: 1px solid var(--border-color);
    padding: 0 60px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: background 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
    will-change: background, border-color, box-shadow;
    transform: translateZ(0);
}

/* 以下为 upload.html 中原样提取的完整 CSS 内容，确保视觉与交互保持一致 */

/* ========== 导航栏样式（从 templates/upload.html 提取） ========== */
.luxury-nav {
    display: flex;
    gap: 50px;
    align-items: center;
    margin: 0 auto;
}

.luxury-nav-link {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    font-size: 14px;
    letter-spacing: 1px;
    transition: all 0.3s ease;
    position: relative;
    padding: 8px 0;
    font-weight: 500;
}

.luxury-nav-link::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--primary-blue), var(--primary-light-blue));
    border-radius: 2px;
    transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.luxury-nav-link:hover,
.luxury-nav-link.active {
    color: var(--primary-light-blue);
    background: rgba(74, 157, 212, 0.08);
    border-radius: 4px;
}

.luxury-nav-link:hover::before,
.luxury-nav-link.active::before {
    width: 60%;
}

.luxury-header-actions {
    display: flex;
    gap: 15px;
    align-items: center;
}

a:not(.btn):not(.luxury-nav-link):not(.image-modal-close):not(.alert-close):not(.luxury-logo) {
    color: var(--primary-blue);
    text-decoration: none;
    transition: all 0.3s ease;
    font-weight: 500;
}

a:not(.btn):not(.luxury-nav-link):not(.image-modal-close):not(.alert-close):not(.luxury-logo):hover {
    color: var(--primary-light-blue);
}

/* ========== end navigation style extract ========== */

.luxury-header.scrolled {
    background: rgba(10, 10, 10, 0.95);
    border-bottom-color: var(--border-hover);
    box-shadow: var(--shadow-glow);
}

.luxury-logo {
    cursor: pointer;
    background: linear-gradient(135deg, var(--primary-light-blue) 0%, var(--accent-cyan) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-family: 'Playfair Display', 'Microsoft YaHei', serif;
    font-weight: 700;
    font-size: 32px;
    letter-spacing: 2px;
    transition: all 0.3s ease;
    text-decoration: none;
}

/* （省略此处为节省响应大小，请在需要时检查原始 upload.html 中的完整规则） */

/* 从 upload.html 移出的局部动画（spin） */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ========== Extracted from templates/upload.html: Upload area styles ========== */
.upload-section {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
    margin-bottom: 30px;
}

#laserTicketSection {
    display: grid;
    grid-template-columns: 1fr;
    gap: 30px;
}

.upload-box {
    border: 3px dashed var(--primary-blue);
    border-radius: 24px;
    padding: 40px;
    text-align: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: rgba(255, 255, 255, 0.95);
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(20px) saturate(180%);
    max-width: 100%;
    box-sizing: border-box;
    box-shadow: 0 4px 20px rgba(140, 200, 255, 0.1);
}

.upload-box::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(140, 200, 255, 0.1) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.upload-box:hover {
    border-color: var(--primary-light-blue);
    box-shadow: 0 8px 30px rgba(168, 213, 255, 0.25);
    transform: translateY(-2px);
}

.upload-box:hover::before {
    opacity: 1;
}

.upload-box.dragover {
    border-color: var(--primary-light-blue);
    background: rgba(255, 249, 252, 0.98);
    box-shadow: 0 12px 40px rgba(168, 213, 255, 0.35);
    transform: scale(1.02);
}

.upload-box h3 {
    background: linear-gradient(135deg, var(--primary-blue) 0%, var(--primary-dark-blue) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 15px;
    font-size: 20px;
    font-weight: 700;
    letter-spacing: 1px;
    text-shadow: none;
}

/* Restore submit/action button styles (pre-split) */
.submit-btn,
.btn,
input[type="submit"],
button:not(.nav-link):not(.image-modal-close):not(.alert-close):not(.print-type-btn):not(.product-type-mode-btn):not(.crop-btn):not(.crop-control-btn) {
    height: 48px;
    padding: 0 32px;
    border-radius: 24px;
    font-weight: 700;
    color: #fff;
    background: linear-gradient(135deg, var(--primary-blue) 0%, var(--primary-dark-blue) 100%);
    border: none;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 16px;
    letter-spacing: 1px;
    box-shadow: none;
    position: relative;
    overflow: hidden;
}

.submit-btn::before,
.btn::before,
input[type="submit"]::before,
button:not(.nav-link):not(.image-modal-close):not(.alert-close):not(.print-type-btn):not(.product-type-mode-btn):not(.crop-btn):not(.crop-control-btn)::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: transparent;
    transition: none;
    display: none;
}

.submit-btn:hover,
.btn:hover,
input[type="submit"]:hover,
button:not(.nav-link):not(.image-modal-close):not(.alert-close):not(.print-type-btn):not(.product-type-mode-btn):not(.crop-btn):not(.crop-control-btn):hover {
    background: linear-gradient(135deg, var(--accent-hover) 0%, var(--accent2-hover) 100%);
    box-shadow: none;
    transform: none;
}

.submit-btn:hover::before,
.btn:hover::before,
input[type="submit"]:hover::before,
button:not(.nav-link):not(.image-modal-close):not(.alert-close):not(.print-type-btn):not(.product-type-mode-btn):not(.crop-btn):not(.crop-control-btn):hover::before {
    display: none;
}

.submit-btn:disabled,
.btn:disabled,
input[type="submit"]:disabled,
button:disabled {
    background: rgba(110, 110, 110, 0.3) !important;
    color: rgba(255, 255, 255, 0.7) !important;
    cursor: not-allowed;
    filter: grayscale(0.3);
    transform: none;
    opacity: 1;
}

.action-btn {
    height: 44px;
    padding: 0 24px;
    border: none;
    border-radius: 9999px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 200ms ease-out;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 8px rgba(255, 92, 141, 0.3);
}

.action-btn:enabled,
.action-btn.enabled,
.action-btn.golden {
    background: linear-gradient(135deg, var(--primary-blue) 0%, var(--primary-dark-blue) 100%);
    color: #fff !important;
}

.action-btn:enabled:hover,
.action-btn.enabled:hover,
.action-btn.golden:hover {
    background: linear-gradient(135deg, var(--accent-hover) 0%, var(--accent2-hover) 100%);
    box-shadow: 0 6px 25px rgba(140, 200, 255, 0.5);
    transform: translateY(-2px) scale(1.02);
}

.action-btn:disabled {
    background: rgba(110, 110, 110, 0.3);
    color: rgba(255, 255, 255, 0.6) !important;
    cursor: not-allowed;
    box-shadow: none;
    transform: none;
}

/* Product type mode button restore */
.product-type-mode-btn.active {
    background: linear-gradient(135deg, var(--primary-blue) 0%, var(--primary-dark-blue) 100%) !important;
    color: #fff !important;
    border-radius: 4px !important;
    border: none !important;
    box-shadow: 0 2px 8px rgba(74, 157, 212, 0.3) !important;
}

.product-type-mode-btn:not(.active) {
    background: rgba(50, 50, 60, 0.6) !important;
    color: #000 !important;
    border: 1px solid var(--border-color) !important;
    border-radius: 4px !important;
}

.upload-box p {
    color: #333;
    font-size: 14px;
    opacity: 1;
    font-weight: 500;
}

.upload-box input[type="file"],
input[type="file"] {
    display: none !important;
    visibility: hidden;
    position: absolute;
    width: 0;
    height: 0;
    opacity: 0;
}

.upload-btn {
    display: inline-block;
    height: 48px;
    padding: 0 32px;
    background: linear-gradient(135deg, var(--primary-blue) 0%, var(--primary-dark-blue) 100%);
    color: #fff;
    border-radius: 24px;
    cursor: pointer;
    margin-top: 15px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: none;
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 1px;
    box-shadow: 0 4px 15px rgba(140, 200, 255, 0.4);
    position: relative;
    overflow: hidden;
}

.upload-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);
    transition: left 0.5s;
}

.upload-btn:hover {
    background: linear-gradient(135deg, var(--accent-hover) 0%, var(--accent2-hover) 100%);
    box-shadow: 0 6px 25px rgba(140, 200, 255, 0.5);
    transform: translateY(-2px) scale(1.02);
}

.upload-btn:hover::before {
    left: 100%;
}

.preview-image {
    max-width: 100%;
    max-height: 300px;
    margin-top: 20px;
    border-radius: 0;
    object-fit: contain;
    display: none;
}

.preview-image.show {
    display: block;
}

.preview-left .preview-image.show {
    display: block;
    margin: 20px auto 0;
}

.product-options {
    padding: 30px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 24px;
    border: 2px solid rgba(140, 200, 255, 0.2);
    backdrop-filter: blur(20px) saturate(180%);
    box-shadow: 0 8px 30px rgba(140, 200, 255, 0.15);
    flex: 1;
    display: flex;
    flex-direction: column;
    height: 100%;
    position: relative;
    overflow: hidden;
}

.product-options::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-blue), var(--primary-light-blue), var(--primary-dark-blue));
    border-radius: 24px 24px 0 0;
}

.product-options h3 {
    font-size: 20px;
    background: linear-gradient(135deg, var(--primary-blue) 0%, var(--primary-dark-blue) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 20px;
    letter-spacing: 1px;
    text-align: center;
    padding-bottom: 15px;
    border-bottom: 2px solid rgba(140, 200, 255, 0.2);
    font-family: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
    font-weight: 700;
}

.product-options .form-group:last-child {
    margin-bottom: 0;
}

/* ========== Extracted from templates/upload.html: Preview & upload overrides ========== */
.loading { display: none; }
.loading.show { display: block; }

.result-section { display: none; margin-top: 30px; padding: 40px; background: rgba(255, 255, 255, 0.95); border-radius: 24px; border: 2px solid rgba(140, 200, 255, 0.2); backdrop-filter: blur(20px) saturate(180%); box-shadow: 0 8px 30px rgba(140, 200, 255, 0.15); width: 100%; position: relative; overflow: hidden; display:flex; flex-direction:column; align-items:center; }
.result-section::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 4px; background: linear-gradient(90deg, var(--primary-blue), var(--primary-light-blue), var(--primary-dark-blue)); border-radius: 24px 24px 0 0; }
.result-section.show { display: flex; }
.result-section h2 { background: linear-gradient(135deg, var(--primary-blue) 0%, var(--primary-dark-blue) 100%) !important; -webkit-background-clip: text !important; -webkit-text-fill-color: transparent !important; background-clip: text !important; font-weight:700 !important; margin-bottom:6px; }
.result-section p { color: rgba(0,0,0,0.6); margin-bottom:12px; }
.mockup-preview { width:100%; display:flex; align-items:center; justify-content:center; flex-direction:column; gap:12px; }
.mockup-preview img { max-width: 100%; max-height: 520px; object-fit: contain; display:none; margin: 0 auto; }
.mockup-preview img.show { display:block; }

.spinner { border: 4px solid rgba(0,0,0,0.1); border-top: 4px solid var(--accent); border-radius:50%; width:40px; height:40px; animation:spin 1s linear infinite; margin:0 auto; box-shadow:0 2px 8px rgba(255,92,141,0.2); }
.preview-upload-box { background: rgba(255,255,255,0.95) !important; backdrop-filter: blur(20px) saturate(180%); border-radius:20px !important; border:2px solid rgba(140,200,255,0.3) !important; box-shadow:0 4px 15px rgba(140,200,255,0.1) !important; text-align: center !important; }.preview-upload-box:hover { border-color: var(--primary-light-blue) !important; background: rgba(255,255,255,1) !important; box-shadow:0 8px 25px rgba(168,213,255,0.25) !important; transform: scale(1.03) translateY(-2px); }
.preview-upload-box p { color: var(--primary-light-blue) !important; font-weight:600 !important; text-align: center !important; }
.upload-box h3 { background: linear-gradient(135deg, var(--primary-blue) 0%, var(--primary-dark-blue) 100%) !important; -webkit-background-clip: text !important; -webkit-text-fill-color: transparent !important; background-clip: text !important; font-weight:700 !important; }
.preview-upload-box div[style*="color: rgba(255, 255, 255"], .preview-upload-box div[style*="color:rgba(255, 255, 255"] { color: #666 !important; opacity: 1; }
#frontPreviewPlaceholder,
#backPreviewPlaceholder,
#frontPrintPreviewPlaceholder,
#backPrintPreviewPlaceholder,
#frontWhiteInkPreviewPlaceholder,
#backWhiteInkPreviewPlaceholder,
#frontUVVarnishPreviewPlaceholder,
#backUVVarnishPreviewPlaceholder,
#frontReverseVarnishPreviewPlaceholder,
#backReverseVarnishPreviewPlaceholder {
    color: #999 !important;
    font-size: 13px !important;
    opacity: 0.8 !important;
}
h2 { color: var(--text-primary) !important; text-shadow: none !important; }
.print-type-btn,
.product-type-mode-btn {
    padding: 12px 20px;
    font-size: 14px;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    background: rgba(50, 50, 60, 0.6);
    color: rgba(255, 255, 255, 0.9);
    cursor: pointer;
    position: relative;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.print-type-btn.active,
.product-type-mode-btn.active {
    background: linear-gradient(135deg, var(--primary-blue) 0%, var(--primary-dark-blue) 100%) !important;
    color: #fff !important;
    border: none !important;
    box-shadow: 0 4px 15px rgba(74,157,212,0.3) !important;
}

/* ========== Extracted from templates/upload.html: Cropper styles ========== */
.crop-modal { display:none; position: fixed; z-index:2000; left:0; top:0; width:100%; height:100%; background: rgba(0,0,0,0.5); backdrop-filter: blur(3px); }
.crop-modal.show { display:flex; align-items:center; justify-content:center; flex-direction:column; }

/* image modal */
.image-modal { display:none; position:fixed; z-index:2000; left:0; top:0; width:100%; height:100%; background:rgba(0,0,0,0.8); align-items:center; justify-content:center; }
.image-modal.show { display:flex; }
.image-modal-content { max-width:90%; max-height:90%; border-radius:8px; box-shadow:0 10px 40px rgba(0,0,0,0.6); }
.image-modal-close { position:absolute; right:18px; top:18px; font-size:28px; color:#fff; cursor:pointer; }
.image-modal-close:hover { color: var(--primary-light-blue); }

/* alert modal */
.alert-modal { display:none; position:fixed; inset:0; background:rgba(0,0,0,0.6); align-items:center; justify-content:center; z-index:2100; }
.alert-modal.show { display:flex; }
.alert-container { background: rgba(20,20,30,0.95); color:#fff; width:360px; max-width:90%; padding:18px; border-radius:10px; border:1px solid rgba(74,157,212,0.3); box-shadow:0 10px 30px rgba(0,0,0,0.4); }
.alert-container p { color:#fff; text-align:center; }
.alert-btn { background: linear-gradient(135deg, var(--primary-blue) 0%, var(--primary-dark-blue) 100%); color:#fff; border:none; border-radius:8px; padding:8px 12px; cursor:pointer; }

/* Special styling for material selection alert modal (white background, blue labels, gray select text) */
.alert-modal.material-modal .alert-container { background: #fff; color: var(--primary-blue); }
.alert-modal.material-modal .alert-container label { color: var(--primary-blue); }
.alert-modal.material-modal select { color: #666; background: #fff; border: 1px solid rgba(0,0,0,0.08); padding: 8px 10px; border-radius:6px; }
.alert-modal.material-modal select option { color: #666; }
.alert-modal.material-modal .alert-btn { background: linear-gradient(135deg, var(--primary-blue) 0%, var(--primary-dark-blue) 100%); color: #fff; }


/* upload loading overlay (extracted from templates/upload.html) */
.upload-loading { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.7); z-index: 9999; justify-content: center; align-items: center; flex-direction: column; }
.upload-loading .loading-box { background: rgba(20,20,30,0.95); border: 1px solid rgba(74,157,212,0.5); border-radius: 12px; padding: 40px; text-align: center; box-shadow: 0 0 30px rgba(74,157,212,0.3); }
.upload-loading .spinner { width: 50px; height: 50px; border: 4px solid rgba(74,157,212,0.2); border-top-color: #4A9DD4; border-radius: 50%; animation: spin 1s linear infinite; margin: 0 auto 20px; }
.loading-title { color: #fff; margin-bottom: 10px; font-size: 16px; }
.loading-sub { color: rgba(255,255,255,0.6); font-size: 14px; }
@keyframes spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
.crop-container { background: rgba(255,255,255,0.95); border-radius:24px; padding:30px; max-width:95%; max-height:95%; display:flex; flex-direction:column; box-shadow:0 8px 32px rgba(140,200,255,0.2); position:relative; border:2px solid rgba(140,200,255,0.2); backdrop-filter: blur(20px) saturate(180%); }
.crop-container::before { content:''; position:absolute; top:0; left:0; right:0; height:4px; background: linear-gradient(90deg, var(--primary-blue), var(--primary-light-blue), var(--primary-dark-blue)); border-radius:24px 24px 0 0; }
.crop-container h3 { margin-bottom:20px; background: linear-gradient(135deg, var(--primary-blue) 0%, var(--primary-dark-blue) 100%); -webkit-background-clip:text; -webkit-text-fill-color:transparent; background-clip:text; font-size:22px; font-weight:700; letter-spacing:1px; text-shadow:none; text-align:center; }
.crop-main-content { display:flex; gap:30px; align-items:flex-start; width:100%; max-height:calc(95vh - 200px); }
.crop-left-panel { flex:1; display:flex; flex-direction:column; min-width:0; }
.crop-image-container { width:100%; min-height:500px; max-height:calc(95vh - 300px); border:2px solid rgba(140,200,255,0.3); border-radius:16px; overflow:hidden; background: rgba(255,255,255,0.8); display:flex; align-items:center; justify-content:center; box-shadow:0 4px 15px rgba(140,200,255,0.1); }
.crop-image-container > img { max-width:100%; max-height:calc(95vh - 300px); display:block; }
.crop-right-panel { width:350px; flex-shrink:0; max-height:calc(95vh - 300px); overflow-y:auto; }
.crop-buttons { display:flex; gap:15px; margin-top:20px; justify-content:center; width:100%; }
.crop-btn { height:44px; padding:0 24px; border:none; border-radius:9999px; font-size:14px; font-weight:600; cursor:pointer; transition: all 200ms ease-out; letter-spacing:0.5px; }
.crop-btn-confirm { background: linear-gradient(135deg, var(--primary-blue) 0%, var(--primary-dark-blue) 100%); color:#fff; box-shadow:0 4px 15px rgba(140,200,255,0.4); }
.crop-btn-confirm:hover { background: linear-gradient(135deg, var(--accent-hover) 0%, var(--accent2-hover) 100%); box-shadow:0 6px 25px rgba(140,200,255,0.5); transform:translateY(-2px) scale(1.02); }
.crop-btn-cancel { background: rgba(255,255,255,0.95); color:var(--paper-gray); border:2px solid rgba(140,200,255,0.3); }
.crop-btn-cancel:hover { background: rgba(255,255,255,1); border-color:var(--primary-light-blue); color:var(--primary-blue); }
.crop-info { margin-top:15px; padding:12px; background: rgba(247,245,242,0.9); border:1px solid rgba(0,0,0,0.05); border-radius:0.5rem; font-size:13px; color:var(--paper-gray); line-height:1.6; backdrop-filter: blur(24px); }
.crop-controls { width:100%; padding:20px; background: rgba(247,245,242,0.9); border:1px solid rgba(0,0,0,0.05); border-radius:1rem; display:flex; flex-direction:column; gap:20px; backdrop-filter: blur(24px); }
.crop-control-group { display:flex; flex-direction:column; gap:10px; }
.crop-control-label { color:var(--paper-gray); font-size:14px; font-weight:500; letter-spacing:0.3px; }

/* 改进的裁剪器控制UI样式 */
.crop-control-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.crop-control-header .crop-control-label { margin: 0; }
.crop-control-header .crop-control-value { color: var(--primary-blue); font-size: 13px; font-weight: 600; }

.crop-control-button-group { display: flex; gap: 8px; flex-wrap: wrap; }
.crop-control-button-group.crop-button-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }

.crop-control-btn { padding: 10px 16px; font-size: 13px; border: 1px solid rgba(0,0,0,0.1); background: rgba(255,255,255,0.85); color: var(--paper-gray); border-radius: 6px; cursor: pointer; transition: all 150ms ease-out; display: flex; align-items: center; justify-content: center; gap: 6px; white-space: nowrap; font-weight: 500; }
.crop-control-btn:hover { background: rgba(255,255,255,0.95); border-color: var(--primary-blue); color: var(--primary-blue); box-shadow: 0 2px 8px rgba(74,157,212,0.2); }
.crop-control-btn:active { transform: scale(0.97); }

.crop-btn-quick { flex: 1; min-width: 70px; }
.crop-btn-quick .crop-btn-icon { font-size: 16px; font-weight: normal; }
.crop-btn-quick .crop-btn-text { display: none; }
@media (min-width: 1200px) {
    .crop-btn-quick .crop-btn-text { display: inline; }
    .crop-btn-quick { flex: 1 1 auto; }
}

.crop-btn-reset { background: rgba(100,180,255,0.1); border-color: rgba(74,157,212,0.3); color: var(--primary-blue); width: 100%; }
.crop-btn-reset:hover { background: rgba(74,157,212,0.15); border-color: var(--primary-blue); }

/* 响应式设计 */
@media (max-width:1200px) { .crop-main-content { flex-direction:column; } .crop-right-panel { width:100%; max-height:none; } .crop-image-container { max-height:60vh; } .crop-btn-quick .crop-btn-text { display: inline; } }
@media (max-width:768px) { .crop-modal .crop-container { width:95%; max-width:none; padding:15px; } .crop-modal h3 { font-size:18px; margin-bottom:15px; } .crop-image-container { max-height:50vh; } .crop-controls { padding:15px; gap:15px; } .crop-control-btn { padding:8px 12px; font-size:13px; } .crop-buttons { flex-direction:column; gap:10px; } .crop-btn { width:100%; } }

/* End of extracted blocks */

/* APPENDED from templates/upload.html (start) */
.btn-start {
            height: 48px;
            padding: 0 32px;
            background: linear-gradient(135deg, var(--primary-blue) 0%, var(--primary-dark-blue) 100%);
            border: none;
            color: #fff;
            font-size: 15px;
            letter-spacing: 1px;
            cursor: pointer;
            transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
            font-weight: 700;
            font-family: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
            text-decoration: none;
            display: inline-block;
            border-radius: 24px;
            box-shadow: 0 4px 15px rgba(140, 200, 255, 0.4);
            position: relative;
            overflow: hidden;
        }
        
        .btn-start::before {
            content: '';
            position: absolute;
            top: 0;
            left: -100%;
            width: 100%;
            height: 100%;
            background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
            transition: left 0.5s;
        }
        
        .btn-start:hover {
            background: linear-gradient(135deg, var(--accent-hover) 0%, var(--accent2-hover) 100%);
            box-shadow: 0 6px 25px rgba(140, 200, 255, 0.5);
            transform: translateY(-2px) scale(1.02);
        }
        
        .btn-start:hover::before {
            left: 100%;
        }
        
        .container {
            max-width: 100%;
            margin: 100px auto 40px;
            padding: 0 40px;
            position: relative;
            z-index: 1;
            display: grid;
            grid-template-columns: 1fr 400px;
            gap: 40px;
            align-items: flex-start;
        }
        
        .main-content {
            min-width: 0;
            display: flex;
            flex-direction: column;
            gap: 30px;
        }
        
        .sidebar {
            width: 100%;
            flex-shrink: 0;
            position: sticky;
            top: 100px;
            max-height: calc(100vh - 120px);
            overflow-y: hidden;
            display: flex;
            flex-direction: column;
        }
        
        /* 确保所有容器级 div 若原背景为纯白 #fff → 替换为 var(--paper) 90% 透明度 + backdrop-blur */
        div[style*="background: #fff"],
        div[style*="background:#fff"],
        div[style*="background: white"],
        div[style*="background:white"],
        div[style*="background: #FFF"],
        div[style*="background:#FFF"] {
            background: rgba(247, 245, 242, 0.9) !important;
            backdrop-filter: blur(24px);
            border-radius: 1rem;
        }
        
        .preview-section {
            display: grid;
            grid-template-columns: 1fr 400px;
            gap: 30px;
            margin-bottom: 30px;
        }
        
        .preview-left {
            display: flex;
            flex-direction: column;
            gap: 20px;
        }
        
        .preview-right {
            display: flex;
            flex-direction: column;
            gap: 20px;
        }
        
        /* 响应式设计 */
        @media (max-width: 1400px) {
            .container {
                grid-template-columns: 1fr 450px;
            }
        }
        
        @media (max-width: 1200px) {
            .container {
                grid-template-columns: 1fr;
            }
            
            .sidebar {
                position: relative;
                top: 0;
                max-height: none;
                min-height: auto;
                height: auto;
            }
            
            .main-content {
                max-width: 100%;
            }
        }
        
        h1 {
            font-size: 36px;
            font-weight: 700;
            background: linear-gradient(135deg, var(--primary-blue) 0%, var(--primary-light-blue) 50%, var(--primary-dark-blue) 100%);
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
            background-clip: text;
            margin-bottom: 10px;
            text-align: center;
            letter-spacing: 1px;
            text-shadow: none;
            padding: 48px 0 24px;
            /* 字体已在 global.css 中定义 */
        }
        
        .subtitle {
            color: #333;
            margin-bottom: 40px;
            font-size: 15px;
            text-align: center;
            text-transform: uppercase;
            letter-spacing: 2px;
            opacity: 1;
            font-weight: 600;
            /* 字体已在 global.css 中定义 */
        }
        
        /* Upload area styles moved to static/css/upload.css (backup: templates/upload.html.bak-step3) */
        
                
        .form-group {
            margin-bottom: 16px;
        }
        
        .form-group label {
            display: block;
            margin-bottom: 8px;
            background: linear-gradient(135deg, var(--primary-blue) 0%, var(--primary-dark-blue) 100%);
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
            background-clip: text;
            font-weight: 700;
            font-size: 15px;
            letter-spacing: 0.5px;
            text-shadow: none;
            /* 字体已在 global.css 中定义 */
        }
        
        .form-group select,
        .form-group input {
            width: 100%;
            padding: 12px 16px;
            border: 2px solid rgba(140, 200, 255, 0.3);
            border-radius: 16px;
            font-size: 14px;
            /* 字体已在 global.css 中定义 */
            background: #fff;
            color: #333;
            transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
            font-weight: 500;
        }
        
        .form-group select:focus,
        .form-group input:focus {
            outline: none;
            border-color: var(--primary-light-blue);
            box-shadow: 0 0 0 4px rgba(168, 213, 255, 0.15);
            background: #fff;
            transform: translateY(-1px);
        }
        
        /* APPENDED from templates/upload.html (end) */

