/* 全局样式 - 黑色金融主题 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* 防止横向滚动 - 仅移动端生效 */
@media (max-width: 768px) {
    html {
        overflow-x: hidden !important;
        width: 100% !important;
        max-width: 100vw !important;
        position: relative;
    }
    
    body {
        overflow-x: hidden !important;
        width: 100% !important;
        max-width: 100vw !important;
    }
    
    body.user-layout {
        overflow-x: hidden !important;
        width: 100% !important;
        max-width: 100vw !important;
        position: fixed;
        left: 0;
        right: 0;
        height: 100vh;
        overflow: hidden;
    }
}

/* 强制所有元素不超出视口 - 仅移动端 */
img, video, iframe, embed, object {
    max-width: 100%;
    height: auto;
}

:root {
    --bg-primary: #0d0d0d;
    --bg-secondary: #111111;
    --bg-card: #1a1a1a;
    --bg-hover: #222222;
    --text-primary: #ffffff;
    --text-secondary: #cccccc;
    --text-muted: #888888;
    --accent-gold: #E5B80B;
    --accent-gold-hover: #f5c81b;
    --success: #00c851;
    --danger: #ff4444;
    --warning: #ffbb33;
    --info: #33b5e5;
    --border-color: #333333;
    --shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}

html, body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    margin: 0;
    padding: 0;
    min-height: 100vh;
}

body.user-layout {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

.user-layout .container {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    padding: 0;
}

/* 移动端容器特殊处理 */
@media (max-width: 768px) {
    .user-layout .container {
        height: 100vh;
        overflow: hidden;
        width: 100%;
        max-width: 100vw;
        box-sizing: border-box;
    }
}

/* 跑马灯 */
.marquee-container {
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
    padding: 12px 0;
    overflow: hidden;
    position: relative;
    z-index: 999;
    margin-bottom: 20px;
    width: 100%;
}

.marquee-wrapper {
    overflow: hidden;
    white-space: nowrap;
    width: 100%;
    position: relative;
    height: 30px;
}

.marquee-content {
    display: inline-block !important;
    white-space: nowrap !important;
    animation: marquee-scroll 40s linear infinite !important;
    will-change: transform;
    min-width: max-content;
}

.marquee-content:hover {
    animation-play-state: paused;
}

.marquee-item {
    display: inline-block !important;
    margin-right: 100px !important;
    margin-left: 0 !important;
    padding-right: 0 !important;
    font-size: 14px !important;
    white-space: nowrap !important;
    line-height: 30px !important;
    vertical-align: middle !important;
    font-weight: 500;
}

/* 买入和卖出颜色由JavaScript动态设置，这里只保留默认样式作为后备 */
.marquee-item.buy {
    /* 颜色由内联样式动态设置 */
}

.marquee-item.sell {
    /* 颜色由内联样式动态设置 */
}

.marquee-separator {
    display: none;
}

@keyframes marquee-scroll {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-16.666%);
    }
}

/* 头部导航 */
.header {
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
    padding: 8px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow);
    flex-shrink: 0;
}

.user-layout .header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
}

.header-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: nowrap;
    position: relative;
}

.logo h1 {
    color: var(--accent-gold);
    font-size: 24px;
    font-weight: bold;
}

.logo-img {
    height: 60px;
    width: 120px;
    object-fit: contain;
    margin: 0;
    padding: 0;
}

.nav {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.nav-item {
    color: var(--text-secondary);
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 4px;
    transition: all 0.3s;
}

.nav-item:hover,
.nav-item.active {
    background: var(--bg-hover);
    color: var(--accent-gold);
}

/* 前台用户端：隐藏顶部横向导航，仅使用右侧抽屉 */
.user-layout .nav {
    display: none;
}

/* 导航 - 右上角三条杠 + 右侧抽屉 */
.nav-toggle {
    display: flex;
    width: 32px;
    height: 32px;
    border: none;
    background: transparent;
    cursor: pointer;
    flex-shrink: 0;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    padding: 0;
    margin-left: auto;
    position: relative;
    z-index: 10;
}

.nav-toggle:hover span {
    background: var(--accent-gold);
}

.nav-toggle span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--text-primary);
    border-radius: 2px;
    transition: all 0.2s ease;
}

.nav-drawer-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(3px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease-out;
    z-index: 1200;
}

.nav-drawer {
    position: fixed;
    top: 0;
    right: -260px;
    width: 260px;
    height: 100vh;
    background: #111827;
    box-shadow: -2px 0 12px rgba(0, 0, 0, 0.6);
    z-index: 1300;
    display: flex;
    flex-direction: column;
    transition: right 0.25s ease-out;
}

