/* 重置和基础样式 */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* 下拉刷新样式 */
.pull-to-refresh-indicator {
    position: fixed;
    top: -80px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    padding: 15px 25px;
    border-radius: 25px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    gap: 10px;
    z-index: 2000;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    opacity: 0;
}

.pull-to-refresh-indicator.visible {
    opacity: 1;
}

.pull-to-refresh-indicator.active {
    top: 20px;
}

.refresh-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    color: #2a5298;
    transition: transform 0.3s ease;
}

.refresh-icon svg {
    width: 100%;
    height: 100%;
}

.pull-to-refresh-indicator.spinning .refresh-icon {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.refresh-text,
.refresh-text-release,
.refresh-text-loading {
    font-size: 0.9em;
    font-weight: 500;
    color: #2a5298;
    white-space: nowrap;
    display: none;
}

.pull-to-refresh-indicator.pull .refresh-text {
    display: block;
}

.pull-to-refresh-indicator.release .refresh-text-release {
    display: block;
}

.pull-to-refresh-indicator.loading .refresh-text-loading {
    display: block;
}

/* 为body添加下拉效果 */
body.pull-refresh-active {
    transform: translateY(0px);
    transition: transform 0.2s ease-out;
}

@media (max-width: 768px) {
    .pull-to-refresh-indicator {
        padding: 12px 20px;
        font-size: 0.85em;
    }
    
    .refresh-icon {
        width: 20px;
        height: 20px;
    }
}

/* 语言切换按钮样式 */
.language-switcher {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
    display: flex;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 25px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    backdrop-filter: blur(10px);
    padding: 4px;
    gap: 2px;
}

.lang-btn {
    background: transparent;
    border: none;
    padding: 8px 12px;
    border-radius: 20px;
    font-size: 0.8em;
    font-weight: 500;
    color: #6c757d;
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 55px;
}

.lang-btn:hover {
    background: #f8f9fa;
    color: #2a5298;
}

.lang-btn.active {
    background: linear-gradient(135deg, #1e3c72, #2a5298);
    color: white;
    box-shadow: 0 2px 8px rgba(42, 82, 152, 0.3);
}

@media (max-width: 768px) {
    .language-switcher {
        top: 10px;
        right: 10px;
        padding: 3px;
        gap: 1px;
    }
    
    .lang-btn {
        padding: 6px 8px;
        font-size: 0.75em;
        min-width: 45px;
    }
}

@media (max-width: 480px) {
    .language-switcher {
        top: 8px;
        right: 8px;
        padding: 2px;
    }
    
    .lang-btn {
        padding: 5px 6px;
        font-size: 0.7em;
        min-width: 40px;
    }
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #1e3c72, #2a5298);
    color: #333;
    min-height: 100vh;
    padding: 20px;
    line-height: 1.6;
    .inner{
        background: linear-gradient(135deg, #123123, #000000);
    }
}

.container {
    max-width: 1400px;
    width: 100%;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
    overflow: hidden;
    margin: 0 auto;
    position: relative;
}

/* 表格容器，用于水平滚动 */
.table-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

/* 大屏幕上让表格容器居中 */
@media (min-width: 1400px) {
    .table-wrapper {
        display: flex;
        justify-content: center;
        overflow-x: auto;
    }
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9em;
    min-width: 0; /* 移除固定最小宽度，让表格自适应 */
    table-layout: auto; /* 自动表格布局 */
    margin: 25px 0; /* 增加表格上下间距 */
}

/* 大屏幕时使用固定宽度而不是百分比，防止列过度拉伸 */
@media (min-width: 1400px) {
    table {
        min-width: 1800px; /* 固定最小宽度 */
        max-width: 2200px; /* 设置最大宽度防止过度拉伸 */
        table-layout: auto; /* 使用自动布局 */
        margin: 0 auto; /* 居中显示 */
    }
    
    /* 使用固定像素宽度而不是百分比 */
    th:nth-child(1), td:nth-child(1) { /* Symbol 列 */
        width: 60px;
        min-width: 60px;
    }
    
    th:nth-child(2), td:nth-child(2) { /* Name 列 */
        width: 180px;
        min-width: 180px;
        max-width: 220px;
    }
    
    /* HK$ 买入价格列 - 每列固定宽度 */
    th:nth-child(3), td:nth-child(3),
    th:nth-child(4), td:nth-child(4),
    th:nth-child(5), td:nth-child(5),
    th:nth-child(6), td:nth-child(6) {
        width: 85px;
        min-width: 85px;
    }
    
    /* 其他货币买入价格列 - 每列固定宽度 */
    th:nth-child(7), td:nth-child(7),
    th:nth-child(8), td:nth-child(8),
    th:nth-child(9), td:nth-child(9),
    th:nth-child(10), td:nth-child(10),
    th:nth-child(11), td:nth-child(11),
    th:nth-child(12), td:nth-child(12) {
        width: 75px;
        min-width: 75px;
    }
    
    /* HK$ 卖出价格列 - 每列固定宽度（grp页面扩展为4列） */
    th:nth-child(13), td:nth-child(13),
    th:nth-child(14), td:nth-child(14),
    th:nth-child(15), td:nth-child(15),
    th:nth-child(16), td:nth-child(16) {
        width: 85px;
        min-width: 85px;
    }
    
    /* 其他货币卖出价格列 - 每列固定宽度（grp页面2列） */
    th:nth-child(17), td:nth-child(17),
    th:nth-child(18), td:nth-child(18) {
        width: 75px;
        min-width: 75px;
    }
}

/* 超大屏幕时稍微增加价格列宽度 */
@media (min-width: 1800px) {
    /* HK$ 买入价格列 - 稍微增加宽度 */
    th:nth-child(3), td:nth-child(3),
    th:nth-child(4), td:nth-child(4),
    th:nth-child(5), td:nth-child(5),
    th:nth-child(6), td:nth-child(6) {
        width: 95px;
        min-width: 95px;
    }
    
    /* 其他货币买入价格列 */
    th:nth-child(7), td:nth-child(7),
    th:nth-child(8), td:nth-child(8),
    th:nth-child(9), td:nth-child(9),
    th:nth-child(10), td:nth-child(10),
    th:nth-child(11), td:nth-child(11),
    th:nth-child(12), td:nth-child(12) {
        width: 85px;
        min-width: 85px;
    }
    
    /* HK$ 卖出价格列（grp页面扩展为4列） */
    th:nth-child(13), td:nth-child(13),
    th:nth-child(14), td:nth-child(14),
    th:nth-child(15), td:nth-child(15),
    th:nth-child(16), td:nth-child(16) {
        width: 95px;
        min-width: 95px;
    }
    
    /* 其他货币卖出价格列（grp页面2列） */
    th:nth-child(17), td:nth-child(17),
    th:nth-child(18), td:nth-child(18) {
        width: 85px;
        min-width: 85px;
    }
}

/* 当屏幕宽度不足时才使用最小宽度 */
@media (max-width: 1399px) {
    table {
        min-width: 1600px; /* 增加最小宽度以确保内容可读 */
    }
}

caption {
    font-size: 1.4em;
    font-weight: bold;
    padding: 20px;
    background: #f1f3f5;
    color: #2a5298;
    border-bottom: 2px solid #e0e0e0;
    text-align: center;
}

th, td {
    border: 1px solid #e0e0e0;
    padding: 12px 6px; /* 增加内边距提供更多空间 */
    text-align: center;
    vertical-align: middle;
    font-size: 0.9em; /* 稍微增大字体 */
    line-height: 1.4; /* 增加行高 */
    white-space: nowrap; /* 防止价格数字换行 */
    overflow: hidden;
    text-overflow: ellipsis; /* 超长文本显示省略号 */
    min-height: 45px; /* 设置最小高度 */
}

th {
    background: #2a5298;
    color: #fff;
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 0.05em;
    font-size: 0.8em; /* 稍微增大表头字体 */
    position: sticky;
    top: 0;
    z-index: 10;
    padding: 15px 8px; /* 增加表头内边距 */
    min-height: 55px; /* 表头最小高度 */
}

td {
    background: #fff;
    transition: all 0.2s ease;
    font-size: 0.9em;
}

tr:nth-child(even) td {
    background: #f8f9fa;
}

tr:hover td {
    background: #e3f2fd;
    transform: scale(1.02);
}

.crypto-name {
    text-align: left;
    font-weight: 500;
    color: #1e3c72;
    min-width: 120px; /* 减少最小宽度 */
    font-size: 0.85em; /* 稍微增大名称列字体 */
    line-height: 1.3; /* 增加行高 */
    padding: 12px 8px; /* 增加内边距 */
    white-space: normal; /* 名称可以换行 */
    overflow: visible; /* 名称可以显示完整 */
}

/* 价格列优化显示 */
td[id*="price-"], td[id*="cny-"], td[id*="usd-"], td[id*="eur-"], td[id*="krw-"], td[id*="twd-"], td[id*="jpy-"] {
    font-family: 'Courier New', monospace; /* 使用等宽字体显示数字 */
    font-weight: 600;
    font-size: 0.85em; /* 稍微增大价格字体 */
    letter-spacing: 0.3px;
    padding: 14px 8px; /* 为价格列增加更多内边距 */
}

th[colspan], th[rowspan] {
    background: #1e3c72;
}

/* 买入价格列样式 */
td[id^="buy-price-"], 
td[id^="buy-cny-"], 
td[id^="buy-usd-"], 
td[id^="buy-eur-"], 
td[id^="buy-krw-"], 
td[id^="buy-twd-"], 
td[id^="buy-jpy-"] {
    background-color: #e8f5e8;
    color: #155724;
    font-weight: 600;
}

tr:nth-child(even) td[id^="buy-price-"], 
tr:nth-child(even) td[id^="buy-cny-"], 
tr:nth-child(even) td[id^="buy-usd-"], 
tr:nth-child(even) td[id^="buy-eur-"], 
tr:nth-child(even) td[id^="buy-krw-"], 
tr:nth-child(even) td[id^="buy-twd-"], 
tr:nth-child(even) td[id^="buy-jpy-"] {
    background-color: #d4edda;
}

/* 卖出价格列样式 */
td[id^="sell-price-"],
td[id^="sell-cny-"], 
td[id^="sell-usd-"] {
    background-color: #fff3cd;
    color: #856404;
    font-weight: 600;
}

tr:nth-child(even) td[id^="sell-price-"],
tr:nth-child(even) td[id^="sell-cny-"], 
tr:nth-child(even) td[id^="sell-usd-"] {
    background-color: #ffeeba;
}

/* 数字格式化 */
td:not(.crypto-name) {
    font-family: 'Consolas', 'Monaco', monospace;
    font-weight: 500;
}

/* 大屏幕（桌面） */
@media (min-width: 1200px) {
    body {
        padding: 40px;
    }
    
    table {
        font-size: 1em; /* 恢复正常字体大小 */
        /* 移除固定最小宽度，让表格自适应容器宽度 */
    }
    
    th, td {
        padding: 16px 8px; /* 增加大屏幕的内边距 */
        min-height: 50px; /* 大屏幕上更大的最小高度 */
    }
    
    th {
        padding: 18px 10px; /* 大屏幕表头更大内边距 */
        min-height: 60px; /* 大屏幕表头更大高度 */
    }
    
    caption {
        font-size: 1.4em; /* 稍微增大标题 */
        padding: 25px;
    }
}

/* 中等屏幕（平板横屏） */
@media (max-width: 1199px) and (min-width: 992px) {
    table {
        font-size: 0.85em;
        min-width: 1100px; /* 减少中等屏幕最小宽度 */
    }
    
    th, td {
        padding: 10px 6px;
    }
}

/* 为中等屏幕优化表格布局 */
@media (min-width: 1200px) and (max-width: 1399px) {
    table {
        table-layout: fixed;
    }
    
    th:nth-child(1), td:nth-child(1) { /* Symbol 列 */
        width: 3%;
    }
    
    th:nth-child(2), td:nth-child(2) { /* Name 列 */
        width: 6%;
    }
}

/* 小屏幕（平板竖屏） */
@media (max-width: 991px) and (min-width: 768px) {
    body {
        padding: 15px;
    }
    
    table {
        font-size: 0.8em;
        min-width: 900px; /* 减少小屏幕最小宽度 */
    }
    
    th, td {
        padding: 8px 4px;
    }
    
    caption {
        font-size: 1.2em;
        padding: 15px;
    }
    
    .crypto-name {
        min-width: 150px;
    }
}

/* 移动设备 */
@media (max-width: 767px) {
    body {
        padding: 10px;
        background: #2a5298;
    }
    
    .container {
        border-radius: 8px;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    }
    
    caption {
        font-size: 1.1em;
        padding: 12px;
        line-height: 1.4;
    }
    
    table {
        font-size: 0.7em;
        min-width: 800px; /* 移动设备保持最小宽度 */
    }
    
    th, td {
        padding: 6px 3px;
        font-size: 0.9em;
    }
    
    .crypto-name {
        min-width: 120px;
        font-size: 0.85em;
    }
}

/* 超小屏幕（小手机） */
@media (max-width: 480px) {
    body {
        padding: 5px;
    }
    
    table {
        font-size: 0.65em;
        min-width: 700px; /* 小手机保持最小宽度 */
    }
    
    th, td {
        padding: 4px 2px;
    }
    
    caption {
        font-size: 1em;
        padding: 10px;
    }
    
    .crypto-name {
        min-width: 100px;
    }
}

/* 触摸设备优化 */
@media (hover: none) {
    tr:hover td {
        background: inherit;
        transform: none;
    }
    
    td {
        transition: background 0.1s ease;
    }
    
    tr:active td {
        background: #e3f2fd;
    }
}

/* 横屏优化 */
@media (max-height: 500px) and (orientation: landscape) {
    body {
        padding: 5px;
        min-height: auto;
    }
    
    caption {
        padding: 8px;
        font-size: 1em;
    }
    
    th, td {
        padding: 4px 6px;
    }
}

/* 打印样式 */
@media print {
    body {
        background: white;
        padding: 0;
    }
    
    .container {
        box-shadow: none;
        border-radius: 0;
    }
    
    table {
        font-size: 0.8em;
    }
}

/* 高对比度模式支持 */
@media (prefers-contrast: high) {
    th {
        background: #000;
        color: #fff;
    }
    
    td {
        border-color: #333;
    }
}

/* 移动布局样式 */
.mobile-layout {
    display: none;
    padding: 15px;
    background: #f8f9fa;
}

.mobile-header {
    text-align: center;
    margin-bottom: 20px;
    padding: 15px;
    background: linear-gradient(135deg, #1e3c72, #2a5298);
    color: white;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.mobile-header h2 {
    font-size: 1.4em;
    margin-bottom: 5px;
    font-weight: 600;
}

.mobile-header p {
    font-size: 0.9em;
    opacity: 0.9;
}

.crypto-card {
    background: white;
    border-radius: 12px;
    margin-bottom: 15px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.crypto-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.card-header {
    background: linear-gradient(135deg, #2a5298, #1e3c72);
    color: white;
    padding: 15px;
    border-bottom: 3px solid #1e3c72;
}

.crypto-symbol {
    font-size: 1.3em;
    font-weight: bold;
    margin-bottom: 3px;
}

.crypto-full-name {
    font-size: 0.9em;
    opacity: 0.9;
    line-height: 1.3;
}

/* 價格區塊樣式 */
.price-section {
    border-bottom: 1px solid #e9ecef;
    margin-bottom: 0;
}

.price-section:last-of-type {
    border-bottom: none;
}

.price-section-title {
    background: #f8f9fa;
    padding: 12px 15px;
    font-size: 1em;
    font-weight: 600;
    color: #495057;
    border-bottom: 1px solid #e9ecef;
    text-align: center;
    margin: 0;
}

/* 買入區塊樣式 */
.buy-section .price-section-title {
    background: linear-gradient(135deg, #e8f5e8, #d4f4dd);
    color: #155724;
    border-bottom: 2px solid #28a745;
}

/* 賣出區塊樣式 */
.sell-section .price-section-title {
    background: linear-gradient(135deg, #fff3cd, #ffeaa7);
    color: #856404;
    border-bottom: 2px solid #ffc107;
}

.price-grid {
    padding: 15px;
    background: #f8f9fa;
}

.price-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid #e9ecef;
    transition: all 0.2s ease;
}

.price-item:last-child {
    border-bottom: none;
}

.price-item:hover {
    background: rgba(42, 82, 152, 0.05);
    border-radius: 6px;
    padding: 10px 8px;
}

.price-item.main-price {
    background: linear-gradient(135deg, #e8f5e8, #f0f8ff);
    padding: 15px 12px;
    border-radius: 8px;
    margin-bottom: 10px;
    border: 2px solid #28a745;
    box-shadow: 0 2px 8px rgba(40, 167, 69, 0.15);
}

.price-item.main-price .price-label {
    font-weight: bold;
    color: #155724;
    font-size: 0.9em;
}

.price-item.main-price .price-value {
    font-size: 1.3em;
    font-weight: bold;
    color: #155724;
}

.price-label {
    font-size: 0.85em;
    color: #6c757d;
    font-weight: 500;
    flex: 1;
}

.price-value {
    font-family: 'Consolas', 'Monaco', monospace;
    font-weight: 600;
    color: #2a5298;
    font-size: 1em;
    text-align: right;
    min-width: 80px;
}

.currency-row {
    display: flex;
    justify-content: space-around;
    background: white;
    padding: 15px;
    border-top: 1px solid #e9ecef;
    gap: 10px;
}

.currency-item {
    text-align: center;
    flex: 1;
    min-width: 0;
}

/* grp頁面移動版 - 恢復到標準的2項目佈局 */
body[data-page="grp"] .sell-section .currency-row {
    display: flex;
    justify-content: space-around;
    gap: 10px;
}

body[data-page="grp"] .sell-section .currency-item {
    flex: 1;
    min-width: 0;
}

.currency-label {
    display: block;
    font-size: 0.75em;
    color: #6c757d;
    margin-bottom: 4px;
    font-weight: 500;
}

.currency-value {
    display: block;
    font-family: 'Consolas', 'Monaco', monospace;
    font-weight: 600;
    color: #1e3c72;
    font-size: 0.9em;
    padding: 4px;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.currency-value:hover {
    background: #f8f9fa;
    transform: scale(1.05);
}

/* 買入價格特殊樣式 - 移動端 */
.buy-section .currency-value {
    background: linear-gradient(135deg, #d1ecf1, #bee5eb);
    border: 1px solid #17a2b8;
    border-radius: 6px;
    padding: 6px 8px;
    color: #0c5460;
    font-weight: 700;
    box-shadow: 0 2px 6px rgba(23, 162, 184, 0.2);
}

.buy-section .currency-value:hover {
    background: linear-gradient(135deg, #bee5eb, #a2d2d2);
    transform: scale(1.08);
    box-shadow: 0 4px 12px rgba(23, 162, 184, 0.3);
}

/* 賣出價格特殊樣式 - 移動端 */
.currency-value.sell-price {
    background: linear-gradient(135deg, #fff3cd, #ffeaa7);
    border: 1px solid #ffc107;
    border-radius: 6px;
    padding: 6px 8px;
    color: #856404;
    font-weight: 700;
    box-shadow: 0 2px 6px rgba(255, 193, 7, 0.2);
}

.currency-value.sell-price:hover {
    background: linear-gradient(135deg, #ffeaa7, #ffdd57);
    transform: scale(1.08);
    box-shadow: 0 4px 12px rgba(255, 193, 7, 0.3);
}

.mobile-footer {
    text-align: center;
    padding: 15px;
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    margin: 10px;
    border-radius: 8px;
    border-top: 2px solid #2a5298;
}

.last-updated {
    font-size: 0.85em;
    color: #495057;
    margin-bottom: 5px;
    font-weight: 500;
}

.update-info {
    font-size: 0.75em;
    color: #6c757d;
    margin: 0;
}

/* 显示/隐藏逻辑 */
@media (min-width: 768px) {
    .mobile-layout {
        display: none !important;
    }
    
    .table-wrapper {
        display: block;
    }
}

@media (max-width: 767px) {
    .table-wrapper {
        display: none;
    }
    
    .mobile-layout {
        display: block;
    }
    
    .container {
        background: #f8f9fa;
        border-radius: 0;
        box-shadow: none;
    }
    
    body {
        padding: 0;
        background: #f8f9fa;
    }
    
    .crypto-card {
        margin-left: 10px;
        margin-right: 10px;
        border-radius: 8px;
    }
    
    .mobile-header {
        margin: 10px;
        border-radius: 8px;
    }
}

@media (max-width: 480px) {
    .crypto-card {
        margin-left: 5px;
        margin-right: 5px;
    }
    
    .mobile-header {
        margin: 5px;
    }
    
    .mobile-header h2 {
        font-size: 1.2em;
    }
    
    .price-grid {
        padding: 12px;
    }
    
    .currency-row {
        padding: 10px;
    }
    
    .currency-value {
        font-size: 0.8em;
    }
    
    .price-section-title {
        padding: 8px 10px;
        font-size: 0.9em;
    }
}

/* 减少动画偏好支持 */
@media (prefers-reduced-motion: reduce) {
    td {
        transition: none;
    }
    
    tr:hover td {
        transform: none;
    }
    
    .crypto-card {
        transition: none;
    }
    
    .crypto-card:hover {
        transform: none;
    }
    
    .pull-to-refresh-indicator {
        transition: none;
    }
    
    .refresh-icon {
        transition: none;
    }
    
    .pull-to-refresh-indicator.spinning .refresh-icon {
        animation: none;
    }
    
    body.pull-refresh-active {
        transition: none;
    }
}

/* ===== PAGE-SPECIFIC STYLING ===== */

/* Page header styling */
.page-header {
    text-align: center;
    margin-bottom: 2rem;
    padding: 1rem 0;
}

.page-title {
    font-size: 2.5rem;
    margin: 0 0 0.5rem 0;
    font-weight: bold;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}

.page-subtitle {
    font-size: 1.1rem;
    margin: 0;
    opacity: 0.8;
    font-weight: 500;
}

/* slab page styling */
body[data-page="slab"] .page-title {
    background: linear-gradient(135deg, #d2691e, #8b4513);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

body[data-page="slab"] .container {
    border-top: 3px solid #d2691e;
}

body[data-page="slab"] .mobile-header h2 {
    color: #d2691e;
}

body[data-page="slab"] .language-switcher .lang-btn.active {
    background: linear-gradient(135deg, #d2691e, #8b4513);
    border-color: #d2691e;
}

/* GRP page styling */
body[data-page="grp"] .page-title {
    background: linear-gradient(135deg, #4a69bd, #1e3799);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

body[data-page="grp"] .page-subtitle {
    color: #4a69bd;
}

body[data-page="grp"] .container {
    border-top: 3px solid #4a69bd;
}

body[data-page="grp"] .mobile-header h2 {
    color: #4a69bd;
}

body[data-page="grp"] .language-switcher .lang-btn.active {
    background: linear-gradient(135deg, #4a69bd, #1e3799);
    border-color: #4a69bd;
}

/* Responsive adjustments for page headers */
@media (max-width: 767px) {
    .page-title {
        font-size: 2rem;
    }
    
    .page-subtitle {
        font-size: 1rem;
    }
    
    .page-header {
        margin-bottom: 1rem;
        padding: 0.5rem 0;
    }
}

/* slab页面专用样式 - 新版本 */
body[data-page="slab"] .table-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 桌面版价格网格 */
.slab-price-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    padding: 20px 0;
}

.slab-price-header {
    grid-column: 1 / -1;
    text-align: center;
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 20px;
    color: #333;
}

.slab-price-card {
    background: #fff;
    border-radius: 15px;
    padding: 20px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
    overflow: hidden;
    min-height: 160px;
}

.slab-price-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #e65c00, #f9d423);
}

.slab-price-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 25px rgba(0, 0, 0, 0.15);
}

.slab-price-type {
    font-size: 1.8rem;
    font-weight: 700;
    color: #e65c00;
    margin-bottom: 10px;
}

.slab-price-name {
    text-align: center;
    font-size: 1rem;
    color: #666;
    margin-bottom: 20px;
    line-height: 1.4;
}

.network-type {
    font-size: 0.85rem;
    color: #888;
}

.slab-price-value {
    font-size: 2.5rem;
    font-weight: 700;
    color: #333;
    margin: 10px 0;
}

.slab-price-label {
    font-size: 1rem;
    color: #666;
    font-weight: 500;
}

/* 移动版卡片新颜色 */
body[data-page="slab"] .mobile-layout .crypto-card {
    max-width: 400px;
    margin: 0 auto 1rem;
}

body[data-page="slab"] .price-item.main-price {
    background: linear-gradient(135deg, #e65c00, #f9d423);
    color: white;
    border-radius: 12px;
    padding: 16px;
    margin: 8px 0;
    box-shadow: 0 4px 15px rgba(230, 92, 0, 0.3);
}

body[data-page="slab"] .price-item.main-price .price-value {
    font-size: 1.8rem;
    font-weight: 700;
    color: white;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.1);
}

body[data-page="slab"] .price-item.main-price .price-label {
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.9rem;
}

/* 响应式调整 */
@media (max-width: 767px) {
    .slab-price-grid {
        display: none;
    }
    
    body[data-page="slab"] .mobile-layout {
        padding: 0 15px;
    }
}

@media (min-width: 768px) {
    body[data-page="slab"] .mobile-layout {
        display: none;
    }
}

/* 价格更新动画 - 仅适用于slab页面 */
body[data-page="slab"] .slab-price-value,
body[data-page="slab"] [id^="mobile-price-"],
body[data-page="slab"] [id^="buy-price-"] {
    position: relative;
    display: inline-block;
    overflow: hidden;
}

@keyframes slideOutUp {
    0% {
        transform: translateY(0);
        opacity: 1;
    }
    100% {
        transform: translateY(-100%);
        opacity: 0;
    }
}

@keyframes slideInUp {
    0% {
        transform: translateY(100%);
        opacity: 0;
    }
    100% {
        transform: translateY(0);
        opacity: 1;
    }
}

.price-update-old {
    position: absolute;
    left: 0;
    top: 0;
    animation: slideOutUp 1.0s ease-out forwards;
}

.price-update-new {
    animation: slideInUp 1.1s ease-out forwards;
}

/* 賣出價格特殊樣式 - 移動端 */
.price-item.main-price.sell-price {
    background: linear-gradient(135deg, #fff3cd, #ffeaa7);
    border: 2px solid #ffc107;
    box-shadow: 0 2px 8px rgba(255, 193, 7, 0.15);
}

.price-item.main-price.sell-price .price-label {
    color: #856404;
    font-weight: bold;
}

.price-item.main-price.sell-price .price-value {
    color: #856404;
    font-size: 1.3em;
    font-weight: bold;
}

.currency-value.sell-price {
    background: linear-gradient(135deg, #fff3cd, #ffeaa7);
    border: 1px solid #ffc107;
    border-radius: 6px;
    padding: 6px 8px;
    color: #856404;
    font-weight: 700;
    box-shadow: 0 2px 6px rgba(255, 193, 7, 0.2);
}

.currency-value.sell-price:hover {
    background: linear-gradient(135deg, #ffeaa7, #ffdd57);
    transform: scale(1.08);
    box-shadow: 0 4px 12px rgba(255, 193, 7, 0.3);
}

/* Inner Page Styles - Luxury VIP Theme */

/* Inner Circle page styling */
body[data-page="inner"] .page-title {
    background: linear-gradient(135deg, #701402, #8114C7);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 2px 2px 4px rgba(255, 215, 0, 0.3);
}

body[data-page="inner"] .page-subtitle {
    color: #8114C7;
    font-weight: 600;
}

body[data-page="inner"] .container {
    border-top: 3px solid #701402;
    background: linear-gradient(135deg, #fff8dc, #fafafa);
}

/* Inner price grid for desktop */
.inner-price-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
    padding: 25px 0;
    max-width: 1200px;
    margin: 0 auto;
}

.inner-price-header {
    grid-column: 1 / -1;
    text-align: center;
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 25px;
    color: #333;
    background: linear-gradient(135deg, #701402, #8114C7);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.inner-price-card {
    background: linear-gradient(135deg, #fff, #fef9e7);
    border-radius: 20px;
    padding: 25px;
    box-shadow: 0 8px 30px rgba(255, 215, 0, 0.15);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    min-height: 180px;
    border: 2px solid transparent;
    background-clip: padding-box;
}

.inner-price-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #701402, #8114C7);
}

.inner-price-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 40px rgba(255, 215, 0, 0.25);
    border-color: #701402;
}

.inner-price-type {
    font-size: 2rem;
    font-weight: 800;
    color: #8114C7;
    margin-bottom: 12px;
    text-shadow: 1px 1px 2px rgba(255, 107, 53, 0.2);
}

.inner-price-name {
    text-align: center;
    font-size: 1.1rem;
    color: #666;
    margin-bottom: 25px;
    line-height: 1.5;
    font-weight: 500;
}

.inner-price-value {
    font-size: 2.8rem;
    font-weight: 800;
    color: #333;
    margin: 15px 0;
    font-family: 'Consolas', 'Monaco', monospace;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.1);
}

.inner-price-label {
    font-size: 1.2rem;
    color: #666;
    font-weight: 600;
}

/* Mobile styles for inner page */
body[data-page="inner"] .mobile-layout .crypto-card {
    max-width: 400px;
    margin: 0 auto 1.5rem;
    background: linear-gradient(135deg, #fff, #fef9e7);
    border: 2px solid #701402;
}

body[data-page="inner"] .mobile-header {
    background: linear-gradient(135deg, #701402, #8114C7);
    color: white;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.2);
}

body[data-page="inner"] .card-header {
    background: linear-gradient(135deg, #701402, #8114C7);
    color: white;
}

body[data-page="inner"] .price-item.main-price {
    background: linear-gradient(135deg, #701402, #8114C7);
    color: white;
    border-radius: 15px;
    padding: 20px;
    margin: 10px 0;
    box-shadow: 0 6px 20px rgba(255, 215, 0, 0.4);
}

body[data-page="inner"] .price-item.main-price .price-value {
    font-size: 2rem;
    font-weight: 800;
    color: white;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

body[data-page="inner"] .price-item.main-price .price-label {
    color: rgba(255, 255, 255, 0.95);
    font-size: 1rem;
    font-weight: 600;
}

/* Language switcher for inner page */
body[data-page="inner"] .language-switcher .lang-btn.active {
    background: linear-gradient(135deg, #701402, #8114C7);
    border-color: #701402;
}

/* Responsive adjustments for inner page */
@media (max-width: 767px) {
    .inner-price-grid {
        display: none;
    }
    
    body[data-page="inner"] .mobile-layout {
        padding: 0 15px;
    }
    
    .inner-price-header {
        font-size: 1.5rem;
    }
}

@media (min-width: 768px) {
    body[data-page="inner"] .mobile-layout {
        display: none;
    }
}

/* Price update animation for inner page */
body[data-page="inner"] .inner-price-value,
body[data-page="inner"] [id^="mobile-price-"],
body[data-page="inner"] [id^="buy-price-"] {
    position: relative;
    display: inline-block;
    overflow: hidden;
}

/* Special mobile price styling for inner */
.inner-mobile-price {
    font-family: 'Consolas', 'Monaco', monospace;
    font-weight: 800;
    letter-spacing: 0.5px;
}

/* Inner page specific card headers */
.inner-card-header {
    border-bottom: 3px solid rgba(255, 255, 255, 0.3);
}

.inner-crypto-symbol {
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

/* Inner page footer styling */
.inner-mobile-footer {
    background: linear-gradient(135deg, #fef9e7, #fff8dc);
    border-top: 3px solid #701402;
}

/* Inner page grid mobile styling */
.inner-price-grid-mobile {
    background: linear-gradient(135deg, #fef9e7, #fff);
}

.inner-price-item {
    border-bottom: 1px solid rgba(255, 215, 0, 0.2);
}

.inner-price-item:hover {
    background: rgba(255, 215, 0, 0.1);
}

/* Inner header styling */
.inner-header {
    background: linear-gradient(135deg, #fef9e7, #fff8dc);
    padding: 2rem 1rem;
    border-radius: 12px;
    margin: 1rem;
    border: 2px solid #701402;
}

.inner-title {
    color: transparent;
    background: linear-gradient(135deg, #701402, #8114C7);
    -webkit-background-clip: text;
    background-clip: text;
}