/* 全局样式和CSS变量 */
:root {
    --header-height: 50px;
    --chat-bar-height: 65px;
    --primary-color: #FF6B9D;
    --secondary-color: #C44569;
    --text-dark: #2C3E50;
    --text-light: #FFFFFF;
    --bg-overlay: rgba(0, 0, 0, 0.5);
    --messenger-color: #0084FF;
    --whatsapp-color: #25D366;
    --telegram-color: #0088CC;
    --card-radius: 20px;
    --transition: all 0.3s ease;
    
    /* 层级管理 */
    --z-media: 1;
    --z-info: 5;
    --z-thumbnails: 10;
    --z-chat-bar: 100;
    --z-viewer: 1000;
}

/* 隐藏respond.io默认小气泡 */
#respondio__widget-container {
    display: none !important;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", 
                 "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
    background: #000;
    color: var(--text-dark);
    overflow: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    
    /* 原生APP体验优化 */
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    user-select: none;
    touch-action: pan-y;
    
    /* 固定布局 */
    height: 100vh;
    position: fixed;
    width: 100%;
    top: 0;
    left: 0;
}

/* 顶部品牌区 */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 50px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: var(--text-light);
    padding: 8px 16px;
    text-align: center;
    box-shadow: none;
    z-index: 90;
    display: flex;
    align-items: center;
    justify-content: center;
}

.header-content {
    max-width: 600px;
    margin: 0 auto;
}

.header-title {
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 2px;
}

.header-subtitle {
    font-size: 0.7rem;
    opacity: 0.9;
    line-height: 1;
    margin-bottom: 0;
}

/* 侧边 WA/TG 按钮，避免遮挡顶部 */
.side-messengers {
    position: fixed;
    right: 12px;
    top: 110px;
    bottom: auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
    z-index: 150;
    pointer-events: none;
}

.messenger-btn {
    min-width: 150px;
    height: 44px;
    border-radius: 18px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: #fff;
    font-size: 0.92rem;
    font-weight: 700;
    letter-spacing: 0.2px;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 0 16px;
    box-shadow: 0 10px 22px rgba(0,0,0,0.26);
    transition: transform 0.15s ease, opacity 0.15s ease;
    -webkit-tap-highlight-color: transparent;
    cursor: pointer;
    backdrop-filter: blur(10px);
    pointer-events: auto;
    opacity: 0.96;
}

.live-badge {
    position: fixed;
    top: 56px;
    right: 12px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-radius: 14px;
    background: rgba(255, 51, 85, 0.18);
    border: 1px solid rgba(255, 255, 255, 0.16);
    color: #fff;
    font-weight: 700;
    font-size: 0.9rem;
    letter-spacing: 0.4px;
    backdrop-filter: blur(10px);
    box-shadow: 0 8px 18px rgba(0,0,0,0.24);
    z-index: 140;
    pointer-events: none;
}

.location-banner {
    position: fixed;
    left: 12px;
    right: 12px;
    bottom: calc(var(--chat-bar-height) + 16px);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 14px;
    border-radius: 14px;
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid rgba(255, 255, 255, 0.14);
    color: #fff;
    font-weight: 700;
    font-size: 0.95rem;
    letter-spacing: 0.2px;
    backdrop-filter: blur(10px);
    box-shadow: 0 8px 18px rgba(0,0,0,0.24);
    z-index: 135;
    min-height: 40px;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.25s ease;
}

.location-pin {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none'><path d='M12 2.5c-3.6 0-6.5 2.9-6.5 6.5 0 5 6.5 12.5 6.5 12.5S18.5 14 18.5 9c0-3.6-2.9-6.5-6.5-6.5Z' stroke='%23ff6b9d' stroke-width='2'/><circle cx='12' cy='9' r='2.8' fill='%23ff6b9d'/></svg>");
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
    filter: drop-shadow(0 1px 2px rgba(0,0,0,0.25));
}

.location-text {
    white-space: nowrap;
}

.live-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #ff3355;
    box-shadow: 0 0 0 0 rgba(255, 51, 85, 0.6);
    animation: live-pulse 1.6s infinite;
}

.live-text {
    white-space: nowrap;
}

@keyframes live-pulse {
    0% { box-shadow: 0 0 0 0 rgba(255, 51, 85, 0.6); }
    70% { box-shadow: 0 0 0 10px rgba(255, 51, 85, 0); }
    100% { box-shadow: 0 0 0 0 rgba(255, 51, 85, 0); }
}

.messenger-icon {
    width: 22px;
    height: 22px;
    flex-shrink: 0;
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
    filter: drop-shadow(0 1px 2px rgba(0,0,0,0.25));
}

