/* 贵金属行情系统样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Microsoft YaHei', 'PingFang SC', 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
    /* 黑色渐变背景 */
    min-height: 100vh;
    color: #333;
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.header {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    min-height: 80px;
    position: relative;
    z-index: 100;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
    width: 100%;
}

.logo-section {
    flex: 1;
    display: flex;
    align-items: center;
}

.logo-placeholder {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 5px;
}

.logo-image {
    max-height: 60px;
    max-width: 200px;
    object-fit: contain;
}

.logo-text {
    font-size: 2.5em;
    font-weight: 700;
    color: #2c3e50;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    background: linear-gradient(135deg, #d4af37 0%, #ffd700 50%, #b8860b 100%);
    /* 金色渐变 */
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.logo-subtitle {
    font-size: 0.9em;
    color: #6c757d;
    font-weight: 400;
}

.status-section {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
    justify-content: center;
    flex-shrink: 0;
}

.status-row {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1em;
    white-space: nowrap;
}

.status-label {
    color: #6c757d;
    font-weight: 500;
}

.status-success {
    color: #28a745;
    font-weight: 600;
}

.status-error {
    color: #dc3545;
    font-weight: 600;
}

.status-closed {
    color: #28a745;
    font-weight: 600;
}

.status-open {
    color: #dc3545;
    font-weight: 600;
}

.main-content {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    margin-bottom: 15px;
}

/* 视图切换器样式 (下拉菜单) */
.view-switcher-container {
    position: relative;
    margin: 0 20px;
}

.view-menu-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(212, 175, 55, 0.3);
    border-radius: 8px;
    color: #ffd700;
    cursor: pointer;
    font-size: 0.95em;
    transition: all 0.3s ease;
}

.view-menu-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

.view-menu {
    position: absolute;
    top: 100%;
    right: 0;
    /* 默认右对齐，防止超出屏幕 */
    margin-top: 8px;
    background: rgba(30, 30, 30, 0.95);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(212, 175, 55, 0.3);
    border-radius: 8px;
    padding: 5px;
    min-width: 180px;
    display: none;
    z-index: 1000;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.view-menu.show {
    display: block;
    animation: fadeIn 0.2s ease;
}

.view-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 15px;
    color: #ccc;
    text-decoration: none;
    border-radius: 6px;
    transition: all 0.2s;
}

.view-link:hover {
    background: rgba(212, 175, 55, 0.1);
    color: #ffd700;
}

.view-link.active {
    background: rgba(212, 175, 55, 0.2);
    color: #ffd700;
    font-weight: 600;
}

.view-icon {
    font-size: 1.1em;
}

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

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

@media (max-width: 768px) {
    .view-switcher-container {
        margin: 0;
        /* 移动端去掉边距 */
    }

    .view-menu-btn {
        padding: 6px 12px;
        font-size: 0.9em;
    }

    .current-view {
        display: none;
        /* 移动端隐藏文字，只显示图标，或者显示简短文字 */
    }

    .view-menu-btn::after {
        content: "视图";
        display: block;
    }

    .arrow-icon {
        display: none;
    }
}

/* 表格标题区域 - 贵金属风格背景 */

/* 表格标题区域 - 贵金属风格背景 */
.table-header {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 15px;
    padding: 15px 20px;
    background: linear-gradient(135deg, #2c2c2c 0%, #1a1a1a 50%, #0d0d0d 100%);
    /* 深色金属渐变 */
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(212, 175, 55, 0.3), inset 0 1px 0 rgba(255, 215, 0, 0.2);
    /* 金色光晕效果 */
    border: 1px solid rgba(212, 175, 55, 0.3);
    /* 金色边框 */
    position: relative;
    overflow: hidden;
}

/* 添加金属质感效果 */
.table-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 215, 0, 0.1), transparent);
    animation: shimmer 3s infinite;
}

@keyframes shimmer {
    0% {
        left: -100%;
    }

    100% {
        left: 100%;
    }
}

