@import url('./variables.css');

/* ======================================
   内联 SVG 图标通用样式
   ====================================== */

.icon-inline {
    display: inline-flex;
    align-items: center;
    vertical-align: middle;
    line-height: 0;
}

.icon-inline svg {
    width: 16px;
    height: 16px;
}

.icon-live-dot {
    display: inline-flex;
    align-items: center;
}

.icon-live-dot svg {
    width: 10px;
    height: 10px;
    color: #ef4444;
}

.share-invite-icon {
    display: flex;
    align-items: center;
    justify-content: center;
}

.share-invite-icon svg {
    width: 48px;
    height: 48px;
}

.profile-avatar svg {
    width: 48px;
    height: 48px;
}

.profile-item-arrow svg {
    width: 16px;
    height: 16px;
}

.profile-section-title .icon-inline svg {
    width: 18px;
    height: 18px;
}

.profile-rec-btn .icon-inline svg {
    width: 14px;
    height: 14px;
}

.vrm-close-btn svg {
    width: 20px;
    height: 20px;
}

/* ======================================
   抖音风格移动端 Feed 页样式
   ====================================== */

/* === 视口高度修正（解决 iOS 地址栏问题） === */
:root {
    --vh: 1vh;
    --tab-height: 56px;
    --safe-bottom: env(safe-area-inset-bottom, 0px);
}

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

body.feed-page {
    font-family: var(--ls-font-sans);
    background: var(--ls-bg-base);
    color: var(--ls-text-primary);
    overflow: hidden;
    height: 100vh;
    height: calc(var(--vh, 1vh) * 100);
    -webkit-tap-highlight-color: transparent;
}

/* === 视图容器（三个视图叠放，通过 class 控制显隐） === */
.view {
    display: none;
    position: fixed;
    inset: 0;
    bottom: calc(var(--tab-height) + var(--safe-bottom));
    overflow: auto;
    -webkit-overflow-scrolling: touch;
    z-index: 1;
}

.view.active {
    display: block;
}

/* PC 端视图容器适配侧边栏 */
@media (min-width: 769px) {
    body.feed-page {
        overflow: auto;
        height: auto;
        min-height: 100vh;
    }

    .view {
        position: fixed;
        top: 0;
        left: var(--sidebar-width-collapsed);
        right: 0;
        bottom: 0;
        transition: left 0.3s ease;
    }

    body.sidebar-expanded .view {
        left: var(--sidebar-width-expanded);
    }
}

/* ======================================
   PC 端 Feed 视图优化 — 全屏大卡片
   ====================================== */
@media (min-width: 769px) {
    #view-feed {
        display: block;
        background: var(--ls-bg-base);
    }

    #view-feed .feed-container {
        width: 100%;
        height: 100%;
    }

    #view-feed .feed-card {
        width: 100%;
        height: 100%;
    }

    /* 封面背景全屏 */
    #view-feed .feed-card-bg {
        filter: brightness(0.5);
    }

    /* 内容区域 - 更大的字体和间距 */
    #view-feed .feed-card-content {
        padding: 40px 60px 48px;
        max-width: 800px;
    }

    #view-feed .feed-card-title {
        font-size: 3rem;
        margin-bottom: 12px;
    }

    #view-feed .feed-card-subtitle {
        font-size: 1.1rem;
        letter-spacing: 0.2em;
        margin-bottom: 16px;
    }

    #view-feed .feed-card-desc {
        font-size: 1rem;
        line-height: 1.6;
        -webkit-line-clamp: 3;
        line-clamp: 3;
        margin-bottom: 24px;
        max-width: 600px;
    }

    /* 播放按钮 - 更大 */
    #view-feed .feed-play-icon {
        width: 100px;
        height: 100px;
        font-size: 2.4rem;
        border-width: 3px;
    }

    #view-feed .feed-play-label {
        font-size: 1.1rem;
        letter-spacing: 0.2em;
    }

    /* 右侧操作栏 */
    #view-feed .feed-card-actions {
        right: 40px;
        bottom: 200px;
        gap: 28px;
    }

    #view-feed .feed-action-btn {
        font-size: 0.85rem;
    }

    #view-feed .feed-action-btn .icon {
        font-size: 2rem;
    }

    /* 滑动提示 */
    #view-feed .feed-swipe-hint {
        bottom: 140px;
        font-size: 0.9rem;
    }

    #view-feed .feed-swipe-hint .arrow {
        font-size: 1.5rem;
    }
}

