﻿/**
 * BWIN Telegram Mini App - Mobile Styles
 * 移动端样式文件
 */

/* ========== CSS 变量 ========== */
:root {
    /* 颜色 */
    --primary-color: #F0B90B;
    --accent-color: #FCD535;
    --dark-bg: #0B0E11;
    --dark-surface: #1E2329;
    --dark-card: #2B3139;
    --text-primary: #FFFFFF;
    --text-secondary: #B7BDC6;
    --border-color: #3A4048;
    
    /* 间距 */
    --spacing-xs: 8px;
    --spacing-sm: 12px;
    --spacing-md: 16px;
    --spacing-lg: 24px;
    --spacing-xl: 32px;
    
    /* 字体 */
    --font-size-xs: 12px;
    --font-size-sm: 14px;
    --font-size-md: 16px;
    --font-size-lg: 18px;
    --font-size-xl: 24px;
    
    /* 圆角 */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    
    /* 阴影 */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.2);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.3);
    
    /* Z-index */
    --z-navbar: 1000;
    --z-bottom-nav: 1000;
    --z-modal: 2000;
    --z-loading: 9999;
}

/* ========== 全局样式 ========== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

html, body {
    width: 100%;
    height: 100%;
    overflow-x: hidden;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
    background: var(--dark-bg);
    color: var(--text-primary);
    font-size: var(--font-size-md);
    line-height: 1.5;
}

/* ========== 布局 ========== */
#app {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 56px;
    background: var(--dark-surface);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 var(--spacing-md);
    z-index: var(--z-navbar);
}

.nav-brand .logo {
    font-size: 24px;
    font-weight: 700;
}

.nav-balance {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 2px;
    align-items: flex-end;
    height: 100%;
}

/* 导航栏余额项目 */
.nav-balance .balance-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 17px;
    font-weight: 600;
    color: var(--text-primary);
    width: 125px; /* 使用固定宽度确保左对齐 */
}

.nav-balance .balance-item span {
    font-size: 17px;
}


/* 其他页面的 balance-item 保持原样 */
.balance-item {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: var(--font-size-sm);
    font-weight: 600;
    color: var(--text-primary);
}

.balance-item .balance-icon {
    font-size: 16px;
}

.icon-btn {
    background: transparent;
    border: none;
    font-size: 20px;
    cursor: pointer;
    padding: var(--spacing-xs);
}

.main-content {
    flex: 1;
    margin-top: 56px;
    margin-bottom: 64px;
    overflow-y: auto;
    overflow-x: hidden;
}

.container {
    padding: var(--spacing-md);
    max-width: 600px;
    margin: 0 auto;
}

.page {
    display: none;
}

.page.active {
    display: block;
}

/* ========== 底部导航栏 ========== */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 64px;
    background: var(--dark-surface);
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: space-around;
    align-items: center;
    z-index: var(--z-bottom-nav);
    padding-bottom: env(safe-area-inset-bottom);
}

.nav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: var(--spacing-sm);
    transition: color 0.2s;
    min-width: 0;
}

.nav-item.active {
    color: var(--primary-color);
}

/* SVG图标样式 */
.nav-icon {
    width: 28px;
    height: 28px;
}

/* Emoji图标样式 */
.nav-emoji {
    font-size: 28px;
    width: auto;
    height: auto;
    display: block;
}

/* ========== 卡片 ========== */
.card {
    background: var(--dark-surface);
    border-radius: var(--radius-md);
    padding: var(--spacing-md);
    margin-bottom: var(--spacing-md);
    box-shadow: var(--shadow-sm);
    /* 文本换行支持 */
    word-wrap: break-word;
    word-break: break-word;
    overflow-wrap: break-word;
    white-space: normal;
}

.card h3,
.card p {
    word-wrap: break-word;
    word-break: break-word;
    overflow-wrap: break-word;
    white-space: normal;
}

/* NestFun.club 品牌配色边框（主页卡片专用）*/
.card.brand-border {
    border: 3px solid;
    box-shadow: 0 0 12px rgba(0, 0, 0, 0.3);
}

/* 黄色边框 - Nest */
.card.brand-border-yellow {
    border-color: #FCD535;
    box-shadow: 0 0 12px rgba(252, 213, 53, 0.3);
}

/* 蓝色边框 - Fun */
.card.brand-border-blue {
    border-color: #2196F3;
    box-shadow: 0 0 12px rgba(33, 150, 243, 0.3);
}

