/* CSS变量 - 支持暗色模式 */
:root {
    --news-bg: #f7f8fa;
    --news-card-bg: #ffffff;
    --news-text: #333;
    --news-muted: #999;
    --news-border: #f0f0f0;
    --news-glass: rgba(255,255,255,0.6);
    --news-hover-bg: rgba(0, 0, 0, 0.02);
}

:root.dark-mode {
    --news-bg: #1a1a1a;
    --news-card-bg: #252525;
    --news-text: #e0e0e0;
    --news-muted: #9ca3af;
    --news-border: rgba(255, 255, 255, 0.1);
    --news-glass: rgba(30, 30, 30, 0.8);
    --news-hover-bg: rgba(255, 255, 255, 0.05);
}

/* 顶部导航栏毛玻璃 - 已废弃，使用share-header */
.top-header {
    display: none !important;
}
.brand-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 8px;
    width: 36px;
    height: 36px;
    min-width: 36px;
    border-radius: 50%;
    background: rgba(255,255,255,0.8);
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}
.page-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--news-text);
    margin-right: 10px;
}
.top-search-container {
    flex: 1;
    margin: 0;
    padding: 0;
    display: flex;
    align-items: center;
    height: 36px;
    position: relative;
}
.search-bar {
    position: relative;
    display: flex;
    align-items: center;
    background: rgba(245,245,245,0.85);
    border-radius: 18px;
    padding: 0 12px;
    height: 36px;
    box-sizing: border-box;
    width: 100%;
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.05);
    border: 1px solid rgba(0,0,0,0.03);
}
.search-icon {
    color: #999;
    margin-right: 6px;
    font-size: 14px;
}
.search-input {
    border: none;
    background: transparent;
    flex: 1;
    font-size: 14px;
    color: var(--news-text);
    outline: none;
    height: 100%;
    line-height: 36px;
    padding: 0;
    margin: 0;
    border-radius: 18px;
}
.search-input::placeholder {
    color: #999;
}
.message-icon {
    display: flex;
    justify-content: center;
    align-items: center;
    min-width: 36px;
    height: 36px;
    border-radius: 18px;
    background: rgba(245,245,245,0.85);
    margin-left: 10px;
    cursor: pointer;
}
.message-icon svg {
    display: block;
}
.news-page {
    display: flex;
    flex-direction: column;
    height: 100vh;
    min-height: 0;
    background: var(--news-bg);
    padding-top: 0;
    position: relative;
    transition: background 0.3s ease;
    max-width: 480px;
    margin: 0 auto;
    width: 100%;
}
.quick-entry-container {
    width: 100%;
    height: 72px;
    min-height: 72px;
    max-height: 72px;
    padding: 2px 8px;
    display: flex;
    justify-content: space-between;
    gap: 8px;
    margin: 2px 0;
    position: relative;
    z-index: 5;
    background: var(--news-glass);
    backdrop-filter: blur(8px) saturate(160%);
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}
.quick-entry-item {
    flex: 1;
    background: var(--news-card-bg);
    border-radius: 8px;
    box-shadow: 0 1px 6px rgba(0,0,0,0.04);
    display: flex;
    transition: background 0.3s ease;
    align-items: center;
    padding: 6px 7px;
    text-decoration: none;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}
.quick-entry-item:active {
    background: rgba(245,245,245,0.95);
}
.quick-entry-icon {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    overflow: hidden;
    margin-right: 6px;
    position: relative;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
    background: linear-gradient(135deg, #e6f7ff, #1677ff05);
}
.quick-entry-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border-radius: 6px;
    background: #f0f0f0;
    position: relative;
    z-index: 2;
}
.quick-entry-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(22, 119, 255, 0.1);
    z-index: 1;
    pointer-events: none;
}
.quick-entry-content {
    flex: 1;
}
.quick-entry-title {
    font-size: 13px;
    color: var(--news-text);
    font-weight: 600;
    margin-bottom: 1px;
}
.quick-entry-desc {
    font-size: 10px;
    color: #666;
}
.quick-entry-arrow {
    color: #1677ff;
    font-size: 11px;
    opacity: 0.7;
    transition: transform 0.3s ease;
}
.carousel-section {
    width: 100%;
    height: 25vw;
    min-height: 120px;
    max-height: 160px;
    margin: 6px 0;
    padding: 0 8px;
    position: relative;
    z-index: 10;
    overflow: visible;
    background: var(--news-glass);
    backdrop-filter: blur(8px) saturate(160%);
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}
.carousel-container {
    width: 100%;
    height: 100%;
    position: relative;
    overflow: hidden;
    border-radius: 12px;
}