/* 大屏幕优化 */
@media (min-width: 1400px) {
    #view-feed .feed-card-content {
        padding: 48px 80px 56px;
        max-width: 900px;
    }

    #view-feed .feed-card-title {
        font-size: 3.5rem;
    }

    #view-feed .feed-card-desc {
        max-width: 700px;
    }

    #view-feed .feed-play-icon {
        width: 120px;
        height: 120px;
        font-size: 2.8rem;
    }

    #view-feed .feed-card-actions {
        right: 60px;
    }
}

/* ======================================
   Feed 视图 — 全屏竖滑卡片
   ====================================== */

.feed-container {
    width: 100%;
    height: 100%;
    overflow-y: scroll;
    scroll-snap-type: y mandatory;
    -webkit-overflow-scrolling: touch;
    scroll-behavior: smooth;
}

/* 隐藏滚动条 */
.feed-container::-webkit-scrollbar {
    display: none;
}
.feed-container {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

/* 单张卡片 — 全屏 */
.feed-card {
    width: 100%;
    height: 100%;
    scroll-snap-align: start;
    scroll-snap-stop: always;
    position: relative;
    overflow: hidden;
    flex-shrink: 0;
}

/* 封面背景 */
.feed-card-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    background-color: var(--ls-bg-surface);
    transform: scale(1.05); /* 略微放大避免边缘漏底 */
    filter: brightness(0.6);
    transition: filter 0.3s ease;
}

.feed-card:active .feed-card-bg {
    filter: brightness(0.5);
}

/* 渐变遮罩 */
.feed-card-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        0deg,
        rgba(10, 5, 5, 0.95) 0%,
        rgba(10, 5, 5, 0.4) 35%,
        transparent 55%,
        rgba(10, 5, 5, 0.3) 100%
    );
}

/* 卡片内容 — 底部信息区 */
.feed-card-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 30px 20px 24px;
    z-index: 2;
    pointer-events: none; /* 防止遮挡 iframe 内的点击事件 */
}

.feed-card-title {
    font-family: var(--ls-font-display); font-weight: 700;
    font-size: 2rem;
    color: var(--ls-accent-primary);
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.8);
    margin-bottom: 6px;
    line-height: 1.2;
}

.feed-card-subtitle {
    font-size: 0.85rem;
    color: var(--ls-text-secondary);
    letter-spacing: 0.15em;
    margin-bottom: 10px;
}

.feed-card-desc {
    font-size: 0.82rem;
    color: var(--ls-text-secondary);
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 18px;
}

/* 居中播放按钮 */
.feed-play-center {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    z-index: 4;
    transition: all 0.2s ease;
}

.feed-play-center:active {
    transform: translate(-50%, -50%) scale(0.92);
}

.feed-play-icon {
    width: 68px;
    height: 68px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    border: 2px solid var(--ls-accent-glow);
    background: rgba(235, 214, 113, 0.15);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    font-size: 1.6rem;
    color: var(--ls-text-primary);
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.4);
    transition: all 0.3s ease;
}

.feed-play-center:active .feed-play-icon {
    background: rgba(212, 168, 83, 0.4);
    box-shadow: 0 4px 32px rgba(212, 168, 83, 0.3);
}

.feed-play-label {
    font-family: var(--ls-font-sans);
    font-size: 0.85rem;
    color: var(--ls-text-primary);
    letter-spacing: 0.15em;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.6);
}

/* 右侧操作栏 */
.feed-card-actions {
    position: absolute;
    right: 12px;
    bottom: 140px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    z-index: 3;
}

.feed-action-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    background: none;
    border: none;
    cursor: pointer;
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.65rem;
    padding: 0;
}

.feed-action-btn .icon {
    font-size: 1.6rem;
    filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.6));
}

/* 滑动指示器（首次加载时） */
.feed-swipe-hint {
    position: absolute;
    bottom: 100px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    color: var(--ls-text-secondary);
    font-size: 0.75rem;
    animation: swipeHintBounce 2s ease-in-out infinite;
    z-index: 5;
    pointer-events: none;
}