/* 白色边框 - .club */
.card.brand-border-white {
    border-color: #FFFFFF;
    box-shadow: 0 0 12px rgba(255, 255, 255, 0.3);
}

.card.clickable {
    cursor: pointer;
    transition: background 0.2s;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.card.clickable:active {
    background: var(--dark-card);
}

.card-title {
    font-size: var(--font-size-md);
    font-weight: 600;
}

.card-arrow {
    font-size: 24px;
    color: var(--text-secondary);
}

/* ========== 用户卡片 ========== */
.user-card {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
}

.user-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    overflow: hidden;
    flex-shrink: 0;
}

.user-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.user-info {
    flex: 1;
}

.user-name {
    font-size: var(--font-size-lg);
    font-weight: 600;
    margin-bottom: 4px;
}

.user-id {
    font-size: var(--font-size-sm);
    color: var(--text-secondary);
}

/* ========== 余额卡片 ========== */
.balance-card {
    padding: var(--spacing-lg);
}

.balance-grid {
    display: flex;
    align-items: center;
    gap: var(--spacing-lg);
}

.balance-item {
    flex: 1;
    text-align: center;
}

.balance-divider-vertical {
    width: 1px;
    height: 50px;
    background: var(--border-color);
    flex-shrink: 0;
}

.balance-info {
    width: 100%;
}

.balance-label {
    font-size: var(--font-size-sm);
    color: var(--text-secondary);
    margin-bottom: 4px;
}

.balance-value {
    font-size: var(--font-size-xl);
    font-weight: 700;
    color: var(--primary-color);
}

/* ========== 按钮 ========== */
.action-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-sm);
    margin-bottom: var(--spacing-md);
}

.btn {
    padding: var(--spacing-md);
    border-radius: var(--radius-md);
    border: none;
    font-size: var(--font-size-md);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-xs);
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    color: var(--dark-bg);
}

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

.btn-outline {
    background: transparent;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
}

.btn-outline:active {
    background: rgba(240, 185, 11, 0.1);
}

/* ========== Toast 通知 ========== */
.toast {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(-120px);
    background: rgba(11, 14, 17, 0.95);
    color: #FCD535;
    padding: 14px 24px;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 600;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(252, 213, 53, 0.3);
    z-index: 10000;
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    max-width: 85%;
    text-align: center;
    backdrop-filter: blur(10px);
}

.toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* ========== 我的页面头部 ========== */
.profile-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--spacing-lg);
}

.profile-header h1 {
    margin-bottom: 0;
}

.profile-header #tonConnectButton {
    flex-shrink: 0;
}



/* ========== 响应式 ========== */
@media (max-width: 360px) {
    :root {
        --font-size-xs: 11px;
        --font-size-sm: 13px;
        --font-size-md: 15px;
        --font-size-lg: 17px;
        --font-size-xl: 22px;
    }
    
    .container {
        padding: var(--spacing-sm);
    }
}

/* ========== 滚动条 ========== */
::-webkit-scrollbar {
    width: 4px;
}

::-webkit-scrollbar-track {
    background: var(--dark-bg);
}

::-webkit-scrollbar-thumb {
    background: var(--dark-card);
    border-radius: 2px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--border-color);
}

/* ========== 标题 ========== */
h1 {
    font-size: var(--font-size-xl);
    font-weight: 700;
    margin-bottom: var(--spacing-lg);
}

h2 {
    font-size: var(--font-size-lg);
    font-weight: 600;
    margin-bottom: var(--spacing-md);
}

h3 {
    font-size: var(--font-size-md);
    font-weight: 600;
    margin-bottom: var(--spacing-sm);
}

/* ========== 游戏页面 ========== */
#gamePage {
    padding: 0 !important;
}

#gamePage .container {
    padding: var(--spacing-md);
}

/* 游戏列表视图 */
#gameListView {
    display: block;
}

/* 游戏运行视图 */
#gamePlayView {
    width: 100%;
    position: fixed;
    top: 56px; /* navbar 高度 */
    left: 0;
    right: 0;
    bottom: 64px; /* bottom-nav 高度 */
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    z-index: 1001;
    background: var(--dark-bg);
}

/* 游戎工具栏 */
.game-toolbar {
    height: 50px;
    background: var(--dark-surface);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: stretch; /* 改为stretch让子元素填满高度 */
    justify-content: space-between;
    padding: 0; /* 移除padding让边框到达边缘 */
    flex-shrink: 0;
    gap: 0; /* 移除间距让边框紧密相连 */
}

