/* new/assets/css/style.css */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Arial, sans-serif;
    padding-bottom: 60px;
}

/* 公告栏优化 */
.notice-bar {
    background: #8d8774;
    padding: 10px;
    overflow: hidden;
    position: relative;
}

.notice-content {
    display: inline-block;
    white-space: nowrap;
    animation: marquee 20s linear infinite;
    padding-right: 100%;
}

@keyframes marquee {
    0% {
        transform: translateX(100%);
    }

    100% {
        transform: translateX(-100%);
    }
}

/* 搜索框优化 */
.search-container {
    padding: 15px;
    display: flex;
    gap: 10px;
    position: sticky;
    top: 0;
    background: white;
    z-index: 10;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

/* 弹窗样式 */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
}

.modal-content {
    position: relative;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    padding: 30px;
    border-radius: 8px;
    text-align: center;
    max-width: 400px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.modal-content h3 {
    margin-bottom: 15px;
    color: #333;
}

.modal-content button {
    padding: 10px 25px;
    background: #007bff;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.3s;
}

.modal-content button:hover {
    background: #0056b3;
}

/* 选择框 */
.store-select {
    padding: 8px 32px 8px 12px;
    border: none;
    border-bottom: 1px solid #e0e0e0;
    border-radius: 0;
    font-size: 14px;
    color: #666;
    background-color: transparent;
    font-weight: 800;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    transition: all 0.3s ease;
    position: relative;
    background-image: url("data:image/svg+xml,%3Csvg width='12' height='12' viewBox='0 0 24 24' fill='%23666666' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M7 10l5 5 5-5z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 8px center;
}

.store-select:hover {
    border-bottom-color: #999;
    color: #444;
}

.store-select:focus {
    outline: none;
    border-bottom-color: #0761e7;
    color: #444;
}

/* 输入框容器 */
.input-container {
    flex: 1;
    position: relative;
}

/* 搜索图标 */
.search-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #999;
    transition: all 0.3s ease;
    pointer-events: none;
}

/* 输入框 */
.search-input {
    width: 100%;
    padding: 10px 40px;
    border: 1px solid #ddd;
    border-radius: 25px;
    font-size: 14px;
    transition: padding 0.3s ease;
}

.search-input:focus,
.search-input:not(:placeholder-shown) {
    padding-left: 40px;
    padding-right: 20px;
}

.search-input:focus~.search-icon,
.search-input:not(:placeholder-shown)~.search-icon {
    left: 20px;
    transform: translateY(-50%);
}

/* 搜索按钮 */
.search-btn {
    padding: 0 20px;
    background: #007bff;
    color: white;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    transition: opacity 0.3s;
}

.search-btn:hover {
    opacity: 0.9;
}

/* 商品列表优化 */
.product-list {
    padding: 0 15px;
}

.product-item {
    display: flex;
    gap: 15px;
    padding: 15px 0;
    border-bottom: 1px solid #eee;
    transition: background 0.3s;
    cursor: pointer;
}

.product-item:hover {
    background: #f8f9fa;
}

.product-img-container {
    position: relative;
    width: 80px;
    height: 80px;
    flex-shrink: 0;
    border-radius: 8px;
    overflow: hidden;
    background: #f5f5f5;
}

.product-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: opacity;
}

.product-img.loaded {
    opacity: 1;
}

.loading-shimmer {
    position: absolute;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
    to {
        background-position: -200% 0;
    }
}

.product-info {
    flex: 1;
    min-width: 0;
}

.product-price {
    font-size: 18px;
    margin-bottom: 5px;
    font-weight: bold;
}

.product-title {
    font-size: 14px;
    color: #666;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.product-level {
    font-size: 12px;
    color: #999;
    margin-top: 4px;
}