.feed-swipe-hint .arrow {
    font-size: 1.2rem;
}

@keyframes swipeHintBounce {
    0%, 100% { transform: translateX(-50%) translateY(0); opacity: 0.5; }
    50% { transform: translateX(-50%) translateY(-12px); opacity: 1; }
}

/* 加载状态 */
.feed-loading {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 16px;
    background: var(--ls-bg-base);
    z-index: 10;
}

.feed-loading-spinner {
    width: 36px;
    height: 36px;
    border: 3px solid rgba(212, 168, 83, 0.2);
    border-top-color: var(--ls-accent-primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

.feed-loading-text {
    color: var(--ls-text-secondary);
    font-size: 0.85rem;
}

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

/* 翻页指示点 (已隐藏) */
.feed-dots {
    display: none;
}

/* ======================================
   大厅列表视图
   ====================================== */

.lobby-view {
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    background: var(--ls-bg-base);
    padding: 16px 12px;
}

.lobby-view-title {
    font-family: var(--ls-font-display); font-weight: 700;
    font-size: 1.5rem;
    color: var(--ls-accent-primary);
    text-align: center;
    margin-bottom: 16px;
    padding-top: 8px;
}

.lobby-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.lobby-card {
    display: flex;
    gap: 12px;
    padding: 12px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--ls-glass-border-light);
    backdrop-filter: blur(12px);
    text-decoration: none;
    color: inherit;
    transition: all 0.2s;
}

.lobby-card:active {
    background: var(--ls-glass-bg-light);
    border-color: var(--ls-accent-glow);
}

.lobby-card-cover-wrapper {
    position: relative;
    width: 90px;
    height: 64px;
    flex-shrink: 0;
}

.lobby-card-cover {
    width: 100%;
    height: 100%;
    border-radius: 8px;
    object-fit: cover;
    background: #1a120e;
    filter: brightness(0.7);
}

.lobby-card-art-title {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
    text-align: center;
    font-family: var(--ls-font-display);
    font-weight: 700;
    font-size: 0.8rem;
    color: #fff;
    text-shadow: 0 1px 4px rgba(0,0,0,0.9), 0 0 8px rgba(212, 168, 83, 0.4);
    z-index: 2;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.2;
}

.lobby-card-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
}

.lobby-card-name {
    font-size: 1rem;
    color: var(--ls-text-primary);
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.lobby-card-desc {
    font-size: 0.78rem;
    color: var(--ls-text-secondary);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.4;
}

.lobby-empty {
    text-align: center;
    padding: 60px 20px;
    color: var(--ls-text-secondary);
    font-size: 0.9rem;
}

/* ======================================
   个人中心视图
   ====================================== */

.profile-view {
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    background: var(--ls-bg-base);
    padding: 20px 14px;
}

/* 双列布局容器 */
.profile-layout {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.profile-left,
.profile-right {
    width: 100%;
}

/* PC 端双列布局 */
@media (min-width: 769px) {
    .profile-view {
        padding: 32px 40px;
        max-width: 1200px;
        margin: 0 auto;
    }

    .profile-layout {
        flex-direction: row;
        gap: 32px;
        align-items: flex-start;
    }

    .profile-left {
        width: 320px;
        flex-shrink: 0;
        position: sticky;
        top: 32px;
    }

    .profile-right {
        flex: 1;
        min-width: 0;
    }

    /* PC 端列表项 hover 效果 */
    .profile-item:hover {
        background: rgba(212, 168, 83, 0.08);
        border-color: rgba(212, 168, 83, 0.2);
    }

    .profile-rec-btn:hover {
        background: rgba(212, 168, 83, 0.12);
        border-color: rgba(212, 168, 83, 0.3);
    }

    .profile-rec-btn-danger:hover {
        background: rgba(192, 57, 43, 0.12);
        border-color: rgba(231, 76, 60, 0.3);
    }

    .profile-logout-btn:hover {
        background: var(--ls-bg-elevated);
    }
}

/* 用户卡片 */
.profile-card {
    text-align: center;
    padding: 24px 16px;
    margin-bottom: 24px;
    border-radius: 16px;
    background: var(--ls-glass-bg);
    backdrop-filter: var(--ls-glass-blur);
    -webkit-backdrop-filter: var(--ls-glass-blur);
    border: 1px solid var(--ls-glass-border-light);
    box-shadow: var(--ls-glass-shadow);
}

/* 钱包卡片 */
.profile-wallet-card {
    margin-bottom: 24px;
    background: linear-gradient(135deg, rgba(235, 214, 113, 0.1) 0%, rgba(20, 20, 20, 0.8) 100%);
    border: 1px solid rgba(235, 214, 113, 0.3);
    border-radius: 16px;
    padding: 20px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.5);
}

.wallet-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.wallet-title {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #ebd671;
    font-size: 14px;
    font-weight: 600;
}

.wallet-expires {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.6);
}