/* 弹幕容器限制在轮播图区域内 */
.carousel-container .barrage-container {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    z-index: 100;
    overflow: hidden; /* 隐藏溢出部分 */
    /* 启用硬件加速 */
    transform: translateZ(0);
    will-change: contents;
    -webkit-transform: translateZ(0);
    -webkit-will-change: contents;
    /* 性能优化 */
    contain: layout style;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    /* GPU加速 */
    perspective: 1000px;
    -webkit-perspective: 1000px;
}
.carousel-wrapper {
    width: 100%;
    height: 100%;
    position: relative;
    overflow: hidden;
    border-radius: 12px;
    background: rgba(245,245,245,0.7);
}
.carousel-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.5s ease;
    z-index: 1;
}
.carousel-slide.active {
    opacity: 1;
    z-index: 2;
}
.carousel-slide a {
    display: block;
    width: 100%;
    height: 100%;
}
.carousel-slide a img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 12px;
}
.scq-featured-container {
    background: var(--news-glass);
    backdrop-filter: blur(8px) saturate(160%);
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    margin: 0 8px 8px;
    padding: 8px 6px 6px;
    position: relative;
}
.scq-featured-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 4px;
}
.scq-featured-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--news-text);
    position: relative;
    padding-left: 10px;
}
.scq-featured-title::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 15px;
    background: linear-gradient(135deg, #ff4d4f, #ff7875);
    border-radius: 2px;
}
.scq-featured-more {
    font-size: 10px;
    color: #fff;
    display: flex;
    align-items: center;
    text-decoration: none;
    background: linear-gradient(135deg, #ff4d4f, #ff7875);
    padding: 4px 8px;
    border-radius: 12px;
    box-shadow: 0 1px 4px rgba(255, 77, 79, 0.25);
    transition: all 0.3s ease;
    font-weight: 500;
}
.scq-featured-more:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(255, 77, 79, 0.35);
}
.scq-featured-more:active {
    transform: translateY(0);
    box-shadow: 0 1px 3px rgba(255, 77, 79, 0.25);
}
.scq-featured-more i {
    margin-left: 3px;
    font-size: 9px;
}
.scq-featured-preview {
    display: flex;
    overflow-x: auto;
    gap: 10px;
    padding: 2px 5px 5px;
    scrollbar-width: none;
    -ms-overflow-style: none;
    justify-content: center;
    margin: 0;
}
.scq-featured-preview::-webkit-scrollbar {
    display: none;
}
.scq-preview-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 0 0 auto;
    width: 60px;
    position: relative;
    opacity: 0;
    background: var(--news-card-bg);
    backdrop-filter: blur(8px) saturate(160%);
    border-radius: 12px;
    border: 1px solid var(--news-border);
    transition: opacity 0.5s;
}
.scq-preview-item.animate-fadein-up {
    opacity: 1;
    animation: fadeInUp 0.5s;
}
@keyframes fadeInUp {
    from { opacity: 0; transform: translate3d(0, 20px, 0); }
    to { opacity: 1; transform: translate3d(0, 0, 0); }
}
.scq-preview-rank-wrapper {
    position: relative;
    width: 48px;
    height: 48px;
    margin-bottom: 4px;
}
.scq-preview-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 2px solid #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    overflow: hidden;
    position: relative;
    background: #f0f0f0;
    transition: transform 0.3s ease;
}
.scq-preview-item:active .scq-preview-avatar {
    transform: scale(0.95);
}
.scq-preview-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.scq-preview-name {
    font-size: 11px;
    color: var(--news-text);
    text-align: center;
    width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    line-height: 1.2;
    margin-top: 2px;
}
.scq-preview-badge {
    position: absolute;
    bottom: 22px;
    right: 0;
    background: linear-gradient(135deg, #ff4d4f, #ff7875);
    color: #fff;
    font-size: 8px;
    padding: 1px 4px;
    border-radius: 6px;
    line-height: 1.1;
    z-index: 3;
    font-weight: 500;
    box-shadow: 0 1px 3px rgba(255,77,79,0.3);
}
.scq-rank {
    position: absolute;
    top: 2px;
    left: -6px;
    background: #1677ff;
    color: #fff;
    font-size: 9px;
    width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    z-index: 20;
    font-weight: bold;
}
.scq-rank-1 { background: linear-gradient(135deg, #ff4d4f, #ff7875); }
.scq-rank-2 { background: linear-gradient(135deg, #fa8c16, #ffc53d); }
.scq-rank-3 { background: linear-gradient(135deg, #1677ff, #69b1ff); }
.content-area {
flex: 1;
position: relative;
z-index: 1;
margin-top: 0;
overflow: visible;
background: var(--news-bg);
backdrop-filter: blur(8px) saturate(160%);
border-radius: 12px;
box-shadow: 0 2px 8px rgba(0,0,0,0.04);
padding-bottom: 60px;
}
.calendar-section {
margin: 2px 0;
padding: 0;
position: relative;
z-index: 1;
margin-top: 0;
overflow: visible;
background: var(--news-glass);
backdrop-filter: blur(8px) saturate(160%);
border-radius: 12px;
box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}
.calendar-tabs-wrapper {
margin: 0;
position: relative;
z-index: 5;
background: var(--news-glass);
backdrop-filter: blur(8px) saturate(160%);
border-radius: 0 0 12px 12px;
box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}
.calendar-tabs {
display: flex;
background: transparent;
padding: 0;
border-bottom: 1px solid var(--news-border);
overflow-x: auto;
-webkit-overflow-scrolling: touch;
scrollbar-width: none; /* Firefox */
-ms-overflow-style: none; /* IE and Edge */
}
.calendar-tabs::-webkit-scrollbar {
    display: none; /* Chrome, Safari, Opera */
}
.calendar-tab {
    flex: 0 0 auto;
    min-width: 70px;
    text-align: center;
    padding: 10px 8px;
    cursor: pointer;
    transition: all 0.3s;
    position: relative;
    font-size: 14px;
    color: var(--news-text);
    background: transparent;
    white-space: nowrap;
}
.calendar-tab.active {
    color: #1677ff;
    font-weight: 500;
    background: transparent;
}
.calendar-tab.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 30px;
    height: 3px;
    background-color: #1677ff;
    border-radius: 3px 3px 0 0;
}
/* 今日标签指示器 */
.calendar-tab.today::before {
    content: '今日';
    position: absolute;
    top: 0;
    right: 2px;
    background: linear-gradient(135deg, #ff4d4f, #ff7875);
    color: #fff;
    font-size: 10px;
    padding: 2px 4px;
    border-radius: 0 0 4px 4px;
    line-height: 1;
    font-weight: 500;
    box-shadow: 0 1px 3px rgba(255,77,79,0.3);
}
.calendar-content {
    max-height: 70vh;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 0 2px 8px 2px;
}
.calendar-items {
    display: none;
}
.calendar-items.active {
    display: block;
}
.calendar-item {
    display: flex;
    align-items: center;
    padding: 15px 15px;
    background: var(--news-card-bg);
    margin-bottom: 1px;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
    position: relative;
}
.item-image {
    width: 65px;
    height: 65px;
    border-radius: 6px;
    overflow: hidden;
    margin-right: 10px;
    flex-shrink: 0;
    border: 1px solid #f0f0f0;
}
.item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.item-info {
    flex: 1;
    min-width: 0;
    padding-right: 80px;
    display: flex;
    flex-direction: column;
}
.item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 3px;
}
.item-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--news-text);
    margin: 0 0 3px;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    line-height: 1.3;
    max-height: 2.6em;
    white-space: normal;
}
.item-subtitle-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.item-subtitle {
    font-size: 12px;
    color: #666;
    margin: 3px 0 5px;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    line-height: 1.4;
    max-height: 2.8em;
    word-break: break-all;
}
.item-meta {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    margin-top: 5px;
    position: relative;
    top: 0;
}
.item-price {
    font-size: 14px;
    color: #ff4d4f;
    font-weight: 600;
}
.item-time {
    font-size: 12px;
    color: #fff;
    display: flex;
    align-items: center;
    background-color: #ff4d4f;
    padding: 2px 6px;
    border-radius: 3px;
    font-weight: 500;
}
.item-actions {
    display: flex;
    flex-direction: column;
    gap: 4px;
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
}
.item-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 5px 0;
    width: 70px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    background: rgba(22,119,255,0.08);
    color: #1677ff;
    border: 1px solid #1677ff22;
    transition: background 0.2s, color 0.2s;
}
.item-btn:active {
    background: #1677ff;
    color: #fff;
}
.goto-btn, .floor-btn {
    background: linear-gradient(135deg, rgba(22,119,255,0.18) 0%, rgba(165,180,252,0.18) 100%);
    color: #1677ff;
    border: none;
    border-radius: 12px;
    padding: 5px 0;
    width: 70px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(22,119,255,0.10);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: all 0.2s;
    outline: none;
}
.goto-btn:hover, .floor-btn:hover {
    background: linear-gradient(135deg, rgba(22,119,255,0.28) 0%, rgba(165,180,252,0.28) 100%);
    color: #0958d9;
    box-shadow: 0 4px 16px rgba(22,119,255,0.13);
}
.goto-btn:active, .floor-btn:active {
    background: linear-gradient(135deg, rgba(22,119,255,0.38) 0%, rgba(165,180,252,0.38) 100%);
    color: #fff;
}
.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}
.modal.show {
    opacity: 1;
    visibility: visible;
}
.modal-content {
    background: rgba(255,255,255,0.45);
    box-shadow: 0 8px 32px 0 rgba(31,38,135,0.18);
    border-radius: 18px;
    border: 1px solid rgba(255,255,255,0.18);
    width: 80%;
    max-width: 320px;
    padding: 24px;
    transform: translateY(20px);
    opacity: 0;
    transition: transform 0.3s, opacity 0.3s;
    animation: glassyPop 0.35s cubic-bezier(.4,2,.6,1) both;
}
.modal.show .modal-content {
    transform: translateY(0);
    opacity: 1;
}
@keyframes glassyPop {
    0% { transform: scale(0.85) translateY(40px); opacity: 0; }
    100% { transform: scale(1) translateY(0); opacity: 1; }
}
.bottom-nav {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    height: 55px;
    background: var(--scq-glass, rgba(255, 255, 255, 0.9));
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    display: flex;
    justify-content: space-around;
    align-items: center;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.05);
    border-radius: 16px 16px 0 0;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-bottom: none;
    z-index: 1000;
    padding-bottom: env(safe-area-inset-bottom);
    transition: background 0.3s ease;
    max-width: 480px;
    width: 100%;
    margin: 0 auto;
}
.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--scq-muted, #999);
    text-decoration: none;
    font-size: 11px;
    padding: 6px 12px;
    transition: all 0.2s ease;
    flex: 1;
    max-width: 80px;
}
.nav-item i {
    font-size: 20px;
    margin-bottom: 2px;
}
.nav-item.active {
    color: var(--scq-primary, #1677ff);
}
.nav-item:active {
    transform: scale(0.95);
}
.brand-logo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    display: block;
}
.search-results-container {
    background: var(--news-glass);
    backdrop-filter: blur(12px) saturate(180%);
    -webkit-backdrop-filter: blur(12px) saturate(180%);
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    border-radius: 18px 18px 0 0;
    border: 1px solid rgba(255,255,255,0.18);
    position: fixed;
    top: 54px;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1000;
    display: none;
    flex-direction: column;
}
.search-results-content {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
}
.search-result-item {
    display: flex;
    align-items: center;
    background: rgba(255,255,255,0.8);
    backdrop-filter: blur(8px) saturate(160%);
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
    margin-bottom: 10px;
    padding: 10px 12px;
    transition: background 0.2s;
}
.search-result-image {
    width: 60px;
    height: 60px;
    border-radius: 8px;
    overflow: hidden;
    margin-right: 12px;
    flex-shrink: 0;
    background: #f0f0f0;
}
.search-result-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px;
}
.search-result-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}
.search-result-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--news-text);
    margin-bottom: 4px;
    line-height: 1.3;
}
.search-result-desc {
    font-size: 13px;
    color: #666;
    margin-bottom: 4px;
}
.search-result-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 12px;
    color: #999;
}
.search-result-price {
    color: #ff4d4f;
    font-weight: 500;
}
.search-result-time {
    background: #1677ff;
    color: #fff;
    border-radius: 4px;
    padding: 2px 6px;
    font-size: 12px;
    margin-left: 6px;
}