.toolbar-btn {
    background: transparent;
    border: 3px solid #FCD535; /* Nest黄色边框 */
    border-radius: 0; /* 直角边框 */
    color: var(--text-primary);
    font-size: var(--font-size-sm);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 0; /* 移除padding让边框填满 */
    transition: all 0.2s;
    box-shadow: 0 0 12px rgba(252, 213, 53, 0.5);
    flex: 1; /* 占据剩余空间 */
    height: 100%; /* 填满高度 */
}

.toolbar-btn:active {
    transform: scale(0.95);
}

.toolbar-btn span:first-child {
    font-size: 24px;
}

.toolbar-exit {
    color: var(--text-secondary);
    border-color: #FFFFFF !important; /* Club白色边框 */
    box-shadow: 0 0 12px rgba(255, 255, 255, 0.5) !important;
}

.toolbar-exit span:first-child {
    font-size: 24px;
    font-weight: 300;
}

.toolbar-exit:hover {
    color: var(--primary-color);
}

/* Jackpot 徽章样式 */
.game-jackpot {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 4px 16px;
    background: linear-gradient(135deg, rgba(33, 150, 243, 0.15), rgba(33, 150, 243, 0.25));
    border: 3px solid #2196F3; /* 加粗边框 */
    border-radius: 0; /* 直角边框 */
    box-shadow: 0 0 12px rgba(33, 150, 243, 0.5);
    flex: 2; /* JP占据更多空间 */
    height: 100%; /* 填满高度 */
}

.jackpot-label {
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 1px;
    color: #ff3333;
    text-transform: uppercase;
    margin-bottom: 2px;
    text-shadow: 0 0 8px rgba(255, 51, 51, 0.8),
                 0 0 15px rgba(255, 51, 51, 0.6);
}

.jackpot-amount {
    font-size: 20px;
    font-weight: 700;
    background: linear-gradient(
        90deg,
        #00FFFF 0%,   /* Cyan */
        #0080FF 33%,  /* Blue */
        #FF00FF 66%,  /* Pink/Magenta */
        #00FFFF 100%  /* Cyan */
    );
    background-size: 200% 100%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1;
    filter: drop-shadow(0 0 10px rgba(0, 255, 255, 0.9));
    animation: gradientScroll 3s linear infinite, jackpotBlink 1.5s ease-in-out infinite;
}

/* 渐变滚动动画 */
@keyframes gradientScroll {
    0% {
        background-position: 200% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

/* 闪烁动画 */
@keyframes jackpotBlink {
    0%, 100% {
        opacity: 1;
        filter: drop-shadow(0 0 10px rgba(0, 255, 255, 0.9));
    }
    50% {
        opacity: 0.7;
        filter: drop-shadow(0 0 20px rgba(0, 255, 255, 1)) 
                drop-shadow(0 0 30px rgba(255, 0, 255, 0.8));
    }
}

/* 旋转动画 (用于刷新按钮) */
@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* 更新时的高光闪烁效果 */
.jackpot-amount.updating {
    animation: flashBlink 0.1s ease-in-out 8 !important;
    background-position: 50% 50% !important;
}

@keyframes flashBlink {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
        filter: drop-shadow(0 0 25px rgba(255, 255, 255, 1))
                drop-shadow(0 0 40px rgba(0, 255, 255, 1));
    }
    50% {
        opacity: 0.5;
        transform: scale(1.1);
        filter: drop-shadow(0 0 50px rgba(255, 255, 255, 1))
                drop-shadow(0 0 60px rgba(0, 255, 255, 1));
    }
}

#party-crisis-game-container {
    width: 100%;
    height: 100%;
    flex: 1;
    overflow: hidden;
    position: relative;
    background: #0a0a0a;
}

#game-iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
    display: block;
    background: #0a0a0a;
    z-index: 1;
}

/* 4宫格游戏布局 */
.games-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--spacing-md);
    margin-top: var(--spacing-md);
}

/* 游戏卡片 */
.game-card {
    background: var(--dark-surface);
    border-radius: var(--radius-md);
    overflow: hidden;
    aspect-ratio: 1 / 1;
    position: relative;
    transition: transform 0.2s, box-shadow 0.2s;
}

.game-card:active {
    transform: scale(0.95);
}

.game-card:not(.coming-soon):hover {
    box-shadow: 0 4px 16px rgba(240, 185, 11, 0.3);
}