.messenger-label {
    line-height: 1;
    white-space: nowrap;
}

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

.messenger-btn.wa {
    background: linear-gradient(135deg, #22d060 0%, #16b455 100%);
}

.messenger-btn.tg {
    background: linear-gradient(135deg, #41b6f6 0%, #1d9edf 100%);
}

.wa-icon {
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none'><path fill='%23fff' d='M12 2a10 10 0 0 0-8.7 14.93L2 22l5.2-1.37A10 10 0 1 0 12 2Z'/><path fill='%2325D366' d='M12 4a8 8 0 0 0-6.93 11.82l-.1.19L4.4 20l4-.95.18.1A8 8 0 1 0 12 4Z'/><path fill='%23fff' d='M9.45 7.9c-.14-.31-.3-.32-.44-.32h-.38c-.13 0-.35.05-.53.26-.18.2-.69.68-.69 1.65 0 .97.71 1.9.81 2.03.09.13 1.38 2.2 3.41 3 .47.19.84.3 1.12.38.47.15.9.13 1.24.08.38-.06 1.17-.48 1.34-.95.17-.47.17-.87.12-.95-.05-.08-.19-.13-.4-.22l-1.34-.62c-.18-.08-.31-.12-.44.12l-.66 1.07c-.08.13-.17.15-.32.09-.15-.06-.65-.24-1.24-.76-.46-.41-.77-.93-.86-1.08-.09-.15-.01-.23.07-.31.07-.07.15-.17.22-.25.07-.08.09-.14.14-.23.05-.09.02-.17-.01-.24-.03-.07-.54-1.28-.74-1.75Z'/></svg>");
}

.tg-icon {
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none'><path fill='%2341b6f6' d='M21.99 4.24c-.23-.39-.68-.59-1.12-.46L2.77 9.56a.9.9 0 0 0-.15 1.66l4.45 2.3 2.02 6.43a.9.9 0 0 0 1.47.42l3.14-2.8 4.05 3.03a.9.9 0 0 0 1.42-.54l2.72-14.3a.9.9 0 0 0-.1-.52Z'/><path fill='%23fff' d='m17.54 9.03-7.05 6.32-.3 2.8a.15.15 0 0 0 .24.13l1.57-1.16 3.55 2.66c.23.17.56.04.62-.24l2.17-10.05c.07-.34-.33-.59-.6-.35Z'/><path fill='%23c0e7ff' d='m10.7 15.83.48 3.48c.05.37.37.47.65.25l1.85-1.43 3.86 2.89a.3.3 0 0 0 .48-.18l2.58-12a.3.3 0 0 0-.4-.35L4.4 11.8a.3.3 0 0 0-.01.55l4.25 2.2 9.49-7.26c.13-.1.3.07.19.2l-8.63 8.34Z'/></svg>");
}

@media (max-width: 480px) {
    .side-messengers {
        right: 8px;
        top: 102px;
        bottom: auto;
        gap: 10px;
    }
    .messenger-btn {
        min-width: 130px;
        height: 40px;
        font-size: 0.85rem;
        border-radius: 16px;
        gap: 8px;
        padding: 0 14px;
    }
    .messenger-icon {
        width: 18px;
        height: 18px;
    }
    .location-banner {
        left: 10px;
        right: 10px;
        bottom: calc(var(--chat-bar-height) + 14px);
        font-size: 0.86rem;
        padding: 9px 12px;
        border-radius: 12px;
    }
}

.header-actions {
    display: none;
}

.lang-switch {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: var(--text-light);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: var(--transition);
    backdrop-filter: blur(10px);
}

.lang-switch:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.05);
}

.lang-switch .lang-divider {
    margin: 0 0.5rem;
    opacity: 0.7;
}

/* 卡片容器 */
.cards-container {
    position: fixed;
    top: var(--header-height);
    left: 0;
    right: 0;
    bottom: var(--chat-bar-height);
    overflow-y: scroll;
    scroll-snap-type: y mandatory;
    scrollbar-width: none;
    -ms-overflow-style: none;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-y: contain;
    z-index: 1;
}

.cards-container::-webkit-scrollbar {
    display: none;
}

/* 加载状态 */
.loading {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    height: 100%;
    color: var(--text-light);
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 1rem;
}

