:root {
    --bg-color: #0b1528;
    --card-bg: #16243d;
    --card-border: #2a3c5a;
    --text-primary: #ffffff;
    --text-secondary: #8491a5;
    --accent-color: #f0b90b;
    --success-color: #0ecb81;
    --danger-color: #f6465d;
    --shadow-color: rgba(0, 0, 0, 0.3);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-primary);
    line-height: 1.5;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    min-height: 100vh;
}

.app-container {
    width: 100%;
    max-width: 450px;
    min-height: 100vh;
    background-color: var(--bg-color);
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
    position: relative;
    padding-bottom: 30px;
}

#global-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: linear-gradient(to bottom, #111e36, var(--bg-color));
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 16px;
    height: 60px;
}

.header-title {
    font-size: 20px;
    font-weight: bold;
    color: var(--text-primary);
}

.header-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.wallet-box {
    display: flex;
    align-items: center;
    background-color: rgba(22, 36, 61, 0.6);
    border: 1px dashed var(--card-border);
    border-radius: 20px;
    padding: 6px 12px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.wallet-box:active {
    opacity: 0.7;
    transform: scale(0.98);
}

.wallet-icon {
    width: 16px;
    height: 16px;
    margin-right: 6px;
}

.wallet-address {
    font-size: 13px;
    color: #c0cddf;
}

.lang-switch {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.lang-switch:active {
    transform: scale(0.9);
}

.lang-icon {
    width: 24px;
    height: 24px;
    object-fit: contain;
}


.content-wrapper {
    padding: 0 16px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-top: 10px;
}

.notice-bar {
    display: flex;
    align-items: center;
    background-color: rgba(22, 36, 61, 0.4);
    border: 1px solid var(--card-border);
    border-radius: 8px;
    padding: 10px 12px;
    overflow: hidden;
}

.notice-icon-box {
    display: flex;
    align-items: center;
    margin-right: 8px;
    flex-shrink: 0;
}

.notice-icon {
    width: 16px;
    height: 16px;
}

.notice-text-container {
    overflow: hidden;
    white-space: nowrap;
    width: 100%;
    position: relative;
}

.notice-text {
    display: inline-block;
    padding-left: 100%;
    animation: marquee 15s linear infinite;
    color: var(--text-secondary);
    font-size: 13px;
}

@keyframes marquee {
    0% {
        transform: translate3d(0, 0, 0);
    }

    100% {
        transform: translate3d(-100%, 0, 0);
    }
}

.banner-container {
    width: 100%;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 12px var(--shadow-color);
}

.banner-img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
}

.market-card {
    background-color: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 12px;
    padding: 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: transform 0.2s ease;
}

.market-card:active {
    transform: scale(0.98);
}

.market-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.token-logo-container {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.token-logo {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.token-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.token-name {
    font-size: 16px;
    font-weight: bold;
    color: var(--text-primary);
}

.price-change-box {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 13px;
    font-weight: 500;
}

.trend-arrow {
    width: 8px;
    height: 8px;
    object-fit: contain;
}

.up-color {
    color: var(--success-color);
}

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

.market-right {
    text-align: right;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

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

.price-value {
    font-size: 18px;
    font-weight: bold;
    color: var(--text-primary);
    font-family: "Courier New", Courier, monospace;
}

.hashrate-card {
    background-color: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 12px;
    padding: 20px 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.hashrate-chart-img {
    width: 68px;
    height: auto;
    margin-bottom: 8px;
}

.hashrate-title {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 12px;
}

.hashrate-divider-box {
    display: flex;
    align-items: center;
    width: 100%;
    margin-bottom: 12px;
}

.hashrate-line {
    flex-grow: 1;
    height: 1px;
    background-color: rgba(255, 255, 255, 0.15);
}

.hashrate-rate-text {
    padding: 0 12px;
    font-size: 16px;
    font-weight: bold;
    color: var(--text-primary);
}

.hashrate-total {
    font-size: 13px;
    color: var(--text-secondary);
}

.nav-card {
    background-color: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 12px;
    padding: 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    text-decoration: none;
    transition: transform 0.2s ease;
}

.nav-card:active {
    transform: scale(0.98);
}

.nav-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.nav-icon {
    width: 32px;
    height: 32px;
}

.nav-title {
    font-size: 16px;
    font-weight: bold;
    color: var(--text-primary);
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 13px;
    color: var(--text-secondary);
}

.nav-arrow {
    width: 12px;
    height: 12px;
    opacity: 0.6;
}


.orders-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.order-card {
    background-color: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 12px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.order-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.order-status {
    font-size: 16px;
    font-weight: bold;
}

.order-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
}

.order-row.separator {
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding-top: 12px;
}

.order-label {
    color: var(--text-secondary);
}

.order-value {
    color: var(--text-primary);
    font-family: sans-serif;
}

.order-value.highlight {
    font-weight: bold;
    color: var(--accent-color);
}

.order-value.highlight-green {
    font-weight: bold;
    color: var(--success-color);
}

.status-active {
    color: var(--accent-color);
}

.status-ended {
    color: var(--danger-color);
}


.header-left {
    display: flex;
    align-items: center;
    gap: 8px;
}

.back-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    cursor: pointer;
    text-decoration: none;
    transition: opacity 0.2s ease;
}

.back-btn:active {
    opacity: 0.6;
}

.section-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 14px;
    margin-bottom: 6px;
    padding-left: 2px;
}

.section-title-bar {
    width: 4px;
    height: 16px;
    background-color: var(--accent-color);
    border-radius: 2px;
}

.section-title {
    font-size: 16px;
    font-weight: bold;
    color: var(--text-primary);
    letter-spacing: 0.5px;
}

/* 1. 数据明细布局 */
.data-detail-grid {
    display: flex;
    gap: 12px;
    width: 100%;
}

.assets-card {
    flex: 1.1;
    background-color: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 12px;
    padding: 16px;
    position: relative;
    display: flex;
    flex-direction: column;
    min-height: 164px;
    overflow: hidden;
}

.assets-title {
    font-size: 14px;
    font-weight: bold;
    color: var(--text-primary);
    margin-bottom: 10px;
}

.assets-value {
    font-size: 18px;
    font-weight: bold;
    color: var(--accent-color);
    font-family: sans-serif;
    word-break: break-all;
    z-index: 2;
}

.assets-decor-img {
    position: absolute;
    bottom: -6px;
    right: -6px;
    width: 80px;
    height: auto;
    object-fit: contain;
    pointer-events: none;
    opacity: 0.85;
}

.hashrate-col {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.hashrate-mini-card {
    background-color: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 12px;
    padding: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 76px;
    overflow: hidden;
}

.hashrate-mini-left {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.hashrate-mini-title {
    font-size: 13px;
    font-weight: bold;
    color: var(--text-primary);
}

.hashrate-mini-value {
    font-size: 16px;
    font-weight: bold;
    color: var(--accent-color);
}

.hashrate-mini-img {
    width: 44px;
    height: auto;
    object-fit: contain;
    opacity: 0.9;
}

/* 2. 控矿表单卡片 */
.mining-form-card {
    background-color: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 12px;
    padding: 20px 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.mining-input-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.mining-input-label {
    font-size: 14px;
    color: var(--text-primary);
}

.mining-input-container {
    position: relative;
    background-color: #0b1528;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    overflow: hidden;
}

.mining-input-field {
    width: 100%;
    background: transparent;
    border: none;
    color: var(--text-primary);
    font-size: 15px;
    padding: 14px 12px;
    text-align: center;
    outline: none;
    font-weight: 500;
}

.mining-input-field::placeholder {
    color: #4b586c;
}

.mining-balance-row {
    font-size: 12px;
    color: var(--text-secondary);
    text-align: left;
    margin-top: -2px;
    padding-left: 2px;
}

.aggregated-dropdown-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
    color: var(--text-primary);
}

.dropdown-select-box {
    display: flex;
    align-items: center;
    gap: 4px;
    cursor: pointer;
    font-weight: 500;
}

.dropdown-arrow {
    font-size: 10px;
    color: var(--text-secondary);
}

.aggregated-price-label {
    font-size: 13px;
    color: var(--text-secondary);
}

/* 可获得算力数值区 */
.earnable-display-box {
    background-color: #0b1528;
    border: 1px solid var(--card-border);
    border-radius: 8px;
    padding: 14px;
    text-align: center;
    color: var(--text-primary);
    font-size: 16px;
    font-weight: bold;
}

/* 购买按钮 */
.mining-submit-btn {
    width: 100%;
    background-color: var(--accent-color);
    color: #0b1528;
    border: none;
    border-radius: 8px;
    padding: 14px;
    font-size: 15px;
    font-weight: bold;
    cursor: pointer;
    margin-top: 4px;
    transition: all 0.2s ease;
}

.mining-submit-btn:active {
    opacity: 0.8;
    transform: scale(0.99);
}

.earnings-card {
    background-color: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 12px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.earnings-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
}

.earnings-label {
    color: var(--text-primary);
}

.earnings-value {
    font-weight: bold;
    font-family: sans-serif;
}

.earnings-btn-box {
    display: flex;
    gap: 12px;
    margin-top: 8px;
}

.earnings-settle-btn {
    flex: 1;
    background-color: var(--accent-color);
    color: #0b1528;
    border: none;
    border-radius: 8px;
    padding: 12px;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    text-align: center;
    transition: opacity 0.2s ease;
}

.earnings-claim-btn {
    flex: 1;
    background-color: #50607a;
    color: #ffffff;
    border: none;
    border-radius: 8px;
    padding: 12px;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    text-align: center;
    transition: opacity 0.2s ease;
}

.earnings-settle-btn:active,
.earnings-claim-btn:active {
    opacity: 0.8;
}

.social-card {
    background-color: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 12px;
    padding: 16px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.social-img-box {
    width: 60px;
    height: 60px;
    border-radius: 8px;
    overflow: hidden;
    background-color: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.social-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.social-info {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.social-title {
    font-size: 14px;
    font-weight: bold;
    color: var(--text-primary);
}

.social-value {
    font-size: 12px;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.social-action-btn {
    background-color: var(--accent-color);
    color: #0b1528;
    border: none;
    border-radius: 14px;
    padding: 6px 12px;
    font-size: 11px;
    font-weight: bold;
    cursor: pointer;
    flex-shrink: 0;
    transition: opacity 0.2s ease;
}

.social-action-btn:active {
    opacity: 0.8;
}

.partners-card {
    background-color: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 12px;
    padding: 20px 10px;
}

.partners-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 18px 8px;
    justify-items: center;
}

.partner-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    text-decoration: none;
}

.partner-logo {
    width: 32px;
    height: 32px;
    object-fit: contain;
}

.partner-name {
    font-size: 11px;
    color: var(--text-secondary);
    text-align: center;
}


.team-identity-banner {
    font-size: 15px;
    font-weight: bold;
    color: var(--text-primary);
    margin-top: 10px;
    padding-left: 2px;
}

.team-metrics-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-top: 4px;
}

.team-metric-card {
    background-color: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 12px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-height: 106px;
}

.metric-card-top {
    display: flex;
    align-items: center;
    gap: 6px;
}

.metric-icon-img {
    width: 18px;
    height: 18px;
    object-fit: contain;
    flex-shrink: 0;
}

.metric-label {
    font-size: 13px;
    color: var(--text-secondary);
    font-weight: bold;
}

.metric-value {
    font-size: 16px;
    font-weight: bold;
    color: var(--text-primary);
    font-family: sans-serif;
    word-break: break-all;
}

.team-list-card {
    background-color: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 12px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    margin-top: 4px;
}

.team-table-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
    color: var(--text-secondary);
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.team-table-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
    color: var(--text-primary);
    padding: 12px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.team-table-row:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.team-addr-val {
    font-family: monospace;
    font-weight: 500;
}

.team-time-val {
    color: var(--text-secondary);
}

.wallet-wrapper {
    position: relative;
}

.wallet-arrow {
    font-size: 10px;
    color: var(--text-secondary);
    margin-left: 6px;
    user-select: none;
    transition: transform 0.2s;
}

.wallet-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    width: 220px;
    background-color: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 12px;
    padding: 12px;
    display: none;
    flex-direction: column;
    gap: 10px;
    z-index: 1000;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6);
}

.wallet-full-address {
    font-size: 11px;
    color: var(--text-secondary);
    font-family: monospace;
    word-break: break-all;
    background-color: #0b1528;
    padding: 10px 8px;
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    cursor: pointer;
    text-align: center;
    transition: all 0.2s;
}

.wallet-full-address:hover {
    border-color: var(--accent-color);
    color: var(--text-primary);
}

.wallet-disconnect-btn {
    background-color: var(--danger-color);
    color: #ffffff;
    border: none;
    border-radius: 6px;
    padding: 8px;
    font-size: 13px;
    font-weight: bold;
    cursor: pointer;
    transition: opacity 0.2s;
}

.wallet-disconnect-btn:active {
    opacity: 0.8;
}

.dropdown-wrapper {
    position: relative;
}

.dropdown-list {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    min-width: 360px;
    background-color: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 8px;
    list-style: none;
    padding: 6px 0;
    z-index: 100;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
}

.dropdown-list li {
    width:118px;
    float:left;
    padding: 10px 16px;
    font-size: 13px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s;
    text-align: left;
}

.dropdown-list li:hover {
    background-color: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
}

.dropdown-list li.active {
    color: var(--accent-color);
    font-weight: bold;
}

.lang-wrapper {
    position: relative;
}

.lang-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    width: 120px;
    background-color: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 8px;
    padding: 6px 0;
    display: none;
    flex-direction: column;
    list-style: none;
    z-index: 1000;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
}

.lang-dropdown li {
    padding: 10px 16px;
    font-size: 13px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
}

.lang-dropdown li:hover {
    background-color: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
}

.lang-dropdown li.active {
    color: var(--accent-color);
    font-weight: bold;
}

/* 邀请码弹窗 */
.invite-code-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(11, 21, 40, 0.85);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    padding: 16px;
}

.invite-code-container {
    background-color: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 16px;
    width: 100%;
    max-width: 380px;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.6);
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    animation: modalFadeIn 0.25s ease-out;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

.invite-code-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    padding-bottom: 12px;
}

.invite-code-title {
    font-size: 18px;
    font-weight: bold;
    color: var(--text-primary);
}

.invite-code-close {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 20px;
    cursor: pointer;
    padding: 2px 6px;
    line-height: 1;
    border-radius: 4px;
    transition: all 0.2s;
}

    .invite-code-close:hover {
        color: var(--text-primary);
        background-color: rgba(255, 255, 255, 0.08);
    }

.invite-code-content {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.invite-code-input-container {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.invite-code-input {
    width: 100%;
    background-color: #0b1528;
    border: 1px solid var(--card-border);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 15px;
    padding: 14px 12px;
    text-align: center;
    outline: none;
    transition: border-color 0.2s;
}

    .invite-code-input::placeholder {
        color: #4b586c;
    }

    .invite-code-input:focus {
        border-color: var(--accent-color);
    }

.invite-code-submit {
    width: 100%;
    background-color: var(--accent-color);
    color: #0b1528;
    border: none;
    border-radius: 8px;
    padding: 14px;
    font-size: 15px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s ease;
}

    .invite-code-submit:active {
        opacity: 0.8;
        transform: scale(0.99);
    }

    .invite-code-submit:disabled {
        opacity: 0.6;
        cursor: not-allowed;
    }