/* Home 頁面 */
.home-banner {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 24px 16px;
    margin-bottom: 16px;
    position: relative;
    overflow: hidden;
}

.home-banner-content {
    position: relative;
    z-index: 2;
}

.home-banner-title {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 8px;
    color: white;
}

.home-banner-subtitle {
    font-size: 14px;
    opacity: 0.9;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 20px;
}

.home-banner-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.banner-stat {
    text-align: center;
}

.banner-stat-value {
    font-size: 20px;
    font-weight: 700;
    color: white;
    margin-bottom: 4px;
}

.banner-stat-label {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.8);
}

.home-banner-bg {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1;
}

.banner-circle {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
}

.banner-circle-1 {
    width: 150px;
    height: 150px;
    top: -50px;
    right: -30px;
}

.banner-circle-2 {
    width: 100px;
    height: 100px;
    bottom: -30px;
    left: -20px;
}

.banner-circle-3 {
    width: 80px;
    height: 80px;
    top: 50%;
    left: 30%;
    opacity: 0.5;
}

/* 快速操作 */
.quick-actions {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    padding: 0 16px;
    margin-bottom: 24px;
}

.quick-action-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    text-decoration: none;
}

.quick-action-icon {
    width: 56px;
    height: 56px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: transform 0.2s;
}

.quick-action-item:active .quick-action-icon {
    transform: scale(0.95);
}

.quick-action-label {
    font-size: 12px;
    color: var(--text-primary);
    font-weight: 500;
}

/* 區塊標題 */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.section-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
}

.section-more {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 13px;
    color: var(--text-secondary);
    text-decoration: none;
}

/* 市場概覽 */
.market-overview {
    padding: 0 16px;
    margin-bottom: 24px;
}

.market-stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.market-stat-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 12px;
}

.market-stat-header {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 12px;
}

.market-stat-icon {
    font-size: 18px;
}

.market-stat-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
}

.market-stat-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.market-stat-item {
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    padding: 6px;
    border-radius: 6px;
    transition: background 0.2s;
}

.market-stat-item:hover {
    background: var(--bg-tertiary);
}

.market-stat-rank {
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-tertiary);
    border-radius: 4px;
    font-size: 11px;
    font-weight: 700;
    color: var(--text-secondary);
}

.market-stat-symbol {
    flex: 1;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
}

.market-stat-change {
    font-size: 12px;
    font-weight: 600;
}

/* 熱門交易對 */
.hot-pairs {
    padding: 0 16px;
    margin-bottom: 24px;
}

.pair-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px;
    background: var(--bg-secondary);
    border-radius: 12px;
    margin-bottom: 8px;
    border: 1px solid var(--border-color);
    text-decoration: none;
    transition: all 0.2s;
}

.pair-item:hover {
    border-color: var(--color-primary);
    transform: translateX(4px);
}

.pair-left {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
}

.pair-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--color-primary), var(--color-info));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    font-size: 16px;
}

.pair-info {
    flex: 1;
}

.pair-symbol {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 4px;
    color: var(--text-primary);
}

.pair-volume {
    font-size: 11px;
    color: var(--text-secondary);
}

.pair-right {
    text-align: right;
}

.pair-price-value {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 4px;
}

.pair-price-change {
    font-size: 11px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 4px;
    display: inline-block;
}

.badge-success {
    background: rgba(16, 185, 129, 0.15);
    color: var(--color-buy);
}

.badge-danger {
    background: rgba(239, 68, 68, 0.15);
    color: var(--color-sell);
}

/* 最新動態 */
.home-news {
    padding: 0 16px;
    margin-bottom: 24px;
}

.news-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.news-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px;
    background: var(--bg-secondary);
    border-radius: 12px;
    border: 1px solid var(--border-color);
    border-left-width: 3px;
}

.news-info {
    border-left-color: var(--color-info);
}

.news-success {
    border-left-color: var(--color-buy);
}

.news-warning {
    border-left-color: #f59e0b;
}

.news-icon {
    font-size: 20px;
    flex-shrink: 0;
}

.news-content {
    flex: 1;
}

.news-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.news-text {
    font-size: 12px;
    color: var(--text-secondary);
    line-height: 1.5;
}

.news-time {
    font-size: 11px;
    color: var(--text-secondary);
    white-space: nowrap;
}

/* Markets 頁面 */
.markets-header {
    padding: 16px;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
}

.markets-header .search-box {
    position: relative;
}

.markets-header .search-box input {
    padding-left: 40px;
}

.markets-header .search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-secondary);
}

.markets-header-extended {
    padding: 12px 12px 0;
}

.markets-search-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.markets-search-row .search-box {
    flex: 1;
}

.markets-search-row .search-box input {
    height: 36px;
    border-radius: 8px;
    background: var(--bg-tertiary);
}

.more-btn {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: transparent;
    color: var(--text-secondary);
    padding: 0;
    font-size: 22px;
    line-height: 1;
}

.markets-top-tabs,
.markets-sub-tabs {
    display: flex;
    align-items: center;
    overflow-x: auto;
    gap: 16px;
    white-space: nowrap;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
}

.markets-top-tabs::-webkit-scrollbar,
.markets-sub-tabs::-webkit-scrollbar {
    display: none;
}

.markets-top-tabs {
    padding: 0 2px 8px;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 2px;
}

.top-tab {
    background: transparent;
    color: var(--text-secondary);
    font-size: 16px;
    font-weight: 600;
    padding: 0;
    border: none;
}

.top-tab.active {
    color: var(--text-primary);
    font-weight: 700;
}

.markets-sub-tabs {
    gap: 14px;
    padding: 6px 2px 0;
    border-bottom: 1px solid var(--border-color);
}

.sub-tab {
    background: transparent;
    color: var(--text-secondary);
    font-size: 15px;
    font-weight: 600;
    padding: 0 0 8px;
    border: none;
    border-bottom: 2px solid transparent;
}

.sub-tab.active {
    color: var(--text-primary);
    border-bottom-color: var(--text-primary);
}

