/* 用户端样式 */

/* 幻灯片轮播图 */
.carousel-container {
    position: relative;
    width: 100%;
    margin-bottom: 32px;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--shadow);
}

.carousel-wrapper {
    position: relative;
    width: 100%;
    height: 400px;
    overflow: hidden;
}

.carousel-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
    cursor: pointer;
}

.carousel-slide.active {
    opacity: 1;
    z-index: 1;
}

.carousel-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.carousel-dots {
    position: absolute;
    bottom: 16px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 10;
}

.carousel-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    border: 2px solid rgba(255, 255, 255, 0.8);
    cursor: pointer;
    transition: all 0.3s;
}

.carousel-dot.active {
    background: var(--primary-color);
    border-color: var(--primary-color);
    transform: scale(1.2);
}

.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    font-size: 24px;
    cursor: pointer;
    z-index: 10;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.carousel-btn:hover {
    background: rgba(0, 0, 0, 0.7);
    transform: translateY(-50%) scale(1.1);
}

.carousel-prev {
    left: 16px;
}

.carousel-next {
    right: 16px;
}

/* 移动端轮播图 */
@media (max-width: 768px) {
    .carousel-wrapper {
        height: 200px;
    }
    
    .carousel-btn {
        width: 36px;
        height: 36px;
        font-size: 20px;
    }
    
    .carousel-prev {
        left: 8px;
    }
    
    .carousel-next {
        right: 8px;
    }
    
    .carousel-dots {
        bottom: 12px;
    }
    
    .carousel-dot {
        width: 8px;
        height: 8px;
    }
}

/* 主题切换按钮 */
.theme-toggle {
    position: fixed;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 1001;
}

.theme-toggle-btn {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 50%;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: var(--shadow);
    font-size: 24px;
}

.theme-toggle:hover .theme-toggle-btn {
    transform: scale(1.1);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.theme-toggle:active .theme-toggle-btn {
    transform: scale(0.95);
}

.theme-icon {
    line-height: 1;
    transition: transform 0.3s;
}

.theme-toggle-btn:hover .theme-icon {
    transform: rotate(15deg);
}

/* 移动端主题切换按钮 */
@media (max-width: 768px) {
    .theme-toggle {
        left: 16px;
        top: 50%;
        transform: translateY(-50%);
    }
    
    .theme-toggle-btn {
        width: 44px;
        height: 44px;
        font-size: 20px;
    }
}

/* 导航栏 - 隐藏顶部导航栏（PC端和移动端都隐藏） */
.navbar {
    display: none;
}

/* 底部导航栏 - PC端和移动端都显示 */
.bottom-nav {
    display: flex;
    justify-content: space-around;
    align-items: center;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--card-bg);
    border-top: 1px solid var(--border-color);
    padding: 8px 0;
    padding-bottom: calc(8px + env(safe-area-inset-bottom));
    z-index: 1000;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.3);
    height: 64px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.bottom-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: var(--text-secondary);
    padding: 8px 12px;
    border-radius: 12px;
    transition: all 0.3s;
    min-width: 50px;
    flex: 1;
    position: relative;
}

.bottom-nav-item .nav-icon {
    font-size: 22px;
    margin-bottom: 4px;
    transition: transform 0.3s;
    line-height: 1;
}

.bottom-nav-item .nav-label {
    font-size: 11px;
    font-weight: 500;
    line-height: 1;
    white-space: nowrap;
}

.bottom-nav-item.active {
    color: var(--primary-color);
    background: rgba(30, 136, 229, 0.15);
}

.bottom-nav-item.active .nav-icon {
    transform: scale(1.15);
}

.bottom-nav-item:hover {
    background: rgba(30, 136, 229, 0.1);
}

.bottom-nav-item:active {
    transform: scale(0.92);
    background: rgba(30, 136, 229, 0.25);
}

/* PC端底部导航栏样式优化 */
@media (min-width: 769px) {
    .bottom-nav {
        height: 70px;
        padding: 10px 0;
        padding-bottom: calc(10px + env(safe-area-inset-bottom));
    }
    
    .bottom-nav-item {
        padding: 10px 16px;
        min-width: 80px;
    }
    
    .bottom-nav-item .nav-icon {
        font-size: 24px;
        margin-bottom: 6px;
    }
    
    .bottom-nav-item .nav-label {
        font-size: 13px;
    }
}

