/* 纯白极简UI - 锁定深色模式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

/* 强制覆盖系统深色模式 */
:root {
    --bg-primary: #ffffff !important;
    --bg-secondary: #f8f9fa !important;
    --bg-hover: #f1f3f5 !important;
    --text-primary: #1a1a1a !important;
    --text-secondary: #6c757d !important;
    --text-muted: #adb5bd !important;
    --border-color: #e9ecef !important;
    --accent-color: #000000 !important;
    --success-color: #28a745 !important;
    --warning-color: #ffc107 !important;
    --danger-color: #dc3545 !important;
    --shadow: 0 2px 12px rgba(0, 0, 0, 0.06) !important;
    --shadow-lg: 0 8px 30px rgba(0, 0, 0, 0.08) !important;
    --radius: 12px !important;
    --radius-sm: 8px !important;
}

/* 强制所有元素使用浅色模式 */
html {
    color-scheme: light !important;
    background-color: #ffffff !important;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
    background-color: #ffffff !important;
    color: #1a1a1a !important;
    line-height: 1.6;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* 覆盖浏览器深色模式 */
@media (prefers-color-scheme: dark) {
    html, body, [class*="dark"] {
        background-color: #ffffff !important;
        color: #1a1a1a !important;
        color-scheme: light !important;
    }
    * {
        background-color: inherit !important;
        color: inherit !important;
        border-color: #e9ecef !important;
    }
    input, textarea, select, button {
        background-color: #ffffff !important;
        color: #1a1a1a !important;
        border-color: #e9ecef !important;
    }
}

/* 容器 */
.container {
    max-width: 480px;
    margin: 0 auto;
    padding: 20px 16px;
    min-height: 100vh;
}

.container-wide {
    max-width: 720px;
    margin: 0 auto;
    padding: 20px 16px;
    min-height: 100vh;
}

/* 卡片 */
.card {
    background: #ffffff !important;
    border: 1px solid #e9ecef !important;
    border-radius: 12px !important;
    padding: 24px 20px;
    margin-bottom: 16px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04) !important;
}

/* 标题 */
.page-title {
    font-size: 24px;
    font-weight: 600;
    color: #1a1a1a !important;
    margin-bottom: 8px;
    letter-spacing: -0.5px;
}

.page-subtitle {
    font-size: 14px;
    color: #6c757d !important;
    margin-bottom: 24px;
}

.card-title {
    font-size: 16px;
    font-weight: 600;
    color: #1a1a1a !important;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* 表单 */
.form-group {
    margin-bottom: 18px;
}

.form-label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: #495057 !important;
    margin-bottom: 6px;
}

.form-input,
.form-textarea,
.form-select {
    width: 100%;
    padding: 12px 14px;
    font-size: 15px;
    color: #1a1a1a !important;
    background: #ffffff !important;
    border: 1px solid #dee2e6 !important;
    border-radius: 8px !important;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
    -webkit-appearance: none;
    appearance: none;
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
    border-color: #1a1a1a !important;
    box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.05) !important;
}

.form-input::placeholder,
.form-textarea::placeholder {
    color: #adb5bd !important;
}

.form-textarea {
    resize: vertical;
    min-height: 80px;
    font-family: inherit;
}

.form-hint {
    font-size: 12px;
    color: #adb5bd !important;
    margin-top: 4px;
}

/* 按钮 */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    font-size: 15px;
    font-weight: 500;
    border: none;
    border-radius: 8px !important;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    white-space: nowrap;
    -webkit-appearance: none;
    appearance: none;
}

.btn-primary {
    background: #000000 !important;
    color: #ffffff !important;
}

.btn-primary:hover {
    background: #333333 !important;
}

.btn-primary:active {
    transform: scale(0.98);
}

.btn-outline {
    background: #ffffff !important;
    color: #1a1a1a !important;
    border: 1px solid #dee2e6 !important;
}

.btn-outline:hover {
    background: #f8f9fa !important;
    border-color: #1a1a1a !important;
}

.btn-danger {
    background: #dc3545 !important;
    color: #ffffff !important;
}

.btn-danger:hover {
    background: #c82333 !important;
}