.markets-filters {
    display: flex;
    gap: 8px;
    margin-top: 12px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.filter-chip {
    padding: 6px 16px;
    border-radius: 20px;
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    font-size: 13px;
    white-space: nowrap;
    border: 1px solid var(--border-color);
    cursor: pointer;
}

.filter-chip.active {
    background: var(--color-info);
    color: white;
    border-color: var(--color-info);
}

.markets-list {
    padding: 0;
}

.markets-table-list {
    background: var(--bg-primary);
}

.markets-table-head,
.market-table-row {
    display: grid;
    grid-template-columns: 1.3fr 0.9fr 0.7fr;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
}

.markets-table-head {
    border-bottom: 1px solid var(--border-color);
    color: var(--text-secondary);
    font-size: 12px;
    font-weight: 600;
}

.markets-table-head .right {
    text-align: right;
}

.market-item {
    display: flex;
    align-items: center;
    padding: 16px;
    border-bottom: 1px solid var(--border-color);
}

.market-item:active {
    background: var(--bg-hover);
}

.market-table-row {
    padding-top: 12px;
    padding-bottom: 12px;
}

.market-symbol {
    flex: 1;
}

.market-symbol-cell {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.market-coin-icon {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    flex-shrink: 0;
}

.market-coin-info {
    min-width: 0;
}

.market-symbol-name {
    font-size: 15px;
    font-weight: 700;
    margin-bottom: 2px;
}

.market-symbol-base {
    font-size: 12px;
    color: var(--text-secondary);
}

.market-price {
    flex: 1;
    text-align: right;
    margin-right: 20px;
}

.market-price-cell {
    margin-right: 0;
}

.market-price-value {
    font-size: 15px;
    font-weight: 700;
    margin-bottom: 2px;
}

.market-volume {
    font-size: 12px;
    color: var(--text-secondary);
}

.market-change {
    text-align: right;
    min-width: 70px;
}

.market-change-cell {
    display: flex;
    justify-content: flex-end;
}

.market-change-value {
    font-size: 14px;
    font-weight: 600;
    padding: 6px 10px;
    border-radius: 6px;
}

.market-change-badge {
    min-width: 82px;
    text-align: center;
    color: #fff;
}

.market-change-up {
    background: var(--color-success);
}

.market-change-down {
    background: var(--color-danger);
}

/* Chart 頁面 */
.chart-mobile-page {
    height: 100vh;
    background: var(--bg-primary);
    color: var(--text-primary);
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 480px;
    margin: 0 auto;
    position: relative;
    overflow: hidden;
}

.chart-mobile-header {
    padding: 12px 16px 0;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
}

.chart-title-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
}

.chart-back-btn {
    width: 28px;
    height: 28px;
    padding: 0;
    border: none;
    background: transparent;
    color: var(--text-primary);
    font-size: 24px;
    line-height: 1;
}

.chart-token-block {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
    min-width: 0;
}

.chart-token-icon {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: var(--color-info);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 16px;
}

.chart-token-info {
    min-width: 0;
}

.chart-token-main {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 2px;
}

.chart-symbol {
    font-size: 26px;
    line-height: 1;
    font-weight: 700;
    color: var(--text-primary);
}

.chart-token-arrow {
    font-size: 12px;
    color: var(--text-secondary);
}

.chart-token-sub {
    font-size: 14px;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: none;
}

.chart-head-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.chart-ai-mark {
    font-size: 22px;
    font-weight: 700;
    color: var(--color-info);
}

.chart-icon-btn {
    width: 28px;
    height: 28px;
    border: none;
    background: transparent;
    color: var(--text-primary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.chart-top-tabs {
    display: flex;
    align-items: center;
    gap: 22px;
    overflow-x: auto;
    white-space: nowrap;
    scrollbar-width: none;
}

.chart-top-tabs::-webkit-scrollbar {
    display: none;
}

.chart-top-tab {
    border: none;
    background: transparent;
    color: var(--text-secondary);
    padding: 0 0 12px;
    font-size: 16px;
    font-weight: 600;
    border-bottom: 2px solid transparent;
}

.chart-top-tab.active {
    color: var(--text-primary);
    border-bottom-color: var(--color-warning);
}

.chart-summary-section {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 12px;
    padding: 12px 16px 10px;
}

.chart-price-panel {
    min-width: 0;
}

.chart-data-type {
    color: var(--text-secondary);
    font-size: 13px;
    margin-bottom: 4px;
}

.chart-current-price {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1;
    margin-bottom: 6px;
}

.chart-price-change-row {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 15px;
    color: var(--text-secondary);
    min-width: 0;
}

#chartContract {
    display: inline-block;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.chart-price-change-row .text-success {
    color: #2fb67b;
}

.chart-price-change-row .text-danger {
    color: #ef4d63;
}

.chart-mini-tools {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 10px;
}

.chart-mini-dot,
.chart-mini-square {
    width: 18px;
    height: 18px;
    border-radius: 4px;
    display: inline-block;
}

.chart-mini-dot {
    background: var(--color-warning);
}

.chart-mini-square {
    background: var(--color-info);
}

.chart-stats-panel {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 9px 10px;
    min-width: 0;
}

.chart-stat-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 8px;
    padding: 6px 0;
    border-bottom: 1px dashed var(--border-color);
}

.chart-stat-row:last-child {
    border-bottom: none;
}

.chart-stat-label {
    color: var(--text-secondary);
    font-size: 13px;
    white-space: nowrap;
}

.chart-stat-value {
    color: var(--text-primary);
    font-size: 13px;
    font-weight: 500;
    text-align: right;
    max-width: 150px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.chart-time-tabs {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 10px 16px;
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
    overflow-x: auto;
    white-space: nowrap;
    scrollbar-width: none;
}

.chart-time-tabs::-webkit-scrollbar {
    display: none;
}

.chart-time-label {
    color: var(--text-secondary);
    font-size: 13px;
}

.chart-tab,
.chart-time-more {
    border: none;
    background: transparent;
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 600;
    padding: 0;
}

.chart-tab.active {
    color: var(--text-primary);
}

.chart-time-more {
    color: var(--text-secondary);
}

.chart-setting-btn {
    margin-left: auto;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    font-size: 16px;
    padding: 0;
}

.chart-indicator-line {
    padding: 7px 16px;
    color: #b48be6;
    font-size: 12px;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.chart-main-area {
    flex: 1;
    min-height: 0;
    background: var(--bg-primary);
    position: relative;
    padding-bottom: 92px;
    overflow: hidden;
}

.kline-chart {
    width: 100%;
    height: 100%;
    min-height: 280px;
}

.chart-bottom-actions {
    position: fixed;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 480px;
    bottom: 0;
    z-index: 100;
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
    display: grid;
    grid-template-columns: 58px 1fr;
    gap: 12px;
    align-items: center;
    padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
}

.chart-bottom-more {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    border: 1px solid var(--border-color);
    background: var(--bg-tertiary);
    color: var(--text-primary);
    font-size: 22px;
    padding: 0;
}

.chart-trade-btn {
    border: none;
    border-radius: 10px;
    background: var(--color-warning);
    color: var(--bg-primary);
    font-size: 18px;
    font-weight: 700;
    height: 46px;
    line-height: 46px;
    padding: 0;
}

/* Trade 頁面 */
.trade-header {
    padding: 12px 16px;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
}

.trade-symbol {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 4px;
}

.trade-price {
    display: flex;
    align-items: baseline;
    gap: 12px;
}

.trade-price-value {
    font-size: 24px;
    font-weight: 600;
}

.trade-price-change {
    font-size: 14px;
    font-weight: 500;
}

.trade-stats {
    display: flex;
    padding: 12px 16px;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
    overflow-x: auto;
}

.trade-stat {
    flex: 1;
    min-width: 80px;
}

.trade-stat-label {
    font-size: 11px;
    color: var(--text-secondary);
    margin-bottom: 4px;
}

.trade-stat-value {
    font-size: 13px;
    font-weight: 500;
}

.trade-content {
    padding: 16px;
}

.trade-v2-header {
    padding: 10px 12px 6px;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
}

.trade-v2-symbol-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.trade-v2-symbol-wrap {
    min-width: 0;
}

.trade-v2-symbol {
    font-size: 23px;
    color: var(--text-primary);
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: 0.2px;
}

.trade-v2-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 2px;
}

.trade-v2-price,
.trade-v2-change {
    font-size: 12px;
    font-weight: 600;
}

.trade-v2-tools {
    color: var(--text-secondary);
    font-size: 19px;
    line-height: 1;
}

.trade-v2-content {
    padding: 8px 10px 14px;
}

.trade-v2-tabs-wrap {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 8px;
}

.trade-v2-side-tabs {
    width: 100%;
    flex: none;
    gap: 0;
    border-radius: 8px;
    background: var(--bg-tertiary);
    overflow: hidden;
    margin: 0 0 8px;
}

.trade-v2-side-tabs .trade-tab {
    border: none;
    border-radius: 0;
    background: transparent;
    color: var(--text-secondary);
    padding: 7px 0;
    font-size: 12px;
    font-weight: 700;
}

.trade-v2-side-tabs .trade-tab.active {
    background: var(--color-buy);
    color: #fff;
}

.trade-v2-side-tabs[data-side="SELL"] .trade-tab.active {
    background: var(--color-sell);
}

.trade-v2-type-tabs {
    gap: 14px;
    margin-bottom: 0;
    border-bottom: none;
}

.trade-v2-type-tabs .order-type-tab {
    padding: 2px 0;
    font-size: 12px;
}

.trade-v2-panel {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
}

.trade-v2-panel.market-mode {
    grid-template-columns: 1fr;
}

.trade-v2-orderbook {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 6px;
}

.trade-v2-orderbook-head,
.trade-v2-orderbook-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    font-size: 11px;
    padding: 2px 0;
}

.trade-v2-orderbook-head {
    color: var(--text-secondary);
    margin-bottom: 3px;
}

.trade-v2-orderbook-row span:last-child,
.trade-v2-orderbook-head span:last-child {
    text-align: right;
}

.trade-v2-orderbook-row.sell span:first-child {
    color: var(--color-danger);
}

.trade-v2-orderbook-row.buy span:first-child {
    color: var(--color-success);
}

.trade-v2-last-price {
    font-size: 14px;
    font-weight: 700;
    padding: 4px 0;
}

.trade-v2-orderbook-more {
    margin-top: 4px;
    color: var(--text-secondary);
    font-size: 11px;
}

.trade-v2-form {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 8px;
    margin-bottom: 0;
}

.trade-v2-open-order-row {
    margin-bottom: 8px;
}

.trade-v2-open-order-label {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    background: var(--bg-tertiary);
    font-size: 12px;
    font-weight: 600;
}

.trade-v2-input-wrap {
    position: relative;
}

.trade-v2-input-wrap input {
    height: 34px;
    padding-right: 58px;
}

.trade-v2-suffix {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-secondary);
    font-size: 11px;
}

.trade-v2-form .percentage-selector {
    margin-top: 5px;
}

.trade-v2-form .percentage-btn {
    padding: 5px 4px;
    font-size: 11px;
}

.trade-v2-slider-row {
    margin: 7px 0 8px;
    color: var(--text-tertiary);
    font-size: 11px;
    letter-spacing: 0.4px;
    text-align: center;
    user-select: none;
}

.trade-v2-checks {
    display: flex;
    flex-direction: column;
    gap: 5px;
    margin: 8px 0;
    font-size: 12px;
    color: var(--text-secondary);
}

.trade-v2-balance-line {
    display: flex;
    justify-content: space-between;
    font-size: 11px;
    margin-bottom: 3px;
}

.trade-v2-submit {
    border-radius: 6px;
    min-height: 38px;
    font-size: 13px;
}

.trade-v2-market-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.trade-v2-market-type {
    font-size: 14px;
    font-weight: 700;
}

.trade-v2-market-status {
    font-size: 12px;
    color: var(--color-success);
    font-weight: 600;
}

.trade-v2-market-card {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 8px;
}

.trade-v2-market-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--text-secondary);
    font-size: 12px;
    margin-bottom: 6px;
}

