* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}
body {
    background: linear-gradient(135deg, #1e3c72, #2a5298);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    color: #fff;
}
.container {
    max-width: 600px;
    width: 100%;
}

/* 响应式设计 */
@media (max-width: 768px) {
    body {
        padding: 15px;
    }
    .container {
        max-width: 100%;
    }
    .card {
        padding: 20px;
    }
    .form-group input {
        padding: 14px;
    }
    .btn {
        padding: 14px;
    }
}

/* 电脑端优化 */
@media (min-width: 769px) {
    body {
        padding: 30px;
    }
    .container {
        max-width: 800px;
    }
    .card {
        padding: 32px;
    }
    .card-title {
        font-size: 16px;
    }
    .stat-value {
        font-size: 24px;
    }
}

@media (max-width: 480px) {
    body {
        padding: 10px;
    }
    .card {
        padding: 16px;
        border-radius: 16px;
    }
    .form-group input {
        padding: 12px;
        font-size: 14px;
    }
    .btn {
        padding: 12px;
        font-size: 14px;
    }
    .stat-value {
        font-size: 18px;
    }
    .hash-value {
        font-size: 10px;
        padding: 6px 10px;
    }
    .chart-container {
        height: 200px;
    }
}

/* 自定义提示框 */
.custom-alert {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}
.custom-alert.show {
    opacity: 1;
    visibility: visible;
}
.alert-content {
    background: rgba(255,255,255,0.95);
    padding: 30px;
    border-radius: 20px;
    text-align: center;
    box-shadow: 0 15px 35px rgba(0,0,0,0.25);
    max-width: 300px;
    width: 90%;
    color: #333;
}
.alert-icon {
    font-size: 52px;
    margin-bottom: 15px;
}
.alert-text {
    font-size: 18px;
    font-weight: 600;
}

/* 页面切换 */
.page {
    display: none;
}
.page.active {
    display: block;
}

/* 登录页样式 */
#login-page .card {
    background: rgba(255,255,255,0.15);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255,255,255,0.2);
    box-shadow: 0 8px 32px rgba(0,0,0,0.1);
    border-radius: 24px;
    padding: 30px;
}
.form-group {
    margin-bottom: 20px;
}
.form-group label {
    display: block;
    margin-bottom: 8px;
    color: rgba(255,255,255,0.85);
    font-size: 14px;
    font-weight: 500;
}
.form-group input {
    width: 100%;
    padding: 16px;
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,0.2);
    background: rgba(255,255,255,0.1);
    color: #fff;
    font-size: 16px;
    outline: none;
    transition: all 0.3s ease;
}
.form-group input::placeholder {
    color: rgba(255,255,255,0.5);
}
.form-group input:focus {
    border-color: #00e4ff;
    background: rgba(255,255,255,0.15);
    box-shadow: 0 0 0 3px rgba(0,228,255,0.1);
    animation: pulse 2s infinite;
}

/* 动画效果 */
@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(0,228,255,0.4);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(0,228,255,0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(0,228,255,0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
.btn {
    width: 100%;
    padding: 16px;
    border-radius: 12px;
    background: linear-gradient(135deg, #00e4ff, #0099ff);
    color: #fff;
    border: none;
    font-weight: 600;
    cursor: pointer;
    font-size: 16px;
    margin-top: 16px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0,228,255,0.3);
    position: relative;
    overflow: hidden;
}
.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.6s ease;
}
.btn:hover::before {
    left: 100%;
}
.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,228,255,0.4);
}
.btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 10px rgba(0,228,255,0.3);
}
.btn-secondary {
    background: rgba(255,255,255,0.1);
    color: #fff;
    margin-top: 8px;
    border: 1px solid rgba(255,255,255,0.2);
}
.btn-secondary:hover {
    background: rgba(255,255,255,0.2);
    transform: translateY(-2px);
}
.btn-secondary:active {
    transform: translateY(0);
}
.error {
    color: #ff4d4f;
    text-align: center;
    margin-top: 16px;
    display: none;
    font-size: 14px;
}

/* 主界面标签页 */
.tabs {
    display: flex;
    gap: 12px;
    margin-bottom: 24px;
    background: rgba(255,255,255,0.1);
    padding: 8px;
    border-radius: 16px;
}
.tab {
    padding: 12px 20px;
    border-radius: 12px;
    background: transparent;
    cursor: pointer;
    font-size: 14px;
    flex: 1;
    text-align: center;
    transition: all 0.3s ease;
    font-weight: 500;
}
.tab.active {
    background: #00e4ff;
    color: #1e3c72;
    box-shadow: 0 4px 12px rgba(0,228,255,0.3);
}
.tab-content {
    display: none;
}
.tab-content.active {
    display: block;
}