.game-poster {
    width: 100%;
    height: 100%;
    background: var(--dark-bg);
    overflow: hidden;
    position: relative;
}

.game-poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.game-tags {
    position: absolute;
    bottom: var(--spacing-sm);
    left: var(--spacing-sm);
    right: var(--spacing-sm);
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
    z-index: 2;
}

.game-tag {
    background: rgba(240, 185, 11, 0.95);
    color: #0B0E11;
    padding: 4px 8px;
    border-radius: 8px;
    font-size: 10px;
    font-weight: 600;
    backdrop-filter: blur(4px);
}

/* 即将上线样式 */
.game-card.coming-soon {
    opacity: 0.7;
    cursor: default;
}

.game-card.coming-soon .game-poster {
    filter: grayscale(0.3);
}

/* ========== 排行榜样式 ========== */
.leaderboard-modal {
    max-width: 500px;
}

.leaderboard-list {
    max-height: 60vh;
    overflow-y: auto;
}

.leaderboard-item {
    display: flex;
    align-items: center;
    padding: 12px;
    background: var(--dark-surface);
    border-radius: 8px;
    margin-bottom: 8px;
    transition: background 0.2s;
}

.leaderboard-item:hover {
    background: var(--dark-card);
}

.leaderboard-item.current-user {
    background: rgba(240, 185, 11, 0.1);
    border: 2px solid #F0B90B;
}

.leaderboard-rank {
    font-size: 20px;
    font-weight: 700;
    min-width: 50px;
    text-align: center;
}

.leaderboard-rank.top1 {
    color: #FFD700;
    font-size: 24px;
}

.leaderboard-rank.top2 {
    color: #C0C0C0;
    font-size: 24px;
}

.leaderboard-rank.top3 {
    color: #CD7F32;
    font-size: 24px;
}

.leaderboard-info {
    flex: 1;
    margin-left: 12px;
}

.leaderboard-name {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 2px;
}

.leaderboard-uid {
    font-size: 12px;
    color: var(--text-secondary);
}

.leaderboard-amount {
    font-size: 18px;
    font-weight: 700;
    color: #FCD535;
    text-align: right;
}


/* ========== 安全区域适配 ========== */
@supports (padding: max(0px)) {
    body {
        padding-top: env(safe-area-inset-top);
        padding-bottom: env(safe-area-inset-bottom);
    }
    
    .navbar {
        padding-top: env(safe-area-inset-top);
        height: calc(56px + env(safe-area-inset-top));
    }
    
    .bottom-nav {
        padding-bottom: env(safe-area-inset-bottom);
        height: calc(64px + env(safe-area-inset-bottom));
    }
}

/* ========== �̼�ϵͳ��ʽ ========== */
/* Tabs */
.merchant-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
    background: var(--dark-surface);
    border-radius: var(--radius-md);
    padding: 4px;
}

.merchant-tab {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 12px;
    background: transparent;
    border: none;
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.merchant-tab.active {
    background: var(--primary-color);
    color: #000;
}

.merchant-tab span:first-child {
    font-size: 18px;
}

/* Content */
.merchant-content {
    min-height: 300px;
}

/* Actions */
.merchant-actions {
    margin-bottom: 16px;
}

/* �̼��б� */
.merchant-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.merchant-card {
    background: var(--dark-surface);
    border-radius: var(--radius-md);
    padding: 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
}

.merchant-card:active {
    transform: scale(0.98);
    background: var(--dark-card);
}

.merchant-card.official {
    border: 1px solid rgba(240, 185, 11, 0.3);
}

.official-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    background: var(--primary-color);
    color: #000;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
}

.merchant-avatar {
    font-size: 48px;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--dark-bg);
    border-radius: var(--radius-md);
}

.merchant-info {
    flex: 1;
}

.merchant-name {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 6px;
}

.merchant-stats {
    display: flex;
    gap: 12px;
    font-size: 12px;
    color: var(--text-secondary);
    margin-bottom: 4px;
}

.merchant-price,
.merchant-remaining {
    font-size: 13px;
    color: var(--text-secondary);
    margin-top: 2px;
}

.merchant-arrow {
    font-size: 24px;
    color: var(--text-secondary);
}

/* �����б� */
.order-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.order-card {
    background: var(--dark-surface);
    border-radius: var(--radius-md);
    padding: 16px;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
}

.order-card:active {
    transform: scale(0.98);
    background: var(--dark-card);
}