.trade-v2-market-asset {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
}

.trade-v2-market-symbol {
    font-size: 23px;
    font-weight: 700;
    line-height: 1.1;
}

.trade-v2-market-name {
    color: var(--text-secondary);
    font-size: 12px;
}

.trade-v2-market-input-wrap {
    text-align: right;
}

.trade-v2-market-input-wrap input {
    width: 140px;
    text-align: right;
    font-size: 22px;
    font-weight: 700;
    padding: 0;
    background: transparent;
    border: none;
    color: var(--text-primary);
}

.trade-v2-market-max {
    margin-top: 2px;
    padding: 0;
    background: transparent;
    color: var(--color-warning);
    font-size: 11px;
}

.trade-v2-market-output {
    font-size: 22px;
    font-weight: 700;
    min-width: 120px;
    text-align: right;
}

.trade-v2-market-switch {
    width: 30px;
    height: 30px;
    margin: -7px auto;
    border-radius: 50%;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    position: relative;
    z-index: 2;
}

.trade-v2-market-info {
    margin: 8px 0;
}

.trade-v2-market-info > div {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    color: var(--text-secondary);
    padding: 5px 0;
    border-bottom: 1px solid var(--border-color);
}

.trade-v2-market-info > div:last-child {
    border-bottom: none;
}

.trade-v2-orders {
    margin-top: 10px;
}

.trade-v2-orders .orders-content {
    min-height: 96px;
}

.trade-warning {
    background: rgba(255, 168, 0, 0.1);
    border: 1px solid var(--color-warning);
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 16px;
    color: var(--color-warning);
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.trade-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
}

.trade-tab {
    flex: 1;
    padding: 10px;
    background: var(--bg-tertiary);
    border-radius: 6px;
    text-align: center;
    font-weight: 500;
    cursor: pointer;
    border: 1px solid var(--border-color);
}

.trade-tab.active {
    background: var(--color-info);
    border-color: var(--color-info);
    color: white;
}

.order-type-tabs {
    display: flex;
    gap: 16px;
    margin-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
}

.order-type-tab {
    padding: 10px 0;
    color: var(--text-secondary);
    cursor: pointer;
    border-bottom: 2px solid transparent;
    font-weight: 500;
}

.order-type-tab.active {
    color: var(--text-primary);
    border-bottom-color: var(--color-info);
}

.trade-form {
    margin-bottom: 24px;
}

.available-balance {
    display: flex;
    justify-content: space-between;
    margin-bottom: 12px;
    font-size: 13px;
}

.available-balance-label {
    color: var(--text-secondary);
}

.available-balance-value {
    color: var(--text-primary);
    font-weight: 500;
}

.input-with-max {
    position: relative;
}

.input-with-max input {
    padding-right: 60px;
}

.max-btn {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    padding: 4px 12px;
    background: var(--color-info);
    color: white;
    border-radius: 4px;
    font-size: 12px;
}

.percentage-selector {
    display: flex;
    gap: 8px;
    margin-top: 8px;
}

.percentage-btn {
    flex: 1;
    padding: 8px;
    background: var(--bg-tertiary);
    border-radius: 4px;
    font-size: 12px;
    border: 1px solid var(--border-color);
    color: #fff
}

.percentage-btn:hover {
    border-color: var(--color-info);
}

.order-summary {
    display: flex;
    justify-content: space-between;
    margin-top: 12px;
    padding: 12px;
    background: var(--bg-tertiary);
    border-radius: 6px;
    font-size: 13px;
}

.order-summary-label {
    color: var(--text-secondary);
}

.order-summary-value {
    font-weight: 500;
}

.trade-submit {
    margin-top: 20px;
}

.orders-section {
    margin-top: 24px;
}

.orders-tabs {
    display: flex;
    border-bottom: 1px solid var(--border-color);
}

.orders-tab {
    flex: 1;
    padding: 12px;
    text-align: center;
    color: var(--text-secondary);
    cursor: pointer;
    border-bottom: 2px solid transparent;
    font-size: 14px;
}

.orders-tab.active {
    color: var(--color-info);
    border-bottom-color: var(--color-info);
}

.orders-content {
    padding-top: 16px;
}

.order-item {
    padding: 12px;
    background: var(--bg-tertiary);
    border-radius: 8px;
    margin-bottom: 8px;
    border: 1px solid var(--border-color);
}

.order-item-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
}

.order-item-symbol {
    font-weight: 600;
}

.order-item-type {
    font-size: 12px;
}

.order-item-details {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-bottom: 12px;
    font-size: 13px;
}

.order-item-detail {
    display: flex;
    justify-content: space-between;
}

.order-item-detail-label {
    color: var(--text-secondary);
}

.order-item-actions {
    display: flex;
    gap: 8px;
}

