/* ============================================
   纯白极简商城管理系统 - 全局样式
   强制浅色模式，手机端锁定缩放
   ============================================ */

/* 重置与基础 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
}

html {
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
    font-size: 16px;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC',
                 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
    background: #ffffff !important;
    color: #1a1a1a !important;
    min-height: 100vh;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    line-height: 1.5;
}

/* 强制浅色模式 - 覆盖深色模式 */
:root {
    color-scheme: light only;
    --bg-primary: #ffffff;
    --bg-secondary: #fafafa;
    --bg-tertiary: #f5f5f5;
    --text-primary: #1a1a1a;
    --text-secondary: #666666;
    --text-tertiary: #999999;
    --border-color: #f0f0f0;
    --border-light: #f5f5f5;
    --accent: #1a1a1a;
    --price-red: #e53935;
    --title-green: #43a047;
    --shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
    --shadow-lg: 0 4px 24px rgba(0, 0, 0, 0.08);
    --radius: 12px;
    --radius-sm: 8px;
}

/* 深色模式强制覆盖 */
@media (prefers-color-scheme: dark) {
    html, body {
        background: #ffffff !important;
        color: #1a1a1a !important;
    }
    * {
        color-scheme: light only !important;
    }
}

/* 通用工具类 */
.container {
    max-width: 480px;
    margin: 0 auto;
    padding: 0 16px;
}