.nav-drawer-header {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-drawer-title {
    color: var(--accent-gold);
    font-size: 16px;
    font-weight: 600;
}

.nav-drawer-close {
    border: none;
    background: transparent;
    color: var(--text-secondary);
    font-size: 24px;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s;
}

.nav-drawer-close:hover {
    color: var(--accent-gold);
}

.nav-drawer-content {
    padding: 12px 16px;
    overflow-y: auto;
}

.nav-drawer-content .nav-item {
    display: block;
    padding: 10px 12px;
    margin-bottom: 6px;
}

body.nav-drawer-open .nav-drawer-overlay {
    opacity: 1;
    pointer-events: auto;
}

body.nav-drawer-open .nav-drawer {
    right: 0;
}

/* 卡片 */
.card {
    background: var(--bg-card);
    border-radius: 8px;
    box-shadow: var(--shadow);
    margin-bottom: 20px;
    border: 1px solid var(--border-color);
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    overflow-x: hidden;
}

.card-header {
    padding: 20px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    flex-wrap: wrap;
    gap: 10px;
}

.card-header h2 {
    font-size: 18px;
    color: var(--text-primary);
    margin: 0;
}

.card-body {
    padding: 20px;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    overflow-x: hidden;
}

/* 盈亏记录表格卡片body减少padding */
.profit-records .card-body {
    padding: 15px 10px !important;
}

/* 按钮 */
.btn {
    display: inline-block;
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s;
    text-decoration: none;
    text-align: center;
}

.btn-primary {
    background: var(--accent-gold);
    color: #000;
    font-weight: 600;
    font-size: 16px;
    padding: 16px 24px;
    min-height: 52px;
    letter-spacing: 0.5px;
    transition: all 0.3s;
}

/* 管理后台移动端导航按钮 */
.admin-layout .nav-toggle {
    display: none;
}

/* 响应式：小屏幕使用抽屉导航 */
@media (max-width: 992px) {
    .admin-layout .header-content {
        padding: 0 15px;
    }

    .admin-layout .nav {
        display: none;
    }
    
    .admin-layout .nav-toggle {
        display: flex;
    }
    
    .admin-layout .logo h1 {
        font-size: 18px;
    }
}

/* 管理后台抽屉导航样式 */
.admin-layout .nav-drawer {
    background: var(--bg-secondary);
    border-left: 1px solid var(--border-color);
}

.admin-layout .nav-drawer-header {
    background: var(--bg-card);
    border-bottom: 1px solid var(--border-color);
}

.admin-layout .nav-drawer-content .nav-item {
    color: var(--text-secondary);
    border-radius: 4px;
    transition: all 0.3s;
}

.admin-layout .nav-drawer-content .nav-item:hover,
.admin-layout .nav-drawer-content .nav-item.active {
    background: var(--bg-hover);
    color: var(--accent-gold);
}

.btn-primary:hover {
    background: var(--accent-gold-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(229, 184, 11, 0.3);
}

.btn-danger {
    background: var(--danger);
    color: #fff;
}

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

.btn-success {
    background: var(--success);
    color: #fff;
}

.btn-success:hover {
    background: #00e65c;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 12px;
}

.btn-block {
    display: block;
    width: 100%;
}

.btn-buy {
    background: var(--success);
    color: #fff;
}

.btn-buy.active {
    background: var(--success);
    box-shadow: 0 0 10px rgba(0, 200, 81, 0.5);
}

.btn-sell {
    background: var(--danger);
    color: #fff;
}

.btn-sell.active {
    background: var(--danger);
    box-shadow: 0 0 10px rgba(255, 68, 68, 0.5);
}

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

.form-group label {
    display: block;
    margin-bottom: 10px;
    color: var(--text-secondary);
    font-size: 15px;
    font-weight: 500;
}

.form-control {
    width: 100%;
    padding: 16px 20px;
    background: var(--bg-secondary);
    border: 2px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 16px;
    transition: all 0.3s;
    min-height: 52px;
    box-sizing: border-box;
}

.form-control::placeholder {
    color: var(--text-muted);
    opacity: 0.7;
}

.form-control:focus {
    outline: none;
    border-color: var(--accent-gold);
    box-shadow: 0 0 0 4px rgba(229, 184, 11, 0.15);
    background: var(--bg-card);
}

.form-control:hover {
    border-color: #444444;
}

.code-input {
    display: flex;
    gap: 10px;
}

.code-input input {
    flex: 1;
}

.code-input .btn {
    min-width: 110px;
    white-space: nowrap;
}

/* 表格 */
.table {
    width: 100%;
    max-width: 100%;
    border-collapse: collapse;
    font-size: 14px;
    table-layout: auto;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.table thead {
    background: var(--bg-secondary);
}

.table th {
    padding: 10px 8px;
    text-align: left;
    color: var(--text-secondary);
    font-weight: 600;
    border-bottom: 2px solid var(--border-color);
    word-wrap: break-word;
    overflow-wrap: break-word;
    max-width: 0;
    font-size: 13px;
}

.table td {
    padding: 10px 8px;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-primary);
    word-wrap: break-word;
    overflow-wrap: break-word;
    max-width: 0;
    font-size: 13px;
}

/* 盈亏记录表格 - 移除边框，减少行间距，增大字体 */
.profit-records .card-body .table td {
    border-bottom: none !important;
    padding: 1px 1px !important;
    font-size: 11px !important;
    line-height: 1.1 !important;
}

.profit-records .card-body .table th {
    border-bottom: none !important;
    padding: 1px 1px !important;
    font-size: 11px !important;
    line-height: 1.1 !important;
}

.table tbody tr:hover {
    background: var(--bg-hover);
}

/* 徽章 */
.badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: bold;
}

.badge-success {
    background: var(--success);
    color: #fff;
}

.badge-danger {
    background: var(--danger);
    color: #fff;
}

.badge-warning {
    background: var(--warning);
    color: #000;
}

.badge-info {
    background: var(--info);
    color: #fff;
}

/* 认证页面 */
.auth-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: linear-gradient(135deg, #0d0d0d 0%, #1a1a1a 100%);
}

.auth-container {
    width: 100%;
    max-width: 500px;
    padding: 20px;
}

.auth-card {
    background: var(--bg-card);
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.6);
    border: 1px solid var(--border-color);
    overflow: hidden;
}

.auth-header {
    padding: 40px 30px 30px;
    text-align: center;
    border-bottom: 1px solid var(--border-color);
}

.auth-header h1 {
    color: var(--accent-gold);
    font-size: 32px;
    margin-bottom: 12px;
    font-weight: 700;
    letter-spacing: 1px;
}

.auth-header p {
    color: var(--text-secondary);
    font-size: 15px;
}

.auth-form {
    padding: 35px 30px;
}

.auth-footer {
    text-align: center;
    margin-top: 25px;
    font-size: 14px;
}