.loading-spinner-small {
    width: 30px;
    height: 30px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 0.5rem;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* 欢迎屏幕 */
.welcome-screen {
    position: fixed;
    top: var(--header-height);
    left: 0;
    right: 0;
    bottom: var(--chat-bar-height);
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    transition: opacity 0.5s ease;
}

.welcome-content {
    text-align: center;
    color: var(--text-light);
    padding: 2rem;
    max-width: 500px;
}

.welcome-logo {
    width: 120px;
    height: 120px;
    margin: 0 auto 2rem;
    animation: pulse 2s ease-in-out infinite;
}

.welcome-logo svg {
    width: 100%;
    height: 100%;
    filter: drop-shadow(0 4px 20px rgba(0, 0, 0, 0.3));
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.welcome-title {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    line-height: 1.4;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.welcome-subtitle {
    font-size: 1.1rem;
    opacity: 0.9;
    margin-bottom: 3rem;
    text-shadow: 0 1px 5px rgba(0, 0, 0, 0.3);
}

.welcome-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 2rem;
}

.loading-text {
    font-size: 0.95rem;
    opacity: 0.8;
}

.welcome-tips {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    padding: 1rem 1.5rem;
    border-radius: 15px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.welcome-tips p {
    margin: 0;
    font-size: 0.9rem;
    opacity: 0.9;
}

/* 视频加载遮罩 */
.video-loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.4); /* 降低透明度，能透出封面图 */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 5; /* 在封面图和视频之上 */
    color: var(--text-light);
    transition: opacity 0.3s ease;
}

.video-loading-overlay p {
    margin-top: 0.5rem;
    font-size: 0.9rem;
    opacity: 0.9;
}

/* 主播卡片 */
.model-card {
    position: relative;
    height: 100%;
    min-height: calc(100vh - var(--header-height) - var(--chat-bar-height));
    scroll-snap-align: start;
    display: flex;
    flex-direction: column;
    background: #000;
    overflow: hidden;
    isolation: isolate;
}

/* 媒体区域 */
.card-media {
    position: relative;
    flex: 1;
    overflow: hidden;
    background: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: var(--z-media);
}

.card-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* 视频封面图片（视频加载前显示） */
.video-poster-cover {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 1;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.card-media video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    position: relative;
    z-index: 2;
}

/* 媒体控制按钮 */
.media-controls {
    position: absolute;
    top: 1rem;
    right: 1rem;
    display: flex;
    gap: 0.5rem;
}

.media-control-btn {
    width: 40px;
    height: 40px;
    background: var(--bg-overlay);
    border: none;
    border-radius: 50%;
    color: var(--text-light);
    font-size: 1.2rem;
    cursor: pointer;
    backdrop-filter: blur(10px);
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

.media-control-btn:hover {
    background: rgba(0, 0, 0, 0.7);
    transform: scale(1.1);
}

/* 缩略图列表 */
/* 缩略图列表 - 竖向排列在左侧，从顶部开始 */
.media-thumbnails {
    position: absolute;
    left: 8px;
    top: 60px;
    bottom: 80px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 0;
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-width: none;
    z-index: var(--z-thumbnails);
    -webkit-overflow-scrolling: touch;
}

.media-thumbnails::-webkit-scrollbar {
    display: none;
}

.thumbnail {
    flex-shrink: 0;
    width: 60px;
    height: 60px;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    border: 2px solid rgba(255, 255, 255, 0.6);
    transition: var(--transition);
    position: relative;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(10px);
    -webkit-tap-highlight-color: transparent;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}

.thumbnail:hover,
.thumbnail:active {
    transform: scale(1.05);
    border-color: var(--primary-color);
    box-shadow: 0 0 15px rgba(255, 107, 157, 0.8);
    z-index: 2;
}

.thumbnail:first-child {
    margin-top: 0;
}

.thumbnail:last-child {
    margin-bottom: 0;
}

.thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    pointer-events: none;
}

/* 更多图片提示 */
.thumbnail.more-indicator {
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.75);
    border: 2px solid rgba(255, 107, 157, 0.8);
}

.thumbnail.more-indicator span {
    color: var(--primary-color);
    font-size: 0.95rem;
    font-weight: 700;
}

/* 移除旧的active和video样式 */

/* 卡片信息区 - 视频下三分之一，去掉背景 */
.card-info {
    position: absolute;
    left: 90px; /* 缩略图右侧 */
    right: 12px;
    bottom: calc(170px + env(safe-area-inset-bottom)); /* 上移到视频中下区域 */
    top: auto;
    width: auto;
    background: transparent;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    border-radius: 0;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    gap: 0.5rem;
    padding: 12px 14px 10px;
    color: var(--text-light);
    z-index: var(--z-info);
    pointer-events: none;
    box-shadow: none;
}

.card-info > * {
    pointer-events: auto;
}

.card-name {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 6px;
    text-shadow: 0 2px 10px rgba(0,0,0,0.9);
    line-height: 1.2;
    word-break: break-word;
}