.btn-block {
    width: 100%;
}

.btn-sm {
    padding: 8px 16px;
    font-size: 13px;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* 导航栏 */
.navbar {
    background: #ffffff !important;
    border-bottom: 1px solid #e9ecef !important;
    padding: 14px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(10px);
}

.navbar-title {
    font-size: 17px;
    font-weight: 600;
    color: #1a1a1a !important;
}

.navbar-back {
    font-size: 15px;
    color: #1a1a1a !important;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 4px;
}

/* 标签页 */
.tabs {
    display: flex;
    background: #f8f9fa !important;
    border-radius: 8px !important;
    padding: 4px;
    margin-bottom: 20px;
}

.tab-item {
    flex: 1;
    text-align: center;
    padding: 10px 12px;
    font-size: 14px;
    font-weight: 500;
    color: #6c757d !important;
    border-radius: 6px !important;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
}

.tab-item.active {
    background: #ffffff !important;
    color: #1a1a1a !important;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06) !important;
}

/* 列表 */
.list-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 0;
    border-bottom: 1px solid #f1f3f5 !important;
}

.list-item:last-child {
    border-bottom: none;
}

.list-label {
    font-size: 14px;
    color: #6c757d !important;
}

.list-value {
    font-size: 14px;
    font-weight: 500;
    color: #1a1a1a !important;
    word-break: break-all;
    text-align: right;
    max-width: 60%;
}

/* 状态标签 */
.badge {
    display: inline-block;
    padding: 4px 10px;
    font-size: 12px;
    font-weight: 500;
    border-radius: 20px !important;
}

.badge-pending {
    background: #fff3cd !important;
    color: #856404 !important;
}

.badge-success {
    background: #d4edda !important;
    color: #155724 !important;
}

.badge-expired {
    background: #f8d7da !important;
    color: #721c24 !important;
}

/* 上传区域 */
.upload-area {
    border: 2px dashed #dee2e6 !important;
    border-radius: 12px !important;
    padding: 32px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    background: #fafbfc !important;
}

.upload-area:hover {
    border-color: #1a1a1a !important;
    background: #f8f9fa !important;
}

.upload-area.has-image {
    border-style: solid;
    padding: 12px;
}

.upload-icon {
    font-size: 36px;
    color: #adb5bd !important;
    margin-bottom: 8px;
}

.upload-text {
    font-size: 14px;
    color: #6c757d !important;
}

.upload-preview {
    max-width: 100%;
    max-height: 200px;
    border-radius: 8px !important;
    object-fit: contain;
}

/* 二维码展示 */
.qrcode-box {
    text-align: center;
    padding: 24px;
}

.qrcode-img {
    max-width: 240px;
    width: 100%;
    border-radius: 12px !important;
    border: 1px solid #e9ecef !important;
}

.qrcode-amount {
    font-size: 36px;
    font-weight: 700;
    color: #1a1a1a !important;
    margin: 16px 0 8px;
    letter-spacing: -1px;
}

.qrcode-tip {
    font-size: 14px;
    color: #6c757d !important;
    margin-bottom: 20px;
}

/* 支付方式选择 */
.pay-methods {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
}

.pay-method {
    flex: 1;
    padding: 16px 12px;
    border: 2px solid #e9ecef !important;
    border-radius: 12px !important;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    background: #ffffff !important;
}

.pay-method.active {
    border-color: #1a1a1a !important;
    background: #fafbfc !important;
}

.pay-method-icon {
    font-size: 28px;
    margin-bottom: 6px;
}

.pay-method-name {
    font-size: 13px;
    font-weight: 500;
    color: #1a1a1a !important;
}

/* 信息框 */
.alert {
    padding: 14px 16px;
    border-radius: 8px !important;
    font-size: 14px;
    margin-bottom: 16px;
}

.alert-info {
    background: #d1ecf1 !important;
    color: #0c5460 !important;
    border: 1px solid #bee5eb !important;
}

.alert-success {
    background: #d4edda !important;
    color: #155724 !important;
    border: 1px solid #c3e6cb !important;
}

.alert-warning {
    background: #fff3cd !important;
    color: #856404 !important;
    border: 1px solid #ffeaa7 !important;
}