/* 卡片样式 */
.card {
    background: rgba(255,255,255,0.15);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255,255,255,0.2);
    box-shadow: 0 8px 32px rgba(0,0,0,0.1);
    border-radius: 24px;
    padding: 24px;
    margin-bottom: 20px;
    animation: fadeIn 0.5s ease;
}
.card-title {
    font-size: 14px;
    color: rgba(255,255,255,0.85);
    margin-bottom: 16px;
    font-weight: 500;
}
.stat-row {
    display: flex;
    justify-content: space-between;
    margin: 12px 0;
    align-items: flex-start;
}
.stat-label {
    font-size: 14px;
    color: rgba(255,255,255,0.8);
    flex-shrink: 0;
    margin-right: 8px;
}
.stat-value {
    font-size: 20px;
    font-weight: bold;
    color: #00e4ff;
    word-break: break-all;
}
/* 哈希值美化样式 */
.hash-value {
    font-size: 12px;
    color: #00e4ff;
    font-family: 'SF Mono', 'Menlo', 'Consolas', monospace;
    background: rgba(0,228,255,0.1);
    padding: 8px 12px;
    border-radius: 8px;
    border: 1px solid rgba(0,228,255,0.2);
    word-break: break-all;
    line-height: 1.4;
    max-width: 100%;
}
.mining-status {
    display: inline-block;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 12px;
    background: rgba(0,228,255,0.2);
    color: #00e4ff;
    margin-top: 16px;
    font-weight: 500;
}
.chart-container {
    position: relative;
    height: 220px;
    margin-top: 20px;
}
.legend {
    display: flex;
    gap: 15px;
    margin-top: 10px;
    font-size: 12px;
}
.legend-item {
    display: flex;
    align-items: center;
    gap: 5px;
}
.legend-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}
.dot-total {
    background: #00e4ff;
}
.dot-diff {
    background: #00ff88;
}
.user-info-item {
    margin: 12px 0;
    font-size: 14px;
    color: rgba(255,255,255,0.85);
}
.user-info-value {
    color: #00e4ff;
    font-weight: 600;
    word-break: break-all;
}
.transaction-item {
    padding: 12px 0;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}
.transaction-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 4px;
}
.transaction-type {
    font-weight: 500;
}
.transaction-amount {
    font-weight: 600;
}
.transaction-meta {
    font-size: 12px;
    color: rgba(255,255,255,0.6);
}
.transaction-hash {
    font-size: 10px;
    color: rgba(255,255,255,0.4);
    margin-top: 4px;
}

/* 底部导航栏 */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(30, 60, 114, 0.95);
    backdrop-filter: blur(20px);
    border-top: 1px solid rgba(255,255,255,0.2);
    display: flex;
    justify-content: space-around;
    padding: 12px 0;
    z-index: 1000;
}
.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    padding: 8px 0;
    transition: all 0.3s ease;
    flex: 1;
}
.nav-item.active {
    color: #00e4ff;
}
.nav-icon {
    font-size: 20px;
    margin-bottom: 4px;
}
.nav-label {
    font-size: 12px;
    font-weight: 500;
}

/* 挖矿进度条 */
.progress-container {
    margin: 16px 0;
}
.progress-label {
    font-size: 14px;
    color: rgba(255,255,255,0.8);
    margin-bottom: 8px;
    display: flex;
    justify-content: space-between;
}
.progress-bar {
    width: 100%;
    height: 8px;
    background: rgba(255,255,255,0.1);
    border-radius: 4px;
    overflow: hidden;
}
.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #00e4ff, #0099ff);
    border-radius: 4px;
    transition: width 0.3s ease;
}

/* 风格切换器 */
.style-switcher {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
}
.style-btn {
    padding: 8px 12px;
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 6px;
    background: rgba(30, 60, 114, 0.9);
    color: #fff;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.3s ease;
}
.style-btn.active {
    background: #00e4ff;
    color: #1e3c72;
    font-weight: 600;
}

/* 比特币风格下的风格切换器 */
body.bitcoin-style .style-btn {
    background: rgba(45, 45, 45, 0.9);
    border: 1px solid rgba(247, 147, 26, 0.3);
}
body.bitcoin-style .style-btn.active {
    background: #F7931A;
    color: #121212;
}

