/* public/css/style.css (Dual Theme) */

/* --- 1. 全局变量 (CSS Variables) --- */

/* 默认加载浅色主题 */
:root {
    --bg-body: #f4f7fa;
    --bg-main: #ffffff;
    --bg-header: #f8f9fa;
    --border-color: #e9ecef;
    --shadow-color: rgba(108, 117, 125, 0.15);
    --text-dark: #212529;
    --text-secondary: #6c757d;
    --primary-light: rgba(0, 123, 255, 0.1);
    --held-bg-color: #f0fff3;
    --flash-success-bg: #d4edda;
    --flash-success-text: #155724;
    --flash-success-border: #c3e6cb;
    --flash-error-bg: #f8d7da;
    --flash-error-text: #721c24;
    --flash-error-border: #f5c6cb;
}

/* 当html标签有 data-theme="dark" 属性时，应用以下深色主题变量 */
[data-theme='dark'] {
    --bg-body: #1a1b26;
    --bg-main: #24283b;
    --bg-header: rgba(0, 0, 0, 0.15);
    --border-color: #414868;
    --shadow-color: rgba(0, 0, 0, 0.2);
    --text-dark: #c0caf5;
    --text-secondary: #a9b1d6;
    --primary-light: rgba(122, 162, 247, 0.2);
    --held-bg-color: rgba(158, 206, 106, 0.08);
    --flash-success-bg: rgba(158, 206, 106, 0.1);
    --flash-success-text: #9ece6a;
    --flash-success-border: #9ece6a;
    --flash-error-bg: rgba(247, 118, 142, 0.1);
    --flash-error-text: #f7768e;
    --flash-error-border: #f7768e;
}

/* 通用变量 (不随主题变化) */
:root {
    --text-light: #ffffff;
    --primary-color: #007bff;
    --primary-hover: #0056b3;
    --accent-green: #28a745;
    --accent-red: #dc3545;
    --accent-yellow: #ffc107;
    --accent-cyan: #17a2b8;
    --held-border-color: var(--accent-green);
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --border-radius: 8px;
    --shadow: 0 4px 20px var(--shadow-color);
}


/* --- 2. 基础设置 (使用变量) --- */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html,
body {
    height: 100%;
}

body {
    font-family: var(--font-family), serif;
    background-color: var(--bg-body);
    color: var(--text-dark);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    transition: background-color 0.3s ease, color 0.3s ease;
    /* 添加主题切换动画 */
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    text-decoration: underline;
    color: var(--primary-hover);
}

/* --- 3. 登录页面 --- */
.login-box {
    background-color: var(--bg-main);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow);
    /* ... 其余登录样式保持不变 ... */
}

/* ... .login-wrapper, .login-header 等 ... */
.login-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100vh;
    padding: 20px;
}

.login-box {
    width: 100%;
    max-width: 400px;
    padding: 40px;
    border-radius: var(--border-radius);
}

.login-header {
    text-align: center;
    margin-bottom: 30px;
}

.login-header .logo {
    width: 48px;
    height: 48px;
    color: var(--primary-color);
    margin-bottom: 15px;
}

.login-header h1 {
    color: var(--text-dark);
    font-size: 24px;
    margin-bottom: 5px;
}

.login-header p {
    color: var(--text-secondary);
    font-size: 14px;
}


/* --- 4. 主容器与头部 --- */
.container {
    max-width: 1600px;
    margin: 30px auto;
    padding: 20px;
}

.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    gap: 20px;
    padding: 20px;
    background-color: var(--bg-main);
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
    transition: background-color 0.3s, border-color 0.3s;
}

.header-main {
    flex-shrink: 0;
}

.header-main h1 {
    font-size: 2rem;
    color: var(--text-dark);
    margin: 0;
}

.header-right {
    display: flex;
    flex-direction: column;
    gap: 12px;
    align-items: flex-end;
    justify-content: center;
}

.sol-balance {
    font-size: 1rem;
    color: var(--text-secondary);
    margin-top: 5px;
}

.sol-balance strong {
    color: var(--text-dark);
    font-weight: 600;
}

.header-buttons {
    display: flex;
    gap: 15px;
    align-items: center;
}

/* 主题切换按钮样式 */
.theme-switcher {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-secondary);
    padding: 8px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.theme-switcher:hover {
    background-color: var(--bg-body);
}

.theme-switcher svg {
    width: 20px;
    height: 20px;
}

/* 默认隐藏月亮图标 */
.theme-switcher .icon-moon {
    display: none;
}

/* 深色模式下，隐藏太阳图标，显示月亮图标 */
[data-theme='dark'] .theme-switcher .icon-sun {
    display: none;
}

