﻿:root {
    --mmo-blue: #50a0ff;
    --mmo-blue-hover: #7dbbff;
    --mmo-dark-bg: #0b1b34;
    --mmo-panel-bg: #162a4a;
    --mmo-text: #e0e0e0;
    --mmo-border: #243b5e;
    --mmo-up: #4caf50;
    --mmo-down: #ff4d4d;
    --mmo-gold-text: #ffcc00;
}

.hub-wrapper {
    max-width: 1230px;
    margin: 0 auto 10px auto;
    position: relative;
}

/* Main Conversion Bar */
.conversion-bar {
    background-color: var(--mmo-panel-bg);
    border: 1px solid var(--mmo-border);
    border-bottom: 3px solid var(--mmo-blue);
    border-bottom-left-radius: 12px;
    border-bottom-right-radius: 12px;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 1px;
    background-color: var(--mmo-border);
    overflow: visible;
    box-shadow: 0 4px 25px rgba(0,0,0,0.4);
}

.stat-item {
    background-color: var(--mmo-panel-bg);
    padding: 12px 20px;
    display: flex;
    align-items: center;
    gap: 14px;
    position: relative;
    cursor: pointer;
    transition: all 0.2s ease;
    user-select: none;
}

    .stat-item:hover {
        background-color: rgba(80, 160, 255, 0.05);
    }

    .stat-item.active {
        background-color: rgba(80, 160, 255, 0.15);
    }

.stat-icon {
    color: var(--mmo-blue);
    width: 24px;
    height: 24px;
}

.stat-content {
    display: flex;
    flex-direction: column;
}

.stat-label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #8faed9;
}

.stat-value {
    font-size: 14px;
    font-weight: 600;
    color: #fff;
    white-space: nowrap;
}

/* Dropdown Popups Shared Style */
.mmo-dropdown-popup {
    display: none;
    position: absolute;
    top: 105%;
    background-color: #1a3154;
    border: 1px solid var(--mmo-border);
    border-top: 2px solid var(--mmo-blue);
    border-radius: 0 0 12px 12px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.9);
    z-index: 1000;
    max-height: 80vh;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--mmo-border) transparent;
}

    .mmo-dropdown-popup.show {
        display: block;
        animation: mmoFadeUp 0.2s ease-out forwards;
    }

@keyframes mmoFadeUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(5px);
    }
}

/* Specific Widths and Alignments */
.price-trend-tooltip {
    width: 520px;
    left: 0;
}

.power-tools-menu {
    width: 360px;
    right: 0;
}

/* Popup Headers */
.popup-header {
    border-bottom: 1px solid var(--mmo-border);
    padding: 15px 20px;
    background: rgba(0,0,0,0.2);
    position: sticky;
    top: 0;
    z-index: 10;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-left {
    display: flex;
    flex-direction: column;
}

.header-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    background: rgba(80, 160, 255, 0.1);
    padding: 6px 14px;
    border-radius: 8px;
    border: 1px solid rgba(80, 160, 255, 0.2);
}

.update-timestamp {
    font-size: 12px;
    color: var(--mmo-blue);
    font-weight: bold;
    margin: 0;
}

.refresh-notice {
    font-size: 10px;
    color: #8faed9;
    margin: 2px 0 0 0;
}

.current-rate-label {
    font-size: 9px;
    color: #8faed9;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.current-rate-value {
    font-size: 16px;
    font-weight: 800;
    color: var(--mmo-gold-text);
    display: flex;
    align-items: center;
    gap: 4px;
}

/* Chart Area */
.chart-area {
    padding: 20px 20px 10px 20px;
}

/* Price Stats Section */
.price-summary-stats {
    display: flex;
    gap: 15px;
    padding: 10px 20px;
    border-top: 1px solid rgba(80, 160, 255, 0.1);
    background: rgba(0,0,0,0.1);
}

.summary-pill {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 8px 12px;
    border-radius: 6px;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.05);
}

.pill-label {
    font-size: 10px;
    color: #8faed9;
    text-transform: uppercase;
    margin-bottom: 2px;
}

.pill-value {
    font-size: 13px;
    font-weight: bold;
    color: #fff;
}

    .pill-value.low {
        color: var(--mmo-down);
    }

    .pill-value.high {
        color: var(--mmo-up);
    }

.price-logic-footer {
    padding: 12px 20px;
    border-top: 1px solid var(--mmo-border);
    font-size: 11px;
    color: #8faed9;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    background: rgba(0,0,0,0.1);
}

.footer-node-icon {
    color: var(--mmo-blue);
    fill: var(--mmo-blue);
    width: 8px;
    height: 8px;
}