/* 底部导航优化 */
.bottom-nav {
    position: fixed;
    bottom: 0;
    width: 100%;
    height: 60px;
    background: #fff;
    display: flex;
    justify-content: space-around;
    align-items: center;
    border-top: 1px solid #ddd;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.05);
    z-index: 100;
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 8px;
    font-size: 12px;
    color: #666;
    cursor: pointer;
    transition: all 0.3s;
    position: relative;
    text-decoration: none;
}

.nav-item.active {
    color: #007bff;
}

/* 自定义图标样式 */
.nav-icon {
    width: 24px;
    height: 24px;
    margin-bottom: 4px;
}

.nav-icon path {
    fill: currentColor;
    transition: fill 0.3s;
}

/* 加载状态 */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #007bff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.item-index {
    position: absolute;
    top: 5px;
    right: 5px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    font-size: 12px;
    padding: 2px 6px;
    border-radius: 10px;
    z-index: 2;
    min-width: 20px;
    text-align: center;
    font-weight: bold;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* 空状态 */
.empty-state {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 60vh;
    color: #666;
}

/* 错误提示 */
.error-message {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: #f8d7da;
    color: #721c24;
    padding: 10px 20px;
    border-radius: 4px;
    z-index: 1000;
}

/* 详情页样式 */
:root {
    --primary-color: #1677ff;
    --success-color: #52c41a;
    --error-color: #ff4d4f;
    --text-color: #333;
    --border-color: #eee;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    background: white;
    min-height: 100vh;
}

.cover-img {
    width: 60px;
    height: 60px;
    border-radius: 8px;
    object-fit: cover;
    margin-right: 15px;
    border: 1px solid var(--border-color);
}

/* 头部区域 */
.header {
    display: flex;
    align-items: flex-start;
    padding: 15px 0;
}

.left-section {
    display: flex;
    align-items: center;
}

/* 调整返回按钮位置 */
.back-btn {
    margin-right: 10px;
    cursor: pointer;
}

.back-btn svg {
    width: 24px;
    height: 24px;
    fill: var(--primary-color);
}

.product-info {
    flex: 1;
}

.product-title {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 8px;
}

