/**
 * 具象汇率大师 - 前台样式
 * 统一前台展示样式 - 已移除所有白色背景
 */

/* ============================================================
   基础重置
   ============================================================ */
.nextick-dashboard,
.nextick-dashboard * {
    box-sizing: border-box;
}

.nextick-dashboard {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    max-width: 1200px;
    margin: 20px auto;
    padding: 0 15px;
    color: inherit;
    line-height: 1.6;
}

/* ============================================================
   统计卡片网格
   ============================================================ */
.nextick-stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}

.nextick-stat-card {
    background: transparent !important;
    border-radius: 12px;
    padding: 18px 20px;
    border: 1px solid rgba(0,0,0,0.1);
    box-shadow: none;
}

.nextick-stat-card:hover {
    transform: translateY(-2px);
}

.nextick-stat-label {
    font-size: 13px;
    color: #8c8f94;
    font-weight: 500;
    letter-spacing: 0.3px;
    text-transform: uppercase;
}

.nextick-stat-value {
    font-size: 26px;
    font-weight: 700;
    margin-top: 4px;
    color: inherit;
}

.nextick-stat-value .up {
    color: #e74c3c;
}

.nextick-stat-value .down {
    color: #27ae60;
}

/* ============================================================
   主布局
   ============================================================ */
.nextick-dashboard-main {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 20px;
}

.nextick-dashboard-left,
.nextick-dashboard-right {
    background: transparent !important;
    border-radius: 12px;
    border: 1px solid rgba(0,0,0,0.1);
    padding: 20px;
    box-shadow: none;
}

/* ============================================================
   区块标题
   ============================================================ */
.nextick-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 14px;
    flex-wrap: wrap;
    gap: 8px;
}

.nextick-section-header h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: inherit;
}

.nextick-refresh-btn {
    background: rgba(0,0,0,0.05);
    border: none;
    padding: 4px 14px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 12px;
    color: #555;
}

.nextick-refresh-btn:hover {
    background: rgba(0,0,0,0.08);
}

/* ============================================================
   汇率表格
   ============================================================ */
.nextick-rates-container {
    overflow-x: auto;
}

.nextick-rates-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
    min-width: 480px;
    background: transparent !important;
}

.nextick-rates-table thead th {
    background: transparent !important;
    padding: 10px 12px;
    text-align: left;
    border-bottom: 2px solid rgba(0,0,0,0.1);
    font-weight: 600;
    color: #555;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    white-space: nowrap;
}

.nextick-rates-table tbody td {
    padding: 8px 12px;
    border-bottom: 1px solid rgba(0,0,0,0.05);
    white-space: nowrap;
    background: transparent !important;
}

.nextick-rates-table tbody tr:hover td {
    background: rgba(0,0,0,0.02) !important;
}

.nextick-rates-table tbody tr:last-child td {
    border-bottom: none;
}

.nextick-rates-table .nextick-up {
    color: #e74c3c;
    font-weight: 600;
}

.nextick-rates-table .nextick-down {
    color: #27ae60;
    font-weight: 600;
}

.nextick-rates-table .nextick-flat {
    color: #999;
}

/* ============================================================
   AI分析
   ============================================================ */
.nextick-ai-container {
    font-size: 14px;
    background: transparent !important;
}

.nextick-ai-trend,
.nextick-ai-risk,
.nextick-ai-suggestion,
.nextick-ai-key-levels {
    padding: 10px 0;
    border-bottom: 1px solid rgba(0,0,0,0.05);
    background: transparent !important;
}

.nextick-ai-trend:last-child,
.nextick-ai-risk:last-child,
.nextick-ai-suggestion:last-child,
.nextick-ai-key-levels:last-child {
    border-bottom: none;
}

.nextick-ai-label {
    font-weight: 600;
    color: #666;
    display: inline-block;
    min-width: 60px;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.nextick-ai-suggestion p {
    margin: 4px 0 0 0;
    color: inherit;
    font-size: 14px;
    line-height: 1.7;
}

.nextick-ai-key-levels p {
    margin: 4px 0 0 0;
    color: #555;
    font-size: 13px;
}

.nextick-risk-badge {
    display: inline-block;
    padding: 2px 14px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
}

.nextick-risk-高 {
    background: rgba(231, 76, 60, 0.15);
    color: #e74c3c;
}

.nextick-risk-中 {
    background: rgba(243, 156, 18, 0.15);
    color: #f39c12;
}

.nextick-risk-低 {
    background: rgba(39, 174, 96, 0.15);
    color: #27ae60;
}

.nextick-ai-badge {
    background: #4a6cf7;
    color: #fff;
    font-size: 10px;
    padding: 2px 10px;
    border-radius: 12px;
    font-weight: 500;
}

/* ============================================================
   预警
   ============================================================ */
.nextick-alerts-container {
    background: transparent !important;
}

.nextick-alert-count {
    background: #e74c3c;
    color: #fff;
    font-size: 11px;
    padding: 1px 12px;
    border-radius: 20px;
    font-weight: 500;
}

.nextick-alert-item {
    display: flex;
    gap: 10px;
    padding: 7px 0;
    border-bottom: 1px solid rgba(0,0,0,0.05);
    font-size: 13px;
    align-items: center;
    flex-wrap: wrap;
    background: transparent !important;
}

.nextick-alert-item:last-child {
    border-bottom: none;
}

.nextick-alert-pair {
    font-weight: 600;
    color: #2271b1;
    min-width: 60px;
}

.nextick-alert-msg {
    color: inherit;
    flex: 1;
}

.nextick-alert-time {
    color: #999;
    font-size: 11px;
    white-space: nowrap;
}

/* ============================================================
   图表
   ============================================================ */
.nextick-chart-wrapper {
    background: transparent !important;
    border-radius: 8px;
    border: 1px solid rgba(0,0,0,0.1);
    padding: 16px 20px 20px 20px;
    margin: 10px 0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    box-shadow: none;
}

.nextick-chart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    flex-wrap: wrap;
    gap: 8px;
}