.auth-footer a {
    color: var(--accent-gold);
    text-decoration: none;
    transition: all 0.3s;
    font-weight: 500;
}

.auth-footer a:hover {
    text-decoration: underline;
    color: var(--accent-gold-hover);
}

/* 注册协议样式 */
.agreement-content {
    max-height: 200px;
    overflow-y: auto;
    padding: 15px;
    background: var(--bg-secondary);
    border-radius: 8px;
    margin-bottom: 15px;
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.8;
}

.agreement-content h3 {
    color: var(--accent-gold);
    margin-bottom: 15px;
    font-size: 18px;
}

.agreement-content p {
    margin-bottom: 10px;
}

.agreement-content ol,
.agreement-content ul {
    margin-left: 20px;
    margin-bottom: 15px;
}

.agreement-content li {
    margin-bottom: 8px;
}

.agreement-content a {
    color: var(--accent-gold);
    text-decoration: none;
}

.agreement-content a:hover {
    text-decoration: underline;
}

#agreementGroup label {
    display: flex;
    align-items: flex-start;
    cursor: pointer;
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.6;
}

#agreementGroup label input[type="checkbox"] {
    margin-right: 8px;
    margin-top: 3px;
    flex-shrink: 0;
    cursor: pointer;
}

#agreementGroup label span a {
    color: var(--accent-gold);
    text-decoration: none;
}

#agreementGroup label span a:hover {
    text-decoration: underline;
}

/* 主要内容区域 */
.main-content {
    padding: 20px 0;
    flex: 1;
}

/* 移动端内容区域特殊处理 */
@media (max-width: 768px) {
    .user-layout .main-content {
        margin-top: 0;
        padding-top: 70px;
        padding-left: 10px;
        padding-right: 10px;
        height: calc(100vh - 70px);
        overflow-y: auto;
        overflow-x: hidden;
        -webkit-overflow-scrolling: touch;
        width: 100%;
        max-width: 100vw;
        box-sizing: border-box;
        /* 隐藏滚动条但保持滚动功能 */
        scrollbar-width: none; /* Firefox */
        -ms-overflow-style: none; /* IE and Edge */
    }
    
    /* 隐藏Webkit浏览器的滚动条 */
    .user-layout .main-content::-webkit-scrollbar {
        display: none;
    }
    
    .user-layout .main-content.has-marquee {
        padding-top: 100px;
        height: calc(100vh - 100px);
    }
}

/* 行情区域 */
.market-section {
    margin-bottom: 20px;
}

.ticker-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
}

.ticker-item {
    background: var(--bg-secondary);
    padding: 15px;
    border-radius: 6px;
    border: 1px solid var(--border-color);
    transition: all 0.3s;
}

.ticker-item:hover {
    border-color: var(--accent-gold);
    transform: translateY(-2px);
}

.ticker-symbol {
    font-weight: bold;
    color: var(--text-primary);
    margin-bottom: 5px;
}

.ticker-price {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 5px;
}

.ticker-change {
    font-size: 14px;
}

.ticker-change.positive {
    color: var(--success);
}

.ticker-change.negative {
    color: var(--danger);
}

/* K线图区域 */
.chart-section {
    margin-bottom: 20px;
}

.tradingview-widget-container {
    background: var(--bg-secondary);
    border-radius: 8px;
    padding: 0;
    overflow: hidden;
    min-height: 600px;
    position: relative;
}

.tradingview-widget-container iframe {
    border: none;
}

/* 覆盖层：完全阻止TradingView logo的点击 */
.tradingview-logo-blocker {
    position: absolute !important;
    bottom: 0 !important;
    left: 0 !important;
    width: 180px !important;
    height: 50px !important;
    background: transparent !important;
    z-index: 99999 !important;
    cursor: default !important;
    pointer-events: auto !important;
    display: block !important;
}

/* 确保覆盖层始终在最上层 */
#tradingview_gold {
    position: relative;
}

/* 如果TradingView的iframe内部有logo区域，通过更高的z-index覆盖 */
.tradingview-widget-container > div {
    position: relative;
}

/* 持仓区域 */
.positions-section {
    margin-bottom: 20px;
}

/* 交易布局 */
.trade-layout {
    display: grid;
    grid-template-columns: 400px 1fr;
    gap: 20px;
}

.trade-panel {
    position: sticky;
    top: 80px;
    height: fit-content;
}

.trade-info {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.trade-type {
    display: flex;
    gap: 10px;
}

.trade-type button {
    flex: 1;
    padding: 12px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    font-weight: bold;
    transition: all 0.3s;
}

.amount-preview {
    padding: 15px;
    background: var(--bg-secondary);
    border-radius: 4px;
    font-size: 20px;
    font-weight: bold;
    color: var(--accent-gold);
    text-align: center;
}

/* 钱包概览 */
.wallet-overview {
    margin-bottom: 20px;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    overflow-x: hidden;
}

/* 总资产估值卡片 */
.asset-summary-card {
    background: linear-gradient(135deg, rgba(229, 184, 11, 0.15) 0%, rgba(229, 184, 11, 0.05) 100%);
    border: 1px solid rgba(229, 184, 11, 0.3);
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 20px;
}

.asset-summary-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.asset-summary-title {
    color: var(--text-secondary);
    font-size: 14px;
}

.asset-total-value {
    color: var(--text-primary);
    font-size: 36px;
    font-weight: bold;
    margin-bottom: 12px;
    line-height: 1.2;
}

.asset-today-profit {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-secondary);
    font-size: 14px;
}

.profit-value {
    color: var(--text-primary);
    font-weight: 500;
}

.profit-percent {
    color: var(--success);
    font-weight: 500;
}

.profit-percent.negative {
    color: var(--danger);
}