.wallet-balance-row {
    display: flex;
    align-items: flex-end;
    gap: 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 12px;
    margin-bottom: 12px;
}

.wallet-balance-value {
    font-size: 32px;
    font-weight: 700;
    color: #fff;
    line-height: 1;
}

.wallet-balance-label {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 4px;
}

.wallet-vip-status {
    font-size: 13px;
    color: #ebd671;
    margin-bottom: 20px;
}

.wallet-recharge-btn {
    display: block;
    text-align: center;
    padding: 12px;
    background: linear-gradient(135deg, #ebd671 0%, #c4aa3e 100%);
    color: #000;
    font-weight: 700;
    border-radius: 12px;
    text-decoration: none;
    box-shadow: 0 4px 12px rgba(235, 214, 113, 0.3);
    transition: all 0.2s;
}

.wallet-recharge-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(235, 214, 113, 0.4);
}

/* Light Mode 钱包卡片 */
[data-theme="light"] .profile-wallet-card {
    background: linear-gradient(135deg, rgba(184, 157, 58, 0.08) 0%, rgba(255, 255, 255, 0.95) 100%);
    border-color: rgba(184, 157, 58, 0.3);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

[data-theme="light"] .wallet-title {
    color: #9c842e;
}

[data-theme="light"] .wallet-expires {
    color: rgba(0, 0, 0, 0.5);
}

[data-theme="light"] .wallet-balance-row {
    border-bottom-color: rgba(0, 0, 0, 0.1);
}

[data-theme="light"] .wallet-balance-value {
    color: #18181b;
}

[data-theme="light"] .wallet-balance-label {
    color: rgba(0, 0, 0, 0.5);
}

[data-theme="light"] .wallet-vip-status {
    color: #9c842e;
}

[data-theme="light"] .wallet-recharge-btn {
    background: linear-gradient(135deg, #b89d3a 0%, #9c842e 100%);
    color: #fff;
    box-shadow: 0 4px 12px rgba(184, 157, 58, 0.25);
}

.profile-avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--ls-accent-primary), #a07830);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    margin: 0 auto 12px;
    border: 2px solid rgba(212, 168, 83, 0.4);
}

.profile-name {
    font-size: 1.1rem;
    color: var(--ls-text-primary);
    font-weight: 600;
    margin-bottom: 4px;
}

.profile-phone {
    font-size: 0.8rem;
    color: var(--ls-text-secondary);
}

/* 未登录提示 */
.profile-guest {
    text-align: center;
    padding: 40px 20px;
}

.profile-guest p {
    color: var(--ls-text-secondary);
    margin-bottom: 16px;
    font-size: 0.9rem;
}

.profile-login-btn {
    display: inline-block;
    padding: 12px 36px;
    border: 2px solid var(--ls-accent-primary);
    background: linear-gradient(135deg, rgba(212, 168, 83, 0.15), rgba(160, 120, 48, 0.25));
    color: var(--ls-text-primary);
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 700;
    text-decoration: none;
    font-family: inherit;
    cursor: pointer;
}

/* 区块标题 */
.profile-section-title {
    font-family: var(--ls-font-display); font-weight: 700;
    font-size: 1.1rem;
    color: var(--ls-accent-primary);
    margin-bottom: 12px;
    padding-bottom: 6px;
    border-bottom: 1px solid rgba(212, 168, 83, 0.12);
    display: flex;
    align-items: center;
    gap: 6px;
}

.profile-section-title .icon-inline {
    flex-shrink: 0;
}