.text-center { text-align: center; }
.text-right { text-align: right; }
.flex { display: flex; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.flex-1 { flex: 1; }
.hidden { display: none !important; }

/* 按钮 */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 44px;
    padding: 0 20px;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    transition: opacity 0.15s;
    outline: none;
    -webkit-appearance: none;
}
.btn:active { opacity: 0.8; }
.btn-primary { background: #1a1a1a; color: #fff; }
.btn-outline { background: #fff; color: #1a1a1a; border: 1px solid #e0e0e0; }
.btn-danger { background: #e53935; color: #fff; }
.btn-block { width: 100%; }
.btn-lg { height: 50px; font-size: 15px; }

/* 表单 */
.form-group { margin-bottom: 16px; }
.form-label {
    display: block;
    font-size: 13px;
    color: #333;
    margin-bottom: 6px;
    font-weight: 500;
}
.form-input, .form-textarea, .form-select {
    width: 100%;
    min-height: 44px;
    padding: 10px 14px;
    border: 1px solid #e8e8e8;
    border-radius: var(--radius-sm);
    font-size: 14px;
    color: #1a1a1a;
    background: #fafafa;
    outline: none;
    transition: border-color 0.2s;
    -webkit-appearance: none;
    font-family: inherit;
}
.form-input:focus, .form-textarea:focus, .form-select:focus {
    border-color: #1a1a1a;
    background: #fff;
}
.form-textarea { min-height: 100px; resize: vertical; }

/* 卡片 */
.card {
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 16px;
    margin-bottom: 12px;
}

/* ============================================
   顶部导航栏
   ============================================ */
.topbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 52px;
    background: #ffffff;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 12px;
    z-index: 100;
    padding-top: env(safe-area-inset-top);
}
.topbar-btn {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    background: transparent;
    cursor: pointer;
    border-radius: 8px;
    padding: 0;
}
.topbar-btn:active { background: #f5f5f5; }
.topbar-title {
    font-size: 16px;
    font-weight: 600;
    color: #1a1a1a;
    flex: 1;
    text-align: center;
}

.topbar-right {
    display: flex;
    align-items: center;
}

/* 头像下拉菜单 */
.avatar-wrapper { position: relative; }
.avatar-img {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid #eee;
    cursor: pointer;
}
.avatar-dropdown {
    position: absolute;
    top: 46px;
    right: 0;
    width: 160px;
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    z-index: 200;
    display: none;
}
.avatar-dropdown.show { display: block; }
.avatar-dropdown-item {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    font-size: 14px;
    color: #1a1a1a;
    text-decoration: none;
    cursor: pointer;
    border-bottom: 1px solid var(--border-light);
    gap: 10px;
}
.avatar-dropdown-item:last-child { border-bottom: none; }
.avatar-dropdown-item:active { background: #fafafa; }
.avatar-dropdown-item.logout { color: #e53935; }

/* ============================================
   侧边栏菜单 (三条杠)
   ============================================ */
.sidebar-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.4);
    z-index: 150;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s;
}
.sidebar-overlay.show { opacity: 1; visibility: visible; }

.sidebar {
    position: fixed;
    top: 0;
    left: -280px;
    width: 280px;
    height: 100%;
    background: #ffffff;
    z-index: 160;
    transition: left 0.3s ease;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}
.sidebar.show { left: 0; }

/* 侧边栏头部 - 头像框 + 背景轮播 */
.sidebar-header {
    position: relative;
    height: 160px;
    overflow: hidden;
    flex-shrink: 0;
}
.sidebar-bg-slider {
    position: absolute;
    top: 0; left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    transition: transform 0.6s ease;
}
.sidebar-bg-slide {
    min-width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    filter: blur(0px);
}
.sidebar-bg-default {
    background: linear-gradient(135deg, #f5f5f5 0%, #e8e8e8 50%, #f0f0f0 100%);
    filter: blur(0px);
}
.sidebar-header-content {
    position: relative;
    z-index: 2;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding-top: 20px;
}
.sidebar-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: 3px solid #fff;
    object-fit: cover;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}
.sidebar-username {
    margin-top: 8px;
    font-size: 15px;
    font-weight: 600;
    color: #1a1a1a;
    text-shadow: 0 1px 2px rgba(255,255,255,0.8);
}

/* 侧边栏菜单按钮 */
.sidebar-menu {
    flex: 1;
    padding: 12px 0;
    display: flex;
    flex-direction: column;
}
.sidebar-menu-item {
    display: flex;
    align-items: center;
    padding: 14px 20px;
    font-size: 14px;
    color: #1a1a1a;
    text-decoration: none;
    cursor: pointer;
    gap: 12px;
    border-left: 3px solid transparent;
    transition: background 0.15s;
}
.sidebar-menu-item:active,
.sidebar-menu-item.active {
    background: #fafafa;
    border-left-color: transparent;
}
.sidebar-menu-item .icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

/* 商品列表 box 下拉 */
.product-box {
    background: #fafafa;
    margin: 0 12px 8px;
    border-radius: var(--radius-sm);
    overflow: hidden;
    border: 1px solid var(--border-color);
}
.product-box-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 14px;
    cursor: pointer;
    background: #fff;
}
.product-box-title {
    font-size: 14px;
    font-weight: 500;
    color: #1a1a1a;
}
.product-box-toggle {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s;
}
.product-box-toggle.expanded { transform: rotate(180deg); }
.product-box-body {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    padding: 0 8px;
}
.product-box-body.open { max-height: 500px; padding: 0 8px 8px; }
.product-box-btn {
    display: flex;
    align-items: center;
    width: 100%;
    padding: 12px 14px;
    border: none;
    background: #f5f5f5;
    color: #1a1a1a;
    font-size: 13px;
    cursor: pointer;
    text-align: left;
    gap: 8px;
    border-bottom: none;
    border-radius: 10px;
    margin-top: 6px;
}
.product-box-btn:last-child { border-bottom: none; }
.product-box-btn:active { background: #eee; }

/* ============================================
   主内容区
   ============================================ */
.main-content {
    padding-top: 52px;
    padding-bottom: 20px;
    min-height: 100vh;
    background: #fff;
}
.page-content { padding: 16px; }

/* 页面标题 */
.page-title {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 4px;
    color: #1a1a1a;
}
.page-subtitle {
    font-size: 13px;
    color: #999;
    margin-bottom: 20px;
}

/* ============================================
   商品卡片（前台展示）
   ============================================ */
.product-card {
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    overflow: hidden;
    margin-bottom: 12px;
}
.product-card-img {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    border-radius: 0;
}
.product-card-body { padding: 12px; }
.product-card-name {
    font-size: 14px;
    color: #333;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 6px;
}
.product-card-price {
    font-size: 18px;
    font-weight: 700;
    color: var(--price-red);
}
.product-card-price .currency { font-size: 13px; }

/* ============================================
   商品详情页
   ============================================ */
.detail-images {
    width: 100%;
    aspect-ratio: 1;
    overflow: hidden;
    position: relative;
}
.detail-images img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 0;
}
.detail-info { padding: 16px; }
.detail-price-row {
    display: flex;
    align-items: baseline;
    gap: 8px;
    margin-bottom: 10px;
}
.detail-price {
    font-size: 26px;
    font-weight: 700;
    color: var(--price-red);
}
.detail-price .currency { font-size: 16px; }

/* 大标题（绿色 + logo） */
.detail-big-title {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 16px;
    font-weight: 600;
    color: var(--title-green);
    margin-bottom: 8px;
}
.detail-big-title img {
    width: 20px;
    height: 20px;
    border-radius: 4px;
    object-fit: cover;
}

/* 小标题三种字体 */
.detail-sub-titles {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 10px;
}
.sub-special {
    font-size: 12px;
    font-weight: 700;
    color: #fff;
    background: linear-gradient(135deg, #ff6b35, #e53935);
    padding: 2px 8px;
    border-radius: 4px;
    font-style: italic;
    letter-spacing: 0.5px;
}
.sub-flagship {
    font-size: 12px;
    font-weight: 600;
    color: #1a1a1a;
    background: #f5f5f5;
    padding: 2px 8px;
    border-radius: 4px;
    border: 1px solid #e0e0e0;
}
.sub-product-name {
    font-size: 15px;
    font-weight: 600;
    color: #1a1a1a;
    line-height: 1.4;
}

.detail-desc {
    font-size: 13px;
    color: #666;
    line-height: 1.7;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--border-color);
    white-space: pre-wrap;
}

/* 底部操作栏 */
.bottom-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 56px;
    background: #fff;
    border-top: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    padding: 0 12px;
    gap: 8px;
    z-index: 100;
    padding-bottom: env(safe-area-inset-bottom);
}
.bottom-bar-icon {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    cursor: pointer;
    text-decoration: none;
    color: #666;
    font-size: 10px;
    gap: 2px;
}
.bottom-bar-icon svg { width: 22px; height: 22px; }
.bottom-bar-icon.active { color: #e53935; }
.btn-buy {
    flex: 1;
    height: 42px;
    background: linear-gradient(135deg, #ff6b35, #e53935);
    color: #fff;
    border: none;
    border-radius: 21px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
}

/* ============================================
   弹窗
   ============================================ */
.modal-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 300;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.modal-overlay.show { display: flex; }
.modal-box {
    width: 100%;
    max-width: 340px;
    background: #fff;
    border-radius: 16px;
    padding: 24px 20px;
    text-align: center;
}
.modal-title {
    font-size: 17px;
    font-weight: 600;
    margin-bottom: 10px;
    color: #1a1a1a;
}
.modal-text {
    font-size: 14px;
    color: #666;
    line-height: 1.6;
    margin-bottom: 20px;
}
.modal-actions {
    display: flex;
    gap: 10px;
}
.modal-actions .btn { flex: 1; }

/* 数量选择器 */
.quantity-selector {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin: 16px 0;
}
.qty-btn {
    width: 36px;
    height: 36px;
    border: 1px solid #e0e0e0;
    background: #fafafa;
    border-radius: 8px;
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #1a1a1a;
}
.qty-btn:active { background: #eee; }
.qty-value {
    font-size: 20px;
    font-weight: 600;
    min-width: 40px;
    text-align: center;
    color: #1a1a1a;
}
.total-amount {
    font-size: 15px;
    color: #666;
    margin-bottom: 16px;
}
.total-amount strong {
    color: var(--price-red);
    font-size: 20px;
    font-weight: 700;
}

/* ============================================
   登录页
   ============================================ */
.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: #fff;
}
.login-box {
    width: 100%;
    max-width: 360px;
}
.login-logo {
    width: 64px;
    height: 64px;
    background: #1a1a1a;
    border-radius: 16px;
    margin: 0 auto 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 24px;
    font-weight: 700;
}
.login-title {
    font-size: 22px;
    font-weight: 600;
    text-align: center;
    margin-bottom: 6px;
}
.login-sub {
    font-size: 13px;
    color: #999;
    text-align: center;
    margin-bottom: 32px;
}

/* ============================================
   空状态
   ============================================ */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #999;
}
.empty-state-icon {
    font-size: 48px;
    margin-bottom: 12px;
    opacity: 0.5;
}
.empty-state-text { font-size: 14px; }

/* ============================================
   Toast 提示
   ============================================ */
.toast {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.8);
    color: #fff;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 14px;
    z-index: 999;
    opacity: 0;
    transition: opacity 0.3s;
    pointer-events: none;
    max-width: 80%;
    text-align: center;
}
.toast.show { opacity: 1; }

/* 图片上传预览 */
.upload-area {
    border: 2px dashed #e0e0e0;
    border-radius: var(--radius-sm);
    padding: 24px;
    text-align: center;
    cursor: pointer;
    background: #fafafa;
    transition: border-color 0.2s;
}
.upload-area:active { border-color: #1a1a1a; }
.upload-area-text { font-size: 13px; color: #999; margin-top: 8px; }
.upload-preview {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}
.upload-preview-item {
    position: relative;
    width: 72px;
    height: 72px;
    border-radius: 8px;
    overflow: hidden;
}
.upload-preview-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px;
}
.upload-preview-remove {
    position: absolute;
    top: 2px;
    right: 2px;
    width: 20px;
    height: 20px;
    background: rgba(0,0,0,0.6);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    cursor: pointer;
}

/* 商品管理列表 */
.admin-product-item {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    padding: 12px;
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    margin-bottom: 10px;
    align-items: center;
}
.admin-product-thumb {
    width: 72px;
    height: 72px;
    border-radius: 8px;
    object-fit: cover;
    flex-shrink: 0;
}
.admin-product-info { flex: 1; min-width: 120px; }
.admin-product-name {
    font-size: 14px;
    font-weight: 500;
    color: #1a1a1a;
    margin-bottom: 4px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.admin-product-price {
    font-size: 16px;
    font-weight: 700;
    color: var(--price-red);
}
.admin-product-actions {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: flex-start;
    align-items: center;
    padding: 10px 0;
}
.admin-product-actions button {
    padding: 8px 18px;
    font-size: 13px;
    border: 1px solid #e0e0e0;
    background: #fff;
    border-radius: 8px;
    cursor: pointer;
    color: #666;
    font-weight: 600;
    white-space: nowrap;
}
.admin-product-actions button.del { color: #e53935; border-color: #ffd6d6; }

/* 背景管理 */
.bg-manage-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    margin-bottom: 8px;
}
.bg-manage-thumb {
    width: 60px;
    height: 40px;
    border-radius: 6px;
    object-fit: cover;
}

/* Switch 开关 */
.switch {
    position: relative;
    display: inline-block;
    width: 46px;
    height: 26px;
    flex-shrink: 0;
}
.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}
.switch .slider {
    position: absolute;
    cursor: pointer;
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: #e0e0e0;
    transition: 0.3s;
    border-radius: 26px;
}
.switch .slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 3px;
    bottom: 3px;
    background-color: #fff;
    transition: 0.3s;
    border-radius: 50%;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}
.switch input:checked + .slider {
    background-color: #9c27b0;
}
.switch input:checked + .slider:before {
    transform: translateX(20px);
}

/* AI 关键词标签 */
.ai-tag {
    display: inline-block;
    padding: 3px 10px;
    background: #f3e5f5;
    color: #7b1fa2;
    border-radius: 12px;
    font-size: 12px;
    cursor: pointer;
    transition: background 0.15s;
}
.ai-tag:active {
    background: #e1bee7;
}

/* AI 生成动画 */
@keyframes aiPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}
.ai-loading {
    animation: aiPulse 0.8s ease-in-out infinite;
}