/* 直播弹窗样式 */
.live-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.live-modal.show {
    opacity: 1;
    visibility: visible;
    animation: liveModalFadeIn 0.3s ease-out;
}

.live-modal.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    animation: liveModalFadeOut 0.3s ease-out;
}

@keyframes liveModalFadeIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes liveModalFadeOut {
    from {
        opacity: 1;
        transform: scale(1);
    }
    to {
        opacity: 0;
        transform: scale(0.9);
    }
}

.live-modal-content {
    background: var(--news-card-bg);
    border-radius: 16px;
    width: 100%;
    max-width: 400px;
    max-height: 90vh;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
    animation: liveModalSlideIn 0.3s ease-out;
}

@keyframes liveModalSlideIn {
    from {
        transform: translateY(30px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.live-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 20px 0 20px;
    border-bottom: 1px solid #f0f0f0;
    margin-bottom: 20px;
}

.live-modal-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--news-text);
    margin: 0;
}

.live-close-btn {
    background: none;
    border: none;
    font-size: 20px;
    color: #999;
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
}

.live-close-btn:hover {
    background: #f5f5f5;
    color: #666;
}

.live-modal-body {
    padding: 0 20px 20px 20px;
}

.live-content {
    text-align: center;
    margin-bottom: 20px;
}