.profile-section-title a {
    margin-left: auto;
    font-family: var(--ls-font-sans);
    font-size: 0.75rem;
    color: var(--ls-text-secondary);
    text-decoration: none;
}

.profile-section {
    margin-bottom: 24px;
}

/* 列表项 */
.profile-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--ls-glass-border-light);
    backdrop-filter: blur(10px);
    margin-bottom: 8px;
    text-decoration: none;
    color: inherit;
    transition: background 0.2s, border-color 0.2s, transform 0.2s;
}

.profile-item:active {
    background: rgba(212, 168, 83, 0.1);
}

.profile-item-cover {
    width: 48px;
    height: 48px;
    border-radius: 6px;
    object-fit: cover;
    background: rgba(0, 0, 0, 0.3);
    flex-shrink: 0;
}

.profile-cover-placeholder {
    width: 48px;
    height: 48px;
    border-radius: 8px;
    background: linear-gradient(135deg, var(--ls-bg-elevated) 0%, var(--ls-bg-surface) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: var(--ls-text-tertiary);
}

.profile-cover-placeholder .icon-inline svg {
    width: 24px;
    height: 24px;
}

.profile-item-info {
    flex: 1;
    min-width: 0;
}

/* 剧本列表容器 - PC端网格布局 */
.profile-dramas-grid {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* PC 端右侧内容优化 */
@media (min-width: 769px) {
    .profile-section-title {
        font-size: 1.2rem;
        margin-bottom: 16px;
        padding-bottom: 10px;
    }

    .profile-section-title a {
        font-size: 0.85rem;
        padding: 6px 12px;
        border-radius: 6px;
        background: var(--ls-glass-bg-light);
        transition: background 0.2s;
    }

    .profile-section-title a:hover {
        background: rgba(212, 168, 83, 0.15);
        color: var(--ls-accent-primary);
    }

    .profile-section {
        margin-bottom: 32px;
    }

    /* 剧本列表 - PC端网格 */
    .profile-dramas-grid {
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
        gap: 16px;
    }

    .profile-dramas-grid .profile-item {
        flex-direction: column;
        align-items: stretch;
        padding: 0;
        margin-bottom: 0;
        overflow: hidden;
        background: var(--ls-bg-elevated);
    }

    .profile-dramas-grid .profile-item:hover {
        transform: translateY(-2px);
        border-color: rgba(212, 168, 83, 0.3);
        box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
    }

    .profile-dramas-grid .profile-item-cover {
        width: 100%;
        height: 140px;
        border-radius: 0;
    }

    .profile-dramas-grid .profile-cover-placeholder {
        width: 100%;
        height: 140px;
        border-radius: 0;
    }

    .profile-dramas-grid .profile-cover-placeholder .icon-inline svg {
        width: 40px;
        height: 40px;
    }

    .profile-dramas-grid .profile-item-info {
        padding: 14px;
    }

    .profile-dramas-grid .profile-item-title {
        font-size: 1rem;
        font-weight: 600;
        margin-bottom: 6px;
    }

    .profile-dramas-grid .profile-item-meta {
        font-size: 0.8rem;
    }

    .profile-dramas-grid .profile-item-arrow {
        display: none;
    }

    /* 列表项 - PC端优化 */
    .profile-item {
        padding: 14px 16px;
        gap: 16px;
        border-radius: 12px;
    }

    .profile-item-cover {
        width: 64px;
        height: 64px;
        border-radius: 8px;
    }

    .profile-cover-placeholder {
        width: 64px;
        height: 64px;
    }

    .profile-item-title {
        font-size: 1rem;
    }

    .profile-item-meta {
        font-size: 0.8rem;
        margin-top: 4px;
    }
}

.profile-item-title {
    font-size: 0.9rem;
    color: var(--ls-text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: flex;
    align-items: center;
    gap: 4px;
}

.profile-item-meta {
    font-size: 0.72rem;
    color: var(--ls-text-secondary);
    margin-top: 2px;
    display: flex;
    align-items: center;
    gap: 4px;
    flex-wrap: wrap;
}
}

.profile-item-arrow {
    color: var(--ls-text-tertiary);
    font-size: 0.8rem;
}

.profile-empty {
    padding: 20px;
    text-align: center;
    color: var(--ls-text-secondary);
    font-size: 0.82rem;
}

/* 退出登录 */
.profile-logout-btn {
    display: block;
    width: 100%;
    padding: 14px;
    border: 1px solid var(--ls-glass-border);
    background: var(--ls-glass-bg);
    color: var(--ls-text-primary);
    border-radius: 10px;
    font-size: 0.9rem;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    text-align: center;
    margin-top: 20px;
    transition: all 0.2s;
}

.profile-logout-btn:hover {
    background: var(--ls-bg-elevated);
    border-color: var(--ls-accent-primary);
    color: var(--ls-accent-primary);
}

.profile-logout-btn:active {
    transform: scale(0.98);
}

/* ======================================
   动画
   ====================================== */

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

.view.active .lobby-card,
.view.active .profile-item {
    animation: fadeInUp 0.3s ease-out both;
}

/* Feed 切换毛刺特效 */
.feed-glitch-enter {
    animation: swipeGlitch 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

@keyframes swipeGlitch {
    0% { filter: invert(100%) contrast(300%) hue-rotate(90deg) saturate(500%) blur(4px); opacity: 0.2; transform: scale(1.15) skewX(-15deg); }
    10% { filter: invert(0%) contrast(500%) brightness(2) hue-rotate(-180deg) grayscale(80%); opacity: 1; transform: scale(1.05) translateX(-25px) skewX(20deg); }
    20% { filter: invert(100%) saturate(600%) blur(1px); transform: translateX(30px) translateY(-10px) skewX(-10deg); }
    35% { filter: contrast(400%) brightness(0.4) hue-rotate(45deg); transform: translateY(15px) scale(1.1); }
    50% { filter: invert(30%) saturate(800%) brightness(3) sepia(100%); transform: translateY(-15px) translateX(-20px) skewX(25deg); }
    65% { filter: contrast(400%) grayscale(100%) invert(90%); transform: skewX(-15deg) scale(1.05); }
    80% { filter: contrast(200%) brightness(1.5); transform: translate(0) scale(1.02); }
    90% { filter: saturate(300%) hue-rotate(-90deg); transform: none; }
    100% { filter: none; opacity: 1; transform: none; }
}

.view.active .lobby-card:nth-child(2) { animation-delay: 0.05s; }
.view.active .lobby-card:nth-child(3) { animation-delay: 0.1s; }
.view.active .lobby-card:nth-child(4) { animation-delay: 0.15s; }
.view.active .lobby-card:nth-child(5) { animation-delay: 0.2s; }


/* ======================================
   播放记录卡片 — 带操作按钮
   ====================================== */

.profile-record-item {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 12px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--ls-glass-border-light);
    backdrop-filter: blur(10px);
    margin-bottom: 12px;
    transition: background 0.2s, border-color 0.2s;
}

.profile-record-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    width: 100%;
}

.profile-rec-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    height: 32px;
    padding: 0 12px;
    border: 1px solid rgba(212, 168, 83, 0.15);
    border-radius: 8px;
    background: rgba(26, 15, 10, 0.4);
    color: var(--ls-text-primary);
    font-size: 0.8rem;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s;
    white-space: nowrap;
}