.card-tags {
    display: flex;
    gap: 0.45rem;
    margin-bottom: 6px;
    flex-wrap: wrap;
}

.tag {
    background: rgba(255, 107, 157, 0.45);
    backdrop-filter: blur(10px);
    padding: 0.22rem 0.7rem;
    border-radius: 10px;
    font-size: 0.8rem;
    border: 1px solid rgba(255, 107, 157, 0.65);
    line-height: 1.35;
}

.card-intro {
    font-size: 0.95rem;
    line-height: 1.45;
    margin-bottom: 0;
    opacity: 0.97;
    text-shadow: 0 2px 8px rgba(0,0,0,0.9);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    word-break: break-word;
}

.card-cta {
    width: 100%;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: var(--text-light);
    border: none;
    padding: 16px;
    border-radius: 25px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: 0 4px 15px rgba(255, 107, 157, 0.5);
    -webkit-tap-highlight-color: transparent;
    user-select: none;
    margin-bottom: 0;
}

.card-cta:active {
    transform: scale(0.95);
    box-shadow: 0 2px 10px rgba(255, 107, 157, 0.6);
}

/* 底部聊天栏 */
.chat-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.98);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: 0.6rem 1rem;
    padding-bottom: calc(0.6rem + env(safe-area-inset-bottom));
    display: flex;
    align-items: center;
    justify-content: center;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    z-index: var(--z-chat-bar);
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.5);
}

.chat-bar-text {
    display: none;
}

.chat-bar-buttons {
    width: 100%;
    max-width: 420px;
    display: flex;
    justify-content: center;
}

.chat-btn {
    border: none;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    position: relative;
    background: transparent;
    color: var(--text-light);
}