.live-badge {
    display: inline-block;
    background: #ff4d4f;
    color: #fff;
    padding: 6px 12px;
    border-radius: 16px;
    font-size: 12px;
    font-weight: 500;
    margin-bottom: 16px;
    box-shadow: 0 2px 8px rgba(255, 77, 79, 0.3);
}

.live-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--news-text);
    margin: 0 0 12px 0;
    line-height: 1.3;
}

.live-desc {
    font-size: 14px;
    color: #666;
    margin: 0 0 16px 0;
    line-height: 1.4;
}

.live-stats {
    display: flex;
    align-items: center;
    justify-content: center;
}

.live-viewers {
    font-size: 13px;
    color: #999;
}

.live-actions {
    display: flex;
    gap: 12px;
}

.live-watch-btn {
    flex: 1;
    background: linear-gradient(135deg, #1677ff, #4096ff);
    color: #fff;
    border: none;
    border-radius: 12px;
    padding: 14px 20px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(22, 119, 255, 0.3);
}

.live-watch-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(22, 119, 255, 0.4);
}

.live-watch-btn:active {
    transform: translateY(0);
}

.live-later-btn {
    background: #f5f5f5;
    color: #666;
    border: none;
    border-radius: 12px;
    padding: 14px 20px;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 100px;
}