/* Assets 頁面 */
.assets-overview {
    background: linear-gradient(135deg, var(--bg-secondary), var(--bg-tertiary));
    padding: 24px 16px;
    margin-bottom: 16px;
}

.total-balance {
    margin-bottom: 20px;
}

.total-balance-label {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.total-balance-value {
    font-size: 32px;
    font-weight: bold;
}

.total-balance-usd {
    font-size: 14px;
    color: var(--text-secondary);
    margin-top: 4px;
}

.assets-actions {
    display: flex;
    gap: 12px;
}

.assets-list {
    padding: 0 16px;
}

.asset-item {
    display: flex;
    align-items: center;
    padding: 16px;
    background: var(--bg-secondary);
    border-radius: 8px;
    margin-bottom: 8px;
    border: 1px solid var(--border-color);
}

.asset-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--color-info);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 12px;
    font-weight: bold;
}

.asset-info {
    flex: 1;
}

.asset-symbol {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 4px;
}

.asset-name {
    font-size: 12px;
    color: var(--text-secondary);
}

.asset-balance {
    text-align: right;
}

.asset-balance-value {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 4px;
}

.asset-balance-usd {
    font-size: 12px;
    color: var(--text-secondary);
}

/* Profile 頁面 */
.profile-header {
    background: linear-gradient(135deg, var(--bg-secondary), var(--bg-tertiary));
    padding: 30px 16px;
    margin-bottom: 16px;
}

.profile-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: var(--color-info);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    font-weight: bold;
    margin: 0 auto 16px;
}

.profile-name {
    text-align: center;
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 4px;
}

.profile-email {
    text-align: center;
    font-size: 14px;
    color: var(--text-secondary);
}

.profile-menu {
    padding: 0 16px;
}

.menu-section {
    margin-bottom: 16px;
}

.menu-section-title {
    font-size: 12px;
    color: var(--text-secondary);
    text-transform: uppercase;
    padding: 0 16px 8px;
    font-weight: 600;
}

.menu-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px;
    background: var(--bg-secondary);
    border-radius: 8px;
    margin-bottom: 4px;
    border: 1px solid var(--border-color);
    cursor: pointer;
}

.menu-item:active {
    background: var(--bg-hover);
}

.menu-item-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.menu-item-icon {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: var(--bg-tertiary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-info);
}

.menu-item-text {
    font-size: 15px;
    font-weight: 500;
}

.menu-item-arrow {
    color: var(--text-secondary);
}

/* Tasks 頁面 */
.tasks-header {
    padding: 24px 16px;
    background: linear-gradient(135deg, var(--bg-secondary), var(--bg-tertiary));
    margin-bottom: 16px;
}

.tasks-header-title {
    font-size: 24px;
    font-weight: bold;
    margin-bottom: 8px;
}

.tasks-header-subtitle {
    font-size: 14px;
    color: var(--text-secondary);
}

.tasks-list {
    padding: 0 16px;
}

.task-item {
    padding: 16px;
    background: var(--bg-secondary);
    border-radius: 8px;
    margin-bottom: 12px;
    border: 1px solid var(--border-color);
}

.task-item-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.task-item-title {
    font-size: 16px;
    font-weight: 600;
}

.task-item-reward {
    font-size: 16px;
    font-weight: bold;
    color: var(--color-success);
}

.task-item-description {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 12px;
    line-height: 1.6;
}

.task-item-progress {
    margin-bottom: 12px;
}

.task-progress-bar {
    height: 6px;
    background: var(--bg-tertiary);
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 6px;
}

.task-progress-fill {
    height: 100%;
    background: var(--color-success);
    border-radius: 3px;
    transition: width 0.3s;
}

.task-progress-text {
    font-size: 12px;
    color: var(--text-secondary);
}

.task-item-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.task-item-status {
    font-size: 12px;
}

/* 充值彈窗樣式 */
.deposit-address-section {
    margin-top: 20px;
}

.deposit-qr-code {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    background: var(--bg-secondary);
    border-radius: 12px;
    margin-bottom: 20px;
}

.qr-placeholder {
    width: 200px;
    height: 200px;
    display: flex;
    justify-content: center;
    align-items: center;
    background: white;
    border-radius: 8px;
    padding: 10px;
}

.qr-placeholder svg {
    width: 100%;
    height: 100%;
}

.deposit-address {
    margin-bottom: 20px;
}

.deposit-address label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.address-input-wrapper {
    display: flex;
    gap: 8px;
}

.address-input-wrapper .form-input {
    flex: 1;
    font-size: 13px;
    font-family: 'Courier New', monospace;
    padding-right: 8px;
}

.btn-copy {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 0 16px;
    background: var(--color-primary);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s;
}

.btn-copy:hover {
    background: var(--color-primary-dark);
    transform: translateY(-1px);
}

.btn-copy:active {
    transform: translateY(0);
}

.btn-copy svg {
    flex-shrink: 0;
}

.deposit-tips {
    background: rgba(255, 193, 7, 0.1);
    border: 1px solid rgba(255, 193, 7, 0.3);
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 20px;
}

.deposit-tips h4 {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 12px;
    color: #ffc107;
}

.deposit-tips ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.deposit-tips li {
    font-size: 13px;
    line-height: 1.6;
    color: var(--text-secondary);
    padding-left: 16px;
    position: relative;
    margin-bottom: 8px;
}

.deposit-tips li:before {
    content: '•';
    position: absolute;
    left: 0;
    color: #ffc107;
    font-weight: bold;
}

.deposit-tips li:last-child {
    margin-bottom: 0;
}

.deposit-tips span {
    color: var(--text-primary);
    font-weight: 500;
}

.deposit-history-link {
    text-align: center;
    padding-top: 12px;
    border-top: 1px solid var(--border-color);
}

.deposit-history-link a {
    color: var(--color-primary);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: opacity 0.2s;
}

.deposit-history-link a:hover {
    opacity: 0.8;
}

/* 充值彈窗特定樣式 */
.modal-large {
    max-width: 520px;
}

#depositModal .modal-content {
    max-width: 480px;
    max-height: 90vh;
}

#depositModal .modal-body {
    overflow-y: auto;
}

#depositModal .modal-body {
    padding: 20px;
}

#depositModal .form-group {
    margin-bottom: 20px;
}

#depositModal .form-group label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 8px;
    color: var(--text-primary);
}

#depositModal .form-select {
    width: 100%;
    padding: 12px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
}

#depositModal .form-select:hover {
    border-color: var(--color-primary);
}

#depositModal .form-select:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

#depositModal .form-input {
    width: 100%;
    padding: 12px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 14px;
    transition: all 0.2s;
}

#depositModal .form-input:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

/* 響應式調整 */
@media (max-width: 480px) {
    .qr-placeholder {
        width: 160px;
        height: 160px;
    }
    
    #depositModal .modal-content {
        max-width: 95%;
        margin: 10px;
    }
    
    .address-input-wrapper {
        flex-direction: column;
    }
    
    .btn-copy {
        width: 100%;
        justify-content: center;
    }
}

/* Assets 頁面增強樣式 */
.balance-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 16px;
    font-size: 13px;
    color: var(--text-secondary);
}

.toggle-label {
    font-size: 13px;
}

.switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--border-color);
    transition: 0.3s;
    border-radius: 24px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: 0.3s;
    border-radius: 50%;
}

input:checked + .slider {
    background-color: var(--color-primary);
}

input:checked + .slider:before {
    transform: translateX(20px);
}

.assets-actions {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}

.assets-actions button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px;
    font-size: 13px;
}

.assets-actions svg {
    flex-shrink: 0;
}

.assets-search {
    padding: 12px 16px;
    background: var(--bg-primary);
}