.order-card.pending-highlight {
    border: 1px solid rgba(255, 184, 0, 0.5);
    background: rgba(255, 184, 0, 0.05);
}

.order-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border-color);
}

.order-id {
    font-family: monospace;
    color: var(--text-secondary);
    font-size: 13px;
}

.order-body {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.order-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
}

.order-row span:first-child {
    color: var(--text-secondary);
}

.order-arrow {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 24px;
    color: var(--text-secondary);
}

/* ״̬���� */
.status-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}

.status-badge.status-warning {
    background: rgba(255, 184, 0, 0.2);
    color: #FFB800;
}

.status-badge.status-info {
    background: rgba(33, 150, 243, 0.2);
    color: #2196F3;
}

.status-badge.status-success {
    background: rgba(76, 175, 80, 0.2);
    color: #4CAF50;
}

.status-badge.status-secondary {
    background: rgba(183, 189, 198, 0.2);
    color: var(--text-secondary);
}

.status-badge.status-active {
    background: rgba(76, 175, 80, 0.2);
    color: #4CAF50;
}

/* ����/��/����״̬ */
.loading-state,
.empty-state,
.error-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    text-align: center;
}

.empty-icon,
.error-icon {
    font-size: 64px;
    margin-bottom: 16px;
}

.loading-state p,
.empty-state p,
.error-state p {
    color: var(--text-secondary);
    margin-top: 12px;
}

/* �̼�״̬��Ƭ */
.merchant-status-card {
    margin-bottom: 20px;
}

.status-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
}

/* �̼�����ҳ */
.merchant-detail-page,
.order-detail-page,
.merchant-order-detail-page {
    padding-bottom: 20px;
}

.btn-back {
    margin-bottom: 16px;
}

.merchant-detail-header,
.order-detail-header {
    text-align: center;
    margin-bottom: 20px;
}

.merchant-avatar-large {
    font-size: 80px;
    margin: 0 auto 12px;
}

.merchant-desc {
    color: var(--text-secondary);
    margin-top: 8px;
}

.reputation-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-top: 12px;
}

.reputation-item {
    text-align: center;
}

.reputation-value {
    font-size: 24px;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 4px;
}

.reputation-label {
    font-size: 12px;
    color: var(--text-secondary);
}

/* �۸�λ */
.price-tiers {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 12px;
}

.price-tier {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    background: var(--dark-bg);
    border-radius: var(--radius-sm);
}

.tier-label {
    font-weight: 600;
}

.tier-range {
    flex: 1;
    text-align: center;
    color: var(--text-secondary);
    font-size: 13px;
}

.tier-rate {
    font-weight: 700;
    color: var(--primary-color);
}

/* ��� */
.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--text-primary);
}

.form-input,
.form-select,
.form-textarea {
    width: 100%;
    padding: 12px;
    background: var(--dark-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 16px;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

.form-textarea {
    resize: vertical;
}

/* �۸�Ԥ�� */
.price-preview {
    background: var(--dark-bg);
    border-radius: var(--radius-sm);
    padding: 16px;
    margin-bottom: 16px;
}

.preview-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.preview-row:last-child {
    margin-bottom: 0;
    padding-top: 8px;
    border-top: 1px solid var(--border-color);
}

/* ������Ϣ�� */
.order-info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid var(--border-color);
}

.order-info-row:last-child {
    border-bottom: none;
}

.copyable {
    cursor: pointer;
    color: var(--primary-color);
    text-decoration: underline;
}

.copyable:hover {
    opacity: 0.8;
}

/* ͷ��ѡ���� */
.avatar-selector {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 8px;
    margin-bottom: 12px;
}

.avatar-option {
    padding: 12px;
    background: var(--dark-bg);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 24px;
    cursor: pointer;
    transition: all 0.2s;
}

.avatar-option.active {
    border-color: var(--primary-color);
    background: rgba(240, 185, 11, 0.1);
}

/* Alert */
.alert {
    padding: 12px;
    border-radius: var(--radius-sm);
    margin-bottom: 16px;
}

.alert-info {
    background: rgba(33, 150, 243, 0.1);
    border: 1px solid rgba(33, 150, 243, 0.3);
    color: #2196F3;
}

.alert strong {
    display: block;
    margin-bottom: 4px;
}

.alert p {
    margin: 0;
    font-size: 14px;
}

/* ��ť���� */
.btn-danger {
    background: #ff4444;
    color: #fff;
}

.btn-danger:hover {
    background: #cc0000;
}