/* 底部大粉色按钮 */
.chat-bar-cta {
    width: 100%;
    max-width: 420px;
    background: linear-gradient(135deg, #f868a8 0%, #c44569 100%);
    color: var(--text-light);
    border-radius: 22px;
    padding: 0.9rem 1.2rem;
    font-size: 0.98rem;
    font-weight: 800;
    letter-spacing: 0.5px;
    box-shadow: none;
    transition: transform 0.15s ease, opacity 0.15s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.chat-bar-cta:active {
    transform: scale(0.97);
    box-shadow: none;
}

.chat-heart-icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    color: #fff;
}

/* 飘浮爱心容器 */
.floating-hearts-container {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    top: 0;
    pointer-events: none;
    z-index: 9999;
    overflow: hidden;
}

.floating-heart {
    position: absolute;
    width: 40px;
    height: 40px;
    color: #ff3e7f;
    pointer-events: none;
    will-change: transform, opacity;
}

.floating-heart svg {
    width: 100%;
    height: 100%;
    filter: drop-shadow(0 2px 8px rgba(255, 62, 127, 0.5));
}

@keyframes float-up {
    0% {
        transform: translateY(0) translateX(0) scale(0.8);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    50% {
        transform: translateY(-200px) translateX(var(--drift-x, 20px)) scale(1.1);
        opacity: 0.9;
    }
    100% {
        transform: translateY(-400px) translateX(var(--drift-x, 40px)) scale(0.6);
        opacity: 0;
    }
}

/* ==========================================
   弹幕文案 + 爱心点赞效果样式（重做版）
   ========================================== */

/* 叠加层容器 */
.hero-danmaku-layer,
.hero-hearts-layer {
    position: absolute;
    inset: 0;
    pointer-events: none;
    overflow: visible;
    z-index: 10;
}

/* 弹幕「一行一句」的小胶囊样式 */
.hero-danmaku-bubble {
    position: absolute;
    white-space: nowrap;
    padding: 8px 16px;
    background: rgba(0, 0, 0, 0.6);
    color: #fff;
    border-radius: 9999px;
    font-size: 13px;
    line-height: 1.4;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    transform: translateX(110%);
    opacity: 0;
    z-index: 11;
}

/* 横向弹幕从右往左移动 */
@keyframes danmaku-line-move {
    0% {
        transform: translateX(110%);
        opacity: 0;
    }
    5% {
        opacity: 1;
    }
    95% {
        opacity: 1;
    }
    100% {
        transform: translateX(-130%);
        opacity: 0;
    }
}

.hero-danmaku-bubble.is-moving {
    animation-name: danmaku-line-move;
    animation-timing-function: linear;
    animation-fill-mode: forwards;
    animation-duration: var(--dm-duration, 9s);
}

/* 爱心样式 */
.hero-heart {
    position: absolute;
    width: 20px;
    height: 20px;
    font-size: 20px;
    line-height: 1;
    color: #ff4b7d;
    opacity: 0;
    z-index: 11;
}

/* 爱心上浮+淡出动画 */
@keyframes heart-float {
    0% {
        transform: translate3d(0, 0, 0) scale(0.7);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    60% {
        transform: translate3d(-12px, -50px, 0) scale(1);
        opacity: 0.85;
    }
    100% {
        transform: translate3d(-25px, -100px, 0) scale(1.15);
        opacity: 0;
    }
}

.hero-heart.is-floating {
    animation: heart-float 2.5s ease-out forwards;
}

/* 移动端优化 */
@media (max-width: 600px) {
    .hero-danmaku-bubble {
        font-size: 12px;
        padding: 6px 14px;
        max-width: 85vw;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    
    .hero-heart {
        width: 18px;
        height: 18px;
        font-size: 18px;
    }
}

/* 页脚 */
.footer {
    position: fixed;
    bottom: 65px;
    left: 0;
    right: 0;
    background: #1a1a1a;
    color: rgba(255, 255, 255, 0.8);
    padding: 2rem 1.5rem;
    max-height: calc(100vh - 185px);
    overflow-y: auto;
    z-index: 95;
    display: none;
}

.footer-content {
    max-width: 600px;
    margin: 0 auto;
}

.footer-content h3 {
    font-size: 1.2rem;
    margin-bottom: 1rem;
    color: var(--text-light);
}

.footer-content ul {
    list-style: none;
    margin-bottom: 1.5rem;
}

.footer-content li {
    margin-bottom: 0.75rem;
    font-size: 0.9rem;
    line-height: 1.6;
    padding-left: 1.2rem;
    position: relative;
}

.footer-content li::before {
    content: "•";
    position: absolute;
    left: 0;
    color: var(--primary-color);
}

.footer-copyright {
    text-align: center;
    font-size: 0.85rem;
    opacity: 0.6;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* 媒体查看器 */
.media-viewer {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.98);
    z-index: var(--z-viewer);
    display: none;
    align-items: center;
    justify-content: center;
    -webkit-tap-highlight-color: transparent;
}

.media-viewer.active {
    display: flex;
}

.viewer-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 50px;
    height: 50px;
    background: var(--bg-overlay);
    border: none;
    border-radius: 50%;
    color: var(--text-light);
    font-size: 2rem;
    cursor: pointer;
    z-index: 1001;
    transition: var(--transition);
}

.viewer-close:hover {
    background: rgba(255, 255, 255, 0.2);
}

.viewer-content {
    max-width: 90%;
    max-height: 90%;
}

.viewer-content img,
.viewer-content video {
    max-width: 100%;
    max-height: 90vh;
    object-fit: contain;
}

#viewerImage {
    display: none;
}

#viewerVideo {
    display: none;
}

/* 响应式设计 */
@media (min-width: 768px) {
    .header-title {
        font-size: 1.5rem;
    }
    
    .header-subtitle {
        font-size: 1rem;
    }
    
    .header {
        left: 50%;
        transform: translateX(-50%);
        max-width: 600px;
        border-radius: 0 0 15px 15px;
    }
    
    .cards-container {
        max-width: 600px;
        left: 50%;
        transform: translateX(-50%);
        box-shadow: 0 0 50px rgba(0, 0, 0, 0.5);
    }
    
    .chat-bar {
        max-width: 600px;
        left: 50%;
        transform: translateX(-50%);
        border-radius: 15px 15px 0 0;
    }
}

@media (min-width: 1024px) {
    body {
        background: #1a1a1a;
    }
    
    .cards-container {
        box-shadow: 0 0 50px rgba(0, 0, 0, 0.5);
    }
}

/* 动画 */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.model-card {
    animation: fadeIn 0.5s ease-out;
}

/* 触摸反馈 */
@media (hover: none) {
    .card-cta:active,
    .chat-btn:active {
        opacity: 0.8;
    }
}

/* PWA模式额外优化 */
.pwa-mode {
    /* 在PWA模式下的额外样式 */
}

.pwa-mode .header {
    padding-top: calc(2rem + env(safe-area-inset-top));
}

/* 隐藏语言相关元素的辅助类 */
[lang="zh-Hans"] .zh-hant-only {
    display: none;
}

[lang="zh-Hant"] .zh-hans-only {
    display: none;
}

/* 性能优化 */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* 确保视频在iOS上正确显示 */
video {
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
}

/* 优化滚动条 */
::-webkit-scrollbar {
    display: none;
}

* {
    scrollbar-width: none;
    -ms-overflow-style: none;
}