/* 设置按钮 */
.settings-btn {
    position: fixed;
    top: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(30, 60, 114, 0.9);
    border: 1px solid rgba(255,255,255,0.2);
    color: #fff;
    cursor: pointer;
    font-size: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1001;
    transition: all 0.3s ease;
}
.settings-btn:hover {
    transform: scale(1.1);
    background: rgba(0, 228, 255, 0.9);
}

/* 比特币风格下的设置按钮 */
body.bitcoin-style .settings-btn {
    background: rgba(45, 45, 45, 0.9);
    border: 1px solid rgba(247, 147, 26, 0.3);
}
body.bitcoin-style .settings-btn:hover {
    background: rgba(247, 147, 26, 0.9);
}

/* 设置模态框 */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(20px);
    z-index: 2000;
    display: none;
    align-items: center;
    justify-content: center;
}
.modal.show {
    display: flex;
}
.modal-content {
    background: rgba(30, 60, 114, 0.95);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 24px;
    padding: 32px;
    max-width: 400px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    animation: fadeIn 0.5s ease;
}
/* 比特币风格下的模态框 */
body.bitcoin-style .modal-content {
    background: rgba(45, 45, 45, 0.95);
    border: 1px solid rgba(247, 147, 26, 0.2);
}
.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}
.modal-title {
    font-size: 18px;
    font-weight: 600;
    color: #00e4ff;
}
body.bitcoin-style .modal-title {
    color: #F7931A;
}
.modal-close {
    background: none;
    border: none;
    color: #fff;
    font-size: 24px;
    cursor: pointer;
}
.modal-section {
    margin-bottom: 24px;
}
.modal-section-title {
    font-size: 14px;
    color: rgba(255,255,255,0.85);
    margin-bottom: 16px;
    font-weight: 500;
}

/* 交易记录模态框 */
.transactions-modal .modal-content {
    max-width: 500px;
}
.transaction-item {
    padding: 16px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    margin-bottom: 8px;
    border-radius: 12px;
    background: rgba(255,255,255,0.05);
}
.transaction-item:last-child {
    border-bottom: none;
}
.transaction-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}
.transaction-type {
    font-weight: 500;
    font-size: 14px;
}
.transaction-amount {
    font-weight: 600;
    font-size: 16px;
    color: #00ff88;
}
body.bitcoin-style .transaction-amount {
    color: #F7931A;
}
.transaction-meta {
    font-size: 12px;
    color: rgba(255,255,255,0.6);
    display: flex;
    justify-content: space-between;
}
.transaction-hash {
    font-size: 10px;
    color: rgba(255,255,255,0.4);
    margin-top: 8px;
    word-break: break-all;
}
.no-transactions {
    text-align: center;
    color: rgba(255,255,255,0.6);
    padding: 40px 0;
}

/* 分页控件样式 */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid rgba(255,255,255,0.1);
}

.pagination button {
    padding: 8px 16px;
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 8px;
    background: rgba(255,255,255,0.05);
    color: #fff;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s ease;
}

.pagination button:hover:not(:disabled) {
    background: rgba(0, 228, 255, 0.1);
    border-color: rgba(0, 228, 255, 0.3);
    transform: translateY(-2px);
}

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

.pagination span {
    font-size: 14px;
    color: rgba(255,255,255,0.8);
}

/* 比特币风格下的分页控件 */
body.bitcoin-style .pagination button {
    border-color: rgba(247, 147, 26, 0.3);
    background: rgba(247, 147, 26, 0.05);
}

body.bitcoin-style .pagination button:hover:not(:disabled) {
    background: rgba(247, 147, 26, 0.1);
    border-color: rgba(247, 147, 26, 0.5);
}

body.bitcoin-style .pagination span {
    color: rgba(255,255,255,0.8);
}

/* 快捷操作网格 */
.quick-actions {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-top: 16px;
}
.quick-action-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px 12px;
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 16px;
    background: rgba(255,255,255,0.05);
    color: #fff;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
}
.quick-action-btn:hover {
    transform: translateY(-2px);
    background: rgba(0, 228, 255, 0.1);
    border-color: rgba(0, 228, 255, 0.3);
}
.quick-action-icon {
    font-size: 32px;
    margin-bottom: 8px;
}
.quick-action-label {
    font-size: 14px;
    font-weight: 500;
}