.profile-rec-btn:active {
    background: rgba(212, 168, 83, 0.15);
    border-color: rgba(212, 168, 83, 0.4);
    transform: scale(1.05);
}

.profile-rec-btn-danger {
    border-color: rgba(192, 57, 43, 0.2);
}

.profile-rec-btn-danger:active {
    background: rgba(192, 57, 43, 0.15);
    border-color: rgba(231, 76, 60, 0.4);
}

/* 主要按钮样式 */
.profile-rec-btn-primary {
    background: linear-gradient(135deg, rgba(235, 214, 113, 0.15), rgba(160, 120, 48, 0.2));
    border-color: rgba(235, 214, 113, 0.3);
    color: var(--ls-accent-primary);
    font-weight: 500;
}

.profile-rec-btn-primary:active {
    background: linear-gradient(135deg, rgba(235, 214, 113, 0.25), rgba(160, 120, 48, 0.35));
    border-color: rgba(235, 214, 113, 0.5);
}

/* PC 端播放记录优化 */
@media (min-width: 769px) {
    .profile-record-item {
        flex-direction: row;
        align-items: center;
        padding: 16px 20px;
        gap: 16px;
        position: relative;
    }

    .profile-record-item:hover {
        background: rgba(212, 168, 83, 0.05);
        border-color: rgba(212, 168, 83, 0.2);
    }

    /* 播放记录内容区 */
    .profile-record-item > div:first-child {
        flex: 1;
        min-width: 0;
    }

    /* 按钮区域 - 默认隐藏，hover 显示 */
    .profile-record-actions {
        width: auto;
        flex-wrap: nowrap;
        gap: 8px;
        flex-shrink: 0;
        opacity: 0;
        transform: translateX(10px);
        transition: opacity 0.2s, transform 0.2s;
        pointer-events: none;
    }

    .profile-record-item:hover .profile-record-actions {
        opacity: 1;
        transform: translateX(0);
        pointer-events: auto;
    }

    .profile-rec-btn {
        height: 36px;
        padding: 0 16px;
        font-size: 0.85rem;
        border-radius: 8px;
    }

    .profile-rec-btn:hover {
        background: rgba(212, 168, 83, 0.12);
        border-color: rgba(212, 168, 83, 0.3);
        transform: translateY(-1px);
    }

    .profile-rec-btn-danger:hover {
        background: rgba(192, 57, 43, 0.12);
        border-color: rgba(231, 76, 60, 0.3);
    }

    /* 主要按钮样式 */
    .profile-rec-btn-primary {
        background: linear-gradient(135deg, rgba(235, 214, 113, 0.2), rgba(160, 120, 48, 0.3));
        border-color: rgba(235, 214, 113, 0.4);
        color: var(--ls-accent-primary);
        font-weight: 500;
    }

    .profile-rec-btn-primary:hover {
        background: linear-gradient(135deg, rgba(235, 214, 113, 0.3), rgba(160, 120, 48, 0.4));
        border-color: rgba(235, 214, 113, 0.6);
    }

    /* 记录封面大一点 */
    .profile-record-item .profile-item-cover,
    .profile-record-item .profile-cover-placeholder {
        width: 72px;
        height: 72px;
    }

    .profile-record-item .profile-item-title {
        font-size: 1rem;
        font-weight: 500;
    }

    .profile-record-item .profile-item-meta {
        font-size: 0.82rem;
        margin-top: 4px;
    }
}