.table-title {
    font-size: 1.8em;
    font-weight: 600;
    color: #ffd700;
    /* 金色文字 */
    margin: 0;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8), 0 0 10px rgba(255, 215, 0, 0.5);
    /* 金色发光效果 */
    position: relative;
    z-index: 1;
}

/* 滚动文字容器 - 与标题风格一致 */
.scrolling-text-container {
    margin-bottom: 15px;
    overflow: hidden;
    background: linear-gradient(135deg, #2c2c2c 0%, #1a1a1a 100%);
    /* 深色背景 */
    border-radius: 8px;
    padding: 8px 0;
    box-shadow: 0 2px 8px rgba(212, 175, 55, 0.2);
    border: 1px solid rgba(212, 175, 55, 0.2);
}

.scrolling-text {
    display: flex;
    animation: scroll-left 30s linear infinite;
    white-space: nowrap;
}

.scrolling-text span {
    margin-right: 50px;
    color: #d4af37;
    /* 金色文字 */
    font-size: 0.9em;
    font-weight: 500;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

@keyframes scroll-left {
    0% {
        transform: translateX(100%);
    }

    100% {
        transform: translateX(-100%);
    }
}

/* 固定的表头行 - 贵金属风格 */
.table-header-row {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr 1fr 1fr;
    gap: 0;
    background: linear-gradient(135deg, #2c2c2c 0%, #1a1a1a 50%, #0d0d0d 100%);
    /* 深色金属渐变 */
    border-radius: 10px 10px 0 0;
    box-shadow: 0 4px 15px rgba(212, 175, 55, 0.3), inset 0 1px 0 rgba(255, 215, 0, 0.2);
    border: 1px solid rgba(212, 175, 55, 0.3);
    margin-bottom: 0;
    min-width: 0;
    position: relative;
    overflow: hidden;
}

/* 表头金属质感效果 */
.table-header-row::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 215, 0, 0.1), transparent);
    animation: shimmer 4s infinite;
}

.header-cell {
    padding: 15px 12px;
    text-align: center;
    color: #ffd700;
    /* 金色文字 */
    font-weight: 600;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8), 0 0 8px rgba(255, 215, 0, 0.3);
    border-right: 1px solid rgba(212, 175, 55, 0.3);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    position: relative;
    z-index: 1;
}

.header-cell:last-child {
    border-right: none;
}

/* 可滚动的数据容器 */
.table-data-container {
    max-height: 750px;
    overflow-y: auto;
    overflow-x: hidden;
    border: 1px solid #e9ecef;
    border-top: none;
    border-radius: 0 0 10px 10px;
    background: white;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.table-data-container::-webkit-scrollbar {
    display: none;
}

.table-data-content {
    display: flex;
    flex-direction: column;
}

/* 数据行 - 增强背景色对比度 */
.data-row {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr 1fr 1fr;
    gap: 0;
    border-bottom: 1px solid #e9ecef;
    transition: all 0.3s ease;
    min-width: 0;
    min-height: 60px;
}

/* 奇数行 - 纯白色背景 */
.data-row:nth-child(odd) {
    background: #ffffff;
}

/* 偶数行 - 更明显的浅灰色背景 */
.data-row:nth-child(even) {
    background: #f1f3f4;
    /* 更明显的浅灰色 */
}

/* 悬停效果 */
.data-row:hover {
    background: #e3f2fd !important;
    /* 悬停时使用浅蓝色背景 */
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    border-left: 3px solid #2196f3;
    /* 左侧蓝色边框 */
}

/* 偶数行悬停效果 */
.data-row:nth-child(even):hover {
    background: #e3f2fd !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    border-left: 3px solid #2196f3;
}

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

/* 数据单元格 */
.data-cell {
    padding: 15px 12px;
    text-align: center;
    border-right: 1px solid #e9ecef;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.data-cell:last-child {
    border-right: none;
}

/* 价格变化颜色 */
.price-up {
    color: #dc3545 !important;
    font-weight: 600;
}

.price-down {
    color: #28a745 !important;
    font-weight: 600;
}

/* 高/低列样式 */
.high-low-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    width: 100%;
}