/* 资产卡片网格 */
.wallet-stats-grid {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 16px;
    margin-bottom: 20px;
}

.asset-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 20px;
    position: relative;
    transition: all 0.3s ease;
    min-height: 140px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.asset-card:hover {
    border-color: rgba(229, 184, 11, 0.5);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.asset-card.clickable {
    cursor: pointer;
}

.asset-card-label {
    color: var(--text-secondary);
    font-size: 13px;
    margin-bottom: 8px;
}

.asset-card-value {
    color: var(--accent-gold);
    font-size: 28px;
    font-weight: bold;
    line-height: 1.2;
    margin-bottom: 4px;
}

.asset-card-unit {
    color: var(--text-muted);
    font-size: 12px;
}

.asset-card-desc {
    color: var(--text-muted);
    font-size: 11px;
    margin-top: 8px;
    line-height: 1.4;
}

.asset-card-action {
    margin-top: 12px;
    padding: 6px 12px;
    background: rgba(229, 184, 11, 0.2);
    border: 1px solid rgba(229, 184, 11, 0.4);
    border-radius: 6px;
    color: var(--accent-gold);
    font-size: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
}

.asset-card-action:hover {
    background: rgba(229, 184, 11, 0.3);
    border-color: var(--accent-gold);
}

.wallet-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.stat-item {
    background: var(--bg-secondary);
    padding: 20px;
    border-radius: 6px;
    border: 1px solid var(--border-color);
    text-align: center;
}

.stat-label {
    color: var(--text-secondary);
    font-size: 14px;
    margin-bottom: 10px;
}

.stat-value {
    color: var(--accent-gold);
    font-size: 24px;
    font-weight: bold;
}

.wallet-actions {
    display: flex !important;
    flex-direction: column !important;
    gap: 20px;
    margin-bottom: 20px;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    overflow-x: hidden;
}

/* 团队统计 */
.team-stats {
    margin-bottom: 20px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.stat-card {
    background: var(--bg-secondary);
    padding: 20px;
    border-radius: 6px;
    border: 1px solid var(--border-color);
    text-align: center;
}

/* 邀请码 */
.invite-section {
    margin-bottom: 20px;
}

.invite-code-box {
    text-align: center;
}

.invite-code {
    font-size: 32px;
    font-weight: bold;
    color: var(--accent-gold);
    padding: 20px;
    background: var(--bg-secondary);
    border-radius: 6px;
    margin-bottom: 20px;
    letter-spacing: 4px;
}

.invite-link {
    margin-top: 20px;
}

/* 公告列表 */
.announcements-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.announcement-content {
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 15px;
}

.announcement-time {
    color: var(--text-muted);
    font-size: 12px;
}

/* 公告弹窗样式 */
.announcement-popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
    margin: 0;
}

.announcement-popup.hidden {
    display: none !important;
}

.announcement-popup-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(4px);
    cursor: pointer;
    z-index: 10000;
}

.announcement-popup-content {
    position: relative;
    background: var(--bg-card);
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.6);
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    border: 1px solid var(--border-color);
    z-index: 10001;
    margin: auto;
    transform: none !important;
    top: auto !important;
    left: auto !important;
    right: auto !important;
    bottom: auto !important;
    pointer-events: auto;
}

.announcement-popup-header {
    padding: 20px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.announcement-popup-header h3 {
    color: var(--accent-gold);
    font-size: 20px;
    margin: 0;
}

.announcement-popup-close {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 28px;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: all 0.3s;
    z-index: 10002;
    position: relative;
    line-height: 1;
    pointer-events: auto;
    user-select: none;
}

.announcement-popup-close:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.announcement-popup-body {
    padding: 20px;
    overflow-y: auto;
    flex: 1;
    color: var(--text-secondary);
    line-height: 1.8;
}

.announcement-popup-body img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin-bottom: 15px;
}

.announcement-popup-footer {
    padding: 15px 20px;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.announcement-popup-pagination {
    color: var(--text-muted);
    font-size: 14px;
}

.announcement-popup-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.announcement-popup-actions .btn {
    padding: 8px 16px;
    font-size: 14px;
}

/* 移动端适配 */
@media (max-width: 768px) {
    .announcement-popup-content {
        width: 95%;
        max-height: 90vh;
    }
    
    .announcement-popup-header {
        padding: 15px;
    }
    
    .announcement-popup-body {
        padding: 15px;
    }
    
    .announcement-popup-footer {
        padding: 12px 15px;
        flex-direction: column;
        align-items: stretch;
    }
    
    .announcement-popup-actions {
        width: 100%;
        justify-content: space-between;
    }
    
    .announcement-popup-actions .btn {
        flex: 1;
    }
}

/* 模态框 */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    overflow: auto;
}