/* ============================================
   液态玻璃全局覆盖
   ============================================ */
body {
    background: linear-gradient(180deg, #e2e6f0 0%, #dde1ec 50%, #d8dce8 100%) !important;
    position: relative;
}
body::before {
    content: '';
    position: fixed; inset: 0;
    background:
        radial-gradient(ellipse at 20% 10%, rgba(140,170,255,.2), transparent 50%),
        radial-gradient(ellipse at 80% 60%, rgba(180,150,255,.16), transparent 50%);
    pointer-events: none;
    z-index: 0;
}
.main-content, .page-content, .container {
    position: relative;
    z-index: 1;
}

/* 顶部栏玻璃化 */
.topbar {
    background: rgba(255,255,255,0.18) !important;
    backdrop-filter: blur(12px) saturate(140%) !important;
    -webkit-backdrop-filter: blur(12px) saturate(140%) !important;
    border-bottom: 1px solid rgba(255,255,255,0.25) !important;
    box-shadow: 0 2px 12px rgba(80,100,160,0.04) !important;
}

/* 卡片玻璃化 */
.card, .stat-card, .product-card, .order-card, .form-card, .settings-card {
    background: rgba(255,255,255,.28) !important;
    backdrop-filter: blur(6px) !important;
    -webkit-backdrop-filter: blur(6px) !important;
    border: 1px solid rgba(255,255,255,.38) !important;
    border-radius: 18px !important;
    box-shadow: 0 4px 16px rgba(80,100,160,0.05), inset 0 1px 0 rgba(255,255,255,0.4) !important;
}

/* 按钮玻璃化 */
.btn, .btn-primary, .btn-success, .btn-danger, .btn-secondary {
    background: linear-gradient(180deg, rgba(255,255,255,0.32), rgba(255,255,255,0.15)) !important;
    backdrop-filter: blur(8px) saturate(130%) !important;
    -webkit-backdrop-filter: blur(8px) saturate(130%) !important;
    border: 1px solid rgba(255,255,255,0.4) !important;
    color: #1a1a2e !important;
    border-radius: 14px !important;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.5), 0 2px 8px rgba(80,100,160,0.05) !important;
}
.btn-primary {
    background: linear-gradient(180deg, rgba(74,125,255,0.75), rgba(74,125,255,0.55)) !important;
    color: #fff !important;
    border-color: rgba(74,125,255,0.4) !important;
}
.btn-danger {
    background: linear-gradient(180deg, rgba(229,57,53,0.75), rgba(229,57,53,0.55)) !important;
    color: #fff !important;
    border-color: rgba(229,57,53,0.4) !important;
}

/* 输入框玻璃化 */
.form-input, input[type="text"], input[type="password"], input[type="number"], input[type="email"], textarea, select {
    background: rgba(255,255,255,0.25) !important;
    backdrop-filter: blur(6px) !important;
    -webkit-backdrop-filter: blur(6px) !important;
    border: 1px solid rgba(255,255,255,0.35) !important;
    border-radius: 12px !important;
    color: #1a1a2e !important;
}
.form-input:focus, input:focus, textarea:focus, select:focus {
    border-color: rgba(74,125,255,0.45) !important;
    background: rgba(255,255,255,0.4) !important;
    outline: none !important;
    box-shadow: 0 0 0 3px rgba(74,125,255,0.1) !important;
}

/* 侧边栏玻璃化 */
.sidebar {
    background: rgba(255,255,255,0.22) !important;
    backdrop-filter: blur(16px) saturate(140%) !important;
    -webkit-backdrop-filter: blur(16px) saturate(140%) !important;
    border-right: 1px solid rgba(255,255,255,0.3) !important;
}
.sidebar-menu-item {
    background: transparent !important;
    color: #1a1a2e !important;
    border-radius: 12px !important;
    border-left: none !important;
    margin: 2px 8px !important;
    padding: 12px 16px !important;
}
.sidebar-menu-item:hover, .sidebar-menu-item.active {
    background: rgba(255,255,255,0.45) !important;
    border-left: none !important;
}

/* 表格玻璃化 */
table {
    background: rgba(255,255,255,0.2) !important;
    border-radius: 14px !important;
    overflow: hidden;
}
th {
    background: rgba(255,255,255,0.3) !important;
    color: #1a1a2e !important;
}
td {
    border-bottom: 1px solid rgba(255,255,255,0.2) !important;
    color: #333 !important;
}

/* 商品列表box玻璃化 */
.product-box, .product-box-header {
    background: rgba(255,255,255,0.28) !important;
    backdrop-filter: blur(6px) !important;
    border: 1px solid rgba(255,255,255,0.38) !important;
    border-radius: 14px !important;
}
.product-box-btn {
    background: rgba(255,255,255,0.35) !important;
    border: 1px solid rgba(255,255,255,0.3) !important;
    border-radius: 10px !important;
    color: #1a1a2e !important;
}

/* 弹窗玻璃化 */
.modal-box, .modal-overlay .modal-box {
    background: rgba(255,255,255,0.85) !important;
    backdrop-filter: blur(20px) !important;
    -webkit-backdrop-filter: blur(20px) !important;
    border: 1px solid rgba(255,255,255,0.5) !important;
    border-radius: 20px !important;
}

/* 标签页玻璃化 */
.tab-bar-glass, .tabs {
    background: rgba(255,255,255,0.28) !important;
    backdrop-filter: blur(6px) !important;
    border: 1px solid rgba(255,255,255,0.38) !important;
    border-radius: 14px !important;
}
.tab-btn.active {
    background: rgba(255,255,255,0.5) !important;
    color: #1a1a2e !important;
}

