/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #00f3ff;
    --secondary-color: #7b2cbf;
    --bg-dark: #0a0e27;
    --bg-card: #1a1e3e;
    --bg-gradient: linear-gradient(135deg, #1a1e3e 0%, #0a0e27 100%);
    --text-primary: #ffffff;
    --text-secondary: #a0a0c0;
    --glow-color: #00f3ff;
    --glow-shadow: 0 0 10px rgba(0, 243, 255, 0.5), 0 0 20px rgba(0, 243, 255, 0.3);
    --card-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

body {
    font-family: 'Arial', 'Microsoft YaHei', sans-serif;
    background: var(--bg-dark);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
}

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

/* 头部 */
.header {
    position: sticky;
    top: 0;
    z-index: 999;
    background: var(--bg-card);
    padding: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(0, 243, 255, 0.2);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.logo {
    font-size: 24px;
    font-weight: bold;
    color: var(--primary-color);
    text-shadow: var(--glow-shadow);
}

.wallet-info {
    flex: 1;
    text-align: center;
    font-size: 12px;
    color: var(--text-secondary);
    padding: 0 10px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.lang-selector {
    background: transparent;
    border: 1px solid var(--primary-color);
    color: var(--primary-color);
    padding: 5px 10px;
    border-radius: 5px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.3s;
}

.lang-selector:hover {
    background: var(--primary-color);
    color: var(--bg-dark);
    box-shadow: var(--glow-shadow);
}

/* 底部导航 */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--bg-card);
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding: 10px 0;
    border-top: 1px solid rgba(0, 243, 255, 0.2);
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.3);
    z-index: 999;
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 12px;
    transition: all 0.3s;
    padding: 5px 15px;
    cursor: pointer;
}

.nav-item i {
    font-size: 24px;
    margin-bottom: 5px;
}

.nav-item.active,
.nav-item:hover {
    color: var(--primary-color);
    text-shadow: var(--glow-shadow);
}

/* 卡片 */
.card {
    background: var(--bg-card);
    border-radius: 15px;
    padding: 20px;
    margin: 15px 0;
    border: 1px solid rgba(0, 243, 255, 0.2);
    box-shadow: var(--card-shadow);
    transition: all 0.3s;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.card::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color), var(--primary-color));
    border-radius: 15px;
    opacity: 0;
    z-index: -1;
    transition: opacity 0.3s;
    animation: glow-rotate 3s linear infinite;
}

@keyframes glow-rotate {
    0% { filter: hue-rotate(0deg); }
    100% { filter: hue-rotate(360deg); }
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: var(--glow-shadow), var(--card-shadow);
}

.card:hover::before {
    opacity: 0.7;
}

.card:active {
    transform: translateY(-2px);
}

.card-title {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 15px;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    gap: 10px;
}

.card-title i {
    font-size: 20px;
}

/* 资产网格 */
.assets-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
}

.asset-item {
    background: rgba(0, 243, 255, 0.05);
    padding: 15px;
    border-radius: 10px;
    border: 1px solid rgba(0, 243, 255, 0.2);
    text-align: center;
}

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

.asset-balance {
    font-size: 20px;
    font-weight: bold;
    color: var(--primary-color);
}

/* 按钮 */
.btn {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 25px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 243, 255, 0.3);
}

.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--glow-shadow), 0 6px 20px rgba(0, 243, 255, 0.4);
}

.btn:active::before {
    width: 300px;
    height: 300px;
}

.btn-small {
    padding: 8px 20px;
    font-size: 14px;
}

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

.btn-outline:hover {
    background: var(--primary-color);
    color: var(--bg-dark);
}

.btn-group {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
}

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

.form-label {
    display: block;
    margin-bottom: 5px;
    color: var(--text-secondary);
    font-size: 14px;
}