.search-box {
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
}

.search-box svg {
    flex-shrink: 0;
    color: var(--text-secondary);
}

.search-box input {
    flex: 1;
    background: transparent;
    border: none;
    color: var(--text-primary);
    font-size: 14px;
    outline: none;
}

.search-box input::placeholder {
    color: var(--text-secondary);
}

.asset-item {
    cursor: pointer;
    transition: background 0.2s;
}

.asset-item:hover {
    background: var(--bg-secondary);
}

.asset-arrow {
    display: flex;
    align-items: center;
    margin-left: 8px;
    color: var(--text-secondary);
}

.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    color: var(--text-secondary);
}

.empty-state svg {
    margin-bottom: 16px;
    opacity: 0.5;
}

.empty-state p {
    margin: 0;
    font-size: 14px;
}

/* 提現彈窗樣式 */
.form-helper {
    font-size: 12px;
    color: var(--text-secondary);
    margin-top: 6px;
}

.input-with-button {
    display: flex;
    gap: 8px;
}

.input-with-button .form-input {
    flex: 1;
}

.input-button {
    padding: 0 20px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--color-primary);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.input-button:hover {
    background: var(--color-primary);
    color: white;
}

.balance-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 6px;
    font-size: 12px;
    color: var(--text-secondary);
}

.withdraw-fee-info {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 20px;
}

.fee-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    font-size: 14px;
}

.fee-row:last-child {
    margin-bottom: 0;
}

.fee-row.small {
    font-size: 12px;
    color: var(--text-secondary);
}

.fee-row .highlight {
    color: var(--color-primary);
    font-weight: 600;
    font-size: 16px;
}

.withdraw-tips {
    background: rgba(255, 193, 7, 0.1);
    border: 1px solid rgba(255, 193, 7, 0.3);
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 20px;
}

.withdraw-tips h4 {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 12px;
    color: #ffc107;
}

.withdraw-tips ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.withdraw-tips li {
    font-size: 13px;
    line-height: 1.6;
    color: var(--text-secondary);
    padding-left: 16px;
    position: relative;
    margin-bottom: 8px;
}

.withdraw-tips li:before {
    content: '•';
    position: absolute;
    left: 0;
    color: #ffc107;
    font-weight: bold;
}

.withdraw-tips li:last-child {
    margin-bottom: 0;
}

.withdraw-tips span {
    color: var(--text-primary);
    font-weight: 500;
}

.btn-primary {
    width: 100%;
    padding: 14px;
    background: var(--color-primary);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-primary:hover {
    background: var(--color-primary-dark);
    transform: translateY(-1px);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-full {
    width: 100%;
}

/* 劃轉彈窗樣式 */
.transfer-direction {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
}

.transfer-account {
    flex: 1;
}

.transfer-account label {
    display: block;
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.transfer-switch {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    flex-shrink: 0;
    margin-top: 20px;
}

.transfer-switch:hover {
    background: var(--color-primary);
    border-color: var(--color-primary);
}

.transfer-switch:hover svg {
    color: white;
}

.transfer-switch svg {
    color: var(--text-secondary);
}

.modal-large {
    max-width: 520px;
}

@media (max-width: 480px) {
    .assets-actions {
        grid-template-columns: 1fr 1fr 1fr;
    }
    
    .transfer-direction {
        flex-direction: column;
    }
    
    .transfer-switch {
        transform: rotate(90deg);
    }
    
    .modal-large {
        max-width: 95%;
    }
}

/* Profile Edit 個人資料編輯頁面 */
.profile-edit-page {
    padding-bottom: 100px;
}

.header-back {
    background: transparent;
    border: none;
    color: var(--text-primary);
    padding: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.header-title {
    flex: 1;
    text-align: center;
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
}

.header-action {
    background: transparent;
    border: none;
    color: var(--color-primary);
    padding: 8px 16px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
}

.header-action:hover {
    opacity: 0.8;
}

.avatar-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 32px 16px;
    background: var(--bg-primary);
}

.avatar-wrapper {
    position: relative;
    margin-bottom: 12px;
}

.avatar-large {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--color-primary), var(--color-primary-dark));
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 40px;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.avatar-upload-btn {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--color-primary);
    color: white;
    border: 3px solid var(--bg-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
}

.avatar-upload-btn:hover {
    background: var(--color-primary-dark);
    transform: scale(1.1);
}

.avatar-hint {
    font-size: 13px;
    color: var(--text-secondary);
}

.form-section {
    background: var(--bg-primary);
    padding: 0 16px 20px;
}

.form-group-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 24px 0 16px;
    padding-top: 8px;
}

.form-item {
    margin-bottom: 20px;
}

.form-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.form-label svg {
    color: var(--text-secondary);
}

.form-input {
    width: 100%;
    padding: 12px 16px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 14px;
    transition: all 0.2s;
}

.form-input:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.form-input:read-only {
    background: var(--bg-hover);
    cursor: not-allowed;
}

.form-textarea {
    width: 100%;
    padding: 12px 16px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 14px;
    font-family: inherit;
    resize: vertical;
    transition: all 0.2s;
}

.form-textarea:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.form-hint {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 6px;
    font-size: 12px;
    color: var(--text-secondary);
}

.verified-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: var(--color-success);
    font-size: 12px;
}

.verified-badge svg {
    flex-shrink: 0;
}

.unverified-badge {
    color: var(--color-warning);
    font-size: 12px;
}

.link-button {
    background: transparent;
    border: none;
    color: var(--color-primary);
    font-size: 12px;
    cursor: pointer;
    padding: 0;
}

.link-button:hover {
    text-decoration: underline;
}

.form-item-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 0;
    border-bottom: 1px solid var(--border-color);
}

.form-item-toggle:last-child {
    border-bottom: none;
}

.toggle-label {
    flex: 1;
}

.toggle-label span {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.toggle-desc {
    font-size: 12px;
    color: var(--text-secondary);
    margin: 0;
}

.form-actions {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 16px;
    background: var(--bg-primary);
    border-top: 1px solid var(--border-color);
    display: flex;
    gap: 12px;
    z-index: 100;
}

.btn-secondary {
    flex: 1;
    padding: 14px;
    background: var(--bg-secondary);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-secondary:hover {
    background: var(--bg-hover);
}

@media (max-width: 480px) {
    .avatar-large {
        width: 80px;
        height: 80px;
        font-size: 32px;
    }

    .avatar-upload-btn {
        width: 32px;
        height: 32px;
    }

    .avatar-upload-btn svg {
        width: 16px;
        height: 16px;
    }
}

/* Security Settings 安全設置頁面 */
.security-page {
    padding-bottom: 20px;
}

.security-level-card {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1), rgba(139, 92, 246, 0.1));
    border: 1px solid rgba(99, 102, 241, 0.2);
    border-radius: 12px;
    padding: 20px;
    margin: 16px 16px 20px;
}

.security-level-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.security-level-info h3 {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 12px 0;
}

.security-level-bar {
    width: 200px;
    height: 8px;
    background: var(--bg-secondary);
    border-radius: 4px;
    overflow: hidden;
}

.security-level-progress {
    height: 100%;
    background: linear-gradient(90deg, var(--color-success), var(--color-primary));
    border-radius: 4px;
    transition: width 0.5s ease;
}

.security-level-badge {
    padding: 6px 16px;
    background: var(--color-primary);
    color: white;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
}

.security-level-desc {
    font-size: 13px;
    color: var(--text-secondary);
    margin: 0;
    line-height: 1.5;
}

.security-section {
    margin-bottom: 20px;
}

.section-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 12px 16px 8px;
}