/* Menu Links & Categories */
.menu-category {
    padding: 10px 15px;
    background-color: #1e3a63;
    color: var(--mmo-blue);
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    border-bottom: 1px solid var(--mmo-border);
    position: sticky;
    top: 0;
    z-index: 9;
}

.menu-link {
    display: block;
    padding: 12px 18px;
    color: var(--mmo-text);
    text-decoration: none;
    font-size: 13px;
    transition: all 0.2s;
    border-bottom: 1px solid rgba(80, 160, 255, 0.05);
}

    .menu-link:hover {
        background-color: #2a4a7a;
        color: white;
        padding-left: 24px;
    }

.menu-link-highlight {
    background-color: rgba(80, 160, 255, 0.1);
    font-weight: bold;
    color: var(--mmo-blue) !important;
}

.sub-desc {
    display: block;
    font-size: 11px;
    color: #8faed9;
    font-weight: normal;
    margin-top: 4px;
}

/* Badges */
.badge {
    font-size: 9px;
    padding: 2px 5px;
    border-radius: 3px;
    margin-left: 5px;
    vertical-align: middle;
    text-transform: uppercase;
    font-weight: 800;
}

.badge-best {
    background-color: #ffcc00;
    color: #000;
}

.dot {
    display: inline-block;
    width: 7px;
    height: 7px;
    background-color: var(--mmo-up);
    border-radius: 50%;
    animation: pulse-dot 1.5s infinite;
    margin-right: 5px;
}

@keyframes pulse-dot {
    0% {
        opacity: 1;
        transform: scale(1);
    }

    50% {
        opacity: 0.4;
        transform: scale(1.2);
    }

    100% {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes text-do {
    0% {
        opacity: 1;
    }

    50% {
        opacity: 0.1;
    }

    100% {
        opacity: 1;
    }
}

/* Mobile Responsive */
@media (max-width: 1024px) {
    /*.conversion-bar {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    }*/

    .conversion-bar {
        overflow-x: auto;
        overflow-y: hidden;
        width: 100%;
        white-space: nowrap;
    }

    .conversion-bar .stat-item {
        float: left;
    }

    .price-trend-tooltip, .power-tools-menu {
        width: 94vw;
        left: 0;
        right: auto;
    }
}

/* --- Live Order Ticker --- */
.order-ticker-container {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--mmo-border);
    border-bottom: none;
    border-radius: 12px 12px 0 0;
    height: 40px;
    overflow: hidden;
    position: relative;
    display: flex;
    align-items: center;
}

.ticker-label {
    background: var(--mmo-blue);
    color: white;
    font-size: 10px;
    font-weight: 900;
    padding: 0 15px;
    height: 100%;
    display: flex;
    align-items: center;
    text-transform: uppercase;
    z-index: 10;
    box-shadow: 5px 0 15px rgba(0,0,0,0.3);
    white-space: nowrap;
    gap: 8px; /* 呼吸灯与文字的间距 */
}

/* --- New Integrated Breathing Light --- */
.live-indicator {
    position: relative;
    width: 8px;
    height: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.live-dot {
    width: 8px;
    height: 8px;
    background-color: #fff; /* 蓝色背景上使用白色点更显眼 */
    border-radius: 50%;
    z-index: 2;
}

.live-pulse {
    position: absolute;
    width: 100%;
    height: 100%;
    background-color: #fff;
    border-radius: 50%;
    animation: live-breathing 2s infinite ease-out;
    opacity: 0.6;
    z-index: 1;
}

@keyframes live-breathing {
    0% {
        transform: scale(1);
        opacity: 0.6;
    }

    100% {
        transform: scale(3);
        opacity: 0;
    }
}

.ticker-wrap {
    width: 100%;
    overflow: hidden;
    white-space: nowrap;
}

.ticker-move {
    display: inline-block;
    white-space: nowrap;
    padding-right: 100%;
    animation: ticker-scroll 120s linear infinite;
}

    .ticker-move:hover {
        animation-play-state: paused;
        cursor: pointer;
    }

@keyframes ticker-scroll {
    0% {
        transform: translate(0);
    }

    100% {
        transform: translate(-50%);
    }
}

.ticker-item {
    display: inline-flex;
    align-items: center;
    padding: 0 30px;
    font-size: 12px;
    color: #8faed9;
}

    .ticker-item b {
        color: #fff;
        margin: 0 4px;
    }

.status-delivered {
    color: var(--mmo-up);
    font-weight: bold;
}

.status-processing {
    color: var(--mmo-gold-text);
    font-weight: bold;
}

.status-cart {
    color: var(--mmo-blue);
    font-weight: bold;
}