.form-input,
.form-select {
    width: 100%;
    padding: 12px 15px;
    background: rgba(0, 243, 255, 0.05);
    border: 1px solid rgba(0, 243, 255, 0.2);
    border-radius: 10px;
    color: var(--text-primary);
    font-size: 16px;
    transition: all 0.3s;
    /* 移动端优化 */
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    touch-action: manipulation;
}

.form-input:focus,
.form-select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 10px rgba(0, 243, 255, 0.3);
}

.form-select {
    cursor: pointer;
    /* 添加下拉箭头 */
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2300f3ff' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 15px center;
    background-size: 12px;
    padding-right: 45px;
    /* 移动端点击优化 */
    min-height: 48px;
    position: relative;
    z-index: 1;
}

/* iOS Safari 特殊处理 */
.form-select::-ms-expand {
    display: none;
}

/* 移动端触摸优化 */
@media (max-width: 768px) {
    .form-select {
        font-size: 16px; /* 防止iOS自动缩放 */
        min-height: 50px;
        padding: 15px 45px 15px 15px;
    }
    
    .form-select option {
        padding: 10px;
        font-size: 16px;
    }
}

/* K线图容器 */
.chart-container {
    width: 100%;
    height: 300px;
    margin-top: 15px;
}

/* 统计信息 */
.stats-row {
    display: flex;
    justify-content: space-between;
    margin: 10px 0;
    padding: 10px;
    background: rgba(0, 243, 255, 0.05);
    border-radius: 8px;
}

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

.stat-value {
    color: var(--primary-color);
    font-weight: bold;
    font-size: 16px;
}

/* 列表 */
.list-item {
    background: rgba(0, 243, 255, 0.05);
    padding: 15px;
    margin: 10px 0;
    border-radius: 10px;
    border: 1px solid rgba(0, 243, 255, 0.1);
}

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

.list-item-title {
    font-size: 16px;
    font-weight: bold;
}

.list-item-value {
    color: var(--primary-color);
    font-weight: bold;
}

.list-item-meta {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: var(--text-secondary);
}

/* 状态标签 */
.status-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 15px;
    font-size: 12px;
    font-weight: bold;
}

.status-pending {
    background: rgba(255, 193, 7, 0.2);
    color: #ffc107;
    border: 1px solid #ffc107;
}

.status-completed {
    background: rgba(76, 175, 80, 0.2);
    color: #4caf50;
    border: 1px solid #4caf50;
}

.status-failed,
.status-rejected {
    background: rgba(244, 67, 54, 0.2);
    color: #f44336;
    border: 1px solid #f44336;
}

/* 加载动画 */
.loading {
    text-align: center;
    padding: 20px;
    color: var(--text-secondary);
}

.loading::after {
    content: '...';
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0%, 20% { content: '.'; }
    40% { content: '..'; }
    60%, 100% { content: '...'; }
}

/* 模态框 */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    z-index: 9999;
    justify-content: center;
    align-items: center;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: var(--bg-card);
    border-radius: 15px;
    padding: 30px;
    max-width: 400px;
    width: 90%;
    border: 1px solid rgba(0, 243, 255, 0.3);
    box-shadow: var(--glow-shadow);
}

.modal-title {
    font-size: 20px;
    font-weight: bold;
    margin-bottom: 20px;
    color: var(--primary-color);
    text-align: center;
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    font-size: 24px;
    cursor: pointer;
    color: var(--text-secondary);
}

/* 页面内容区 */
.page-content {
    padding-top: 15px;
}

/* Tab切换 */
.tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
    border-bottom: 1px solid rgba(0, 243, 255, 0.2);
}

.tab-item {
    padding: 10px 20px;
    cursor: pointer;
    color: var(--text-secondary);
    border-bottom: 2px solid transparent;
    transition: all 0.3s;
}

.tab-item.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
}

.tab-content {
    display: none;
}

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

/* 排行榜 */
.rank-number {
    display: inline-block;
    width: 30px;
    height: 30px;
    line-height: 30px;
    text-align: center;
    border-radius: 50%;
    background: var(--primary-color);
    color: var(--bg-dark);
    font-weight: bold;
    margin-right: 10px;
}