.security-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px;
    background: var(--bg-primary);
    border-bottom: 1px solid var(--border-color);
    cursor: pointer;
    transition: background 0.2s;
}

.security-item:hover {
    background: var(--bg-secondary);
}

.security-item-left {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
}

.security-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.security-icon-primary {
    background: rgba(99, 102, 241, 0.1);
    color: var(--color-primary);
}

.security-icon-success {
    background: rgba(34, 197, 94, 0.1);
    color: var(--color-success);
}

.security-icon-warning {
    background: rgba(251, 191, 36, 0.1);
    color: var(--color-warning);
}

.security-icon-danger {
    background: rgba(239, 68, 68, 0.1);
    color: var(--color-danger);
}

.security-icon-info {
    background: rgba(59, 130, 246, 0.1);
    color: var(--color-info);
}

.security-item-info {
    flex: 1;
}

.security-item-title {
    font-size: 15px;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.security-item-desc {
    font-size: 13px;
    color: var(--text-secondary);
}

.security-item-right {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.security-status {
    font-size: 13px;
    font-weight: 500;
}

.status-complete {
    color: var(--color-success);
}

.status-incomplete {
    color: var(--color-warning);
}

.device-count {
    font-size: 13px;
    color: var(--text-secondary);
}

.security-tips {
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.2);
    border-radius: 12px;
    padding: 16px;
    margin: 20px 16px;
}

.tips-header {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 600;
    color: var(--color-info);
    margin-bottom: 12px;
}

.security-tips ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.security-tips li {
    font-size: 13px;
    color: var(--text-secondary);
    padding-left: 20px;
    position: relative;
    margin-bottom: 8px;
    line-height: 1.5;
}

.security-tips li:before {
    content: '•';
    position: absolute;
    left: 0;
    color: var(--color-info);
    font-weight: bold;
    font-size: 16px;
}

.security-tips li:last-child {
    margin-bottom: 0;
}

/* 彈窗內容樣式 */
.modal-info {
    text-align: center;
    padding: 20px;
    background: var(--bg-hover);
    border-radius: 8px;
    margin-bottom: 20px;
}

.modal-info svg {
    color: var(--color-primary);
    margin-bottom: 12px;
}

.modal-info p {
    font-size: 14px;
    color: var(--text-secondary);
    margin: 0;
    line-height: 1.5;
}

.password-strength {
    margin-top: 8px;
    font-size: 12px;
}

.strength-weak { color: var(--color-danger); }
.strength-medium { color: var(--color-warning); }
.strength-strong { color: var(--color-success); }
.strength-very-strong { color: var(--color-primary); }

.twofa-status {
    text-align: center;
    padding: 20px;
    margin-bottom: 20px;
}

.status-badge {
    display: inline-block;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 12px;
}

.status-active {
    background: rgba(34, 197, 94, 0.1);
    color: var(--color-success);
}

.twofa-status p {
    font-size: 14px;
    color: var(--text-secondary);
    margin: 0;
}

.twofa-actions {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
}

.twofa-info {
    background: var(--bg-hover);
    border-radius: 8px;
    padding: 16px;
}

.twofa-info h4 {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 8px 0;
}

.twofa-info p {
    font-size: 13px;
    color: var(--text-secondary);
    margin: 0;
    line-height: 1.5;
}

@media (max-width: 480px) {
    .security-level-bar {
        width: 150px;
    }

    .security-item-left {
        gap: 10px;
    }

    .security-icon {
        width: 36px;
        height: 36px;
    }

    .security-icon svg {
        width: 18px;
        height: 18px;
    }

    .twofa-actions {
        flex-direction: column;
    }
}

/* ============================================
   KYC Verification Page Styles
   ============================================ */
.kyc-page {
    padding: 16px;
}

.kyc-status-card {
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    border-radius: 12px;
    padding: 32px 24px;
    text-align: center;
    color: #fff;
    margin-bottom: 24px;
}

.kyc-status-icon {
    margin: 0 auto 16px;
    width: 64px;
    height: 64px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.kyc-status-icon svg {
    color: #fff;
}

.kyc-status-title {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 8px;
}

.kyc-status-desc {
    font-size: 14px;
    opacity: 0.9;
    margin-bottom: 20px;
}

.kyc-limits {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-top: 20px;
}

.limit-item {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    padding: 16px;
}

.limit-label {
    display: block;
    font-size: 12px;
    opacity: 0.8;
    margin-bottom: 8px;
}

.limit-value {
    display: block;
    font-size: 16px;
    font-weight: 600;
}

.kyc-levels {
    margin-bottom: 24px;
}

.kyc-level-card {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 16px;
    border: 1px solid var(--border-color);
}

.kyc-level-card.completed {
    border-color: var(--success-color);
    background: rgba(34, 197, 94, 0.05);
}

.level-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 16px;
}

.level-info {
    flex: 1;
}

.level-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 8px;
}

.level-badge.level-basic {
    background: rgba(34, 197, 94, 0.15);
    color: var(--success-color);
}

.level-badge.level-advanced {
    background: rgba(59, 130, 246, 0.15);
    color: var(--primary-color);
}

.level-badge.level-enterprise {
    background: rgba(168, 85, 247, 0.15);
    color: #a855f7;
}

.level-badge svg {
    width: 14px;
    height: 14px;
}

.level-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 4px;
}

.status-badge.status-verified {
    background: rgba(34, 197, 94, 0.15);
    color: var(--success-color);
}

.status-badge.status-pending {
    background: rgba(251, 191, 36, 0.15);
    color: var(--warning-color);
}

.status-badge.status-locked {
    background: rgba(107, 114, 128, 0.15);
    color: var(--text-secondary);
}

.level-features {
    margin-bottom: 16px;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 0;
    font-size: 14px;
    color: var(--text-secondary);
}

.feature-item svg {
    width: 16px;
    height: 16px;
    color: var(--success-color);
    flex-shrink: 0;
}

.level-requirements {
    background: var(--bg-secondary);
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 16px;
}

.level-requirements h4 {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 12px;
}

.level-requirements ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.level-requirements li {
    padding: 6px 0;
    font-size: 14px;
    color: var(--text-secondary);
}

.level-requirements li.completed {
    color: var(--success-color);
}

.level-requirements li.pending {
    color: var(--warning-color);
}

.level-requirements li.locked {
    color: var(--text-tertiary);
}

.kyc-info-section,
.kyc-faq-section {
    margin-bottom: 24px;
}

.info-card {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 20px;
    border: 1px solid var(--border-color);
}

.info-item {
    display: flex;
    gap: 16px;
    margin-bottom: 20px;
}

.info-item:last-child {
    margin-bottom: 0;
}

.info-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: rgba(59, 130, 246, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.info-icon svg {
    color: var(--primary-color);
}

.info-content h4 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 6px;
}

.info-content p {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.5;
}

.faq-list {
    background: var(--card-bg);
    border-radius: 12px;
    border: 1px solid var(--border-color);
    overflow: hidden;
}

.faq-item {
    border-bottom: 1px solid var(--border-color);
    cursor: pointer;
}

.faq-item:last-child {
    border-bottom: none;
}

.faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    font-weight: 500;
    transition: background-color 0.2s;
}

.faq-question:hover {
    background: var(--bg-secondary);
}

.faq-question svg {
    flex-shrink: 0;
    transition: transform 0.3s;
}

.faq-item.active .faq-question svg {
    transform: rotate(180deg);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
}

.faq-item.active .faq-answer {
    max-height: 500px;
    padding: 0 20px 16px;
}

.faq-answer p {
    color: var(--text-secondary);
    line-height: 1.6;
    font-size: 14px;
}

/* KYC Modal Styles */
.modal-large {
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
}