.high-price {
    font-weight: 600;
    color: #dc3545;
    font-size: 0.9em;
    line-height: 1.2;
}

.separator {
    color: #6c757d;
    font-size: 0.8em;
    line-height: 1;
}

.low-price {
    font-weight: 600;
    color: #28a745;
    font-size: 0.9em;
    line-height: 1.2;
}

.text-center {
    text-align: center;
}

.text-muted {
    color: #6c757d;
    font-style: italic;
}

/* 行更新动画 */
.price-update-up {
    animation: rowUpdateUp 1s ease-in-out;
}

.price-update-down {
    animation: rowUpdateDown 1s ease-in-out;
}

@keyframes rowUpdateUp {
    0% {
        background-color: #f8d7da;
        transform: scale(1);
    }

    50% {
        background-color: #f5c6cb;
        transform: scale(1.02);
    }

    100% {
        background-color: transparent;
        transform: scale(1);
    }
}

@keyframes rowUpdateDown {
    0% {
        background-color: #d4edda;
        transform: scale(1);
    }

    50% {
        background-color: #c3e6cb;
        transform: scale(1.02);
    }

    100% {
        background-color: transparent;
        transform: scale(1);
    }
}

/* 商家信息区域 */
.merchant-info {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    padding: 15px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    margin-top: 10px;
}

/* 商家信息标题 - 贵金属风格 */
.merchant-header {
    text-align: center;
    margin-bottom: 15px;
    padding: 12px 20px;
    background: linear-gradient(135deg, #2c2c2c 0%, #1a1a1a 50%, #0d0d0d 100%);
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(212, 175, 55, 0.3), inset 0 1px 0 rgba(255, 215, 0, 0.2);
    border: 1px solid rgba(212, 175, 55, 0.3);
    position: relative;
    overflow: hidden;
}

.merchant-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 215, 0, 0.1), transparent);
    animation: shimmer 3s infinite;
}

.merchant-title {
    font-size: 1.3em;
    font-weight: 600;
    color: #ffd700;
    margin: 0;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8), 0 0 10px rgba(255, 215, 0, 0.5);
    position: relative;
    z-index: 1;
}

.merchant-content {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.merchant-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 6px 0;
    font-size: 0.9em;
}

.merchant-label {
    font-weight: 700;
    color: #2c3e50;
    min-width: 120px;
    flex-shrink: 0;
    font-size: 0.9em;
}

.merchant-text {
    color: #6c757d;
    flex: 1;
    font-size: 0.9em;
    font-weight: 400;
    line-height: 1.4;
}

/* 二维码区域 */
.qr-section {
    justify-content: center;
    margin-top: 15px;
    padding-top: 20px;
    border-top: 1px solid #e9ecef;
}

.qr-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    width: 100%;
    flex-direction: row !important;
}

.qr-left,
.qr-right {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    flex: 1;
    min-width: 0;
}

.qr-divider {
    width: 1px;
    height: 120px;
    background: #e9ecef;
    flex-shrink: 0;
}