/* 登录页玻璃化 */
.login-page {
    background: transparent !important;
}
.login-box, .install-box {
    background: rgba(255,255,255,0.2) !important;
    backdrop-filter: blur(10px) saturate(130%) !important;
    -webkit-backdrop-filter: blur(10px) saturate(130%) !important;
    border: 1px solid rgba(255,255,255,0.4) !important;
    border-radius: 20px !important;
    box-shadow: 0 8px 32px rgba(80,100,160,0.06), inset 0 1px 0 rgba(255,255,255,0.5) !important;
}
.login-logo {
    background: linear-gradient(135deg, #7c9cff, #b48cff) !important;
}
.login-title, .install-title {
    color: #1a1a2e !important;
}
.login-sub, .install-sub {
    color: #666 !important;
}
.form-label {
    color: #333 !important;
}

/* ============================================
   全面透明玻璃化 - 所有纯白元素
   ============================================ */
/* 商品卡片 & 列表项 */
.product-item, .product-grid-item, .goods-card, .goods-item,
.product-list-item, .shop-card, .item-card {
    background: rgba(255,255,255,0.28) !important;
    backdrop-filter: blur(6px) !important;
    -webkit-backdrop-filter: blur(6px) !important;
    border: 1px solid rgba(255,255,255,0.38) !important;
    border-radius: 18px !important;
    box-shadow: 0 4px 16px rgba(80,100,160,0.06) !important;
}

/* 商品详情区域 */
.product-detail, .product-info, .product-desc, .detail-section,
.goods-detail, .goods-info, .info-block {
    background: rgba(255,255,255,0.25) !important;
    backdrop-filter: blur(6px) !important;
    -webkit-backdrop-filter: blur(6px) !important;
    border: 1px solid rgba(255,255,255,0.35) !important;
    border-radius: 16px !important;
}

/* 通用区块/面板 */
.section, .block, .panel, .box, .wrapper, .content-box,
.module, .group, .field-group, .form-group {
    background: rgba(255,255,255,0.22) !important;
    backdrop-filter: blur(4px) !important;
    -webkit-backdrop-filter: blur(4px) !important;
    border: 1px solid rgba(255,255,255,0.3) !important;
    border-radius: 14px !important;
}

/* 空状态 */
.empty-state, .empty-box, .no-data, .no-result {
    background: rgba(255,255,255,0.2) !important;
    backdrop-filter: blur(4px) !important;
    -webkit-backdrop-filter: blur(4px) !important;
    border: 1px dashed rgba(255,255,255,0.4) !important;
    border-radius: 16px !important;
}

/* 标签/徽章 */
.badge, .tag, .label, .chip, .mark {
    background: rgba(255,255,255,0.35) !important;
    backdrop-filter: blur(4px) !important;
    border: 1px solid rgba(255,255,255,0.4) !important;
    border-radius: 10px !important;
}

/* 分割线 */
.divider, .hr, hr {
    background: rgba(255,255,255,0.3) !important;
    border: none !important;
    height: 1px !important;
}

/* 头像下拉 */
.avatar-dropdown, .dropdown-menu, .popup-menu {
    background: rgba(255,255,255,0.85) !important;
    backdrop-filter: blur(20px) !important;
    -webkit-backdrop-filter: blur(20px) !important;
    border: 1px solid rgba(255,255,255,0.5) !important;
    border-radius: 16px !important;
    box-shadow: 0 8px 32px rgba(80,100,160,0.12) !important;
}
.avatar-dropdown-item, .dropdown-item {
    background: transparent !important;
    color: #1a1a2e !important;
    border-radius: 10px !important;
}
.avatar-dropdown-item:hover, .dropdown-item:hover {
    background: rgba(255,255,255,0.4) !important;
}

/* 侧边栏遮罩 */
.sidebar-overlay {
    background: rgba(0,0,0,0.2) !important;
    backdrop-filter: blur(2px) !important;
}

/* 商品box下拉 */
.product-box, .product-box-header, .box-header {
    background: rgba(255,255,255,0.28) !important;
    backdrop-filter: blur(6px) !important;
    -webkit-backdrop-filter: blur(6px) !important;
    border: 1px solid rgba(255,255,255,0.38) !important;
    border-radius: 14px !important;
}
.product-box-btn, .box-btn {
    background: rgba(255,255,255,0.35) !important;
    border: 1px solid rgba(255,255,255,0.3) !important;
    border-radius: 10px !important;
    color: #1a1a2e !important;
    margin-bottom: 12px !important;
}
.product-box-btn:last-child, .box-btn:last-child {
    margin-bottom: 0 !important;
}

/* 页面标题区 */
.page-header, .page-title-bar, .title-bar {
    background: transparent !important;
}

/* 统计数字卡片 */
.stat-number, .stat-value {
    background: transparent !important;
}

/* 上传区域 */
.upload-area, .upload-box, .drop-zone {
    background: rgba(255,255,255,0.2) !important;
    backdrop-filter: blur(4px) !important;
    border: 2px dashed rgba(255,255,255,0.4) !important;
    border-radius: 14px !important;
}

/* 开关 */
.switch .slider {
    background: rgba(255,255,255,0.35) !important;
}

/* 提示框 */
.alert, .notice, .message, .toast {
    background: rgba(255,255,255,0.8) !important;
    backdrop-filter: blur(10px) !important;
    border: 1px solid rgba(255,255,255,0.5) !important;
    border-radius: 12px !important;
}

/* 所有白色背景强制变透明玻璃 */
[style*="background: #fff"], [style*="background:#fff"],
[style*="background: white"], [style*="background:white"],
[style*="background-color: #fff"], [style*="background-color:#fff"],
[style*="background-color: white"], [style*="background-color:white"] {
    background: rgba(255,255,255,0.28) !important;
    backdrop-filter: blur(6px) !important;
}

/* ============================================
   液态玻璃自定义弹窗
   ============================================ */
.glass-modal-overlay {
    position: fixed; top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.25);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 9999;
    display: flex; align-items: center; justify-content: center;
    padding: 20px;
    animation: glassFadeIn 0.2s ease;
}
@keyframes glassFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}
.glass-modal-box {
    background: rgba(255,255,255,0.85) !important;
    backdrop-filter: blur(20px) saturate(140%) !important;
    -webkit-backdrop-filter: blur(20px) saturate(140%) !important;
    border: 1px solid rgba(255,255,255,0.6) !important;
    border-radius: 20px !important;
    padding: 28px 24px !important;
    max-width: 340px;
    width: 100%;
    box-shadow: 0 16px 48px rgba(80,100,160,0.15), inset 0 1px 0 rgba(255,255,255,0.8) !important;
    animation: glassPopIn 0.25s cubic-bezier(0.32, 0.72, 0, 1);
}
@keyframes glassPopIn {
    from { transform: scale(0.9); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}
.glass-modal-title {
    font-size: 17px; font-weight: 700; color: #1a1a2e;
    text-align: center; margin-bottom: 10px;
}
.glass-modal-content {
    font-size: 14px; color: #444; line-height: 1.6;
    text-align: center; margin-bottom: 22px;
}
.glass-modal-actions {
    display: flex; gap: 10px;
}
.glass-modal-btn {
    flex: 1;
    height: 44px;
    border: 1px solid rgba(255,255,255,0.5) !important;
    border-radius: 12px !important;
    font-size: 14px; font-weight: 600;
    cursor: pointer;
    transition: all 0.15s;
    background: linear-gradient(180deg, rgba(255,255,255,0.4), rgba(255,255,255,0.2)) !important;
    backdrop-filter: blur(6px) !important;
    color: #1a1a2e !important;
}
.glass-modal-btn:active { transform: scale(0.97); }
.glass-modal-btn.primary {
    background: linear-gradient(180deg, rgba(74,125,255,0.85), rgba(74,125,255,0.65)) !important;
    color: #fff !important;
    border-color: rgba(74,125,255,0.5) !important;
}
.glass-modal-btn.danger {
    background: linear-gradient(180deg, rgba(229,57,53,0.85), rgba(229,57,53,0.65)) !important;
    color: #fff !important;
    border-color: rgba(229,57,53,0.5) !important;
}

/* 支付方式选择器 */
.pay-method-selector {
    display: flex;
    gap: 10px;
    margin-bottom: 16px;
}
.pay-method-item {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 12px 8px;
    border-radius: 12px;
    border: 2px solid #e8ecf1;
    background: #fff;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}
.pay-method-item.active {
    border-color: #4a7dff;
    background: rgba(74,125,255,0.06);
}
.pay-method-item .pay-icon {
    width: 24px;
    height: 24px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 700;
    color: #fff;
}
.pay-method-item .alipay-icon {
    background: linear-gradient(135deg, #1677ff, #0958d9);
}
.pay-method-item .wechat-icon {
    background: linear-gradient(135deg, #07c160, #06ad56);
}
.pay-method-item .pay-name {
    font-size: 13px;
    font-weight: 600;
    color: #333;
}
.pay-method-item .pay-check {
    position: absolute;
    top: -6px;
    right: -6px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #4a7dff;
    color: #fff;
    font-size: 11px;
    display: none;
    align-items: center;
    justify-content: center;
    line-height: 1;
}
.pay-method-item.active .pay-check {
    display: flex;
}
/* 大尺寸支付方式选择器 */
.pay-method-selector-large .pay-method-item {
    padding: 16px 8px;
    border-radius: 14px;
}
.pay-method-selector-large .pay-icon {
    width: 30px;
    height: 30px;
    border-radius: 8px;
    font-size: 15px;
}
.pay-method-selector-large .pay-name {
    font-size: 15px;
}
.buy-modal-box {
    max-width: 360px;
}

/* ============================================
   响应式布局修复 - 全面适配手机/平板/电脑
   ============================================ */

/* 设备检测辅助类（由JS设置） */
.is-mobile .desktop-only { display: none !important; }
.is-desktop .mobile-only { display: none !important; }

/* 小屏手机 (<=360px) */
@media (max-width: 360px) {
    html { font-size: 14px; }
    .container { padding: 0 12px; }
    .product-grid { gap: 8px; padding: 0 12px; }
    .glass-card-body { padding: 10px; }
    .glass-card-name { font-size: 12px; height: 34px; }
    .glass-card-price { font-size: 15px; }
    .btn { height: 40px; font-size: 13px; }
    .btn-lg { height: 46px; font-size: 14px; }
    .modal-content { padding: 18px 14px; border-radius: 18px; }
    .modal-title { font-size: 17px; }
    .modal-price { font-size: 20px; }
    .pay-option { padding: 12px; }
    .pay-icon { width: 32px; height: 32px; font-size: 14px; }
    .pay-name { font-size: 14px; }
    .qty-btn { width: 32px; height: 32px; font-size: 18px; }
    .qty-value { font-size: 16px; }
    .topbar { padding: 10px 12px; }
    .topbar-title { font-size: 15px; }
}

/* 平板端 (768px - 1023px) */
@media (min-width: 768px) and (max-width: 1023px) {
    .container { max-width: 680px; }
    .product-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 16px;
        padding: 0 20px;
    }
    .glass-card-name { font-size: 14px; height: 40px; }
    .glass-card-price { font-size: 18px; }
    .modal-content { max-width: 480px; }
    .admin-layout { max-width: 720px; }
}

/* 电脑端 (>=1024px) */
@media (min-width: 1024px) {
    html { font-size: 16px; }
    body { overflow-x: hidden; }

    /* 前台容器放宽 */
    .container { max-width: 960px; padding: 0 24px; }

    /* 商品网格：电脑端4列 */
    .product-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 20px;
        padding: 0 24px;
        max-width: 1200px;
        margin: 0 auto;
    }
    .glass-topbar { max-width: 1200px; margin: 0 auto; padding: 20px 24px 16px; }
    .glass-card-name { font-size: 14px; height: 40px; }
    .glass-card-price { font-size: 19px; }
    .glass-card-stock { font-size: 12px; }

    /* 商品详情页：电脑端居中，最大宽度限制 */
    .product-image { max-width: 500px; margin: 0 auto; display: block; }
    .product-info { max-width: 600px; margin: -24px auto 0; border-radius: 24px; }
    .bottom-bar { max-width: 600px; left: 50%; transform: translateX(-50%); }

    /* 购买弹窗：电脑端更大 */
    .modal-overlay { padding: 40px; padding-right: 40px; }
    .modal-content { max-width: 480px; padding: 32px 28px; border-radius: 20px; }
    .modal-title { font-size: 22px; }
    .modal-price { font-size: 28px; }
    .pay-option { padding: 16px 20px; }
    .pay-icon { width: 40px; height: 40px; font-size: 18px; }
    .pay-name { font-size: 17px; }

    /* 后台管理：电脑端侧边栏常驻 */
    .admin-header { padding: 16px 24px; }
    .admin-title { font-size: 20px; }
    .card { padding: 24px; }
    .form-group { margin-bottom: 20px; }
    .form-label { font-size: 14px; }
    .form-input { height: 46px; font-size: 15px; }
    .btn { height: 46px; font-size: 15px; }
    .btn-lg { height: 52px; font-size: 16px; }

    /* 电脑端：侧边栏常驻显示 */
    .sidebar {
        left: 0 !important;
        box-shadow: 2px 0 8px rgba(0,0,0,0.06);
    }
    .sidebar-overlay { display: none !important; }
    .main-content {
        margin-left: 280px;
        padding-top: 52px;
    }
    .topbar {
        left: 280px;
    }
    .topbar-btn[onclick*="toggleSidebar"] {
        display: none;
    }

    /* 后台表格：电脑端更宽 */
    .admin-table { min-width: auto; width: 100%; }
    .admin-table th, .admin-table td { padding: 14px 16px; font-size: 14px; }

    /* 登录页：电脑端居中卡片 */
    .login-container { max-width: 420px; margin: 60px auto; }
    .login-card { padding: 40px 36px; border-radius: 20px; }

    /* 安装页 */
    .install-container { max-width: 560px; margin: 40px auto; }
}

/* 超宽屏 (>=1440px) */
@media (min-width: 1440px) {
    .container { max-width: 1100px; }
    .product-grid {
        grid-template-columns: repeat(5, 1fr);
        max-width: 1400px;
    }
    .glass-topbar { max-width: 1400px; }
}

/* 横屏手机优化 */
@media (max-height: 500px) and (orientation: landscape) {
    .modal-overlay { align-items: flex-start; padding: 10px; }
    .modal-content { max-height: 95vh; overflow-y: auto; }
    .product-image { aspect-ratio: 16/9; max-height: 40vh; }
}

/* 高DPI屏幕优化 */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .glass-card { border-width: 1px; }
    .pay-option { border-width: 2px; }
}

/* 减少动画（用户偏好） */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* 打印样式 */
@media print {
    .bottom-bar, .topbar-btn, .sidebar, .modal-overlay { display: none !important; }
    body { background: #fff !important; }
    .container { max-width: 100%; padding: 0; }
}

/* ============================================================
   ColorOS 17 磨砂玻璃材质（Frosted Glass）
   ============================================================ */
:root {
    --cos-blur: 26px;
    --cos-bg: rgba(255, 255, 255, 0.52);
    --cos-bg-strong: rgba(255, 255, 255, 0.72);
    --cos-bg-soft: rgba(255, 255, 255, 0.34);
    --cos-border: rgba(255, 255, 255, 0.72);
    --cos-shadow: 0 10px 30px rgba(60, 80, 140, 0.10), inset 0 1px 0 rgba(255, 255, 255, 0.9);
    --cos-shadow-sm: 0 4px 14px rgba(60, 80, 140, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.85);
    --cos-radius: 22px;
    --cos-radius-sm: 14px;
}

/* 彩色柔光底图（磨砂玻璃需要底图才好看） */
body::before {
    content: '' !important;
    position: fixed !important;
    inset: -10% !important;
    background:
        radial-gradient(closest-side at 18% 12%, rgba(126, 168, 255, 0.55), transparent 70%),
        radial-gradient(closest-side at 82% 8%, rgba(186, 148, 255, 0.45), transparent 70%),
        radial-gradient(closest-side at 88% 78%, rgba(120, 220, 220, 0.42), transparent 70%),
        radial-gradient(closest-side at 12% 86%, rgba(255, 178, 190, 0.42), transparent 70%) !important;
    filter: blur(28px) saturate(140%);
    pointer-events: none !important;
    z-index: 0 !important;
}

/* 通用磨砂玻璃容器 */
.card, .stat-card, .product-card, .order-card, .form-card, .settings-card,
.glass-card, .service-item, .rank-item, .ac-card, .bg-manage-item, .admin-product-item,
.msg-item, .modal-box, .modal-content, .glass-modal-box, .empty-glass, .glass-modal-box {
    background: var(--cos-bg) !important;
    -webkit-backdrop-filter: blur(var(--cos-blur)) saturate(165%) !important;
    backdrop-filter: blur(var(--cos-blur)) saturate(165%) !important;
    border: 1px solid var(--cos-border) !important;
    border-radius: var(--cos-radius) !important;
    box-shadow: var(--cos-shadow) !important;
}

/* 顶栏 / 侧边栏 / 底部操作栏 / 弹层 */
.topbar, .sidebar, .bottom-bar, .tab-bar, .cs-sheet, .ac-input-area, .ac-chat-head,
.avatar-dropdown, .product-box, .product-box-header, .select-bar, .glass-modal-overlay .glass-modal-box {
    background: var(--cos-bg-strong) !important;
    -webkit-backdrop-filter: blur(var(--cos-blur)) saturate(170%) !important;
    backdrop-filter: blur(var(--cos-blur)) saturate(170%) !important;
    border-color: var(--cos-border) !important;
    box-shadow: var(--cos-shadow-sm) !important;
}

/* 按钮 / 输入框：胶囊圆角 + 磨砂 */
.btn, .btn-primary, .btn-outline, .send-btn, .code-btn, .ac-send, .cs-send, .qty-btn, .glass-modal-btn {
    border-radius: 999px !important;
    -webkit-backdrop-filter: blur(14px) saturate(150%);
    backdrop-filter: blur(14px) saturate(150%);
    border: 1px solid var(--cos-border) !important;
}
.form-input, input[type="text"], input[type="password"], input[type="number"], input[type="email"], input[type="tel"], textarea, select {
    background: var(--cos-bg-soft) !important;
    -webkit-backdrop-filter: blur(14px) !important;
    backdrop-filter: blur(14px) !important;
    border: 1px solid var(--cos-border) !important;
    border-radius: var(--cos-radius-sm) !important;
}

/* 底部导航 / 分页：统一字体（修复两个按钮字体不一致） */
.tab-bar, .tab-bar *, .bottom-bar, .bottom-bar *, .select-bar, .select-bar * { font-family: inherit !important; }
.tab-bar .tab-item, .tab-bar .tab-label, .tab-bar span, .tab-item { font-weight: 600 !important; letter-spacing: 0.2px; }
.tab-item.active, .tab-item.active * { font-weight: 700 !important; }
.pagination, .pagination * { font-family: inherit !important; font-weight: 600 !important; }
.page-btn, .page-link { font-family: inherit !important; font-weight: 600 !important; font-size: 13px !important; }

/* ===== 居中加载动画（替代浏览器顶部进度条） ===== */
.cos-loader {
    position: fixed; inset: 0; z-index: 99998;
    display: flex; align-items: center; justify-content: center;
    background: rgba(244, 246, 252, 0.42);
    -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
    transition: opacity .25s ease;
}
.cos-loader-hide { opacity: 0; pointer-events: none; }
.cos-loader-box {
    width: 132px; padding: 20px 16px;
    display: flex; flex-direction: column; align-items: center; gap: 12px;
}
.cos-spinner {
    width: 34px; height: 34px; border-radius: 50%;
    border: 3px solid rgba(120, 140, 200, 0.22);
    border-top-color: #5b7cfa;
    animation: cosSpin .8s linear infinite;
}
@keyframes cosSpin { to { transform: rotate(360deg); } }
.cos-loader-text { font-size: 12px; color: #7a8399; letter-spacing: 1px; }

/* ===== 确认后的“打对号 + 果冻动画” ===== */
.cos-tick-wrap {
    position: fixed; inset: 0; z-index: 99999;
    display: flex; align-items: center; justify-content: center;
    pointer-events: none; transition: opacity .22s ease;
}
.cos-tick-hide { opacity: 0; }
.cos-tick {
    width: 84px; height: 84px; border-radius: 50%;
    background: linear-gradient(135deg, #4ade80, #22a45d);
    box-shadow: 0 14px 40px rgba(34, 164, 93, 0.42), inset 0 1px 0 rgba(255, 255, 255, 0.5);
    display: flex; align-items: center; justify-content: center;
    animation: cosJelly .62s cubic-bezier(.28, .84, .42, 1) both;
}
@keyframes cosJelly {
    0%   { transform: scale(.3, .3); }
    22%  { transform: scale(1.26, .74); }
    38%  { transform: scale(.78, 1.22); }
    54%  { transform: scale(1.14, .86); }
    68%  { transform: scale(.92, 1.08); }
    82%  { transform: scale(1.05, .95); }
    100% { transform: scale(1, 1); }
}
@media (prefers-reduced-motion: reduce) {
    .cos-tick, .cos-spinner { animation: none !important; }
}

/* ===== 评论楼中楼（展开/收缩）===== */
.cmt-toggle {
    margin-top: 8px; background: none; border: none; padding: 2px 0;
    font-size: 12px; color: #4a7dff; font-weight: 600; cursor: pointer;
}
.cmt-replies { margin-top: 6px; padding-left: 10px; border-left: 2px solid rgba(74,125,255,0.14); }
.cmt-child { padding: 8px 0; border-bottom: none; }
.cmt-child .cmt-avatar { width: 28px; height: 28px; }
.cmt-child .cmt-text { font-size: 13px; }

/* ===== 语音消息播放按钮 ===== */
.voice-play.playing {
    background: rgba(74,125,255,0.2) !important;
    border-color: rgba(74,125,255,0.5) !important;
    animation: voicePulse 1.1s ease-in-out infinite;
}
@keyframes voicePulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.04); }
}

/* ============================================================
   磨砂玻璃全覆盖（聊天气泡 / 输入区 / 评论 / 卡片 / 按钮）
   ============================================================ */
.msg-bubble {
    -webkit-backdrop-filter: blur(14px) saturate(150%) !important;
    backdrop-filter: blur(14px) saturate(150%) !important;
    border: 1px solid rgba(255, 255, 255, 0.55) !important;
}
.msg-row.other .msg-bubble { background: rgba(255, 255, 255, 0.62) !important; }
.msg-row.mine .msg-bubble { background: linear-gradient(135deg, rgba(102,126,234,0.85), rgba(118,75,162,0.85)) !important; }
/* 评论：去掉立体边框/阴影/卡片底 */
.cmt-item {
    background: transparent !important;
    border: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    padding: 10px 0 !important;
}
.cmt-like, .cmt-toggle {
    -webkit-backdrop-filter: blur(12px) saturate(150%) !important;
    backdrop-filter: blur(12px) saturate(150%) !important;
    border: 1px solid rgba(255, 255, 255, 0.65) !important;
    border-radius: 999px !important;
}
.chat-input-area, .chat-input-bar, .ac-input-area, .ac-input-bar, .ac-chat-head, .ac-chat-body,
.cs-head, .cs-input, .cs-body, .plus-item {
    background: rgba(255, 255, 255, 0.5) !important;
    -webkit-backdrop-filter: blur(22px) saturate(165%) !important;
    backdrop-filter: blur(22px) saturate(165%) !important;
}
.chat-input-bar input, .ac-input-bar input {
    background: rgba(255, 255, 255, 0.45) !important;
    -webkit-backdrop-filter: blur(12px) !important;
    backdrop-filter: blur(12px) !important;
    border: 1px solid rgba(255, 255, 255, 0.7) !important;
}
.send-btn, .ac-send, .cs-send {
    -webkit-backdrop-filter: blur(12px) saturate(150%) !important;
    backdrop-filter: blur(12px) saturate(150%) !important;
}
.cmt-child { background: transparent !important; border: none !important; box-shadow: none !important; padding: 8px 0 !important; }

/* 白底 → 磨砂玻璃（聊天输入区 / 弹窗 / 底栏 / 面板） */
.chat-input-area, .chat-input-bar, .ac-input-area, .ac-input-bar, .ac-chat-head, .ac-chat-body,
.cs-sheet, .cs-input, .cs-head, .cs-body, .modal-content, .modal-box, .report-box,
.bottom-bar, .glass-modal-box, .select-bar {
    background: rgba(255, 255, 255, 0.55) !important;
    -webkit-backdrop-filter: blur(24px) saturate(165%) !important;
    backdrop-filter: blur(24px) saturate(165%) !important;
}

/* ============================================================
   去掉立体感：只留「模糊 + 半透明」，不要边框和投影
   ============================================================ */
.cmt-item, .cmt-child, .cmt-like, .cmt-toggle, .plus-item,
.chat-input-area, .chat-input-bar, .ac-input-area, .ac-input-bar, .ac-chat-head, .ac-chat-body,
.ac-card, .cs-sheet, .cs-head, .cs-body, .cs-input, .cs-attach-bar,
.modal-content, .modal-box, .bottom-bar, .report-box, .glass-modal-box, .glass-modal-btn, .select-bar,
.card, .stat-card, .product-card, .service-item, .rank-item, .msg-item, .msg-bubble,
.avatar-dropdown, .product-box, .product-box-header, .tab-bar, .voice-play {
    border: none !important;
    box-shadow: none !important;
    outline: none !important;
}
.cmt-replies { border-left: 1px solid rgba(74, 125, 255, 0.18) !important; }

/* ============================================================
   表单布局修复：去掉 .form-group 的多余边框/底色（标签与输入框因此重叠）
   ============================================================ */
.form-group {
    background: transparent !important;
    border: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    -webkit-backdrop-filter: none !important;
    backdrop-filter: none !important;
}
.form-label {
    display: block !important;
    margin-bottom: 7px !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    color: #333 !important;
    line-height: 1.4 !important;
}
/* 输入框统一高度与内边距，避免出现又高又空、文字贴边的观感 */
.form-input, .modal-content input, .modal-box input, .glass-modal-box input,
input[type="text"], input[type="password"], input[type="number"],
input[type="email"], input[type="tel"], textarea, select {
    padding: 11px 14px !important;
    min-height: 46px !important;
    line-height: 1.4 !important;
    box-sizing: border-box !important;
}
textarea { min-height: 96px !important; }
/* 弹窗里的表单间距更紧凑一些 */
.modal-content .form-group, .modal-box .form-group, .glass-modal-box .form-group { margin-bottom: 14px !important; }

/* ============================================================
   GPT 风格配色（中性灰 + 蓝色主色）+ 统一确认弹窗样式
   ============================================================ */
:root {
    --gpt-bg: #f4f4f5;
    --gpt-surface: #ffffff;
    --gpt-line: rgba(0, 0, 0, 0.08);
    --gpt-text: #1f2023;
    --gpt-sub: #6b7280;
    --gpt-blue: #5b7cfa;
}
body::before {
    content: '' !important;
    position: fixed !important; inset: 0 !important;
    background: linear-gradient(180deg, #f7f7f8 0%, #eeeef0 100%) !important;
    filter: none !important;
    pointer-events: none !important; z-index: 0 !important;
}
.topbar, .bottom-bar, .tab-bar, .page-header, .glass-topbar, .chat-header,
.chat-input-area, .chat-input-bar, .ac-input-area, .ac-input-bar, .ac-chat-head, .ac-chat-body,
.cs-sheet, .cs-head, .cs-body, .cs-input, .modal-content, .modal-box, .glass-modal-box,
.card, .stat-card, .product-card, .service-item, .rank-item, .msg-item, .product-box, .product-box-header {
    background-image: none !important;
    background-color: rgba(255, 255, 255, 0.9) !important;
    color: var(--gpt-text) !important;
    border-color: var(--gpt-line) !important;
}
.btn, .btn-primary, .send-btn, .ac-send, .cs-send, .btn-buy, .code-btn,
.chat-plus.open, .cs-plus.open, .glass-modal-btn.primary, .open-shop-top,
.query-order-btn, .live-service-btn, .register-box .btn {
    background: var(--gpt-blue) !important;
    background-image: none !important;
    color: #fff !important;
    border: none !important;
}
.btn-outline, .glass-modal-btn {
    background: #ffffff !important;
    background-image: none !important;
    color: var(--gpt-text) !important;
    border: none !important;
}
.msg-row.mine .msg-bubble { background: var(--gpt-blue) !important; background-image: none !important; color: #fff !important; border: none !important; }
.msg-row.other .msg-bubble { background: #ffffff !important; background-image: none !important; color: var(--gpt-text) !important; border: none !important; }

/* ===== 确认弹窗（与图 1 样式一致） ===== */
.glass-modal-overlay {
    background: rgba(20, 20, 22, 0.28) !important;
    -webkit-backdrop-filter: blur(10px) !important; backdrop-filter: blur(10px) !important;
}
.glass-modal-box {
    background: rgba(247, 247, 248, 0.94) !important;
    -webkit-backdrop-filter: blur(26px) saturate(140%) !important;
    backdrop-filter: blur(26px) saturate(140%) !important;
    border: none !important; border-radius: 22px !important;
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.18) !important;
    padding: 26px 22px 20px !important;
    max-width: 340px !important;
}
.glass-modal-title { font-size: 19px !important; font-weight: 800 !important; color: #1f2023 !important; margin-bottom: 10px !important; }
.glass-modal-content { font-size: 15px !important; font-weight: 700 !important; color: #1f2023 !important; line-height: 1.6 !important; margin-bottom: 22px !important; }
.glass-modal-actions { gap: 14px !important; }
.glass-modal-btn {
    height: 52px !important; border-radius: 999px !important;
    font-size: 16px !important; font-weight: 700 !important;
    background: #ffffff !important; color: #1f2023 !important;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06) !important;
}
.glass-modal-btn.primary { background: var(--gpt-blue) !important; color: #fff !important; }
.glass-modal-btn:active { transform: scale(.97); }

/* ============================================================
   致命修复：背景改为直接画在 body 上，不再用固定全屏遮罩层
   （某些 WebView 会把 body::before 画在内容之上，导致整页空白）
   ============================================================ */
body::before { content: none !important; display: none !important; background: none !important; }
body {
    background: linear-gradient(180deg, #f7f7f8 0%, #e9eaee 55%, #f2f3f6 100%) !important;
    background-attachment: fixed !important;
    color: #1f2023 !important;
}
.product-info, .product-desc, .product-image, .product-thumbs, .card, .cmt-item,
.cmt-thread, .cs-sheet, .bottom-bar, .main-content, .page-content, .container,
.sw-wrap, .msg-item, .service-item, .rank-item, .product-grid {
    position: relative;
    z-index: 1;
}

/* ============================================================
   可读性修复：浅底上的白字改深色（不再出现“文字看不见”）
   ============================================================ */
.page-header, .page-header *, .glass-topbar, .glass-topbar *, .topbar, .topbar *,
.cs-head, .cs-head *, .ac-chat-head, .ac-chat-head *, .chat-header, .chat-header *,
.product-info, .product-info *, .card, .card *, .service-item, .service-item *,
.rank-item, .rank-item *, .cmt-item, .cmt-item *, .msg-item, .msg-item *,
.form-label, .form-input, textarea, select, .cs-input input, .chat-input-bar input,
.ac-input-bar input, .back-btn, .cs-title, .service-name, .rank-name, .glass-card-name,
.product-name, .product-desc {
    color: #1f2023 !important;
}
/* 深底/主色按钮/自己的气泡：文字保持白色 */
.btn-primary, .send-btn, .cs-send, .ac-send, .btn-buy, .glass-modal-btn.primary,
.glass-modal-btn.primary *, .msg-row.mine .msg-bubble, .msg-row.mine .msg-bubble * {
    color: #ffffff !important;
}
/* 科技感标题药丸保持亮色 */
.tech-big-title, .tech-big-title *, .tech-sub-special, .tech-sub-special *,
.tech-sub-flagship, .tech-sub-flagship *, .tech-sub-product, .tech-sub-product * {
    color: #e8f8ff !important;
}
/* 次要文字：中性灰 */
.page-subtitle, .service-desc, .cmt-time, .msg-time,
.form-input::placeholder, input::placeholder, textarea::placeholder {
    color: #8a8f98 !important;
}
/* 背景：磨砂模糊（统一 GPT 灰白）*/
body::before {
    content: '' !important;
    position: fixed !important; inset: -10% !important;
    background:
        radial-gradient(closest-side at 20% 15%, rgba(255,255,255,0.95), transparent 70%),
        radial-gradient(closest-side at 80% 85%, rgba(228,230,236,0.95), transparent 70%),
        linear-gradient(180deg, #f7f7f8 0%, #ececee 100%) !important;
    filter: blur(22px) !important;
    z-index: -1 !important;
    pointer-events: none !important;
}
/* 输入框：浅灰磨砂 + 深色文字 */
.form-input, input[type="text"], input[type="password"], input[type="number"],
input[type="email"], input[type="tel"], textarea, select {
    background: rgba(255,255,255,0.75) !important;
    border: 1px solid rgba(0,0,0,0.07) !important;
    color: #1f2023 !important;
}
/* 评论 / 客服圆按钮：磨砂玻璃 + 深色图标 */
.btn-comment {
    background: rgba(255,255,255,0.62) !important;
    background-image: none !important;
    -webkit-backdrop-filter: blur(18px) saturate(150%) !important;
    backdrop-filter: blur(18px) saturate(150%) !important;
    border: 1px solid rgba(0,0,0,0.06) !important;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05) !important;
    color: #1f2023 !important;
}
.btn-comment svg { stroke: #1f2023 !important; }
.btn-comment .btn-comment-count { color: #6b7280 !important; }

/* ============================================================
   全站扫光特效：店铺名（芯云…） / 作者名 / 昵称 / 用户名
   —— 金属渐变文字 + 一道光在文字里来回滚动（与商品详情页作者名同款）
   ------------------------------------------------------------
   金色扫光 → .sweep-gold（作者名 / 昵称 / 用户名 / 评论区昵称）
   冰蓝扫光 → .sweep-blue（店铺名）
   金色辉光闪动 → 站点品牌名（.glass-topbar h1，即首页“云商城”）
   需要时给任意元素加这两个 class 即可复用同一套效果
   ============================================================ */
@keyframes sweepTextShine {
    0%   { background-position: 130% 0; }
    100% { background-position: -130% 0; }
}

/* ---------- 金色扫光：作者名 / 昵称 ---------- */
.owner-name, .author-name, .cmt-name, .podium-name, .rank-name,
.profile-name, .user-name, .msg-sender-name, .service-name .name-text,
.ow-name .nm, .ac-name .nm, .chat-name, .sweep-gold {
    background-image: linear-gradient(100deg,
        #b8860b 0%, #d4af37 22%, #fffbe6 38%, #ffffff 50%,
        #fffbe6 62%, #d4af37 78%, #b8860b 100%) !important;
    background-size: 220% 100% !important;
    background-repeat: no-repeat !important;
    -webkit-background-clip: text !important;
    background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
    animation: sweepTextShine 3s linear infinite !important;
    filter: drop-shadow(0 1px 2px rgba(184, 134, 11, .45)) !important;
}

/* ---------- 冰蓝扫光：店铺名 ---------- */
.shop-name > span:first-child,
.sweep-blue {
    background-image: linear-gradient(100deg,
        #0a4b6e 0%, #1c86b8 22%, #8fe9ff 38%, #ffffff 50%,
        #8fe9ff 62%, #1c86b8 78%, #0a4b6e 100%) !important;
    background-size: 220% 100% !important;
    background-repeat: no-repeat !important;
    -webkit-background-clip: text !important;
    background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
    animation: sweepTextShine 3.4s linear infinite !important;
    filter: drop-shadow(0 1px 2px rgba(28, 134, 184, .4)) !important;
}

/* ---------- 金色辉光闪动：站点品牌名（云商城） ---------- */
/* 金色渐变文字 + 一道金光来回扫过 + 呼吸式金色辉光，更有科技感 */
.glass-topbar h1 {
    background-image: linear-gradient(100deg,
        #6b4a05 0%, #c9992a 16%, #f7d774 30%, #fff6cc 42%,
        #ffffff 50%, #fff6cc 58%, #f7d774 70%, #c9992a 84%, #6b4a05 100%) !important;
    background-size: 240% 100% !important;
    background-repeat: no-repeat !important;
    -webkit-background-clip: text !important;
    background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
    animation: brandGoldShine 2.8s linear infinite, brandGoldPulse 2.2s ease-in-out infinite !important;
    will-change: background-position, filter;
}

/* 金光在字面上反复扫过 */
@keyframes brandGoldShine {
    0%   { background-position: 130% 0; }
    100% { background-position: -130% 0; }
}

/* 金色辉光：亮度呼吸式闪动 */
@keyframes brandGoldPulse {
    0%, 100% {
        filter: drop-shadow(0 0 3px rgba(255, 200, 60, .38))
                drop-shadow(0 1px 2px rgba(120, 85, 10, .45));
    }
    50% {
        filter: drop-shadow(0 0 8px rgba(255, 214, 92, .95))
                drop-shadow(0 0 18px rgba(255, 190, 40, .55))
                drop-shadow(0 1px 2px rgba(120, 85, 10, .5));
    }
}


/* 无动画偏好 / 老设备降级：保留渐变文字，只停止滚动 */
@media (prefers-reduced-motion: reduce) {
    .owner-name, .author-name, .cmt-name, .podium-name, .rank-name,
    .profile-name, .user-name, .msg-sender-name, .service-name .name-text,
    .ow-name .nm, .ac-name .nm, .chat-name, .sweep-gold,
    .shop-name > span:first-child, .glass-topbar h1, .sweep-blue {
        animation: none !important;
        background-position: 50% 0 !important;
    }
}