.kyc-steps {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 32px;
    padding: 0 20px;
}

.step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.step-number {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--bg-secondary);
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    transition: all 0.3s;
}

.step.active .step-number {
    background: var(--primary-color);
    color: #fff;
}

.step.completed .step-number {
    background: var(--success-color);
    color: #fff;
}

.step-label {
    font-size: 12px;
    color: var(--text-secondary);
}

.step.active .step-label {
    color: var(--primary-color);
    font-weight: 600;
}

.step-line {
    width: 60px;
    height: 2px;
    background: var(--border-color);
    margin: 0 8px;
}

.step-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 8px;
    text-align: center;
}

.step-desc {
    text-align: center;
    color: var(--text-secondary);
    font-size: 14px;
    margin-bottom: 24px;
}

.document-types {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-top: 24px;
}

.document-type {
    background: var(--card-bg);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    padding: 24px 16px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
}

.document-type:hover {
    border-color: var(--primary-color);
    background: rgba(59, 130, 246, 0.05);
}

.document-icon {
    margin-bottom: 12px;
    color: var(--primary-color);
}

.document-name {
    font-size: 14px;
    font-weight: 500;
}

.upload-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 24px;
}

.upload-box {
    position: relative;
    aspect-ratio: 3/2;
    border-radius: 8px;
    overflow: hidden;
}

.upload-box.large {
    grid-column: 1 / -1;
    aspect-ratio: 2/1;
}

.upload-placeholder {
    width: 100%;
    height: 100%;
    background: var(--bg-secondary);
    border: 2px dashed var(--border-color);
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s;
}

.upload-placeholder:hover {
    border-color: var(--primary-color);
    background: rgba(59, 130, 246, 0.05);
}

.upload-placeholder svg {
    color: var(--text-tertiary);
    margin-bottom: 8px;
}

.upload-placeholder p {
    font-size: 14px;
    color: var(--text-secondary);
}

.upload-preview {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.upload-tips {
    background: var(--bg-secondary);
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 24px;
}

.upload-tips h5 {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 12px;
}

.upload-tips ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.upload-tips li {
    font-size: 13px;
    color: var(--text-secondary);
    padding: 4px 0;
    padding-left: 20px;
    position: relative;
}

.upload-tips li::before {
    content: '•';
    position: absolute;
    left: 8px;
    color: var(--primary-color);
}

.selfie-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 24px;
}

.selfie-example {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: var(--bg-secondary);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin-bottom: 24px;
}

.selfie-example svg {
    color: var(--text-tertiary);
    margin-bottom: 8px;
}

.selfie-example p {
    font-size: 12px;
    color: var(--text-secondary);
}

/* KYC Responsive */
@media (max-width: 768px) {
    .kyc-limits {
        gap: 12px;
    }
    
    .limit-item {
        padding: 12px;
    }
    
    .limit-value {
        font-size: 14px;
    }
    
    .document-types {
        gap: 12px;
    }
    
    .document-type {
        padding: 20px 12px;
    }
}

@media (max-width: 480px) {
    .kyc-status-card {
        padding: 24px 16px;
    }
    
    .kyc-status-title {
        font-size: 20px;
    }
    
    .kyc-limits {
        grid-template-columns: 1fr;
        gap: 8px;
    }
    
    .kyc-steps {
        padding: 0 10px;
    }
    
    .step-line {
        width: 40px;
    }
    
    .step-label {
        font-size: 11px;
    }
    
    .document-types {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .upload-section {
        grid-template-columns: 1fr;
    }
}

/* ============================================
   Orders Page Styles
   ============================================ */
.orders-page {
    padding: 0;
}

/* 訂單類型標籤 */
.order-tabs {
    background: var(--card-bg);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 56px;
    z-index: 10;
}

.tab-scroll {
    display: flex;
    overflow-x: auto;
    padding: 12px 16px;
    gap: 12px;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.tab-scroll::-webkit-scrollbar {
    display: none;
}

.order-tab {
    padding: 8px 20px;
    border-radius: 20px;
    background: var(--bg-secondary);
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 500;
    border: none;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.3s;
}

.order-tab.active {
    background: var(--primary-color);
    color: #fff;
}

/* 訂單狀態過濾 */
.order-status-filter {
    display: flex;
    background: var(--card-bg);
    border-bottom: 1px solid var(--border-color);
    padding: 12px 16px;
    gap: 8px;
}

.status-filter-btn {
    flex: 1;
    padding: 8px 12px;
    border-radius: 6px;
    background: var(--bg-secondary);
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 500;
    border: none;
    cursor: pointer;
    transition: all 0.3s;
}

.status-filter-btn.active {
    background: rgba(59, 130, 246, 0.15);
    color: var(--primary-color);
}

/* 訂單列表 */
.order-list {
    padding: 16px;
}

.order-item {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 12px;
    border: 1px solid var(--border-color);
    cursor: pointer;
    transition: all 0.3s;
}

.order-item:hover {
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.order-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.order-header-left {
    display: flex;
    align-items: center;
    gap: 8px;
}

.order-type-badge {
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
}

.order-type-badge.type-spot {
    background: rgba(59, 130, 246, 0.15);
    color: var(--primary-color);
}

.order-type-badge.type-contract {
    background: rgba(168, 85, 247, 0.15);
    color: #a855f7;
}

.order-type-badge.type-c2c {
    background: rgba(34, 197, 94, 0.15);
    color: var(--success-color);
}

.order-type-badge.type-earn {
    background: rgba(251, 191, 36, 0.15);
    color: var(--warning-color);
}

.order-pair {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
}

.order-status {
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

.order-status.status-processing {
    background: rgba(59, 130, 246, 0.15);
    color: var(--primary-color);
}

.order-status.status-completed {
    background: rgba(34, 197, 94, 0.15);
    color: var(--success-color);
}

.order-status.status-cancelled {
    background: rgba(239, 68, 68, 0.15);
    color: var(--danger-color);
}

.order-info {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-bottom: 12px;
}

.order-info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.order-label {
    font-size: 13px;
    color: var(--text-secondary);
}

.order-value {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
}

.order-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 12px;
    border-top: 1px solid var(--border-color);
}

.order-time {
    font-size: 12px;
    color: var(--text-tertiary);
}

.order-id {
    font-size: 12px;
    color: var(--text-tertiary);
}

/* 訂單詳情 */
.order-detail {
    padding: 8px 0;
}

.detail-header {
    text-align: center;
    margin-bottom: 24px;
}

.detail-pair {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 12px;
}

.detail-badges {
    display: flex;
    justify-content: center;
    gap: 8px;
}

.detail-section {
    margin-bottom: 24px;
}

.detail-section-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 16px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border-color);
}

.detail-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid var(--border-color);
}

.detail-row:last-child {
    border-bottom: none;
}

.detail-label {
    font-size: 14px;
    color: var(--text-secondary);
}

.detail-value {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
    text-align: right;
}

.detail-actions {
    margin-top: 24px;
}

/* 篩選器 */
.filter-section {
    margin-bottom: 20px;
}

.filter-label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.filter-options {
    display: flex;
    gap: 12px;
}

.filter-option {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px;
    background: var(--bg-secondary);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
}

.filter-option:has(input:checked) {
    background: rgba(59, 130, 246, 0.15);
    color: var(--primary-color);
}

.filter-option input[type="radio"] {
    display: none;
}

.filter-option span {
    font-size: 14px;
    font-weight: 500;
}

/* 空狀態 */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    text-align: center;
}

.empty-state svg {
    color: var(--text-tertiary);
    margin-bottom: 16px;
    opacity: 0.5;
}

.empty-state p {
    font-size: 16px;
    color: var(--text-secondary);
}