.live-later-btn:hover {
    background: #e8e8e8;
    color: #333;
}

/* 弹幕容器现在在.carousel-container内部，使用特定的样式 */

/* 弹幕项样式 */
.barrage-item {
    position: absolute;
    white-space: nowrap;
    pointer-events: auto;
    font-size: 12px;
    line-height: 1.4;
    color: #fff;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.6);
    padding: 6px 14px;
    background: rgba(0, 0, 0, 0.6); /* 简化背景，提升性能 */
    border-radius: 18px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    gap: 6px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.3);
    /* 启用硬件加速 */
    will-change: transform;
    transform: translateZ(0);
    -webkit-transform: translateZ(0);
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    /* 性能优化 */
    contain: layout style paint;
    /* 动画 */
    animation: barrage-move linear forwards;
    animation-fill-mode: forwards;
}

.barrage-item .barrage-avatar {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid rgba(255, 255, 255, 0.3);
    flex-shrink: 0;
}

.barrage-item .barrage-nickname {
    font-weight: 500;
    opacity: 0.9;
}

.barrage-item .barrage-content {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* 弹幕动画 - 优化性能，确保完整显示 */
@keyframes barrage-move {
    0% {
        transform: translate3d(100%, 0, 0); /* 从容器右侧外开始 */
        opacity: 0;
    }
    1% {
        opacity: 1; /* 快速淡入 */
    }
    99% {
        opacity: 1;
    }
    100% {
        transform: translate3d(calc(-100% - 100%), 0, 0); /* 确保完全移出到容器左侧外 */
        opacity: 0;
    }
}

/* 弹幕输入框样式 */
.barrage-input-container {
    position: fixed;
    bottom: 60px;
    left: 0;
    right: 0;
    padding: 8px 16px;
    background: transparent;
    z-index: 200;
    display: none; /* 默认隐藏，登录后显示 */
    max-width: 480px;
    width: 100%;
    margin: 0 auto;
}

.barrage-input-container.show {
    display: block;
}

.barrage-input-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
    max-width: 100%;
}

.barrage-emoji-btn {
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 50%;
    background: rgba(22, 119, 255, 0.1);
    color: #1677ff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    flex-shrink: 0;
    font-size: 18px;
}

.barrage-emoji-btn:hover {
    background: rgba(22, 119, 255, 0.2);
    transform: scale(1.1);
}

.barrage-emoji-btn:active {
    transform: scale(0.95);
}

.barrage-input {
    flex: 1;
    padding: 10px 16px;
    border: 1px solid rgba(22, 119, 255, 0.2);
    border-radius: 20px;
    font-size: 14px;
    color: var(--news-text);
    background: var(--news-card-bg);
    outline: none;
    transition: all 0.3s ease;
}

.barrage-char-count {
    font-size: 12px;
    color: #999;
    min-width: 40px;
    text-align: right;
    flex-shrink: 0;
}

.barrage-char-count.warning {
    color: #ff9800;
}

.barrage-char-count.error {
    color: #ff4d4f;
}

.barrage-input:focus {
    border-color: #1677ff;
    box-shadow: 0 0 0 3px rgba(22, 119, 255, 0.1);
    background: var(--news-card-bg);
}

.barrage-input::placeholder {
    color: #999;
}