/* 移动端样式调整 */
@media (max-width: 768px) {
    /* 登录页面在移动端的调整 */
    .login-container {
        margin: 40px auto;
        padding: 20px;
    }
    
    .login-container h1 {
        font-size: 24px;
        margin-bottom: 32px;
    }
}

.nav-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
}

.logo {
    font-size: 24px;
    font-weight: bold;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.nav-menu {
    display: flex;
    gap: 24px;
    flex: 1;
    justify-content: center;
}

.nav-item {
    color: var(--text-secondary);
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 8px;
    transition: all 0.3s;
}

.nav-item:hover, .nav-item.active {
    color: var(--text-primary);
    background: var(--bg-color);
}

.wallet-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.btn-connect {
    background: linear-gradient(135deg, var(--primary-color), #1565c0);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
}

/* 网络选择器样式 */
.network-selector {
    position: relative;
    margin-right: 12px;
}

.btn-network {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 8px 16px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s;
    white-space: nowrap;
}

.btn-network:hover {
    background: var(--bg-color);
    border-color: var(--primary-color);
}

.network-arrow {
    font-size: 10px;
    transition: transform 0.3s;
}

.network-selector.active .network-arrow {
    transform: rotate(180deg);
}

.network-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    min-width: 200px;
    max-height: 400px;
    overflow-y: auto;
    z-index: 1000;
    margin-top: 8px;
}

.network-list {
    padding: 8px;
}

.network-item {
    padding: 12px 16px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 4px;
}

.network-item:hover {
    background: var(--bg-color);
}

.network-item.active {
    background: rgba(30, 136, 229, 0.15);
    color: var(--primary-color);
}

.network-item-icon {
    font-size: 20px;
    width: 24px;
    text-align: center;
}

.network-item-info {
    flex: 1;
}

.network-item-name {
    font-weight: 500;
    font-size: 14px;
    margin-bottom: 2px;
}

.network-item-chain-id {
    font-size: 12px;
    color: var(--text-secondary);
}

.network-item-badge {
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 4px;
    background: var(--bg-color);
    color: var(--text-secondary);
}

.network-item.testnet .network-item-badge {
    background: rgba(255, 193, 7, 0.2);
    color: #ff9800;
}

.network-divider {
    height: 1px;
    background: var(--border-color);
    margin: 8px 0;
}

/* 移动端网络选择器 */
@media (max-width: 768px) {
    .network-selector {
        margin-right: 8px;
    }
    
    .btn-network {
        padding: 6px 12px;
        font-size: 12px;
    }
    
    .btn-network #networkName {
        display: none;
    }
    
    .network-dropdown {
        right: auto;
        left: 0;
        min-width: 250px;
    }
}

/* 主要内容 */
.main-content {
    flex: 1;
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
    padding: 32px 20px;
    padding-bottom: 90px; /* 为底部导航栏留出空间（PC端和移动端） */
}

/* 移动端调整主要内容区域 */
@media (max-width: 768px) {
    .main-content {
        padding: 20px 16px;
        padding-top: 20px;
        padding-bottom: 80px; /* 为底部导航栏留出空间 */
    }
}

.page {
    display: none;
}

.page.active {
    display: block;
}

/* 登录页面 */
.login-container {
    max-width: 500px;
    margin: 100px auto;
    text-align: center;
}

.login-container h1 {
    margin-bottom: 48px;
    font-size: 32px;
}

.login-options {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.btn-login-option {
    background: var(--card-bg);
    border: 2px solid var(--border-color);
    color: var(--text-primary);
    padding: 20px;
    border-radius: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    font-size: 16px;
    transition: all 0.3s;
}

.btn-login-option:hover {
    border-color: var(--primary-color);
    transform: translateY(-2px);
}

.btn-login-option .icon {
    font-size: 24px;
}

.referral-input {
    margin-top: 24px;
    padding: 16px;
    background: var(--card-bg);
    border-radius: 12px;
    border: 1px solid var(--border-color);
}

.referral-input label {
    display: block;
    margin-bottom: 8px;
    color: var(--text-primary);
    font-size: 14px;
    font-weight: 500;
}

.referral-input-group {
    display: flex;
    gap: 8px;
}

.referral-input-group input {
    flex: 1;
    padding: 10px 16px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: var(--bg-color);
    color: var(--text-primary);
    font-size: 14px;
    transition: all 0.3s;
    text-transform: uppercase;
}

.referral-input-group input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(30, 136, 229, 0.1);
}