/* ====== VRM 直播间卡片 ====== */
.vrm-live-card {
    position: relative;
}

.feed-iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: none;
    pointer-events: none; /* 默认不可交互，允许 feed 滑动 */
}

/* 激活状态：用户点击卡片后，iframe 可交互 */
.feed-card.interactive .feed-iframe {
    pointer-events: auto;
}

/* 触摸覆盖层 — 透明，用于区分滑动和点击 */
.feed-touch-overlay {
    position: absolute;
    inset: 0;
    z-index: 3;
    cursor: pointer;
}

/* 退出交互模式按钮 */
.feed-exit-interactive {
    position: absolute;
    top: 12px;
    left: 12px;
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    color: #fff;
    font-size: 1.1rem;
    cursor: pointer;
    z-index: 15;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.feed-exit-interactive:active {
    background: rgba(212, 168, 83, 0.4);
}

.vrm-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.25);
    z-index: 5;
    pointer-events: none; /* 让滑动手势穿透到 feed 容器 */
}

.vrm-overlay-inner {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    pointer-events: none;
}

.vrm-overlay-badge {
    display: inline-block;
    padding: 4px 14px;
    background: linear-gradient(135deg, var(--ls-live), #f472b6);
    border-radius: 16px;
    font-size: 0.8rem;
    font-weight: 700;
    color: #fff;
    box-shadow: 0 2px 12px rgba(255, 51, 102, 0.4);
}

.vrm-overlay-title {
    font-size: 1.4rem;
    font-weight: 700;
    color: #fff;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}

.vrm-overlay-desc {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.7);
    max-width: 70%;
}

.vrm-enter-btn {
    margin-top: 8px;
    padding: 12px 32px;
    border: none;
    border-radius: 24px;
    background: linear-gradient(135deg, var(--ls-accent-primary), var(--ls-accent-dark)); color: var(--ls-bg-base);
    color: #fff;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    font-family: inherit;
    box-shadow: 0 4px 16px rgba(255, 107, 157, 0.3);
    transition: all 0.2s;
    pointer-events: auto; /* 按钮本身可点击 */
}

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

.vrm-close-btn {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(8px);
    color: #fff;
    font-size: 1.1rem;
    cursor: pointer;
    z-index: 15;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.vrm-close-btn:active {
    background: rgba(255, 107, 157, 0.3);
}

/* ======================================
   分享邀请弹窗
   ====================================== */

.share-invite-modal {
    position: fixed;
    inset: 0;
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: center;
}

.share-invite-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.share-invite-content {
    position: relative;
    z-index: 1;
    width: 85%;
    max-width: 340px;
    padding: 32px 24px 24px;
    border-radius: 24px;
    background: var(--ls-glass-bg, rgba(26, 15, 10, 0.85));
    border: 1px solid rgba(212, 168, 83, 0.2);
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.05) inset;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    text-align: center;
    animation: shareInviteIn 0.35s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

@keyframes shareInviteIn {
    from { opacity: 0; transform: scale(0.85) translateY(20px); }
    to   { opacity: 1; transform: scale(1) translateY(0); }
}

.share-invite-icon {
    font-size: 2.4rem;
    margin-bottom: 14px;
}

.share-invite-text {
    font-size: 1rem;
    color: var(--ls-text-primary, #f0d68a);
    line-height: 1.6;
    margin-bottom: 24px;
}

.share-invite-text strong {
    color: var(--ls-accent-primary, #d4a853);
}

.share-invite-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.share-invite-btn-confirm {
    width: 100%;
    padding: 14px;
    border: none;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--ls-accent-primary, #d4a853), #a07830);
    color: #fff;
    font-size: 1rem;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    box-shadow: 0 4px 16px rgba(212, 168, 83, 0.3);
    transition: all 0.2s;
}

.share-invite-btn-confirm:active {
    transform: scale(0.97);
    box-shadow: 0 2px 8px rgba(212, 168, 83, 0.4);
}

.share-invite-btn-cancel {
    width: 100%;
    padding: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.05);
    color: var(--ls-text-secondary, #a09070);
    font-size: 0.9rem;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.2s;
}

.share-invite-btn-cancel:active {
    background: rgba(255, 255, 255, 0.1);
}

/* ======================================
   Light Theme Overrides
   ====================================== */
[data-theme="light"] .profile-item,
[data-theme="light"] .profile-record-item,
[data-theme="light"] .lobby-card {
    background: var(--ls-glass-bg);
    border-color: rgba(0, 0, 0, 0.1);
}

[data-theme="light"] .profile-rec-btn {
    background: rgba(0, 0, 0, 0.05);
    border-color: rgba(0, 0, 0, 0.1);
    color: var(--ls-text-primary);
}

[data-theme="light"] .profile-rec-btn:active {
    background: rgba(0, 0, 0, 0.1);
}

[data-theme="light"] .profile-rec-btn-danger {
    background: rgba(231, 76, 60, 0.1);
    border-color: rgba(231, 76, 60, 0.2);
    color: #c0392b;
}

[data-theme="light"] .profile-item-cover,
[data-theme="light"] .lobby-card-cover {
    background: #e0e0e0;
}

[data-theme="light"] .profile-logout-btn {
    background: var(--ls-glass-bg);
}

[data-theme="light"] .feed-action-btn {
    color: var(--ls-text-secondary);
}

[data-theme="light"] .feed-play-icon {
    background: rgba(255, 255, 255, 0.8);
    color: var(--ls-accent-primary);
    border-color: var(--ls-accent-primary);
}

[data-theme="light"] .vrm-close-btn,
[data-theme="light"] .feed-exit-interactive {
    background: rgba(255, 255, 255, 0.8);
    color: var(--ls-text-primary);
}

[data-theme="light"] .share-invite-content {
    background: rgba(255, 255, 255, 0.95);
    border-color: rgba(0, 0, 0, 0.1);
}

[data-theme="light"] .share-invite-btn-cancel {
    background: rgba(0, 0, 0, 0.05);
    border-color: rgba(0, 0, 0, 0.1);
    color: var(--ls-text-primary);
}