.alert-danger {
    background: #f8d7da !important;
    color: #721c24 !important;
    border: 1px solid #f5c6cb !important;
}

/* 统计卡片 */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-bottom: 20px;
}

.stat-card {
    background: #ffffff !important;
    border: 1px solid #e9ecef !important;
    border-radius: 12px !important;
    padding: 18px 16px;
}

.stat-label {
    font-size: 12px;
    color: #6c757d !important;
    margin-bottom: 6px;
}

.stat-value {
    font-size: 22px;
    font-weight: 700;
    color: #1a1a1a !important;
    letter-spacing: -0.5px;
}

/* 订单列表 */
.order-item {
    background: #ffffff !important;
    border: 1px solid #e9ecef !important;
    border-radius: 12px !important;
    padding: 16px;
    margin-bottom: 10px;
}

.order-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.order-no {
    font-size: 13px;
    color: #6c757d !important;
    font-family: monospace;
}

.order-amount {
    font-size: 18px;
    font-weight: 600;
    color: #1a1a1a !important;
}

.order-meta {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: #adb5bd !important;
}

/* 底部 */
.footer {
    text-align: center;
    padding: 24px 16px;
    font-size: 12px;
    color: #adb5bd !important;
}

/* 加载动画 */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid #e9ecef !important;
    border-top-color: #1a1a1a !important;
    border-radius: 50% !important;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* 空状态 */
.empty-state {
    text-align: center;
    padding: 48px 20px;
}

.empty-icon {
    font-size: 48px;
    color: #dee2e6 !important;
    margin-bottom: 12px;
}

.empty-text {
    font-size: 14px;
    color: #adb5bd !important;
}

/* 复制按钮组 */
.copy-row {
    display: flex;
    gap: 8px;
    align-items: center;
}

.copy-input {
    flex: 1;
    padding: 10px 12px;
    font-size: 13px;
    font-family: monospace;
    background: #f8f9fa !important;
    border: 1px solid #e9ecef !important;
    border-radius: 8px !important;
    color: #1a1a1a !important;
    word-break: break-all;
}

.copy-btn {
    padding: 10px 14px;
    font-size: 13px;
    background: #ffffff !important;
    border: 1px solid #dee2e6 !important;
    border-radius: 8px !important;
    color: #1a1a1a !important;
    cursor: pointer;
    white-space: nowrap;
}

.copy-btn:hover {
    background: #f8f9fa !important;
}

/* 安装步骤 */
.install-steps {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-bottom: 24px;
}

.install-step {
    width: 32px;
    height: 32px;
    border-radius: 50% !important;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 600;
    background: #f1f3f5 !important;
    color: #adb5bd !important;
}

.install-step.active {
    background: #000000 !important;
    color: #ffffff !important;
}

.install-step.done {
    background: #28a745 !important;
    color: #ffffff !important;
}

/* 复选框 */
.checkbox-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

.checkbox-group input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: #000000;
}

.checkbox-group label {
    font-size: 14px;
    color: #495057 !important;
    cursor: pointer;
}

/* 分隔线 */
.divider {
    height: 1px;
    background: #f1f3f5 !important;
    margin: 16px 0;
}

/* 金额输入 */
.amount-input-wrap {
    position: relative;
}

.amount-input-wrap .currency {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 16px;
    font-weight: 600;
    color: #1a1a1a !important;
}

.amount-input-wrap .form-input {
    padding-left: 32px;
    font-size: 18px;
    font-weight: 600;
}

/* 响应式 */
@media (max-width: 360px) {
    .container, .container-wide {
        padding: 16px 12px;
    }
    .card {
        padding: 18px 14px;
    }
    .page-title {
        font-size: 20px;
    }
    .stats-grid {
        grid-template-columns: 1fr;
    }
}

/* 禁止文本选择（特定区域） */
.no-select {
    -webkit-user-select: none;
    user-select: none;
}

/* 滚动条美化 */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: #dee2e6 !important;
    border-radius: 3px !important;
}

::-webkit-scrollbar-thumb:hover {
    background: #adb5bd !important;
}