.rank-number.top1 {
    background: linear-gradient(135deg, #ffd700, #ffed4e);
}

.rank-number.top2 {
    background: linear-gradient(135deg, #c0c0c0, #e8e8e8);
}

.rank-number.top3 {
    background: linear-gradient(135deg, #cd7f32, #e8a87c);
}

/* 响应式 */
@media (max-width: 480px) {
    .container {
        padding: 0 10px 80px 10px;
    }
    
    .card {
        padding: 15px;
    }
    
    .btn {
        padding: 10px 20px;
        font-size: 14px;
    }
}

/* 滚动条样式 */
::-webkit-scrollbar {
    width: 8px;
}

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

::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 4px;
}

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

/* 选项按钮布局 - 套餐（3列2行） */
.option-buttons-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-top: 10px;
}

/* 选项按钮布局 - 节点（单行3个） */
.option-buttons-row {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

/* 选项按钮基础样式 */
.option-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 15px 10px;
    background: rgba(255, 255, 255, 0.04);
    border: 2px solid rgba(255, 255, 255, 0.12);
    border-radius: 10px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.3s ease;
    min-height: 80px;
    position: relative;
    overflow: hidden;
    filter: grayscale(0.2);
}

.option-btn:hover {
    background: rgba(0, 243, 255, 0.12);
    border-color: rgba(0, 243, 255, 0.4);
    transform: translateY(-2px);
}

.option-btn:active {
    transform: translateY(0);
}

/* 选中状态 */
.option-btn.selected {
    background: linear-gradient(135deg, rgba(0, 243, 255, 0.25), rgba(118, 75, 162, 0.45));
    border-color: var(--primary-color);
    box-shadow: 0 12px 25px rgba(0, 243, 255, 0.35);
    transform: translateY(-4px) scale(1.02);
    filter: none;
    color: #ffffff;
}

.option-btn.selected::before {
    content: '✓';
    position: absolute;
    top: 5px;
    right: 5px;
    width: 20px;
    height: 20px;
    background: var(--primary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
    color: #1a1a2e;
}

/* 套餐按钮内容 */
.option-amount {
    font-size: 24px;
    font-weight: bold;
    color: rgba(255, 255, 255, 0.75);
    margin-bottom: 5px;
}

.option-unit {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.45);
}

/* 节点按钮内容 */
.node-btn {
    flex: 1;
    min-height: 100px;
}

.option-icon {
    font-size: 28px;
    margin-bottom: 8px;
}

.option-name {
    font-size: 14px;
    font-weight: bold;
    color: rgba(255, 255, 255, 0.75);
    margin-bottom: 5px;
}

.option-price {
    font-size: 12px;
    color: rgba(0, 243, 255, 0.8);
}

/* 选中状态下的文字颜色更亮 */
.option-btn.selected .option-amount,
.option-btn.selected .option-name {
    color: #ffffff;
}

.option-btn.selected .option-unit,
.option-btn.selected .option-price {
    color: rgba(255, 255, 255, 0.8);
}

/* 移动端优化 */
@media (max-width: 768px) {
    .option-buttons-grid {
        gap: 8px;
    }
    
    .option-buttons-row {
        gap: 8px;
    }
    
    .option-btn {
        padding: 12px 8px;
        min-height: 70px;
    }
    
    .option-amount {
        font-size: 20px;
    }
    
    .option-unit {
        font-size: 11px;
    }
    
    .node-btn {
        min-height: 85px;
    }
    
    .option-icon {
        font-size: 24px;
        margin-bottom: 5px;
    }
    
    .option-name {
        font-size: 13px;
    }
    
    .option-price {
        font-size: 11px;
    }
}

/* 小屏幕优化 */
@media (max-width: 480px) {
    .option-amount {
        font-size: 18px;
    }
    
    .option-icon {
        font-size: 20px;
    }
    
    .option-name {
        font-size: 12px;
    }
}