/* 比特币风格下的快捷操作 */
body.bitcoin-style .quick-action-btn:hover {
    background: rgba(247, 147, 26, 0.1);
    border-color: rgba(247, 147, 26, 0.3);
}

/* 响应式快捷操作 */
@media (min-width: 769px) {
    .quick-actions {
        grid-template-columns: repeat(4, 1fr);
        gap: 16px;
    }
    .quick-action-btn {
        padding: 24px 16px;
    }
    .quick-action-icon {
        font-size: 36px;
    }
}

@media (max-width: 768px) {
    .quick-actions {
        grid-template-columns: repeat(4, 1fr);
        gap: 12px;
    }
    .quick-action-btn {
        flex-direction: column;
        padding: 12px 8px;
        justify-content: center;
        gap: 8px;
    }
    .quick-action-icon {
        font-size: 20px;
        margin-bottom: 0;
    }
    .quick-action-label {
        font-size: 12px;
        font-weight: 600;
        text-align: center;
    }
}

/* 比特币风格 */
body.bitcoin-style {
    background: linear-gradient(135deg, #121212, #2D2D2D);
}
body.bitcoin-style .card {
    background: rgba(45, 45, 45, 0.9);
    border: 1px solid rgba(247, 147, 26, 0.2);
}
body.bitcoin-style .card h2 {
    color: #F7931A !important;
}
body.bitcoin-style .card div[style*="font-size: 48px"] {
    color: #F7931A;
}
body.bitcoin-style .stat-value {
    color: #F7931A;
}
body.bitcoin-style .btn {
    background: linear-gradient(135deg, #F7931A, #D47717);
}
body.bitcoin-style .btn:hover {
    box-shadow: 0 6px 20px rgba(247, 147, 26, 0.4);
}
body.bitcoin-style .btn-secondary {
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(247, 147, 26, 0.3);
}
body.bitcoin-style .hash-value {
    background: rgba(247, 147, 26, 0.1);
    border: 1px solid rgba(247, 147, 26, 0.2);
    color: #F7931A;
}
body.bitcoin-style .mining-status {
    background: rgba(247, 147, 26, 0.2);
    color: #F7931A;
}
body.bitcoin-style .progress-fill {
    background: linear-gradient(90deg, #F7931A, #D47717);
}
body.bitcoin-style .estimate-value {
    color: #F7931A;
}
body.bitcoin-style .bottom-nav {
    background: rgba(18, 18, 18, 0.95);
    border-top: 1px solid rgba(247, 147, 26, 0.2);
}
body.bitcoin-style .nav-item.active {
    color: #F7931A;
}
body.bitcoin-style .style-btn.active {
    background: #F7931A;
    color: #121212;
}
body.bitcoin-style .form-group input:focus {
    border-color: #F7931A;
    box-shadow: 0 0 0 3px rgba(247, 147, 26, 0.1);
}
body.bitcoin-style .form-group input:focus {
    animation: pulse-bitcoin 2s infinite;
}
@keyframes pulse-bitcoin {
    0% {
        box-shadow: 0 0 0 0 rgba(247, 147, 26, 0.4);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(247, 147, 26, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(247, 147, 26, 0);
    }
}

/* 适配手机端 */
@media (max-width: 768px) {
    .container {
        padding-bottom: 80px; /* 为底部导航栏留出空间 */
    }
    .card {
        margin-bottom: 16px;
    }
    .bottom-nav {
        padding: 10px 0;
    }
    .nav-icon {
        font-size: 18px;
    }
    .nav-label {
        font-size: 11px;
    }
    .style-switcher {
        top: 10px;
        right: 10px;
    }
    .style-btn {
        padding: 6px 10px;
        font-size: 10px;
    }
}

/* 挖矿按钮 */
#mining-toggle-btn {
    width: 100%;
    margin-bottom: 10px;
}

/* 交易记录样式 */
.transaction-item .transaction-meta {
    margin-top: 5px;
}

/* 挖矿状态样式 */
#mine-status {
    display: inline-block;
    margin-top: 15px;
}

/* 响应式调整 */
@media (max-width: 480px) {
    .modal-content {
        padding: 20px;
    }
    .modal-header {
        margin-bottom: 15px;
    }
    .modal-title {
        font-size: 16px;
    }
    .user-info-item {
        font-size: 13px;
    }
    .quick-action-btn {
        padding: 10px 6px;
    }
    .quick-action-icon {
        font-size: 18px;
    }
    .quick-action-label {
        font-size: 10px;
    }
}