.barrage-send-btn {
    width: 40px;
    height: 40px;
    border: none;
    border-radius: 50%;
    background: linear-gradient(135deg, #1677ff, #4096ff);
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(22, 119, 255, 0.3);
}

.barrage-send-btn:hover {
    background: linear-gradient(135deg, #4096ff, #1677ff);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(22, 119, 255, 0.4);
}

.barrage-send-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(22, 119, 255, 0.3);
}

.barrage-send-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.barrage-send-btn i {
    font-size: 16px;
}

/* 表情包选择弹窗 */
.emoji-picker {
    position: absolute;
    bottom: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border-radius: 16px 16px 0 0;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.15);
    max-height: 300px;
    display: none;
    flex-direction: column;
    z-index: 300;
    margin-bottom: 8px;
    overflow: hidden;
}

.emoji-picker.show {
    display: flex;
}

.emoji-picker-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    border-bottom: 1px solid #f0f0f0;
    background: #f8f9fa;
}

.emoji-picker-header span {
    font-size: 14px;
    font-weight: 600;
    color: #333;
}

.emoji-picker-close {
    width: 28px;
    height: 28px;
    border: none;
    background: transparent;
    color: #999;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.emoji-picker-close:hover {
    background: #e8e8e8;
    color: #333;
}

.emoji-picker-content {
    flex: 1;
    overflow-y: auto;
    padding: 12px;
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    gap: 8px;
    max-height: 240px;
}

.emoji-item {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.2s ease;
    user-select: none;
}

.emoji-item:hover {
    background: #f0f0f0;
    transform: scale(1.2);
}

.emoji-item:active {
    transform: scale(1);
    background: #e0e0e0;
}

/* 移动端优化 */
@media (max-width: 480px) {
    .emoji-picker-content {
        grid-template-columns: repeat(6, 1fr);
        gap: 6px;
        padding: 10px;
    }
    
    .emoji-item {
        width: 36px;
        height: 36px;
        font-size: 20px;
    }
    
    .barrage-char-count {
        font-size: 11px;
        min-width: 35px;
    }
}

/* 响应式设计 */
@media (max-width: 480px) {
    .live-modal {
        padding: 16px;
    }
    
    .live-modal-content {
        max-width: 100%;
    }
    
    .live-actions {
        flex-direction: column;
    }
    
    .live-later-btn {
        min-width: auto;
    }
    
    .barrage-item {
        font-size: 12px;
        padding: 3px 10px;
        max-width: 75%;
    }
    
    .barrage-item .barrage-avatar {
        width: 18px;
        height: 18px;
    }
    
    .barrage-input-container {
        padding: 6px 12px;
    }
    
    .barrage-input {
        padding: 8px 12px;
        font-size: 13px;
    }
    
    .barrage-send-btn {
        width: 36px;
        height: 36px;
    }
    
    .barrage-send-btn i {
        font-size: 14px;
    }
}

/* 推荐平台弹窗样式 */
.recommend-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9999;
    justify-content: center;
    align-items: center;
    animation: fadeIn 0.3s ease;
}

.recommend-modal.show {
    display: flex;
}

.recommend-modal-content {
    background: var(--news-card-bg);
    border-radius: 16px;
    width: 85%;
    max-width: 400px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    animation: slideUp 0.3s ease;
    overflow: hidden;
}

.recommend-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid #f0f0f0;
}

.recommend-modal-title {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    margin: 0;
}

.recommend-close-btn {
    width: 32px;
    height: 32px;
    border: none;
    background: rgba(0, 0, 0, 0.05);
    border-radius: 50%;
    font-size: 20px;
    color: #666;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.recommend-close-btn:hover {
    background: rgba(0, 0, 0, 0.1);
    transform: rotate(90deg);
}

.recommend-modal-body {
    padding: 24px 20px;
}

.recommend-input-label {
    font-size: 14px;
    color: #666;
    margin-bottom: 12px;
    font-weight: 500;
}

.recommend-input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid rgba(22, 119, 255, 0.2);
    border-radius: 12px;
    font-size: 15px;
    color: #333;
    background: rgba(246, 248, 250, 0.8);
    outline: none;
    box-sizing: border-box;
    transition: all 0.3s;
    margin-bottom: 20px;
}

.recommend-input:focus {
    border-color: #1677ff;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(22, 119, 255, 0.1);
}

.recommend-input::placeholder {
    color: #bbb;
}

.recommend-submit-btn {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #1677ff, #0958d9);
    color: #fff;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 4px 12px rgba(22, 119, 255, 0.3);
}

.recommend-submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(22, 119, 255, 0.4);
}

.recommend-submit-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(22, 119, 255, 0.3);
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        transform: translateY(30px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* ================= XM 发售日历弹窗 & 详情样式（与 launch-calendar-simple.html 兼容，类名加前缀避免冲突） ================ */

.xm-modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* 默认：全屏磨砂背景（用于商品详情弹窗） */
    background: rgba(15, 23, 42, 0.35);
    backdrop-filter: blur(14px) saturate(140%);
    -webkit-backdrop-filter: blur(14px) saturate(140%);
    z-index: 2100;
    overflow: hidden;
    animation: fadeIn 0.3s ease;
}