.modal-content {
    background: var(--bg-card);
    margin: 50px auto;
    padding: 0;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    width: 90%;
    max-width: 600px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

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

.modal-header h3 {
    margin: 0;
    color: var(--text-primary);
}

.close {
    color: var(--text-secondary);
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    line-height: 1;
}

.close:hover {
    color: var(--accent-gold);
}

.modal-body {
    padding: 20px;
}

/* 搜索框 */
.search-box {
    display: flex;
    gap: 10px;
}

.search-box .form-control {
    flex: 1;
}

/* 仪表盘 */
.dashboard {
    margin-bottom: 20px;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .wallet-stats-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 12px;
    }
    
    .asset-card {
        padding: 16px;
        min-height: 120px;
    }
    
    .asset-card-value {
        font-size: 24px;
    }
    
    .asset-total-value {
        font-size: 32px;
    }
    
    .header-content {
        flex-direction: column;
        gap: 15px;
    }
    
    .nav {
        width: 100%;
        justify-content: center;
    }
    
    .trade-layout {
        grid-template-columns: 1fr;
    }
    
    .trade-panel {
        position: static;
    }
    
    /* 钱包操作区域在移动端垂直排列 */
    .wallet-actions {
        flex-direction: column !important;
    }
    
    .wallet-stats,
    .stats-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }
    
    .ticker-list {
        grid-template-columns: repeat(2, 1fr) !important;
    }
    
    /* 移动端固定头部和内容区域滚动 */
    .user-layout .header {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        width: 100%;
        max-width: 100vw;
        z-index: 1000;
        box-sizing: border-box;
    }
    
    .user-layout .main-content {
        margin-top: 0;
        padding-top: 70px;
        padding-left: 10px;
        padding-right: 10px;
        height: calc(100vh - 70px);
        overflow-y: auto;
        overflow-x: hidden !important;
        -webkit-overflow-scrolling: touch;
        width: 100% !important;
        max-width: 100vw !important;
        box-sizing: border-box;
        /* 隐藏滚动条但保持滚动功能 */
        scrollbar-width: none; /* Firefox */
        -ms-overflow-style: none; /* IE and Edge */
    }
    
    /* 隐藏Webkit浏览器的滚动条 */
    .user-layout .main-content::-webkit-scrollbar {
        display: none;
    }
    
    .user-layout .marquee-container {
        position: fixed;
        top: 60px;
        left: 0;
        right: 0;
        width: 100%;
        max-width: 100vw;
        z-index: 999;
        margin-bottom: 0;
        box-sizing: border-box;
    }
    
    .user-layout .main-content.has-marquee {
        padding-top: 100px;
        height: calc(100vh - 100px);
    }
    
    /* 防止页面横向滚动 - 移动端强制 */
    .user-layout * {
        max-width: 100vw !important;
        box-sizing: border-box !important;
    }
    
    /* 确保所有容器不超出 */
    .user-layout .container,
    .user-layout section,
    .user-layout .card,
    .user-layout .card-header,
    .user-layout .card-body,
    .user-layout .wallet-overview,
    .user-layout .wallet-actions,
    .user-layout .wallet-logs,
    .user-layout .profit-records {
        max-width: 100vw !important;
        width: 100% !important;
        box-sizing: border-box !important;
        overflow-x: hidden !important;
    }
    
    /* 表格容器特殊处理 - 禁止横向滚动 */
    .user-layout .card-body {
        overflow-x: hidden !important;
        overflow-y: visible !important;
        max-width: 100vw !important;
        width: 100% !important;
        position: relative;
        padding: 0 !important;
    }
    
    /* 盈亏记录卡片body减少padding */
    .profit-records .card-body {
        padding: 10px 8px !important;
    }
    
    /* 盈亏记录表格 - 减少行间距，增大字体 */
    .profit-records .card-body .table {
        font-size: 11px !important;
        display: table !important;
        width: 100% !important;
        max-width: 100% !important;
        border-collapse: collapse !important;
        border-spacing: 0 !important;
        table-layout: fixed;
        margin: 0;
    }
    
    .profit-records .card-body .table thead,
    .profit-records .card-body .table tbody {
        display: table-row-group;
    }
    
    .profit-records .card-body .table tr {
        display: table-row;
        margin: 0 !important;
        padding: 0 !important;
        height: auto !important;
    }
    
    .profit-records .card-body .table th,
    .profit-records .card-body .table td {
        display: table-cell !important;
        padding: 1px 1px !important;
        word-wrap: break-word;
        overflow-wrap: break-word;
        word-break: break-all;
        font-size: 11px !important;
        white-space: normal;
        vertical-align: middle;
        line-height: 1.1 !important;
        border: none !important;
        border-bottom: none !important;
        margin: 0 !important;
        height: auto !important;
    }
    
    /* 盈亏记录表格列宽分配 - 7列，增大字体 */
    .profit-records .card-body .table th:nth-child(1),
    .profit-records .card-body .table td:nth-child(1) {
        width: 10% !important;
        font-size: 10px !important;
        padding: 1px 1px !important;
    }
    
    .profit-records .card-body .table th:nth-child(2),
    .profit-records .card-body .table td:nth-child(2) {
        width: 8% !important;
        font-size: 10px !important;
        padding: 1px 1px !important;
    }
    
    .profit-records .card-body .table th:nth-child(3),
    .profit-records .card-body .table td:nth-child(3) {
        width: 12% !important;
        font-size: 10px !important;
        padding: 1px 1px !important;
    }
    
    .profit-records .card-body .table th:nth-child(4),
    .profit-records .card-body .table td:nth-child(4) {
        width: 12% !important;
        font-size: 10px !important;
        padding: 1px 1px !important;
    }
    
    .profit-records .card-body .table th:nth-child(5),
    .profit-records .card-body .table td:nth-child(5) {
        width: 10% !important;
        font-size: 10px !important;
        padding: 1px 1px !important;
    }
    
    .profit-records .card-body .table th:nth-child(6),
    .profit-records .card-body .table td:nth-child(6) {
        width: 12% !important;
        font-size: 10px !important;
        padding: 1px 1px !important;
    }
    
    .profit-records .card-body .table th:nth-child(7),
    .profit-records .card-body .table td:nth-child(7) {
        width: 36% !important;
        font-size: 9px !important;
        white-space: nowrap;
        padding: 1px 1px !important;
    }
    
    /* 资金流水表格保持小字体 */
    .wallet-logs .card-body .table {
        font-size: 7px !important;
        display: table !important;
        width: 100% !important;
        max-width: 100% !important;
        border-collapse: collapse;
        table-layout: fixed;
        margin: 0;
    }
    
    .wallet-logs .card-body .table th,
    .wallet-logs .card-body .table td {
        display: table-cell !important;
        padding: 3px 1px !important;
        word-wrap: break-word;
        overflow-wrap: break-word;
        word-break: break-all;
        font-size: 7px !important;
        white-space: normal;
        vertical-align: top;
        line-height: 1.0;
        border: none;
    }
    
    /* 资金流水表格列宽 */
    .wallet-logs .card-body .table th:nth-child(1),
    .wallet-logs .card-body .table td:nth-child(1) {
        width: 6% !important;
        font-size: 6px !important;
        padding: 3px 0 !important;
    }
    
    .wallet-logs .card-body .table th:nth-child(2),
    .wallet-logs .card-body .table td:nth-child(2) {
        width: 10% !important;
        font-size: 6px !important;
        padding: 3px 0 !important;
    }
    
    .wallet-logs .card-body .table th:nth-child(3),
    .wallet-logs .card-body .table td:nth-child(3) {
        width: 13% !important;
        font-size: 6px !important;
        padding: 3px 0 !important;
    }
    
    .wallet-logs .card-body .table th:nth-child(4),
    .wallet-logs .card-body .table td:nth-child(4) {
        width: 13% !important;
        font-size: 6px !important;
        padding: 3px 0 !important;
    }
    
    .wallet-logs .card-body .table th:nth-child(5),
    .wallet-logs .card-body .table td:nth-child(5) {
        width: 30% !important;
        word-break: break-all;
        font-size: 6px !important;
        padding: 3px 1px !important;
    }
    
    .wallet-logs .card-body .table th:nth-child(6),
    .wallet-logs .card-body .table td:nth-child(6) {
        width: 28% !important;
        font-size: 5px !important;
        white-space: nowrap;
        padding: 3px 0 !important;
    }
    
    /* 卡片头部在移动端换行 */
    .card-header {
        flex-wrap: wrap;
        gap: 10px;
    }
    
    .card-header > div {
        width: 100%;
        flex-wrap: wrap;
    }
    
    /* 确保所有输入框和按钮不会超出 */
    .form-control,
    .btn {
        max-width: 100%;
        box-sizing: border-box;
    }
}