.qr-image {
    width: 120px;
    height: 120px;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.qr-text {
    font-size: 0.9em;
    color: #6c757d;
    font-weight: 500;
    text-align: center;
}

/* 版权信息样式 */
.copyright-section {
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid #e9ecef;
    text-align: center;
}

.copyright-text {
    font-size: 0.8em;
    color: #6c757d;
    font-weight: 400;
    letter-spacing: 0.5px;
}

/* 响应式设计 */
@media (max-width: 1024px) {
    .container {
        padding: 15px;
    }

    .table-title {
        font-size: 1.6em;
    }

    .table-data-container {
        max-height: 650px;
    }

    .merchant-label {
        min-width: 100px;
    }

    .qr-image {
        width: 100px;
        height: 100px;
    }

    .qr-divider {
        height: 100px;
    }

    .scrolling-text span {
        font-size: 0.85em;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 10px;
    }

    .header {
        padding: 15px;
    }

    .header-content {
        flex-direction: row;
        align-items: center;
        gap: 15px;
    }

    .logo-section {
        flex: 1;
        min-width: 0;
    }

    .logo-text {
        font-size: 1.8em;
    }

    .status-section {
        align-items: flex-end;
        flex-shrink: 0;
    }

    .status-row {
        font-size: 0.9em;
    }

    .main-content {
        padding: 15px;
    }

    .table-header {
        padding: 12px 15px;
    }

    .table-title {
        font-size: 1.4em;
    }

    .header-cell,
    .data-cell {
        padding: 10px 8px;
        font-size: 0.9em;
    }

    .high-price,
    .low-price {
        font-size: 0.8em;
    }

    .table-data-container {
        max-height: 550px;
    }

    .merchant-info {
        padding: 12px;
    }

    .merchant-title {
        font-size: 1.2em;
    }

    .merchant-item {
        gap: 10px;
        font-size: 0.85em;
    }

    .merchant-label {
        min-width: 90px;
        font-size: 0.85em;
    }

    .merchant-text {
        font-size: 0.85em;
    }

    .qr-container {
        gap: 15px;
    }

    .qr-image {
        width: 90px;
        height: 90px;
    }

    .qr-divider {
        height: 90px;
    }

    .scrolling-text span {
        font-size: 0.8em;
    }

    .copyright-text {
        font-size: 0.75em;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 8px;
    }

    .header {
        padding: 12px;
    }

    .header-content {
        gap: 10px;
    }

    .logo-text {
        font-size: 1.5em;
    }

    .logo-subtitle {
        font-size: 0.8em;
    }

    .status-row {
        font-size: 0.8em;
    }

    .main-content {
        padding: 12px;
    }

    .table-header {
        padding: 10px 12px;
    }

    .table-title {
        font-size: 1.2em;
    }

    .header-cell,
    .data-cell {
        padding: 8px 6px;
        font-size: 0.8em;
    }

    .high-price,
    .low-price {
        font-size: 0.75em;
    }

    .table-data-container {
        max-height: 450px;
    }

    .merchant-info {
        padding: 10px;
    }

    .merchant-title {
        font-size: 1.1em;
    }

    .merchant-item {
        font-size: 0.8em;
    }

    .merchant-label {
        min-width: 80px;
        font-size: 0.8em;
    }

    .merchant-text {
        font-size: 0.8em;
    }

    .qr-container {
        gap: 10px;
        flex-direction: row !important;
    }

    .qr-image {
        width: 80px;
        height: 80px;
    }

    .qr-divider {
        height: 80px;
    }

    .qr-text {
        font-size: 0.8em;
    }

    .scrolling-text span {
        font-size: 0.75em;
    }

    .copyright-text {
        font-size: 0.7em;
    }
}

@media (max-width: 360px) {
    .container {
        padding: 5px;
    }

    .header {
        padding: 10px;
    }

    .header-content {
        gap: 8px;
    }

    .logo-text {
        font-size: 1.3em;
    }

    .logo-subtitle {
        font-size: 0.75em;
    }

    .status-row {
        font-size: 0.75em;
    }

    .main-content {
        padding: 10px;
    }

    .table-header {
        padding: 8px 10px;
    }

    .table-title {
        font-size: 1.1em;
    }

    .header-cell,
    .data-cell {
        padding: 6px 4px;
        font-size: 0.75em;
    }

    .high-price,
    .low-price {
        font-size: 0.7em;
    }

    .table-data-container {
        max-height: 400px;
    }

    .merchant-info {
        padding: 8px;
    }

    .merchant-title {
        font-size: 1em;
    }

    .merchant-item {
        font-size: 0.75em;
    }

    .merchant-label {
        min-width: 70px;
        font-size: 0.75em;
    }

    .merchant-text {
        font-size: 0.75em;
    }

    .qr-container {
        gap: 8px;
        flex-direction: row !important;
    }

    .qr-image {
        width: 70px;
        height: 70px;
    }

    .qr-divider {
        height: 70px;
    }

    .qr-text {
        font-size: 0.75em;
    }

    .scrolling-text span {
        font-size: 0.7em;
    }

    .copyright-text {
        font-size: 0.65em;
    }
}