.tag-container {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.tag {
    padding: 4px 8px;
    border-radius: 4px;
    background: #fff0f0;
    color: var(--error-color);
    font-size: 12px;
}

/* 中部区域 */
.stats-section {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin-bottom: 25px;
}

.stat-item {
    padding: 12px;
    background: #f8f9fa;
    border-radius: 8px;
}

.stat-label {
    font-size: 12px;
    color: #666;
    margin-bottom: 6px;
}

.stat-value {
    font-size: 16px;
    font-weight: 500;
}

/* 滚动标签样式 */
.scrolling-banner {
    position: absolute;
    left: 120px;
    top: 20%;
    transform: translateY(-50%);
    width: calc(100% - 140px);
    height: 30px;
    overflow: hidden;
}

.scrolling-content {
    display: inline-block;
    white-space: nowrap;
    animation: scroll 20s linear infinite;
    font-size: 16px;
    color: #666;
    line-height: 30px;
}

@keyframes scroll {
    0% {
        transform: translateX(100%);
    }

    100% {
        transform: translateX(-100%);
    }
}

/* 交易记录区域 */
.transaction-list {
    position: relative;
    padding-left: 24px;
}

.transaction-item {
    position: relative;
    padding: 16px 0;
    border-bottom: 1px solid var(--border-color);
}

.timeline-marker {
    position: absolute;
    left: -18px;
    top: 24px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #ddd;
    border: 2px solid white;
}

.timeline-marker.first {
    background: var(--success-color);
}

.timeline-marker::after {
    content: '';
    position: absolute;
    left: 50%;
    top: 24px;
    transform: translateX(-50%);
    width: 1px;
    height: calc(100% - 12px);
    background: #ddd;
}

.transaction-item:last-child .timeline-marker::after {
    display: none;
}

.price {
    font-size: 20px;
    color: #078fe9;
    margin-bottom: 4px;
}

.time {
    font-size: 17px;
    color: #000000;
}

.buyUserNo {
    font-size: 13px;
    color: #da2d2d;
}

.buyUserHash {
    font-size: 14px;
    color: #706c6c;
}

.copy-btn {
    margin-left: 8px;
    padding: 2px 8px;
    font-size: 12px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: opacity 0.3s;
}

.copy-btn:hover {
    opacity: 0.8;
}

.toast-message {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 14px;
    opacity: 0;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 9999;
    pointer-events: none;
    max-width: 80%;
    text-align: center;
}

.toast-message.show {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

/* 用户持仓页样式 */
.search-box {
    margin-bottom: 25px;
    display: flex;
    gap: 12px;
}

.search-input {
    flex: 1;
    padding: 12px 16px;
    border: 2px solid var(--primary-color);
    border-radius: 8px;
    font-size: 16px;
    transition: all 0.3s;
}

.search-input:focus {
    outline: none;
    box-shadow: 0 0 8px rgba(22, 119, 255, 0.2);
}

.search-btn {
    padding: 12px 24px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: opacity 0.3s;
}

.search-btn:hover {
    opacity: 0.9;
}

.highlight-keyword {
    color: var(--primary-color);
    font-weight: 700;
    padding: 0 5px;
}

.dynamic-list {
    display: grid;
    gap: 20px;
}

.dynamic-item {
    display: flex;
    gap: 16px;
    padding: 20px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    position: relative;
}

.media-wrapper {
    position: relative;
    flex: 0 0 120px;
    height: 120px;
    border-radius: 8px;
    overflow: hidden;
}

.media-index {
    position: absolute;
    top: 5px;
    right: 5px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    z-index: 1;
}

.dynamic-media {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.dynamic-content {
    flex: 1;
    min-width: 0;
}

.dynamic-content .time {
    font-size: 18px;
    color: #666;
    margin-bottom: 8px;
}

.dynamic-content .content {
    font-size: 15px;
    color: var(--text-color);
    word-break: break-word;
}

@media (max-width: 480px) {
    .dynamic-item {
        flex-direction: column;
    }

    .media-wrapper {
        flex: none;
        width: 100%;
        height: 200px;
    }

    .stat-item {
        padding: 12px;
    }

    .stat-value {
        font-size: 16px;
    }
}

/* 新增公告栏样式 */
.announcement-bar {
    background: #fffbe6;
    border-bottom: 1px solid #ffe58f;
    padding: 12px 40px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
}

.announcement-content {
    max-width: 1200px;
    width: 100%;
    position: relative;
    display: flex;
    align-items: center;
    overflow: hidden;
}

.announcement-icon {
    flex-shrink: 0;
    margin-right: 12px;
}

.announcement-text {
    flex-grow: 1;
    color: #d48806;
    font-size: 14px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    animation: scroll 20s linear infinite;
}

.close-btn {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
}

.close-btn svg {
    width: 16px;
    height: 16px;
    fill: #d48806;
}

@media (max-width: 768px) {
    .announcement-bar {
        padding: 8px 35px 8px 15px;
    }

    .announcement-text {
        animation: none;
        white-space: normal;
    }

    .close-btn {
        right: 8px;
    }
}



/* 回到顶部按钮 */
.back-to-top {
    position: fixed;
    bottom: 80px;
    right: 20px;
    width: 50px;
    height: 50px;
    background: #007bff;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    z-index: 99;
    opacity: 1;
    transition: opacity 0.3s;
}

.back-to-top.show {
    opacity: 1;
}

.back-to-top svg {
    width: 24px;
    height: 24px;
}

/* 优化商品索引显示 */
.item-index {
    position: absolute;
    top: 5px;
    right: 5px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    font-size: 12px;
    padding: 2px 6px;
    border-radius: 10px;
    z-index: 2;
    min-width: 20px;
    text-align: center;
    font-weight: bold;
}