/* 響應式 */
@media (max-width: 480px) {
    .order-info {
        grid-template-columns: 1fr;
        gap: 8px;
    }
    
    .order-footer {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }
    
    .filter-options {
        flex-direction: column;
        gap: 8px;
    }
    
    .status-filter-btn {
        font-size: 12px;
        padding: 6px 8px;
    }
}

/* ============================================
   Trading History Page Styles
   ============================================ */
.trades-page {
    padding: 0;
}

/* 交易類型標籤 */
.trade-tabs {
    background: var(--card-bg);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 56px;
    z-index: 10;
}

.trade-tab {
    padding: 8px 20px;
    border-radius: 20px;
    background: var(--bg-secondary);
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 500;
    border: none;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.3s;
}

.trade-tab.active {
    background: var(--primary-color);
    color: #fff;
}

/* 統計區域 */
.trade-stats-section {
    background: var(--card-bg);
    border-bottom: 1px solid var(--border-color);
    padding: 16px;
}

.stats-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.stats-time-selector {
    display: flex;
    gap: 8px;
}

.time-btn {
    padding: 6px 16px;
    border-radius: 6px;
    background: var(--bg-secondary);
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 500;
    border: none;
    cursor: pointer;
    transition: all 0.3s;
}

.time-btn.active {
    background: rgba(59, 130, 246, 0.15);
    color: var(--primary-color);
}

.filter-btn {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: var(--bg-secondary);
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s;
}

.filter-btn:hover {
    background: rgba(59, 130, 246, 0.15);
}

.filter-btn svg {
    color: var(--text-secondary);
}

.stats-cards {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
}

.stat-card {
    background: var(--bg-secondary);
    border-radius: 8px;
    padding: 12px;
    text-align: center;
}

.stat-label {
    font-size: 12px;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.stat-value {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
}

.stat-value.profit {
    color: var(--success-color);
}

.stat-value.loss {
    color: var(--danger-color);
}

/* 交易列表 */
.trade-list {
    padding: 16px;
}

.trade-item {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 12px;
    border: 1px solid var(--border-color);
    cursor: pointer;
    transition: all 0.3s;
}

.trade-item:hover {
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.trade-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.trade-header-left {
    display: flex;
    align-items: center;
    gap: 8px;
}

.trade-pair {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
}

.trade-type-tag {
    padding: 3px 8px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
}

.trade-type-tag.type-spot {
    background: rgba(59, 130, 246, 0.15);
    color: var(--primary-color);
}

.trade-type-tag.type-contract {
    background: rgba(168, 85, 247, 0.15);
    color: #a855f7;
}

.trade-type-tag.type-margin {
    background: rgba(251, 191, 36, 0.15);
    color: var(--warning-color);
}

.trade-side {
    font-size: 14px;
    font-weight: 600;
}

.trade-side-badge {
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}

.trade-details {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-bottom: 12px;
}

.trade-detail-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.trade-label {
    font-size: 13px;
    color: var(--text-secondary);
}

.trade-value {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-primary);
}

.trade-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 12px;
    border-top: 1px solid var(--border-color);
}

.trade-role {
    font-size: 11px;
    padding: 3px 8px;
    background: var(--bg-secondary);
    border-radius: 10px;
    color: var(--text-secondary);
}

.trade-time {
    font-size: 12px;
    color: var(--text-tertiary);
}

/* 交易詳情 */
.trade-detail-view {
    padding: 8px 0;
}

.detail-row.highlight {
    background: rgba(59, 130, 246, 0.05);
    padding: 12px;
    margin: 0 -12px;
    border-radius: 8px;
}

/* 金額範圍 */
.amount-range {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 8px;
    align-items: center;
}

.range-separator {
    font-size: 14px;
    color: var(--text-secondary);
}

/* 載入更多 */
.load-more-section {
    padding: 16px;
    text-align: center;
}

/* 響應式 */
@media (max-width: 768px) {
    .stats-cards {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .stat-value {
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .stats-time-selector {
        gap: 6px;
    }
    
    .time-btn {
        padding: 5px 12px;
        font-size: 12px;
    }
    
    .stats-cards {
        gap: 8px;
    }
    
    .stat-card {
        padding: 10px;
    }
    
    .stat-label {
        font-size: 11px;
    }
    
    .stat-value {
        font-size: 13px;
    }
    
    .trade-details {
        grid-template-columns: 1fr;
        gap: 8px;
    }
    
    .amount-range {
        grid-template-columns: 1fr;
        gap: 8px;
    }
    
    .range-separator {
        text-align: center;
    }
}

/* ============================================
   Settings Page Styles
   ============================================ */
.settings-page {
    padding: 0;
    padding-bottom: 24px;
}

.settings-section {
    margin-bottom: 24px;
}

.settings-group {
    background: var(--card-bg);
    border-radius: 12px;
    overflow: hidden;
    margin: 0 16px;
}

.setting-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px;
    border-bottom: 1px solid var(--border-color);
    cursor: pointer;
    transition: background-color 0.2s;
}

.setting-item:last-child {
    border-bottom: none;
}

.setting-item:hover {
    background: var(--bg-secondary);
}

.setting-left {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
}

.setting-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: var(--bg-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.setting-icon svg {
    color: var(--primary-color);
}

.setting-info {
    flex: 1;
}

.setting-label {
    font-size: 15px;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.setting-desc {
    font-size: 12px;
    color: var(--text-secondary);
}

.setting-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

.setting-value {
    font-size: 14px;
    color: var(--text-secondary);
}

.setting-right svg {
    color: var(--text-tertiary);
}

/* 語言/貨幣選擇列表 */
.language-list,
.currency-list {
    max-height: 400px;
    overflow-y: auto;
}

.language-item,
.currency-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px;
    border-bottom: 1px solid var(--border-color);
    cursor: pointer;
    transition: background-color 0.2s;
}

.language-item:last-child,
.currency-item:last-child {
    border-bottom: none;
}

.language-item:hover,
.currency-item:hover {
    background: var(--bg-secondary);
}

.language-name,
.currency-name {
    font-size: 15px;
    color: var(--text-primary);
}

.language-item svg,
.currency-item svg {
    color: var(--primary-color);
    opacity: 0;
    transition: opacity 0.2s;
}

.language-item.active svg,
.currency-item.active svg {
    opacity: 1;
}

/* 關於我們 */
.about-content {
    text-align: center;
    padding: 20px 0;
}

.app-logo {
    margin: 0 auto 16px;
    width: 80px;
    height: 80px;
    border-radius: 20px;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    display: flex;
    align-items: center;
    justify-content: center;
}

.app-logo svg {
    color: #fff;
}

.about-content h3 {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 8px;
}

.version {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 24px;
}

.about-info {
    margin-bottom: 24px;
}

.about-info p {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.6;
    margin: 8px 0;
}

.about-links {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 24px;
    padding: 20px 0;
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
}

.about-link {
    font-size: 14px;
    color: var(--primary-color);
    text-decoration: none;
    transition: opacity 0.2s;
}

.about-link:hover {
    opacity: 0.8;
}

.copyright {
    font-size: 12px;
    color: var(--text-tertiary);
}

/* 登出按鈕 */
.logout-section {
    padding: 0 16px;
    margin-top: 32px;
}

/* 響應式 */
@media (max-width: 480px) {
    .setting-icon {
        width: 36px;
        height: 36px;
    }
    
    .setting-icon svg {
        width: 18px;
        height: 18px;
    }
    
    .setting-label {
        font-size: 14px;
    }
    
    .setting-desc {
        font-size: 11px;
    }
    
    .about-links {
        flex-direction: column;
        gap: 12px;
    }
}
