/* ================= 期货游戏专用样式 ================= */

/* 移动端触摸优化 */
html {
    -webkit-tap-highlight-color: rgba(0,0,0,0);
    -webkit-touch-callout: none;
    -ms-touch-action: manipulation;
    touch-action: manipulation;
}

* { 
    touch-action: manipulation;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

/* 期货游戏主体容器 - 移除背景色，与大亨游戏保持一致 */
.qh-container {
    min-height: 100vh;
    padding: 0;
}

/* 返回按钮样式调整 */
.back-link {
    margin-left: 10px;
    margin-top: 8px;
}

.back-link .btn {
    padding: 6px 12px;
    font-size: 14px;
}

/* 顶部导航区域 */
.welcome-text {
    text-align: left;
    font-size: 16px;  /* 从14px增加到16px，与其他游戏一致 */
    color: #666;
    margin-bottom: 8px;
}

.welcome-text a {
    color: #007bff;
    text-decoration: none;
}

.links-area {
    text-align: left;
    margin-bottom: 10px;
}

.links-area p {
    font-size: 16px;  /* 从14px增加到16px，与其他游戏一致 */
    margin-bottom: 5px;
}

.links-area a {
    color: #007bff;
    text-decoration: none;
    margin: 0 3px;
}

/* 持仓汇总卡片 */
.holdings-summary {
    background: linear-gradient(135deg, #28a745, #20c997);
    color: white;
    border-radius: 12px;
    padding: 15px;
    text-align: center;
}

.holdings-summary h6 {
    font-size: 12px;
    margin-bottom: 5px;
    opacity: 0.9;
}

.holdings-summary .value {
    font-size: 16px;
    font-weight: bold;
    margin-bottom: 8px;
}

/* 期货列表头部 */
.futures-header {
    background: linear-gradient(135deg, #007bff, #0056b3);
    color: white;
    padding: 10px;
    border-radius: 8px;
    text-align: center;
    margin-bottom: 8px;
}

.futures-header h6 {
    margin: 0;
    font-size: 14px;
}

.game-status {
    font-size: 12px;
    margin-top: 5px;
}

/* 期货项目样式 - 改为白色背景，优化间距 */
.future-item {
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    padding: 8px 10px;
    margin-bottom: 4px;
    background: #ffffff;
    transition: all 0.2s ease;
    position: relative;
}

.future-item:hover {
    border-color: #007bff;
    box-shadow: 0 2px 8px rgba(0,123,255,0.15);
}

.future-item:active {
    transform: scale(0.98);
}

/* 期货信息布局 - 三列式，减少底部间距 */
.future-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2px;
}

.future-middle {
    text-align: center;
    flex: 1;
}

.future-stats {
    text-align: right;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 3px;
}

.change-count {
    font-size: 12px;
    color: #666;
    background: rgba(0,123,255,0.1);
    padding: 2px 6px;
    border-radius: 10px;
    border: 1px solid rgba(0,123,255,0.2);
}

.future-name {
    font-size: 14px;
    font-weight: bold;
    color: #333;
    line-height: 1.2;
}

.future-name.clickable {
    color: #007bff;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s ease;
}

.future-name.clickable:hover {
    color: #0056b3;
    text-decoration: underline;
}

.future-code {
    font-size: 11px;
    color: #666;
    line-height: 1.2;
}

.future-price {
    font-size: 13px;
    font-weight: bold;
    color: #333;
    line-height: 1.2;
}

.future-change {
    font-size: 14px;  /* 从12px增加到14px */
    font-weight: 700; /* 从bold改为更粗的700 */
    line-height: 1.2;
}

/* 涨跌颜色 */
.price-up {
    color: #dc3545 !important;
}

.price-down {
    color: #28a745 !important;
}

.price-neutral {
    color: #6c757d !important;
}

/* 买入按钮 - 缩小尺寸 */
.buy-btn {
    background: linear-gradient(135deg, #28a745, #20c997);
    color: white;
    border: none;
    border-radius: 4px;
    padding: 4px 8px;
    font-size: 11px;
    font-weight: bold;
    transition: all 0.2s ease;
}

.buy-btn:hover {
    background: linear-gradient(135deg, #218838, #1e7e34);
    transform: scale(1.05);
}

.buy-btn:active {
    transform: scale(0.95);
}

/* 持有期货的买入按钮 - 紫色样式 */
.buy-btn.held {
    background: linear-gradient(135deg, #8e44ad, #9b59b6) !important;
    color: white;
    border: none;
    border-radius: 4px;
    padding: 4px 8px;
    font-size: 11px;
    font-weight: bold;
    transition: all 0.2s ease;
}

.buy-btn.held:hover {
    background: linear-gradient(135deg, #7d3c98, #8e44ad) !important;
    transform: scale(1.05);
}

.buy-btn.held:active {
    transform: scale(0.95);
}

/* 加仓按钮 */
.buy-more-btn {
    background: linear-gradient(135deg, #28a745, #20c997);
    color: white;
    border: none;
    border-radius: 6px;
    padding: 6px 12px;
    font-size: 12px;
    font-weight: bold;
    transition: all 0.2s ease;
}

.buy-more-btn:hover {
    background: linear-gradient(135deg, #218838, #1e7e34);
    transform: scale(1.05);
}

.buy-more-btn:active {
    transform: scale(0.95);
}

/* 卖出按钮 */
.sell-btn {
    background: linear-gradient(135deg, #dc3545, #c82333);
    color: white;
    border: none;
    border-radius: 6px;
    padding: 6px 12px;
    font-size: 12px;
    font-weight: bold;
    transition: all 0.2s ease;
}

.sell-btn:hover {
    background: linear-gradient(135deg, #c82333, #bd2130);
    transform: scale(1.05);
}

.sell-btn:active {
    transform: scale(0.95);
}

/* 清仓补偿样式 */
.compensation-item {
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 8px;
    background: #ffffff;
    transition: all 0.2s ease;
    border-left: 4px solid #28a745;
}

.compensation-item:hover {
    border-color: #28a745;
    box-shadow: 0 2px 8px rgba(40,167,69,0.15);
}

.compensation-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.compensation-amount {
    color: #28a745;
    font-weight: bold;
    font-size: 14px;
    margin-bottom: 8px;
}

.claim-btn {
    background: #28a745;
    color: white;
    border: none;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.claim-btn:hover {
    background: #218838;
    transform: translateY(-1px);
}

.future-details {
    font-size: 11px;
    color: #6c757d;
    margin-top: 2px;
}

/* 持仓项目样式 - 改为白色背景，优化间距 */
.holding-item {
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    padding: 8px 10px;
    margin-bottom: 4px;
    background: #ffffff;
    transition: all 0.2s ease;
}

.holding-item:hover {
    border-color: #007bff;
    box-shadow: 0 2px 8px rgba(0,123,255,0.15);
}

.holding-info {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 8px;
}

.holding-details {
    font-size: 11px;
    color: #666;
    display: flex;
    justify-content: space-between;
}

/* 盈亏颜色样式 */
.profit {
    color: #dc3545 !important;
}

.loss {
    color: #28a745 !important;
}

.neutral {
    color: #333 !important;
}

/* 倒计时显示 */
.countdown {
    font-size: 18px;  /* 从14px增加到18px，更醒目 */
    font-weight: normal; /* 改回normal，不加粗 */
    color: #333;      /* 改回黑色，不刺眼 */
    text-align: left;
    margin-bottom: 10px;
    padding: 8px 12px;
    background: rgba(0, 123, 255, 0.1);  /* 保留淡蓝色背景 */
    border-radius: 8px;                  /* 保留圆角 */
    border-left: 4px solid #007bff;      /* 保留左边框强调 */
}

/* 加载状态 */
.loading {
    text-align: center;
    padding: 20px;
    color: #666;
}

.loading .spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #007bff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 10px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 模态框样式调整 */
.modal-content {
    border-radius: 12px;
    border: none;
}

.modal-header {
    border-bottom: 1px solid #e9ecef;
    border-radius: 12px 12px 0 0;
}

.modal-footer {
    border-top: 1px solid #e9ecef;
    border-radius: 0 0 12px 12px;
}

/* 表单控件 */
.form-control {
    border-radius: 8px;
    border: 1px solid #dee2e6;
    transition: all 0.2s ease;
}

.form-control:focus {
    border-color: #007bff;
    box-shadow: 0 0 0 0.2rem rgba(0,123,255,0.25);
}

/* 消息提示 */
.alert {
    border-radius: 8px;
    font-size: 14px;
    padding: 8px 12px;
}

/* 历史记录模态框样式 - 酷炫设计 */
.history-modal-dialog {
    /* 默认桌面端样式 */
}

.history-modal {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}

.history-header {
    background: linear-gradient(135deg, rgba(255,255,255,0.2) 0%, rgba(255,255,255,0.1) 100%);
    border: none;
    backdrop-filter: blur(10px);
    padding: 20px;
    border-bottom: 1px solid rgba(255,255,255,0.2);
}

.history-title {
    display: flex;
    align-items: center;
    gap: 15px;
    color: white;
}

.future-icon {
    font-size: 32px;
    background: rgba(255,255,255,0.2);
    border-radius: 12px;
    padding: 8px;
    backdrop-filter: blur(10px);
}

.history-title h6 {
    font-size: 18px;
    font-weight: bold;
    color: white;
}

.history-title small {
    color: rgba(255,255,255,0.8) !important;
}

.history-body {
    background: rgba(255,255,255,0.95);
    backdrop-filter: blur(20px);
    padding: 0;
    max-height: 60vh;
    overflow-y: auto;
}

.history-loading {
    text-align: center;
    padding: 40px 20px;
    color: #666;
}

.loading-animation {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-bottom: 20px;
}

.loading-dot {
    width: 12px;
    height: 12px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    border-radius: 50%;
    animation: loading-bounce 1.4s ease-in-out infinite both;
}

.loading-dot:nth-child(1) { animation-delay: -0.32s; }
.loading-dot:nth-child(2) { animation-delay: -0.16s; }

@keyframes loading-bounce {
    0%, 80%, 100% { 
        transform: scale(0);
    } 40% { 
        transform: scale(1);
    }
}

.history-list {
    padding: 0;
}

.history-item {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    border-bottom: 1px solid rgba(0,0,0,0.08);
    transition: all 0.3s ease;
    animation: slideInFromRight 0.5s ease forwards;
    opacity: 0;
    transform: translateX(30px);
}

@keyframes slideInFromRight {
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.history-item:hover {
    background: rgba(102, 126, 234, 0.05);
    transform: translateX(5px);
}

.history-item.trend-up {
    border-left: 4px solid #dc3545;
}

.history-item.trend-down {
    border-left: 4px solid #28a745;
}

.history-item.trend-neutral {
    border-left: 4px solid #6c757d;
}

.history-time {
    flex: 1;
    min-width: 60px;
}

.history-time .time {
    font-size: 13px;
    color: #666;
    font-weight: 500;
}

.history-price {
    flex: 2;
    text-align: center;
}

.history-price .new-price {
    font-size: 14px;
    font-weight: bold;
    color: #333;
}

.history-change {
    flex: 1.5;
    text-align: center;
}

.history-change .change-percent {
    font-size: 13px;
    font-weight: bold;
    padding: 4px 8px;
    border-radius: 6px;
}

.trend-up .change-percent {
    color: #dc3545;
    background: rgba(220, 53, 69, 0.1);
}

.trend-down .change-percent {
    color: #28a745;
    background: rgba(40, 167, 69, 0.1);
}

.trend-neutral .change-percent {
    color: #6c757d;
    background: rgba(108, 117, 125, 0.1);
}

.history-trend {
    flex: 0.8;
    text-align: center;
}

.history-trend .trend-icon {
    font-size: 18px;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.1));
}

.history-error {
    text-align: center;
    padding: 40px 20px;
    color: #666;
}

.error-icon {
    font-size: 32px;
    margin-bottom: 15px;
    filter: grayscale(100%);
}

/* 响应式调整 - 移动端 */
@media (max-width: 576px) {
    .qh-container {
        padding: 0;
    }
    
    .future-item {
        padding: 6px 8px;
    }
    
    .buy-btn, .buy-more-btn, .sell-btn {
        font-size: 11px;
        padding: 4px 8px;
    }
    
    .future-name {
        font-size: 13px;
    }
    
    .future-price {
        font-size: 12px;
    }
    
    .future-change {
        font-size: 13px;  /* 移动端稍小一些，但仍比原来大 */
        font-weight: 700;
    }
    
    .futures-list {
        margin-bottom: 10px;
    }
    
    /* 移动端倒计时调整 */
    .countdown {
        font-size: 16px;  /* 移动端稍小一些 */
        padding: 6px 10px;
    }
    
    /* 移动端历史记录优化 */
    .history-modal-dialog {
        margin: 60px 10px 40px 10px;  /* 底部边距从10px增加到40px */
        max-width: calc(100% - 20px);
        height: calc(100vh - 100px);   /* 从70px增加到100px，向上缩短 */
    }
    
    .history-modal {
        height: 100%;
        border-radius: 20px;
        margin: 0;
    }
    
    .history-body {
        max-height: calc(100vh - 290px);  /* 为底部按钮留出空间 */
    }
    
    /* 移动端底部可点击关闭区域样式 */
    .history-footer {
        background: linear-gradient(135deg, rgba(255,255,255,0.95) 0%, rgba(255,255,255,0.9) 100%);
        backdrop-filter: blur(20px);
        border: none;
        padding: 20px;
        border-radius: 0 0 20px 20px;
        text-align: center;
        cursor: pointer;
        transition: all 0.3s ease;
        min-height: 60px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .history-footer:hover {
        background: linear-gradient(135deg, rgba(255,255,255,0.98) 0%, rgba(255,255,255,0.95) 100%);
        transform: translateY(-1px);
    }
    
    .history-footer:active {
        transform: translateY(0);
        background: linear-gradient(135deg, rgba(240,240,240,0.95) 0%, rgba(240,240,240,0.9) 100%);
    }
    
    .close-hint {
        color: rgba(102, 126, 234, 0.7);
        transition: all 0.3s ease;
        pointer-events: none;
    }
    
    .close-hint small {
        font-size: 13px;
        font-weight: 500;
        letter-spacing: 0.5px;
    }
    
    .history-footer:hover .close-hint {
        color: rgba(102, 126, 234, 0.9);
        transform: scale(1.05);
    }
    
    .history-header {
        padding: 15px 20px;
    }
    
    .future-icon {
        font-size: 24px;
        padding: 6px;
    }
    
    .history-title h6 {
        font-size: 16px;
    }
    
    .history-item {
        padding: 10px 15px;
    }
    
    .history-time .time {
        font-size: 12px;
    }
    
    .history-price .new-price {
        font-size: 13px;
    }
    
    .history-change .change-percent {
        font-size: 12px;
        padding: 3px 6px;
    }
    
    .history-trend .trend-icon {
        font-size: 16px;
    }
}

/* 平板端样式 */
@media (min-width: 577px) and (max-width: 768px) {
    .history-modal-dialog {
        margin: 40px 20px;
        max-width: calc(100% - 40px);
        height: calc(100vh - 80px);
    }
    
    .history-modal {
        height: 100%;
    }
    
    .history-body {
        max-height: calc(100vh - 180px);
    }
}

/* 桌面端样式 */
@media (min-width: 769px) {
    .history-modal-dialog {
        /* 使用默认的Bootstrap modal样式 */
    }
    
    .history-modal {
        height: auto;
    }
    
    .history-body {
        max-height: 75vh;  /* 从60vh增加到75vh，向下延长 */
        min-height: 500px; /* 确保最小高度 */
    }
}

/* ================= 模态框优化样式 ================= */

/* 买入模态框样式 */
.buy-modal-content {
    border-radius: 20px;
    border: none;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
}

.buy-modal-header {
    background: linear-gradient(135deg, rgba(255,255,255,0.2) 0%, rgba(255,255,255,0.1) 100%);
    border: none;
    backdrop-filter: blur(10px);
    padding: 25px;
    border-bottom: 1px solid rgba(255,255,255,0.2);
}

.buy-modal-title {
    display: flex;
    align-items: center;
    gap: 15px;
    color: white;
}

.buy-icon {
    font-size: 32px;
    background: rgba(255,255,255,0.2);
    border-radius: 12px;
    padding: 8px;
    backdrop-filter: blur(10px);
}

.buy-modal-title h5 {
    font-size: 24px;
    font-weight: bold;
    color: white;
}

.buy-modal-title small {
    color: rgba(255,255,255,0.8) !important;
}

.buy-modal-body {
    background: rgba(255,255,255,0.95);
    backdrop-filter: blur(20px);
    padding: 30px;
}

.buy-future-info {
    background: rgba(0,123,255,0.1);
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 25px;
    text-align: center;
}

.buy-future-name {
    color: #007bff;
    font-size: 28px;
    font-weight: bold;
    margin-bottom: 15px;
}

.buy-price-info {
    font-size: 18px;
}

.buy-price-label {
    color: #666;
    margin-right: 10px;
}

.buy-current-price {
    color: #007bff;
    font-weight: bold;
    font-size: 22px;
}

.buy-input-section {
    margin-bottom: 25px;
}

.buy-label {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    margin-bottom: 10px;
    display: block;
}

.buy-input {
    font-size: 18px;
    padding: 15px;
    border-radius: 12px;
    border: 2px solid #e9ecef;
    transition: all 0.3s ease;
}

.buy-input:focus {
    border-color: #007bff;
    box-shadow: 0 0 0 0.2rem rgba(0,123,255,0.25);
}

.buy-cost-section {
    background: rgba(40,167,69,0.1);
    border-radius: 15px;
    padding: 20px;
    text-align: center;
}

.cost-label {
    font-size: 18px;
    color: #666;
    margin-right: 15px;
}

.total-cost {
    font-size: 24px;
    font-weight: bold;
    color: #333;
}

.buy-modal-footer {
    background: rgba(255,255,255,0.95);
    border: none;
    padding: 20px 30px;
    display: flex;
    gap: 15px;
    justify-content: center;
}

.btn-cancel {
    padding: 12px 30px;
    font-size: 16px;
    border-radius: 10px;
    font-weight: 600;
}

.btn-buy {
    background: linear-gradient(135deg, #28a745, #20c997);
    color: white;
    border: none;
    padding: 12px 30px;
    font-size: 16px;
    border-radius: 10px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-buy:hover {
    background: linear-gradient(135deg, #218838, #1e7e34);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(40,167,69,0.3);
}

/* 卖出模态框样式 */
.sell-modal-content {
    border-radius: 20px;
    border: none;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
}

.sell-modal-header {
    background: linear-gradient(135deg, rgba(255,255,255,0.2) 0%, rgba(255,255,255,0.1) 100%);
    border: none;
    backdrop-filter: blur(10px);
    padding: 25px;
    border-bottom: 1px solid rgba(255,255,255,0.2);
}

.sell-modal-title {
    display: flex;
    align-items: center;
    gap: 15px;
    color: white;
}

.sell-icon {
    font-size: 32px;
    background: rgba(255,255,255,0.2);
    border-radius: 12px;
    padding: 8px;
    backdrop-filter: blur(10px);
}

.sell-modal-title h5 {
    font-size: 24px;
    font-weight: bold;
    color: white;
}

.sell-modal-title small {
    color: rgba(255,255,255,0.8) !important;
}

.sell-modal-body {
    background: rgba(255,255,255,0.95);
    backdrop-filter: blur(20px);
    padding: 30px;
}

.sell-future-info {
    background: rgba(220,53,69,0.1);
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 25px;
}

.sell-future-name {
    color: #dc3545;
    font-size: 28px;
    font-weight: bold;
    margin-bottom: 15px;
    text-align: center;
}

.sell-price-info {
    display: flex;
    justify-content: space-between;
    gap: 20px;
}

.price-item {
    flex: 1;
    text-align: center;
}

.price-label {
    color: #666;
    font-size: 16px;
    display: block;
    margin-bottom: 8px;
}

.current-price, .max-shares {
    color: #dc3545;
    font-weight: bold;
    font-size: 20px;
}

.sell-input-section {
    margin-bottom: 25px;
}

.sell-label {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    margin-bottom: 10px;
    display: block;
}

.sell-input {
    font-size: 18px;
    padding: 15px;
    border-radius: 12px;
    border: 2px solid #e9ecef;
    transition: all 0.3s ease;
}

.sell-input:focus {
    border-color: #dc3545;
    box-shadow: 0 0 0 0.2rem rgba(220,53,69,0.25);
}

.sell-result-section {
    background: rgba(0,123,255,0.1);
    border-radius: 15px;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    gap: 20px;
}

.result-item {
    flex: 1;
    text-align: center;
}

.result-label {
    color: #666;
    font-size: 16px;
    display: block;
    margin-bottom: 8px;
}

.sell-value {
    color: #007bff;
    font-weight: bold;
    font-size: 20px;
}

.profit-loss-value {
    font-weight: bold;
    font-size: 20px;
}

.sell-modal-footer {
    background: rgba(255,255,255,0.95);
    border: none;
    padding: 20px 30px;
    display: flex;
    gap: 15px;
    justify-content: center;
}

.btn-sell {
    background: linear-gradient(135deg, #dc3545, #c82333);
    color: white;
    border: none;
    padding: 12px 30px;
    font-size: 16px;
    border-radius: 10px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-sell:hover {
    background: linear-gradient(135deg, #c82333, #bd2130);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(220,53,69,0.3);
}

/* 新的持仓汇总样式 - 黑白简约风 */
.holdings-summary-new {
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    color: white;
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

.summary-item {
    text-align: center;
    padding: 10px;
}

.summary-item .value {
    font-size: 20px;
    font-weight: bold;
    margin-bottom: 8px;
    color: white;
}

.summary-item .label {
    font-size: 14px;
    color: rgba(255,255,255,0.8);
    font-weight: 500;
}

/* 盈亏比例特殊样式 - 大字号 */
.profit-percent {
    font-size: 28px !important;
    font-weight: 900 !important;
}

/* 今日成绩特殊样式 - 醒目显示 */
.today-result {
    font-size: 18px !important;
    font-weight: bold !important;
    text-shadow: 0 1px 2px rgba(0,0,0,0.3);
    letter-spacing: -0.5px;
}

/* 今日成绩盈利状态 - 红色加粗 */
.today-result.profit {
    color: #dc3545 !important;
    font-weight: 900 !important;
    animation: profit-pulse 2s ease-in-out infinite;
}

/* 今日成绩亏损状态 - 绿色加粗 */
.today-result.loss {
    color: #28a745 !important;
    font-weight: 900 !important;
}

/* 盈利脉动效果 */
@keyframes profit-pulse {
    0% { opacity: 1; }
    50% { opacity: 0.8; }
    100% { opacity: 1; }
}

/* 移动端盈亏比例调整 */
@media (max-width: 576px) {
    .profit-percent {
        font-size: 18px !important;
        font-weight: 700 !important;
    }
    
    .summary-item .value {
        font-size: 12px !important;
        margin-bottom: 3px;
        word-break: keep-all !important;
        white-space: nowrap !important;
        font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif !important;
        letter-spacing: -0.4px !important;
        line-height: 1.1 !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
    }
    
    .summary-item .label {
        font-size: 10px !important;
        margin-bottom: 2px;
        line-height: 1.1 !important;
    }
    
    .holdings-summary-new {
        padding: 12px 6px !important;
    }
    
    .summary-item {
        padding: 6px 3px !important;
    }
}

/* 超小屏幕适配（iPhone SE等） */
@media (max-width: 375px) {
    .summary-item .value {
        font-size: 11px !important;
        letter-spacing: -0.5px !important;
    }
    
    .summary-item .label {
        font-size: 9px !important;
    }
    
    .holdings-summary-new {
        padding: 10px 4px !important;
    }
    
    .summary-item {
        padding: 5px 2px !important;
    }
}

/* 电脑版布局优化 */
@media (min-width: 768px) {
    .qh-container {
        padding: 0;
    }
    
    .futures-list {
        padding: 15px;
    }
    
    .future-item {
        padding: 10px 12px;
        margin-bottom: 6px;
    }
    
    .buy-btn, .buy-more-btn, .sell-btn {
        font-size: 13px;
        padding: 8px 16px;
    }
    
    /* 确保持有状态的紫色按钮在电脑版也有相同大小 */
    .buy-btn.held {
        font-size: 13px !important;
        padding: 8px 16px !important;
    }
    
    /* 电脑版持仓汇总区域字体统一 */
    .holdings-summary-new .summary-item .value {
        font-size: 16px !important;
        font-weight: bold !important;
        line-height: 1.2 !important;
    }
    
    .holdings-summary-new .summary-item .label {
        font-size: 12px !important;
        font-weight: 500 !important;
        line-height: 1.2 !important;
    }
    
    /* 电脑版盈亏比例稍大一些 */
    .holdings-summary-new .profit-percent {
        font-size: 20px !important;
        font-weight: 900 !important;
    }
    
    /* 电脑版今日成绩特殊样式 */
    .holdings-summary-new .today-result {
        font-size: 16px !important;
        font-weight: bold !important;
    }
    
    .future-name {
        font-size: 15px;
    }
    
    .future-price {
        font-size: 14px;
    }
    
    .holdings-summary {
        padding: 20px;
    }
    
    /* 电脑版期货列表网格布局 */
    .futures-grid {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
        gap: 15px;
    }
    
    .future-info {
        margin-bottom: 10px;
    }
}

/* ================= 交易记录模态框样式 ================= */

/* 记录按钮样式 */
.record-btn {
    background: linear-gradient(135deg, #6c757d, #5a6268);
    color: white;
    border: none;
    padding: 6px 12px;
    font-size: 12px;
    border-radius: 6px;
    font-weight: 500;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.record-btn:hover {
    background: linear-gradient(135deg, #5a6268, #545b62);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(108,117,125,0.3);
    color: white;
}

/* 交易记录模态框样式 */
.trade-record-dialog {
    max-width: 95%;
    margin: 20px auto;
}

.trade-record-modal {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}

.trade-record-header {
    background: linear-gradient(135deg, rgba(255,255,255,0.2) 0%, rgba(255,255,255,0.1) 100%);
    border: none;
    backdrop-filter: blur(10px);
    padding: 20px;
    border-bottom: 1px solid rgba(255,255,255,0.2);
}

.trade-record-title {
    display: flex;
    align-items: center;
    gap: 15px;
    color: white;
}

.trade-record-title h6 {
    font-size: 18px;
    font-weight: bold;
    color: white;
}

.trade-record-title small {
    color: rgba(255,255,255,0.8) !important;
}

.record-icon {
    font-size: 28px;
    background: rgba(255,255,255,0.2);
    border-radius: 12px;
    padding: 8px;
    backdrop-filter: blur(10px);
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

.trade-record-body {
    background: rgba(255,255,255,0.95);
    backdrop-filter: blur(20px);
    padding: 0;
    max-height: 60vh;
    overflow-y: auto;
}

/* 交易记录加载状态 */
.trade-record-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    text-align: center;
}

.trade-record-error {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    text-align: center;
    color: #666;
}

.trade-record-error .error-icon {
    font-size: 48px;
    margin-bottom: 15px;
}

/* 交易记录列表 */
.trade-record-list {
    padding: 20px 15px;
}

.trade-record-item {
    background: rgba(255,255,255,0.9);
    border-radius: 12px;
    padding: 15px 20px;
    margin: 8px 8px;
    border: 1px solid rgba(0,0,0,0.08);
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.trade-record-item:hover {
    background: rgba(255,255,255,0.95);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.trade-record-item.trade-buy {
    border-left: 4px solid #28a745;
}

.trade-record-item.trade-sell {
    border-left: 4px solid #dc3545;
}

.trade-record-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.trade-type {
    display: flex;
    align-items: center;
    gap: 8px;
}

.trade-icon {
    font-size: 16px;
}

.trade-text {
    font-weight: 600;
    font-size: 14px;
}

.trade-buy .trade-text {
    color: #28a745;
    font-weight: 600;
}

.trade-sell .trade-text {
    color: #dc3545;
    font-weight: 600;
}

.trade-time {
    font-size: 12px;
    color: #666;
    font-weight: 500;
}

.trade-record-details {
    display: flex;
    justify-content: space-between;
    gap: 20px;
}

.trade-price, .trade-total {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.price-label, .total-label {
    font-size: 11px;
    color: #999;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.price-value, .total-value {
    font-size: 14px;
    font-weight: 600;
    color: #333;
}

/* 交易记录底部 */
.trade-record-footer {
    background: rgba(248,251,255,0.95);
    border: none;
    padding: 15px;
    text-align: center;
}

.close-hint {
    color: #757575;
    cursor: pointer;
}

/* 响应式设计优化 */
@media (min-width: 1200px) {
    .trade-record-dialog {
        max-width: 800px;
    }
    
    .trade-record-list {
        padding: 20px 20px;
    }
    
    .trade-record-item {
        margin: 8px 12px;
    }
}

@media (min-width: 992px) and (max-width: 1199px) {
    .trade-record-dialog {
        max-width: 750px;
    }
    
    .trade-record-list {
        padding: 20px 18px;
    }
    
    .trade-record-item {
        margin: 8px 10px;
    }
}

@media (min-width: 768px) and (max-width: 991px) {
    .trade-record-dialog {
        max-width: 700px;
    }
}

@media (min-width: 577px) and (max-width: 767px) {
    .trade-record-dialog {
        max-width: 96%;
        margin: 15px auto;
    }
}

/* 移动端优化 */
@media (max-width: 576px) {
    .trade-record-dialog {
        max-width: 98%;
        margin: 10px auto;
    }
    
    .trade-record-modal {
        border-radius: 15px;
    }
    
    .trade-record-header {
        padding: 15px 20px;
    }
    
    .record-icon {
        font-size: 24px;
    }
    
    .trade-record-list {
        padding: 15px 5px;
    }
    
    .trade-record-item {
        padding: 12px 15px;
        margin: 6px 2px;
    }
    
    .trade-record-details {
        gap: 15px;
    }
    
    .price-value, .total-value {
        font-size: 13px;
    }
    
    .trade-text {
        font-size: 13px;
    }
    
    .trade-time {
        font-size: 11px;
    }

/* 交易动态样式 */
.trade-dynamics-list {
    max-height: 200px;
    overflow-y: auto;
    font-size: 14px;  /* 从12px增大到14px，与其他页面保持一致 */
}

.dynamic-item {
    padding: 6px 10px;
    margin: 2px 0;
    background: transparent;  /* 移除背景色 */
    border-radius: 4px;
    border-left: none;  /* 移除左侧彩色边框 */
    display: flex;
    align-items: center;
    gap: 4px;
    animation: dynamicFadeIn 0.3s ease-in;
    line-height: 1.2;
    white-space: nowrap;
}

.dynamic-item.buy-action {
    /* 移除背景和边框，纯文字形式 */
}

.dynamic-item.sell-action {
    /* 移除背景和边框，纯文字形式 */
}

.dynamic-content {
    flex: 1;
    color: #e9ecef;
    display: flex;
    align-items: center;
    gap: 4px;
    flex-wrap: nowrap;
}

.dynamic-time {
    color: #6c757d;
    font-size: 10px;
    white-space: nowrap;
    min-width: 35px;
}

.dynamic-username {
    color: #ff4757 !important;
    font-weight: 800 !important;
    white-space: nowrap;
}

.dynamic-future {
    color: #ff4757 !important;
    font-weight: 800 !important;
    white-space: nowrap;
}

.dynamic-action {
    margin: 0 3px;
}

@keyframes dynamicFadeIn {
    from {
        opacity: 0;
        transform: translateX(-10px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* 移动端优化 */
@media (max-width: 576px) {
    .trade-dynamics-list {
        max-height: 150px;
        font-size: 13px;  /* 从11px增大到13px，移动端也要适当增大 */
    }
    
    .dynamic-item {
        padding: 4px 8px;
        gap: 6px;
    }
    
    .dynamic-content {
        gap: 3px;
    }
    
    .dynamic-time {
        min-width: 30px;
        font-size: 9px;
    }
}
}