.xm-modal-overlay.show {
    display: flex;
    flex-direction: column;
}

/* XM 地板价：小弹窗居中 */
.xm-modal-overlay-center {
    align-items: center;
    justify-content: center;
}

.xm-modal-content {
    /* 商品详情：全屏磨砂卡片 */
    background: rgba(255, 255, 255, 0.9);
    border-radius: 0;
    max-width: 100%;
    width: 100%;
    margin: 0;
    box-shadow: none;
    position: relative;
    animation: slideUp 0.3s ease;
    overflow: hidden;
    height: 100vh;
    display: flex;
    flex-direction: column;
}

:root.dark-mode .xm-modal-content {
    background: rgba(37, 37, 37, 0.95);
}

/* XM 地板价小弹窗主体 */
.xm-modal-content-center {
    max-width: 380px;
    width: 88%;
    max-height: 80vh;
    height: auto;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.35);
    animation: glassyPop 0.3s ease;
}

:root.dark-mode .xm-modal-content-center {
    background: rgba(37, 37, 37, 0.95);
}

.xm-modal-header {
    position: sticky;
    top: 0;
    padding: 12px 16px;
    padding-top: calc(12px + env(safe-area-inset-top));
    border-bottom: 1px solid #f0f0f0;
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(255, 255, 255, 0.9);
    z-index: 10;
}