.referral-input-group input::placeholder {
    color: var(--text-secondary);
    text-transform: none;
}

.btn-verify {
    padding: 10px 20px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s;
    white-space: nowrap;
}

.btn-verify:hover {
    background: var(--primary-color-dark, #1976d2);
    transform: translateY(-1px);
}

.btn-verify:active {
    transform: translateY(0);
}

.referral-feedback {
    margin-top: 8px;
    font-size: 12px;
    min-height: 18px;
    transition: all 0.3s;
}

.referral-feedback.valid {
    color: var(--success-color, #10b981);
}

.referral-feedback.invalid {
    color: var(--error-color, #ef4444);
}

/* 统计卡片 */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 32px;
}

.stat-card {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 24px;
    border: 1px solid var(--border-color);
    text-align: center;
}

.stat-label {
    color: var(--text-secondary);
    font-size: 14px;
    margin-bottom: 8px;
}

.stat-value {
    font-size: 24px;
    font-weight: bold;
    color: var(--primary-color);
}

/* 区块 */
.section {
    margin-bottom: 32px;
}

.section h2 {
    margin-bottom: 20px;
    font-size: 20px;
}

.network-stats {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 24px;
    border: 1px solid var(--border-color);
}

.network-stat-item {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid var(--border-color);
}

.network-stat-item:last-child {
    border-bottom: none;
}

/* 区块标题 */
.section-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
}

.section-header h2 {
    margin: 0;
}

/* 生态项目徽章 */
.ecosystem-badge {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* 节点挖矿提示 */
.node-mining-notice {
    background: rgba(30, 136, 229, 0.1);
    border: 1px solid rgba(30, 136, 229, 0.3);
    border-radius: 8px;
    padding: 12px 16px;
    margin-bottom: 20px;
}

.notice-content {
    display: flex;
    align-items: center;
    gap: 8px;
}

.notice-icon {
    font-size: 18px;
}

.notice-text {
    color: var(--text-primary);
    font-size: 14px;
}

/* 节点类型网格 */
.node-types-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.node-type-card {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 24px;
    border: 1px solid var(--border-color);
    transition: all 0.3s;
    cursor: pointer;
}

.node-type-card:hover {
    border-color: var(--primary-color);
    transform: translateY(-4px);
    box-shadow: 0 8px 16px rgba(30, 136, 229, 0.2);
}

.node-type-name {
    font-size: 20px;
    font-weight: bold;
    margin-bottom: 16px;
    color: var(--primary-color);
}

.node-type-price {
    font-size: 24px;
    color: var(--secondary-color);
    margin-bottom: 8px;
}

.node-type-speed {
    color: var(--text-secondary);
    font-size: 14px;
}

/* 节点列表 */
.nodes-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.node-item {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 20px;
    border: 1px solid var(--border-color);
}

.node-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.node-item-name {
    font-size: 18px;
    font-weight: bold;
}

.node-item-status {
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    background: var(--secondary-color);
}

.node-item-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 12px;
    margin-top: 12px;
}

.node-detail-item {
    font-size: 14px;
}

.node-detail-label {
    color: var(--text-secondary);
    margin-right: 8px;
}

/* 推荐页面 */
.referral-header {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 24px;
    border: 1px solid var(--border-color);
}

.referral-code-box {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-top: 16px;
}

.referral-code-item,
.referral-link-item {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.referral-code-item label,
.referral-link-item label {
    font-size: 14px;
    color: var(--text-secondary);
    font-weight: 500;
}

.referral-code-display,
.referral-link-display {
    display: flex;
    gap: 8px;
    align-items: center;
}

.referral-code-display code,
.referral-link-display input {
    flex: 1;
    padding: 10px 16px;
    background: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-family: 'Courier New', monospace;
    font-size: 14px;
    color: var(--text-primary);
}

.referral-link-display input {
    font-family: inherit;
    cursor: text;
}

.referral-link-display input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(var(--primary-color-rgb), 0.1);
}

.btn-copy {
    padding: 10px 16px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
}

.btn-copy:hover {
    background: var(--primary-color-dark);
    transform: translateY(-1px);
}

.btn-copy:active {
    transform: translateY(0);
}

.btn-copy .icon {
    font-size: 16px;
}

/* 旧的推荐码样式（保留兼容性） */
.referral-code-box-old {
    margin-top: 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.referral-code-box code {
    background: var(--bg-color);
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: bold;
    color: var(--primary-color);
}

.btn-copy {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 8px;
    cursor: pointer;
}

.btn-claim {
    background: linear-gradient(135deg, var(--secondary-color), #2e7d32);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s;
}

.btn-claim:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(67, 160, 71, 0.4);
}

.btn-claim:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.referral-stats {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 24px;
    border: 1px solid var(--border-color);
}

.referral-levels {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.referral-level {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 20px;
    border: 1px solid var(--border-color);
}

.level-header {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 16px;
    color: var(--primary-color);
}

.referral-member {
    padding: 12px;
    background: var(--bg-color);
    border-radius: 8px;
    margin-bottom: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

/* 钱包页面 */
.wallet-header {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 24px;
    border: 1px solid var(--border-color);
}

.wallet-address-section {
    margin-bottom: 20px;
}

.wallet-name-section {
    display: flex;
    align-items: center;
    gap: 8px;
}

.wallet-name-display {
    font-size: 16px;
    font-weight: 500;
    color: var(--text-primary);
    flex: 1;
}

.wallet-name-input {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    background: var(--card-bg);
    color: var(--text-primary);
    font-size: 16px;
    font-weight: 500;
}

.wallet-name-input:focus {
    outline: none;
    border-color: var(--primary-color);
}

.btn-edit-wallet-name {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 6px 10px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-edit-wallet-name:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.wallet-address-display {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px;
    background: var(--bg-color);
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.wallet-address-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
    min-width: 0;
}

.wallet-address-wrapper code {
    flex: 1;
    color: var(--primary-color);
    word-break: break-all;
    font-size: 14px;
    font-family: 'Courier New', monospace;
    min-width: 0;
}

.btn-wallet-dropdown {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 6px 10px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.btn-wallet-dropdown:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.wallet-address-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.btn-export-mnemonic {
    background: var(--warning-color, #ff9800);
    color: white;
    border: none;
    padding: 8px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.btn-export-mnemonic:hover {
    background: #f57c00;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(255, 152, 0, 0.3);
}

.btn-add-wallet {
    background: var(--secondary-color);
    color: white;
    border: none;
    padding: 8px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.btn-add-wallet:hover {
    background: #2e7d32;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(67, 160, 71, 0.3);
}

.wallet-list-dropdown {
    margin-top: 8px;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    max-height: 300px;
    overflow-y: auto;
    box-shadow: var(--shadow);
}

.wallet-list {
    padding: 8px;
}

.wallet-list-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
    margin-bottom: 4px;
}

.wallet-list-item:hover {
    background: var(--bg-color);
}

.wallet-list-item.active {
    background: rgba(30, 136, 229, 0.1);
    border: 1px solid var(--primary-color);
}

.wallet-list-item-info {
    flex: 1;
    min-width: 0;
}

.wallet-list-item-name {
    font-weight: 500;
    font-size: 14px;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.wallet-list-item-address {
    font-size: 12px;
    color: var(--text-secondary);
    font-family: 'Courier New', monospace;
    word-break: break-all;
}

.wallet-list-item-badge {
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 4px;
    background: var(--bg-color);
    color: var(--text-secondary);
    margin-left: 8px;
}

.btn-copy-wallet-address {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 8px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    flex-shrink: 0;
}

.btn-copy-wallet-address:hover {
    background: #1565c0;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(30, 136, 229, 0.3);
}

.btn-copy-wallet-address .icon {
    font-size: 16px;
    line-height: 1;
}

.wallet-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
}

.btn-wallet-action {
    flex: 1;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 16px;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.btn-wallet-action:hover {
    background: var(--bg-color);
    border-color: var(--primary-color);
    transform: translateY(-2px);
}

.btn-wallet-action .action-icon {
    font-size: 24px;
}

.btn-wallet-action .action-label {
    font-size: 14px;
    font-weight: 500;
}

/* 资产列表 */
.wallet-assets {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 24px;
    border: 1px solid var(--border-color);
}

.assets-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.assets-header h3 {
    margin: 0;
    font-size: 18px;
}

.btn-add-token {
    background: var(--primary-color);
    color: white;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
}

.btn-add-token:hover {
    background: #1565c0;
    transform: scale(1.1);
}

.assets-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.asset-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px;
    background: var(--bg-color);
    border-radius: 12px;
    border: 1px solid var(--border-color);
    cursor: pointer;
    transition: all 0.3s;
}

.asset-item:hover {
    background: rgba(30, 136, 229, 0.05);
    border-color: var(--primary-color);
}

.asset-info {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
}

.asset-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: white;
    flex-shrink: 0;
}

.asset-details {
    flex: 1;
    min-width: 0;
}

.asset-name {
    font-weight: 500;
    font-size: 16px;
    margin-bottom: 4px;
    color: var(--text-primary);
}

.asset-symbol {
    font-size: 14px;
    color: var(--text-secondary);
}

.asset-balance {
    text-align: right;
}

.asset-balance-value {
    font-size: 16px;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.asset-balance-usd {
    font-size: 12px;
    color: var(--text-secondary);
}

/* 表单样式 */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: var(--text-primary);
    font-size: 14px;
    font-weight: 500;
}

.form-input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: var(--bg-color);
    color: var(--text-primary);
    font-size: 14px;
    transition: all 0.3s;
}

.form-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(30, 136, 229, 0.1);
}

.amount-input-group {
    display: flex;
    gap: 8px;
}

.amount-input-group .form-input {
    flex: 1;
}

.btn-max {
    padding: 12px 20px;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-primary);
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s;
    white-space: nowrap;
}

.btn-max:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.balance-info {
    margin-top: 8px;
    font-size: 12px;
    color: var(--text-secondary);
}

.gas-info {
    padding: 12px;
    background: var(--bg-color);
    border-radius: 8px;
    font-size: 14px;
    color: var(--text-secondary);
}

/* 交易历史 */
.modal-large {
    max-width: 800px;
}

.history-filters {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
}

.history-filters .form-input {
    flex: 1;
}

.history-list {
    max-height: 500px;
    overflow-y: auto;
}

.history-item {
    padding: 16px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 12px;
    transition: all 0.3s;
}

.history-item:hover {
    background: var(--bg-color);
}

.history-item:last-child {
    border-bottom: none;
}

.history-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
}

.history-icon.send {
    background: rgba(229, 57, 53, 0.1);
    color: var(--danger-color);
}

.history-icon.receive {
    background: rgba(67, 160, 71, 0.1);
    color: var(--secondary-color);
}

.history-details {
    flex: 1;
    min-width: 0;
}

.history-type {
    font-weight: 500;
    font-size: 14px;
    margin-bottom: 4px;
    color: var(--text-primary);
}

.history-address {
    font-size: 12px;
    color: var(--text-secondary);
    word-break: break-all;
}

.history-amount {
    text-align: right;
}

.history-amount-value {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.history-amount-time {
    font-size: 12px;
    color: var(--text-secondary);
}

.loading-text {
    text-align: center;
    padding: 40px;
    color: var(--text-secondary);
}

.positive {
    color: var(--secondary-color);
}

/* 移动端钱包页面优化 */
@media (max-width: 768px) {
    .wallet-actions {
        gap: 8px;
        flex-direction: row; /* 保持横向排列 */
        flex-wrap: nowrap; /* 不换行 */
    }
    
    .btn-wallet-action {
        padding: 12px 8px;
        flex: 1; /* 平均分配空间 */
        min-width: 0; /* 允许缩小 */
    }
    
    .btn-wallet-action .action-icon {
        font-size: 20px;
    }
    
    .btn-wallet-action .action-label {
        font-size: 12px;
    }
    
    .asset-item {
        padding: 12px;
    }
    
    .asset-icon {
        width: 36px;
        height: 36px;
        font-size: 18px;
    }
    
    .modal-large {
        max-width: 95%;
    }
}

/* 助记词显示 */
.mnemonic-display {
    background: var(--bg-color);
    padding: 20px;
    border-radius: 8px;
    margin: 20px 0;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.mnemonic-word {
    background: var(--card-bg);
    padding: 12px;
    border-radius: 8px;
    text-align: center;
    font-weight: 500;
}

.warning {
    color: var(--danger-color);
    margin: 16px 0;
    text-align: center;
}

/* 收款模态框样式 */
.receive-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px;
    padding: 20px 0;
}

.qrcode-container {
    background: var(--card-bg);
    padding: 16px;
    border-radius: 12px;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
}

.qrcode-container canvas {
    max-width: 100%;
    height: auto;
}

.wallet-address-display {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    width: 100%;
}

.wallet-address-display code {
    background: var(--bg-color);
    padding: 12px 16px;
    border-radius: 8px;
    word-break: break-all;
    text-align: center;
    font-size: 14px;
    color: var(--primary-color);
    border: 1px solid var(--border-color);
    max-width: 100%;
}

.btn-copy-address {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-copy-address:hover {
    background: #1565c0;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(30, 136, 229, 0.3);
}

.btn-copy-address .icon {
    font-size: 16px;
}

/* 移动端收款模态框样式 */
@media (max-width: 768px) {
    .receive-content {
        gap: 20px;
        padding: 16px 0;
    }
    
    .qrcode-container {
        padding: 12px;
    }
    
    .qrcode-container canvas {
        width: 200px;
        height: 200px;
    }
    
    .wallet-address-display code {
        font-size: 12px;
        padding: 10px 12px;
    }
    
    .btn-copy-address {
        width: 100%;
        justify-content: center;
    }
}

/* 移动端响应式布局调整 */
@media (max-width: 768px) {
    .nav-content {
        flex-direction: row;
        gap: 8px;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .node-types-grid {
        grid-template-columns: 1fr;
    }

    /* 移动端钱包地址样式调整 */
    .wallet-address-wrapper {
        flex-direction: row;
        gap: 6px;
    }
    
    .wallet-item code {
        font-size: 12px;
        text-align: right;
    }
    
    .btn-copy-wallet-address,
    .btn-export-mnemonic,
    .btn-add-wallet {
        min-width: 28px;
        height: 28px;
        padding: 4px 8px;
        font-size: 12px;
    }
    
    .btn-copy-wallet-address .icon,
    .btn-export-mnemonic .icon,
    .btn-add-wallet .icon {
        font-size: 12px;
    }
}

/* 浏览器页面样式 */
.browser-header {
    background: var(--card-bg);
    border-bottom: 1px solid var(--border-color);
    padding: 12px;
    position: sticky;
    top: 0;
    z-index: 100;
    margin-bottom: 16px;
    border-radius: 12px;
}

.browser-url-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
}

.browser-btn {
    background: var(--bg-color);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 8px 12px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 18px;
    transition: all 0.3s;
    min-width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.browser-btn:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.browser-btn:active {
    transform: scale(0.95);
}

.browser-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.browser-url-input {
    flex: 1;
    padding: 10px 16px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: var(--bg-color);
    color: var(--text-primary);
    font-size: 14px;
    transition: all 0.3s;
}

.browser-url-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(30, 136, 229, 0.1);
}

.browser-container {
    position: relative;
    width: 100%;
    height: calc(100vh - 200px);
    min-height: 500px;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
    background: var(--card-bg);
}

#browserFrame {
    width: 100%;
    height: 100%;
    border: none;
    background: white;
}

.browser-loading {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid var(--border-color);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.browser-loading p {
    margin-top: 16px;
    color: var(--text-secondary);
    font-size: 14px;
}

/* 移动端浏览器样式 */
@media (max-width: 768px) {
    .browser-header {
        padding: 8px;
        margin-bottom: 12px;
    }
    
    .browser-url-bar {
        gap: 6px;
    }
    
    .browser-btn {
        padding: 6px 10px;
        min-width: 36px;
        height: 36px;
        font-size: 16px;
    }
    
    .browser-url-input {
        padding: 8px 12px;
        font-size: 13px;
    }
    
    .browser-container {
        height: calc(100vh - 180px);
        min-height: 400px;
    }
}