@media (max-width: 480px) {
    .wallet-stats-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 12px;
    }
    
    .asset-summary-card {
        padding: 20px;
    }
    
    .asset-total-value {
        font-size: 28px;
    }
    
    .wallet-stats,
    .stats-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }
    
    .ticker-list {
        grid-template-columns: repeat(2, 1fr) !important;
    }
    
    /* 钱包操作区域保持垂直排列 - 强制覆盖所有可能的样式 */
    .wallet-actions {
        display: flex !important;
        flex-direction: column !important;
        flex-wrap: nowrap !important;
    }
    
    .wallet-actions > .card {
        width: 100% !important;
        max-width: 100% !important;
        flex: 0 0 auto !important;
    }
    
    /* 交易布局在移动端也保持双列（如果可能） */
    .trade-layout {
        grid-template-columns: 1fr;
    }
    
    .modal-content {
        width: 95%;
        margin: 20px auto;
    }
    
    /* 防止横向滚动 */
    html, body {
        overflow-x: hidden !important;
        width: 100% !important;
        max-width: 100vw !important;
        position: relative;
    }
    
    body.user-layout {
        overflow-x: hidden !important;
        width: 100% !important;
        max-width: 100vw !important;
    }
    
    .user-layout .container,
    .user-layout .main-content,
    .user-layout .header {
        overflow-x: hidden !important;
        width: 100% !important;
        max-width: 100vw !important;
    }
    
    /* 确保所有元素不会超出视口 */
    .user-layout * {
        max-width: 100% !important;
        box-sizing: border-box !important;
    }
    
    /* 表格容器特殊处理 - 480px 禁止横向滚动 */
    .user-layout .card-body {
        overflow-x: hidden !important;
        overflow-y: visible !important;
        max-width: 100vw !important;
        width: 100% !important;
        position: relative;
        padding: 0 !important;
    }
    
    /* 盈亏记录卡片body减少padding - 480px */
    .profit-records .card-body {
        padding: 8px 6px !important;
    }
    
    /* 盈亏记录表格 - 480px 减少行间距，增大字体 */
    .profit-records .card-body .table {
        font-size: 10px !important;
        display: table !important;
        width: 100% !important;
        max-width: 100% !important;
        border-collapse: collapse !important;
        border-spacing: 0 !important;
        table-layout: fixed;
        margin: 0;
    }
    
    .profit-records .card-body .table thead,
    .profit-records .card-body .table tbody {
        display: table-row-group;
    }
    
    .profit-records .card-body .table tr {
        display: table-row;
        margin: 0 !important;
        padding: 0 !important;
        height: auto !important;
    }
    
    .profit-records .card-body .table th,
    .profit-records .card-body .table td {
        display: table-cell !important;
        padding: 1px 1px !important;
        word-wrap: break-word;
        overflow-wrap: break-word;
        word-break: break-all;
        font-size: 10px !important;
        white-space: normal;
        vertical-align: middle;
        line-height: 1.1 !important;
        border: none !important;
        border-bottom: none !important;
        margin: 0 !important;
        height: auto !important;
    }
    
    /* 盈亏记录表格列宽分配 - 480px，增大字体 */
    .profit-records .card-body .table th:nth-child(1),
    .profit-records .card-body .table td:nth-child(1) {
        width: 10% !important;
        font-size: 9px !important;
        padding: 1px 1px !important;
    }
    
    .profit-records .card-body .table th:nth-child(2),
    .profit-records .card-body .table td:nth-child(2) {
        width: 8% !important;
        font-size: 9px !important;
        padding: 1px 1px !important;
    }
    
    .profit-records .card-body .table th:nth-child(3),
    .profit-records .card-body .table td:nth-child(3) {
        width: 12% !important;
        font-size: 9px !important;
        padding: 1px 1px !important;
    }
    
    .profit-records .card-body .table th:nth-child(4),
    .profit-records .card-body .table td:nth-child(4) {
        width: 12% !important;
        font-size: 9px !important;
        padding: 1px 1px !important;
    }
    
    .profit-records .card-body .table th:nth-child(5),
    .profit-records .card-body .table td:nth-child(5) {
        width: 10% !important;
        font-size: 9px !important;
        padding: 1px 1px !important;
    }
    
    .profit-records .card-body .table th:nth-child(6),
    .profit-records .card-body .table td:nth-child(6) {
        width: 12% !important;
        font-size: 9px !important;
        padding: 1px 1px !important;
    }
    
    .profit-records .card-body .table th:nth-child(7),
    .profit-records .card-body .table td:nth-child(7) {
        width: 36% !important;
        font-size: 8px !important;
        white-space: nowrap;
        padding: 1px 1px !important;
    }
    
    /* 资金流水表格 - 480px 保持小字体 */
    .wallet-logs .card-body .table {
        font-size: 6px !important;
        display: table !important;
        width: 100% !important;
        max-width: 100% !important;
        border-collapse: collapse;
        table-layout: fixed;
        margin: 0;
    }
    
    .wallet-logs .card-body .table thead,
    .wallet-logs .card-body .table tbody {
        display: table-row-group;
    }
    
    .wallet-logs .card-body .table tr {
        display: table-row;
    }
    
    .wallet-logs .card-body .table th,
    .wallet-logs .card-body .table td {
        display: table-cell !important;
        padding: 2px 0 !important;
        word-wrap: break-word;
        overflow-wrap: break-word;
        word-break: break-all;
        font-size: 6px !important;
        white-space: normal;
        vertical-align: top;
        line-height: 1.0;
        border: none;
    }
    
    .wallet-logs .card-body .table th:nth-child(1),
    .wallet-logs .card-body .table td:nth-child(1) {
        width: 5% !important;
        font-size: 5px !important;
        padding: 2px 0 !important;
    }
    
    .wallet-logs .card-body .table th:nth-child(2),
    .wallet-logs .card-body .table td:nth-child(2) {
        width: 9% !important;
        font-size: 5px !important;
        padding: 2px 0 !important;
    }
    
    .wallet-logs .card-body .table th:nth-child(3),
    .wallet-logs .card-body .table td:nth-child(3) {
        width: 12% !important;
        font-size: 5px !important;
        padding: 2px 0 !important;
    }
    
    .wallet-logs .card-body .table th:nth-child(4),
    .wallet-logs .card-body .table td:nth-child(4) {
        width: 12% !important;
        font-size: 5px !important;
        padding: 2px 0 !important;
    }
    
    .wallet-logs .card-body .table th:nth-child(5),
    .wallet-logs .card-body .table td:nth-child(5) {
        width: 34% !important;
        word-break: break-all;
        font-size: 5px !important;
        padding: 2px 1px !important;
    }
    
    .wallet-logs .card-body .table th:nth-child(6),
    .wallet-logs .card-body .table td:nth-child(6) {
        width: 28% !important;
        font-size: 4px !important;
        white-space: nowrap;
        padding: 2px 0 !important;
    }
    
    /* 卡片头部在移动端换行 */
    .card-header {
        flex-wrap: wrap;
        gap: 10px;
        padding: 15px;
    }
    
    .card-header > div {
        width: 100%;
        flex-wrap: wrap;
        display: flex;
        gap: 5px;
    }
    
    .card-header input[type="date"] {
        width: auto;
        flex: 1;
        min-width: 0;
    }
    
    /* 确保所有输入框和按钮不会超出 */
    .form-control,
    .btn {
        max-width: 100%;
        box-sizing: border-box;
    }
    
    /* 容器padding调整 */
    .user-layout .container {
        padding: 0 10px;
    }
    
    .user-layout .main-content {
        padding-left: 10px;
        padding-right: 10px;
    }
    
    /* 日期筛选输入框 */
    .date-filter-input {
        flex: 1;
        min-width: 0;
        max-width: 100%;
        width: auto !important;
    }
    
    /* 覆盖内联样式 */
    input.date-filter-input[style*="width"] {
        width: auto !important;
        max-width: 100% !important;
    }
    
    /* 强制所有section和div不超出 */
    section,
    .wallet-overview,
    .wallet-actions,
    .wallet-logs,
    .profit-records {
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
        overflow-x: hidden;
    }
}