:root.dark-mode .xm-modal-header {
    background: rgba(37, 37, 37, 0.95);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.xm-modal-title {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

:root.dark-mode .xm-modal-title {
    color: #e0e0e0;
}

.xm-modal-back-btn,
.xm-modal-close-btn {
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #333;
    padding: 0;
}

:root.dark-mode .xm-modal-back-btn,
:root.dark-mode .xm-modal-close-btn {
    color: #e0e0e0;
}

.xm-modal-close-btn {
    border-radius: 50%;
    font-size: 24px;
    color: #666;
    background: transparent;
    transition: all 0.3s;
}

.xm-modal-close-btn:hover {
    background: rgba(0, 0, 0, 0.05);
}

:root.dark-mode .xm-modal-close-btn:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* 返回按钮样式：类似“优先购条件”胶囊按钮 */
.xm-modal-back-btn {
    border-radius: 14px;
    padding: 6px 12px;
    font-size: 12px;
    font-weight: 500;
    background: linear-gradient(135deg, rgba(22,119,255,0.18) 0%, rgba(165,180,252,0.18) 100%);
    color: #1677ff;
    box-shadow: 0 2px 8px rgba(22,119,255,0.10);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    min-width: auto;
}

.xm-modal-back-btn:active {
    background: linear-gradient(135deg, rgba(22,119,255,0.38) 0%, rgba(165,180,252,0.38) 100%);
    color: #ffffff;
}

.xm-modal-body {
    padding: 0;
    flex: 1;
    overflow-y: auto;
    background: #ffffff;
    -webkit-overflow-scrolling: touch;
    padding-bottom: env(safe-area-inset-bottom);
}

:root.dark-mode .xm-modal-body {
    background: #252525;
}

/* 主商品卡片 */
.xm-main-product-card {
    padding: 12px 16px;
    background: #ffffff;
    border-bottom: 1px solid #f0f0f0;
}

:root.dark-mode .xm-main-product-card {
    background: #2a2a2a;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.xm-main-product-content {
    display: flex;
    gap: 12px;
}

.xm-main-product-image-wrapper {
    position: relative;
    width: 100px;
    height: 100px;
    flex-shrink: 0;
    border-radius: 6px;
    overflow: hidden;
    background: #f5f5f5;
}

.xm-main-product-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.xm-product-platform-badge,
.xm-product-ip-badge {
    position: absolute;
    background: rgba(0, 0, 0, 0.6);
    color: #ffffff;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 500;
}

.xm-product-platform-badge {
    top: 4px;
    left: 4px;
}

.xm-product-ip-badge {
    bottom: 4px;
    left: 4px;
}

.xm-main-product-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.xm-main-product-name {
    font-size: 15px;
    font-weight: 600;
    color: #333;
    line-height: 1.4;
}

:root.dark-mode .xm-main-product-name {
    color: #e0e0e0;
}

.xm-product-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.xm-product-tag {
    padding: 6px 12px;
    border-radius: 14px;
    font-size: 12px;
    font-weight: 500;
    white-space: nowrap;
    background: linear-gradient(135deg, rgba(22,119,255,0.18) 0%, rgba(165,180,252,0.18) 100%);
    color: #1677ff;
    box-shadow: 0 2px 8px rgba(22,119,255,0.10);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.xm-product-tag.limited,
.xm-product-tag.priority {
    background: linear-gradient(135deg, rgba(22,119,255,0.18) 0%, rgba(165,180,252,0.18) 100%);
    color: #1677ff;
}

.xm-product-sell-time {
    font-size: 12px;
    color: #666;
}

:root.dark-mode .xm-product-sell-time {
    color: #9ca3af;
}

.xm-main-product-price-row {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    margin-top: auto;
}

.xm-main-product-price {
    font-size: 28px;
    font-weight: 700;
    color: #ff4d4f;
}

/* 包含藏品卡片 */
.xm-contain-archives-section {
    padding: 12px 16px;
    background: #ffffff;
    border-bottom: 1px solid #f0f0f0;
}

:root.dark-mode .xm-contain-archives-section {
    background: #2a2a2a;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.xm-section-title {
    font-size: 15px;
    font-weight: 600;
    color: #333;
    margin-bottom: 10px;
}

:root.dark-mode .xm-section-title {
    color: #e0e0e0;
}

.xm-archive-cards-row {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
    padding-bottom: 4px;
}

.xm-archive-cards-row::-webkit-scrollbar {
    display: none;
}

.xm-archive-card {
    background: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    overflow: hidden;
    position: relative;
    flex: 0 0 auto;
    width: 100px;
    min-width: 100px;
    cursor: pointer;
    transition: all 0.2s;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

:root.dark-mode .xm-archive-card {
    background: #2a2a2a;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.xm-archive-card:active {
    transform: scale(0.95);
    background: #f8f9fa;
}

:root.dark-mode .xm-archive-card:active {
    background: #333333;
}

.xm-archive-card-image-wrapper {
    position: relative;
    width: 100%;
    aspect-ratio: 1;
    background: #f5f5f5;
}

.xm-archive-card-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.xm-archive-card-badge {
    position: absolute;
    top: 2px;
    left: 2px;
    background: rgba(0, 0, 0, 0.6);
    color: #ffffff;
    padding: 1px 4px;
    border-radius: 3px;
    font-size: 9px;
    line-height: 1.2;
}

.xm-archive-card-info {
    padding: 6px 8px;
}

.xm-archive-card-name {
    font-size: 11px;
    font-weight: 600;
    color: #333;
    margin-bottom: 4px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    line-height: 1.3;
}

:root.dark-mode .xm-archive-card-name {
    color: #e0e0e0;
}

.xm-archive-card-meta {
    font-size: 10px;
    color: #666;
    margin-bottom: 3px;
    line-height: 1.3;
}

:root.dark-mode .xm-archive-card-meta {
    color: #9ca3af;
}

.xm-archive-card-floor-price {
    font-size: 12px;
    color: #ff4d4f;
    font-weight: 700;
    line-height: 1.3;
}

.xm-archive-card-requirement {
    font-size: 10px;
    color: #ff4d4f;
    font-weight: 700;
    line-height: 1.3;
    background: #fff1f0;
    padding: 2px 6px;
    border-radius: 4px;
    display: inline-block;
    margin-top: 4px;
    border: 1px solid #ffccc7;
}

.xm-archive-card-requirement::before {
    content: '⚠️ ';
    font-size: 9px;
}

/* 购买说明和温馨提示 */
.xm-purchase-stages-section {
    padding: 12px 16px;
    background: #ffffff;
    border-bottom: 1px solid #f0f0f0;
}

:root.dark-mode .xm-purchase-stages-section {
    background: #2a2a2a;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.xm-warm-reminder-section {
    padding: 12px 16px;
    background: #ffffff;
}

:root.dark-mode .xm-warm-reminder-section {
    background: #2a2a2a;
}

.xm-detail-description {
    background: #ffffff;
    padding: 0;
    line-height: 1.4;
    color: #333;
    font-size: 13px;
}

:root.dark-mode .xm-detail-description {
    background: #2a2a2a;
    color: #e0e0e0;
}

.xm-detail-description p,
.xm-detail-description div {
    margin: 0 0 6px 0;
    line-height: 1.4;
}

.xm-detail-description p:last-child,
.xm-detail-description div:last-child {
    margin-bottom: 0;
}

/* 数据来源标识 */
.xm-data-source {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 6px;
    font-size: 11px;
    color: #999;
    padding: 8px 16px 12px;
}

.xm-data-source-logo {
    width: 18px;
    height: 18px;
    border-radius: 4px;
    overflow: hidden;
    flex-shrink: 0;
}

.xm-data-source-logo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}