[data-theme='dark'] .theme-switcher .icon-moon {
    display: block;
}

/* --- 4.5 桌面端汇总显示 (简化文本版) --- */
.desktop-summary {
    display: flex;
    align-items: center;
    gap: 15px;
    font-size: 14px;
    flex-wrap: nowrap;
    white-space: nowrap;
}

.summary-item {
    display: inline-flex;
    align-items: baseline;
    gap: 6px;
    white-space: nowrap;
}

.summary-label {
    color: var(--text-secondary);
    font-size: 13px;
    white-space: nowrap;
}

.summary-value {
    color: var(--text-dark);
    font-weight: 600;
    font-size: 14px;
    white-space: nowrap;
}

.summary-value.primary {
    color: var(--primary-color);
    font-weight: 700;
    font-size: 15px;
    white-space: nowrap;
}

.summary-separator {
    color: var(--border-color);
    font-weight: 300;
    white-space: nowrap;
}

/* 移动端隐藏桌面汇总 */
@media screen and (max-width: 992px) {
    .desktop-summary {
        display: none;
    }

    .header {
        flex-direction: column;
        align-items: stretch;
    }

    .header-right {
        align-items: center;
    }

    .header-buttons {
        justify-content: center;
    }
}

/* 平板和小屏幕适配 */
@media screen and (max-width: 1200px) and (min-width: 993px) {
    .desktop-summary {
        font-size: 13px;
        gap: 12px;
    }

    .summary-label {
        font-size: 12px;
    }

    .summary-value {
        font-size: 13px;
    }

    .summary-value.primary {
        font-size: 14px;
    }
}

.custom-slider {
    position: relative;
    height: 50px;
    padding: 0 8px;
    margin: 15px 0;
    user-select: none;
}

/* 轨道 */
.slider-track {
    position: absolute;
    top: 12px;
    left: 8px;
    right: 8px;
    height: 4px;
    background: #e5e5ea;
    border-radius: 2px;
}

[data-theme='dark'] .slider-track {
    background: #414868;
}

/* 进度条 */
.slider-progress {
    position: absolute;
    top: 12px;
    left: 8px;
    height: 4px;
    background: var(--primary-color);
    border-radius: 2px;
    transition: width 0.05s ease;
    pointer-events: none;
}

/* 滑块 */
.slider-handle {
    position: absolute;
    top: 5px;
    width: 18px;
    height: 18px;
    background: #fff;
    border: 3px solid var(--primary-color);
    border-radius: 50%;
    cursor: grab;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
    transition: transform 0.1s ease, box-shadow 0.1s ease;
    outline: none;
}

[data-theme='dark'] .slider-handle {
    background: #24283b;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
}

.slider-handle:hover {
    transform: scale(1.15);
    box-shadow: 0 3px 10px rgba(0, 123, 255, 0.3);
}

.slider-handle:active,
.slider-handle.dragging {
    cursor: grabbing;
    transform: scale(1.1);
}

.slider-handle:focus-visible {
    box-shadow: 0 0 0 4px var(--primary-light);
}

/* 刻度标记容器 */
.slider-marks {
    position: absolute;
    top: 22px;
    left: 8px;
    right: 8px;
    pointer-events: none;
}

/* 单个刻度标记 */
.slider-mark {
    position: absolute;
    text-align: center;
    transform: translateX(-50%);
}

/* 刻度线 */
.mark-line {
    display: block;
    width: 1px;
    height: 6px;
    background: #d1d1d6;
    margin: 0 auto 4px;
}

[data-theme='dark'] .mark-line {
    background: #565f89;
}

/* Switch 开关样式 */
.switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 24px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.switch-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
    border-radius: 24px;
}

.switch-slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked+.switch-slider {
    background-color: var(--primary-color);
}

input:focus+.switch-slider {
    box-shadow: 0 0 1px var(--primary-color);
}

input:checked+.switch-slider:before {
    transform: translateX(26px);
}

/* 深色主题适配 */
[data-theme='dark'] .switch-slider {
    background-color: #565f89;
}

[data-theme='dark'] .switch-slider:before {
    background-color: #cdd6f4;
}

/* 刻度标签 */
.mark-label {
    display: block;
    font-size: 11px;
    color: var(--text-secondary);
    white-space: nowrap;
}

/* --- 5. 表单与按钮 --- */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--text-secondary);
}

.form-group input {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid var(--border-color);
    background-color: var(--bg-main);
    color: var(--text-dark);
    border-radius: 10px;
    /* More rounded */
    font-size: 16px;
    transition: all 0.3s ease;
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px var(--primary-light);
}