/* 分页控件 */
.pagination-container {
    margin-top: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.pagination {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
    justify-content: center;
}

.pagination-btn {
    padding: 6px 12px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
    min-width: 36px;
}

.pagination-btn:hover:not(:disabled) {
    background: var(--bg-hover);
    border-color: var(--accent-gold);
    color: var(--accent-gold);
}

.pagination-btn.active {
    background: var(--accent-gold);
    border-color: var(--accent-gold);
    color: #000;
    font-weight: bold;
}

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

.pagination-ellipsis {
    padding: 0 8px;
    color: var(--text-muted);
}

.pagination-jump {
    margin-left: 15px;
    color: var(--text-secondary);
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.pagination-jump input {
    text-align: center;
}

/* 工具类 */
.text-success {
    color: var(--success);
}

.text-danger {
    color: var(--danger);
}

.text-warning {
    color: var(--warning);
}

.text-gold {
    color: var(--accent-gold);
}

.mt-20 {
    margin-top: 20px;
}

.mb-20 {
    margin-bottom: 20px;
}

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

/* 个人中心Tab样式 */
.profile-tabs {
    margin-bottom: 20px;
}

.tab-nav {
    display: flex;
    gap: 10px;
    border-bottom: 2px solid var(--border-color);
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.tab-btn {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    padding: 12px 24px;
    cursor: pointer;
    font-size: 16px;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: all 0.3s;
}

.tab-btn:hover {
    color: var(--accent-gold);
}

.tab-btn.active {
    color: var(--accent-gold);
    border-bottom-color: var(--accent-gold);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* 安全设置项 */
.security-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid var(--border-color);
}

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

.security-info h3 {
    margin: 0 0 5px 0;
    color: var(--text-primary);
}

.security-info p {
    margin: 0;
    color: var(--text-secondary);
    font-size: 14px;
}

/* 通知样式 */
.notification-item {
    padding: 15px;
    border-bottom: 1px solid var(--border-color);
    cursor: pointer;
    transition: background 0.3s;
}

.notification-item:hover {
    background: var(--bg-hover);
}

.notification-item.unread {
    background: rgba(229, 184, 11, 0.1);
    border-left: 3px solid var(--accent-gold);
}

.notification-title {
    font-weight: bold;
    color: var(--text-primary);
    margin-bottom: 5px;
}

.notification-content {
    color: var(--text-secondary);
    font-size: 14px;
    margin-bottom: 5px;
}

.notification-time {
    color: var(--text-muted);
    font-size: 12px;
}

/* 模态框关闭按钮 */
.modal-close {
    color: var(--text-secondary);
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    line-height: 1;
    background: none;
    border: none;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-close:hover {
    color: var(--accent-gold);
}

/* 移动端优化 */
@media (max-width: 768px) {
    .tab-nav {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .tab-btn {
        white-space: nowrap;
        padding: 10px 16px;
        font-size: 14px;
    }
    
    .security-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .security-item button {
        width: 100%;
    }
    
    .notification-item {
        padding: 12px;
    }
    
    .card-header {
        padding: 15px;
    }
    
    .card-body {
        padding: 15px;
    }
    
    .table {
        font-size: 12px;
    }
    
    .table th,
    .table td {
        padding: 8px 4px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 10px;
    }
    
    .header-content {
        padding: 0 10px;
    }
    
    .logo-img {
        height: 90px !important;
        width: 180px !important;
        margin: 0 !important;
        padding: 0 !important;
    }
    
    .nav {
        gap: 5px;
    }
    
    .nav-item {
        padding: 6px 10px;
        font-size: 12px;
    }
    
    .logo h1 {
        font-size: 18px;
    }
    
    .tab-btn {
        padding: 8px 12px;
        font-size: 12px;
    }
    
    .modal-content {
        width: 95%;
        margin: 10px auto;
    }
    
    .modal-header,
    .modal-body {
        padding: 15px;
    }
    
    /* 管理后台移动端优化 */
    .admin-layout .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    
    .admin-layout .stat-card {
        padding: 15px;
    }
    
    .admin-layout .stat-label {
        font-size: 12px;
    }
    
    .admin-layout .stat-value {
        font-size: 20px;
    }
    
    .admin-layout .table {
        font-size: 11px;
    }
    
    .admin-layout .table th,
    .admin-layout .table td {
        padding: 6px 4px;
    }
    
    .admin-layout .btn {
        padding: 8px 12px;
        font-size: 12px;
    }
}

/* ========== 强制移动端样式 - 确保在所有设备上生效 ========== */
/* 充值提现强制垂直排列 - 最高优先级 */
@media screen and (max-width: 992px) {
    .wallet-actions {
        display: flex !important;
        flex-direction: column !important;
        flex-wrap: nowrap !important;
        grid-template-columns: none !important;
    }
    
    .wallet-actions > * {
        width: 100% !important;
        max-width: 100% !important;
        flex: 0 0 auto !important;
    }
    
    .wallet-actions > .card {
        width: 100% !important;
        max-width: 100% !important;
        flex: 0 0 auto !important;
    }
}

/* 盈亏记录表格优化 - 减少行间距，增大字体 */
.profit-records .card-body {
    padding: 0 !important;
}

.profit-records .card-body .table {
    font-size: 11px !important;
    width: 100% !important;
    border-collapse: collapse !important;
    border-spacing: 0 !important;
}

.profit-records .card-body .table tr {
    margin: 0 !important;
    padding: 0 !important;
    height: auto !important;
}

.profit-records .card-body .table th,
.profit-records .card-body .table td {
    padding: 1px 1px !important;
    font-size: 11px !important;
    line-height: 1.1 !important;
    border: none !important;
    border-bottom: none !important;
    margin: 0 !important;
    height: auto !important;
}

.profit-records .card-body .table th:nth-child(7),
.profit-records .card-body .table td:nth-child(7) {
    font-size: 9px !important;
}

@media screen and (max-width: 768px) {
    .profit-records .card-body {
        padding: 0 !important;
    }
    
    .profit-records .card-body .table {
        font-size: 11px !important;
    }
    
    .profit-records .card-body .table th,
    .profit-records .card-body .table td {
        padding: 1px 1px !important;
        font-size: 11px !important;
        line-height: 1.1 !important;
    }
    
    .profit-records .card-body .table th:nth-child(7),
    .profit-records .card-body .table td:nth-child(7) {
        font-size: 9px !important;
    }
}

@media screen and (max-width: 480px) {
    .profit-records .card-body {
        padding: 0 !important;
    }
    
    .profit-records .card-body .table {
        font-size: 10px !important;
    }
    
    .profit-records .card-body .table th,
    .profit-records .card-body .table td {
        padding: 1px 1px !important;
        font-size: 10px !important;
        line-height: 1.1 !important;
    }
    
    .profit-records .card-body .table th:nth-child(7),
    .profit-records .card-body .table td:nth-child(7) {
        font-size: 8px !important;
    }
}