.nextick-chart-title {
    display: flex;
    align-items: center;
    gap: 12px;
}

.nextick-chart-pair {
    font-weight: 700;
    font-size: 18px;
    color: inherit;
}

.nextick-chart-period {
    font-size: 13px;
    color: #999;
    background: rgba(0,0,0,0.05);
    padding: 2px 12px;
    border-radius: 12px;
}

.nextick-chart-controls {
    display: flex;
    gap: 4px;
    background: rgba(0,0,0,0.03);
    padding: 3px;
    border-radius: 6px;
}

.nextick-chart-period-btn {
    background: transparent;
    border: none;
    padding: 4px 14px;
    border-radius: 4px;
    font-size: 12px;
    cursor: pointer;
    color: #666;
}

.nextick-chart-period-btn:hover {
    color: #1e1e1e;
}

.nextick-chart-period-btn.active {
    background: rgba(0,0,0,0.05);
    color: #4a6cf7;
    font-weight: 600;
}

.nextick-chart-container {
    position: relative;
    width: 100%;
    background: transparent !important;
}

.nextick-chart-container canvas {
    width: 100% !important;
    height: 100% !important;
}

.nextick-chart-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid rgba(0,0,0,0.05);
    background: transparent !important;
}

.nextick-chart-stat {
    text-align: center;
    background: transparent !important;
}

.nextick-chart-stat-label {
    font-size: 11px;
    color: #999;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: block;
}

.nextick-chart-stat-value {
    font-size: 15px;
    font-weight: 600;
    color: inherit;
    display: block;
    margin-top: 2px;
}

/* ============================================================
   错误
   ============================================================ */
.nextick-error {
    background: rgba(231, 76, 60, 0.1);
    padding: 16px 20px;
    border-radius: 8px;
    color: #c0392b;
    border: 1px solid rgba(231, 76, 60, 0.2);
}

/* ============================================================
   加载状态
   ============================================================ */
.nextick-loading {
    opacity: 0.6;
    pointer-events: none;
    transition: opacity 0.3s;
}

.nextick-loading::after {
    content: '';
    display: inline-block;
    width: 16px;
    height: 16px;
    margin-left: 8px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #4a6cf7;
    border-radius: 50%;
    animation: nextick-spin 0.8s linear infinite;
    vertical-align: middle;
}

@keyframes nextick-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ============================================================
   响应式
   ============================================================ */
@media (max-width: 992px) {
    .nextick-dashboard-main {
        grid-template-columns: 1fr 320px;
    }
}

@media (max-width: 768px) {
    .nextick-stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .nextick-dashboard-main {
        grid-template-columns: 1fr;
    }

    .nextick-dashboard-right {
        order: -1;
    }

    .nextick-stat-value {
        font-size: 22px;
    }

    .nextick-rates-table {
        font-size: 13px;
        min-width: 400px;
    }

    .nextick-rates-table thead th,
    .nextick-rates-table tbody td {
        padding: 6px 10px;
    }

    .nextick-chart-wrapper {
        padding: 12px 14px;
    }

    .nextick-chart-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .nextick-chart-stats {
        grid-template-columns: repeat(2, 1fr);
    }

    .nextick-chart-pair {
        font-size: 16px;
    }
}

@media (max-width: 480px) {
    .nextick-stats-grid {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }

    .nextick-stat-card {
        padding: 14px 16px;
    }

    .nextick-stat-value {
        font-size: 18px;
    }

    .nextick-stat-label {
        font-size: 11px;
    }

    .nextick-dashboard-left,
    .nextick-dashboard-right {
        padding: 14px;
    }

    .nextick-rates-table {
        font-size: 12px;
        min-width: 340px;
    }

    .nextick-rates-table thead th,
    .nextick-rates-table tbody td {
        padding: 5px 8px;
    }

    .nextick-ai-container {
        font-size: 13px;
    }

    .nextick-alert-item {
        font-size: 12px;
    }

    .nextick-chart-wrapper {
        padding: 10px 12px;
    }
}