/* Base Button Style */
.btn {
    padding: 6px 12px;
    /* 更小的内边距 */
    border: none;
    border-radius: 6px;
    /* 更小的圆角 */
    cursor: pointer;
    font-size: 13px;
    /* 更小的字号 */
    font-weight: 500;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    /* 更小的间距 */
    line-height: 1.4;
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
    user-select: none;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.btn:active {
    transform: scale(0.98);
}

/* Primary Button */
.btn-primary {
    background-color: var(--primary-color);
    color: #ffffff;
    /* Removed strong gradient and shadow */
}

.btn-primary:hover {
    background-color: var(--primary-hover);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transform: translateY(-1px);
}

/* Secondary Button */
.btn-secondary {
    background-color: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    box-shadow: none;
}

.btn-secondary:hover {
    background-color: var(--bg-header);
    border-color: var(--text-secondary);
    color: var(--text-dark);
    transform: translateY(-1px);
}

/* Info Button (Market) */
.btn-info {
    background-color: var(--accent-cyan);
    color: #ffffff;
}

.btn-info:hover {
    filter: brightness(0.95);
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Danger Button */
.btn-danger {
    background-color: var(--accent-red);
    color: #ffffff;
}

.btn-danger:hover {
    filter: brightness(0.95);
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.btn-block {
    width: 100%;
    text-align: center;
    padding: 10px;
    font-size: 13px;
}

/* Mobile adjustments for buttons */
@media screen and (max-width: 768px) {
    .btn {
        padding: 6px 10px;
        font-size: 12px;
        width: auto;
    }

    .header-buttons .btn {
        padding: 6px 10px;
    }

    /* Mobile Menu Styles */
    .desktop-only {
        display: none !important;
    }

    .mobile-only {
        display: inline-flex !important;
    }

    .header-buttons {
        position: relative;
        /* Anchor for dropdown */
    }

    .mobile-menu-dropdown {
        position: absolute;
        top: 100%;
        right: 0;
        margin-top: 5px;
        background-color: var(--bg-main);
        border: 1px solid var(--border-color);
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
        border-radius: var(--border-radius);
        flex-direction: column;
        width: 140px;
        z-index: 1000;
        display: none;
        padding: 5px 0;
    }

    .mobile-menu-dropdown.show {
        display: flex;
        animation: fadeIn 0.2s ease-out;
    }

    .mobile-menu-dropdown .btn {
        width: 100%;
        justify-content: flex-start;
        text-align: left;
        margin: 0;
        padding: 10px 15px;
        background: none;
        color: var(--text-dark);
        border: none;
        border-radius: 0;
    }

    .mobile-menu-dropdown .btn:hover {
        background-color: var(--bg-header);
    }

    /* Ensure svg icons in dropdown are correct color */
    .mobile-menu-dropdown .btn svg {
        margin-right: 8px;
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-5px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Default state for utility classes */
.mobile-only {
    display: none;
}

.mobile-menu-dropdown {
    display: none;
}

/* --- 6. 消息提示 --- */
/* --- 6. 消息提示 (Toast) --- */
.messages-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 2000;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
    /* 允许点击穿透容器 */
}

.message {
    padding: 12px 20px;
    border-radius: var(--border-radius);
    text-align: left;
    border: 1px solid;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    min-width: 300px;
    max-width: 400px;
    animation: slide-in-right 0.3s ease-out;
    pointer-events: auto;
    /* 恢复消息本身的点击 */
    display: flex;
    align-items: center;
    justify-content: space-between;
}

@keyframes slide-in-right {
    from {
        transform: translateX(100%);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.message.success-message {
    background-color: var(--bg-main);
    /* 使用背景色而不是浅绿，更现代 */
    color: var(--accent-green);
    border-color: var(--accent-green);
    border-left-width: 4px;
    /* 左侧加粗边框 */
}

.message.error-message {
    background-color: var(--bg-main);
    color: var(--accent-red);
    border-color: var(--accent-red);
    border-left-width: 4px;
}

/* 移动端适配 */
@media screen and (max-width: 768px) {
    .messages-container {
        top: 10px;
        right: 10px;
        left: 10px;
        /* 占满宽度 */
        align-items: center;
    }

    .message {
        width: 100%;
        min-width: auto;
        max-width: none;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    }
}


/* --- 7. 表格 --- */
.table-container {
    background-color: var(--bg-main);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow);
    /* ... */
}

th {
    background-color: var(--bg-header);
    color: var(--text-secondary);
    /* ... */
}

tbody tr:hover {
    background-color: var(--bg-body);
}

.is-held {
    background-color: var(--held-bg-color);
}

.is-held td:first-child {
    box-shadow: inset 3px 0 0 0 var(--held-border-color);
}

/* ... 其余表格样式 ... */
.table-container {
    border-radius: var(--border-radius);
    overflow: hidden;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th,
td {
    padding: 8px 12px;
    /* 减少内边距 */
    border-bottom: 1px solid var(--border-color);
    text-align: left;
    vertical-align: middle;
    font-size: 14px;
    /* 稍微减小字体 */
}

th {
    font-weight: 600;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

tr:last-child td {
    border-bottom: none;
}

/* --- 8. 表格单元格特定样式 --- */
.coin-icon {
    width: 24px;
    /* 减小图标尺寸 */
    height: 24px;
    border-radius: 50%;
    margin-right: 8px;
    background-color: var(--bg-body);
}

.coin-name-cell {
    display: flex;
    align-items: center;
}

.coin-name-link {
    font-weight: 600;
    color: var(--text-dark);
    font-size: 14px;
    /* 减小字体 */
}

.coin-tags {
    display: flex;
    gap: 4px;
    margin-top: 4px;
    flex-wrap: wrap;
}

.tag-badge {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 4px;
    background-color: var(--bg-header);
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
    line-height: 1.2;
    white-space: nowrap;
}

.tag-badge svg {
    width: 10px;
    height: 10px;
}

/* 特定标签颜色 */
.tag-verified {
    background-color: rgba(16, 185, 129, 0.1);
    color: #10b981;
    border-color: rgba(16, 185, 129, 0.2);
}

.tag-moonshot {
    background-color: rgba(139, 92, 246, 0.1);
    color: #8b5cf6;
    border-color: rgba(139, 92, 246, 0.2);
}

.tag-community {
    background-color: rgba(59, 130, 246, 0.1);
    color: #3b82f6;
    border-color: rgba(59, 130, 246, 0.2);
}

.tag-launchpad {
    background-color: rgba(249, 115, 22, 0.1);
    color: #f97316;
    border-color: rgba(249, 115, 22, 0.2);
}

.tag-rugpull {
    background-color: rgba(239, 68, 68, 0.1);
    color: #ef4444;
    border-color: rgba(239, 68, 68, 0.2);
    font-weight: 600;
}

.actions {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: 8px;
}

.price-updated {
    animation: flash-bg 0.8s ease-out;
}

@keyframes flash-bg {
    0% {
        background-color: var(--primary-light);
    }

    100% {
        background-color: transparent;
    }
}

/* --- 9. 弹窗 --- */
.modal {
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
    /* ... */
}

.modal-content {
    background-color: var(--bg-main);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow);
    /* ... */
}

/* ... 其余弹窗样式 ... */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    align-items: center;
    justify-content: center;
}

.modal-content {
    width: 50%;
    max-width: none;
    border-radius: 12px;
    animation: slide-down 0.3s ease-out;
    display: flex;
    flex-direction: column;
    max-height: 85vh;
}

@keyframes slide-down {
    from {
        transform: scale(0.95);
        opacity: 0;
    }

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

.modal-header {
    padding: 20px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 {
    margin: 0;
    font-size: 1.25rem;
    color: var(--text-dark);
}

.modal-body {
    padding: 25px;
    overflow-y: auto;
}

.close {
    color: var(--text-secondary);
    font-size: 32px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.2s;
}

.close:hover {
    color: var(--text-dark);
}

.info-table .info-row {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid var(--border-color);
}

.info-table .info-row:last-child {
    border-bottom: none;
}

.info-key {
    font-weight: 600;
    color: var(--text-secondary);
    flex-basis: 40%;
}

.info-value {
    text-align: right;
    word-break: break-all;
    flex-basis: 60%;
    font-weight: 500;
}

/* --- 10. Full-Screen Loading Overlay --- */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--bg-body);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.loading-overlay.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.loading-spinner {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 30px;
}

.spinner-ring {
    position: absolute;
    width: 80px;
    height: 80px;
    border: 3px solid transparent;
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1.5s cubic-bezier(0.68, -0.55, 0.265, 1.55) infinite;
}

.spinner-ring:nth-child(1) {
    width: 80px;
    height: 80px;
    border-width: 3px;
    animation-delay: 0s;
}

.spinner-ring:nth-child(2) {
    width: 60px;
    height: 60px;
    border-width: 3px;
    border-top-color: var(--accent-cyan);
    animation-delay: -0.3s;
    top: 10px;
    left: 10px;
}

.spinner-ring:nth-child(3) {
    width: 40px;
    height: 40px;
    border-width: 2px;
    border-top-color: var(--accent-green);
    animation-delay: -0.6s;
    top: 20px;
    left: 20px;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.loading-text {
    margin-top: 110px;
    font-size: 16px;
    font-weight: 500;
    color: var(--text-secondary);
    letter-spacing: 1px;
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {

    0%,
    100% {
        opacity: 0.6;
    }

    50% {
        opacity: 1;
    }
}

/* --- 11. 响应式设计 --- */
@media screen and (max-width: 992px) {
    .container {
        padding: 10px;
        margin: 15px auto;
    }

    .header {
        flex-direction: column;
        align-items: stretch;
        text-align: center;
    }

    .header-buttons {
        justify-content: center;
    }

    .table-container {
        border: none;
        box-shadow: none;
        background: transparent;
    }

    table,
    thead,
    tbody,
    th,
    td,
    tr {
        display: block;
    }

    thead tr {
        display: none;
    }

    tr {
        background-color: var(--bg-main);
        border: 1px solid var(--border-color);
        /* 移除原有的左边框，因为它会被下面的新规则覆盖 */
        border-radius: var(--border-radius);
        margin-bottom: 15px;
        padding: 15px;
        box-shadow: 0 2px 5px var(--shadow-color);
    }

    /* 1. 为移动端的 .is-held 行卡片添加左边框 */
    .is-held {
        border-left: 4px solid var(--held-border-color);
        /* 微调内边距，为左边框留出空间，使其不显得拥挤 */
        padding-left: 11px;
    }

    /* 2. 在移动端，禁用桌面端 td:first-child 上的内嵌阴影 */
    .is-held td:first-child {
        box-shadow: none;
    }

    td {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 12px 0;
        border-bottom: 1px solid var(--border-color);
        text-align: right;
    }

    td:last-child {
        border-bottom: none;
    }

    /* Center loading text on mobile */
    td[colspan] {
        justify-content: center;
        text-align: center;
    }

    td::before {
        content: attr(data-label);
        font-weight: 600;
        color: var(--text-secondary);
        text-align: left;
    }

    /* 隐藏操作列的标签 */
    td[data-label="操作"]::before {
        display: none;
    }

    .coin-name-cell {
        justify-content: flex-end;
    }

    .actions {
        justify-content: flex-end;
    }

    .modal-content {
        width: 90%;
    }

    /* 移动端汇总行样式 */
    .summary-row {
        display: none !important;
        /* 隐藏桌面版的汇总行 */
    }

    /* 移动端隐藏特定列 */
    .mobile-hide {
        display: none !important;
    }

    /* 移动端汇总容器 */
    .mobile-summary {
        display: block;
        background-color: var(--bg-main);
        border: 1px solid var(--border-color);
        border-radius: var(--border-radius);
        padding: 15px;
        margin-bottom: 15px;
        box-shadow: 0 2px 5px var(--shadow-color);
    }

    .mobile-summary h3 {
        margin: 0 0 10px 0;
        font-size: 16px;
        color: var(--text-dark);
        border-bottom: 1px solid var(--border-color);
        padding-bottom: 8px;
    }

    .mobile-summary-item {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 8px 0;
        border-bottom: 1px solid var(--border-color);
    }

    .mobile-summary-item:last-child {
        border-bottom: none;
    }

    .mobile-summary-label {
        font-weight: 600;
        color: var(--text-secondary);
    }

    .mobile-summary-value {
        font-weight: bold;
        color: var(--text-dark);
    }

}

/* 浮动刷新按钮 - 只在移动端显示 */
@media screen and (max-width: 992px) {
    .floating-refresh {
        position: fixed;
        bottom: 20px;
        right: 20px;
        width: 56px;
        height: 56px;
        background-color: var(--primary-color);
        color: white;
        border: none;
        border-radius: 50%;
        box-shadow: 0 4px 12px rgba(0, 123, 255, 0.3);
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
        z-index: 1000;
        transition: all 0.3s ease;
    }

    .floating-refresh:hover {
        background-color: var(--primary-hover);
        transform: scale(1.1);
        box-shadow: 0 6px 16px rgba(0, 123, 255, 0.4);
    }

    .floating-refresh:active {
        transform: scale(0.95);
    }

    .floating-refresh svg {
        width: 24px;
        height: 24px;
        animation: none;
    }

    .floating-refresh.spinning svg {
        animation: spin 1s linear infinite;
    }

    @keyframes spin {
        from {
            transform: rotate(0deg);
        }

        to {
            transform: rotate(360deg);
        }
    }
}