/* css/style.css - 完整版 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, sans-serif;
}

body {
    background-color: #0e0e10;
    color: #efeff1;
    height: 100vh;
    overflow: hidden;
}

#app {
    display: flex;
    flex-direction: column;
    height: 100vh;
    max-width: 480px;
    margin: 0 auto;
    background-color: #0e0e10;
    position: relative;
    box-shadow: 0 0 30px rgba(0,0,0,0.8);
}

/* 顶部导航 */
.app-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background-color: #1f1f23;
    border-bottom: 1px solid #2a2a2e;
    flex-shrink: 0;
    z-index: 10;
}
.logo {
    font-weight: 700;
    font-size: 18px;
    color: #a970ff;
    letter-spacing: 0.5px;
}
.header-right i {
    font-size: 18px;
    margin-left: 18px;
    color: #adadb8;
    cursor: pointer;
    transition: color 0.2s;
}
.header-right i:hover {
    color: #ffffff;
}

/* 内容区域 */
#content-area {
    flex: 1;
    overflow-y: auto;
    padding: 12px 16px 8px 16px;
    background-color: #0e0e10;
    scrollbar-width: thin;
    scrollbar-color: #3a3a3d transparent;
    -webkit-overflow-scrolling: touch;   /* iOS 惯性滑动 */
    scrollbar-width: none;               /* Firefox */
    -ms-overflow-style: none;            /* IE / 旧 Edge */
}
#content-area::-webkit-scrollbar {
    width: 0 !important;
    height: 0 !important;
    background: transparent !important;
    display: none !important;
}
#content-area::-webkit-scrollbar-thumb {
    background-color: #3a3a3d;
    border-radius: 8px;
}

/* 底部导航 */
.bottom-nav {
    display: flex;
    justify-content: space-around;
    align-items: center;
    background-color: #1f1f23;
    border-top: 1px solid #2a2a2e;
    padding: 6px 0 env(safe-area-inset-bottom, 8px) 0;
    flex-shrink: 0;
    z-index: 10;
}
.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 4px 12px;
    cursor: pointer;
    color: #adadb8;
    transition: color 0.2s ease;
    position: relative;
    min-width: 56px;
}
.nav-item i {
    font-size: 22px;
    margin-bottom: 2px;
}
.nav-item span {
    font-size: 11px;
    font-weight: 500;
}
.nav-item.active {
    color: #a970ff;
}
.nav-item.active i {
    text-shadow: 0 0 8px rgba(169, 112, 255, 0.3);
}

/* 通用卡片 */
.section-title {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 12px;
    color: #efeff1;
    display: flex;
    align-items: center;
    gap: 8px;
}
.live-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}
.live-card {
    background: #1f1f23;
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.15s;
    cursor: pointer;
}
.live-card:active {
    transform: scale(0.97);
}
.thumb {
    width: 100%;
    aspect-ratio: 16 / 9;
    background: linear-gradient(135deg, #2d2d33, #16161a);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}
.thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.thumb .tag {
    position: absolute;
    bottom: 6px;
    left: 6px;
    background: rgba(0,0,0,0.7);
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 11px;
    color: #fff;
    backdrop-filter: blur(2px);
}
.thumb .viewers {
    position: absolute;
    bottom: 6px;
    right: 6px;
    background: rgba(0,0,0,0.6);
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 11px;
    color: #ff6b6b;
}
.card-info {
    padding: 8px 6px;
}
.card-info .name {
    font-weight: 600;
    font-size: 14px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.card-info .desc {
    font-size: 12px;
    color: #adadb8;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* 列表项 */
.list-item {
    display: flex;
    align-items: center;
    background: #1f1f23;
    border-radius: 12px;
    padding: 12px;
    margin-bottom: 10px;
    transition: background 0.15s;
    cursor: pointer;
}
.list-item:active {
    background: #2a2a2e;
}
.avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: #3a3a3d;
    margin-right: 12px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: #adadb8;
    overflow: hidden;
}
.list-content {
    flex: 1;
    min-width: 0;
}
.list-content .title {
    font-weight: 600;
    font-size: 15px;
}
.list-content .sub {
    font-size: 13px;
    color: #adadb8;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.list-content .badge {
    background: #a970ff;
    color: #fff;
    font-size: 11px;
    padding: 1px 8px;
    border-radius: 10px;
    margin-left: 6px;
}

/* 个人中心 */
.profile-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px 0 16px 0;
    background: #1f1f23;
    border-radius: 16px;
    margin-bottom: 16px;
}
.profile-header .big-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: #3a3a3d;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 36px;
    color: #adadb8;
}
.profile-header .username {
    font-size: 20px;
    font-weight: 700;
}
.profile-header .bio {
    color: #adadb8;
    font-size: 14px;
}
.stats {
    display: flex;
    gap: 24px;
    margin-top: 10px;
}
.stats span {
    font-size: 14px;
    color: #adadb8;
}
.stats strong {
    color: #efeff1;
    margin-right: 4px;
}
.menu-item {
    display: flex;
    align-items: center;
    padding: 14px 12px;
    background: #1f1f23;
    border-radius: 12px;
    margin-bottom: 8px;
    cursor: pointer;
    transition: background 0.15s;
}
.menu-item:active {
    background: #2a2a2e;
}
.menu-item i:first-child {
    width: 24px;
    color: #a970ff;
    margin-right: 14px;
}
.menu-item .arrow {
    margin-left: auto;
    color: #3a3a3d;
}

/* ===== 直播页专用样式（轮播/分类） ===== */
.carousel-wrapper {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    margin-bottom: 16px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.5);
}
.carousel-item {
    height: 140px;
    padding: 20px;
    display: flex;
    align-items: flex-end;
}
.carousel-text {
    color: #fff;
}
.carousel-text .badge-live {
    background: #ff4757;
    padding: 2px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    display: inline-block;
    margin-bottom: 6px;
}
.carousel-text h3 {
    font-size: 20px;
    margin-bottom: 4px;
}
.carousel-text p {
    font-size: 13px;
    opacity: 0.8;
    margin: 0;
}
.carousel-indicators {
    position: absolute;
    bottom: 10px;
    right: 16px;
    display: flex;
    gap: 6px;
}
.carousel-indicators .dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255,255,255,0.4);
    transition: 0.3s;
}
.carousel-indicators .dot.active {
    background: #fff;
    width: 20px;
    border-radius: 4px;
}
.category-scroll {
    display: flex;
    gap: 16px;
    overflow-x: auto;
    padding: 4px 0 16px 0;
    scrollbar-width: none;
}
.category-scroll::-webkit-scrollbar {
    display: none;
}
.category-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 56px;
    color: #adadb8;
    cursor: pointer;
    transition: 0.2s;
}
.category-item i {
    font-size: 24px;
    margin-bottom: 4px;
}
.category-item span {
    font-size: 12px;
}
.category-item.active {
    color: #fff;
}
.category-item.active i {
    transform: scale(1.1);
}
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 8px 0 12px 0;
}
.section-title-text {
    font-size: 18px;
    font-weight: 700;
    color: #efeff1;
}
.section-more {
    font-size: 13px;
    color: #adadb8;
    cursor: pointer;
}
.section-more:hover {
    color: #a970ff;
}
.avatar-float {
    position: absolute;
    top: 8px;
    left: 8px;
    font-size: 22px;
    background: rgba(0,0,0,0.5);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(4px);
    border: 1px solid rgba(255,255,255,0.1);
}
.load-more {
    text-align: center;
    padding: 20px 0 10px 0;
    color: #3a3a3d;
    font-size: 14px;
}
.load-more i {
    margin-right: 6px;
}

/* ===== 直播播放页（沉浸式） ===== */
.player-container {
    display: flex;
    flex-direction: column;
    height: 100%;
    background: #0e0e10;
    margin: -12px -16px;
    padding: 0;
    overflow: hidden;
}

/* 顶部栏 */
.player-header {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    background: rgba(30, 30, 35, 0.9);
    backdrop-filter: blur(10px);
    z-index: 20;
    flex-shrink: 0;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}
.player-back {
    color: #fff;
    font-size: 22px;
    cursor: pointer;
    padding-right: 16px;
}
.host-info-wrap {
    display: flex;
    align-items: center;
    flex: 1;
}
.host-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    margin-right: 12px;
    border: 2px solid #a970ff;
}
.host-detail {
    display: flex;
    flex-direction: column;
}
.host-name {
    font-weight: 700;
    font-size: 16px;
    color: #fff;
    line-height: 1.2;
}
.host-game {
    font-size: 12px;
    color: #adadb8;
    display: flex;
    align-items: center;
    gap: 6px;
}
.btn-follow {
    background: #a970ff;
    color: #fff;
    border: none;
    padding: 6px 16px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 13px;
    cursor: pointer;
    transition: 0.2s;
    flex-shrink: 0;
}
.btn-follow:active {
    transform: scale(0.95);
    opacity: 0.8;
}

/* 视频区域 */
.player-video {
    flex: 1;
    min-height: 200px;
    background: #000;
    position: relative;
}
.video-backdrop {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}
.video-center-logo {
    font-size: 72px;
    color: rgba(255,255,255,0.2);
    text-shadow: 0 0 40px rgba(169, 112, 255, 0.3);
    animation: pulse 2s infinite ease-in-out;
}
@keyframes pulse {
    0% { transform: scale(1); opacity: 0.6; }
    50% { transform: scale(1.05); opacity: 1; }
    100% { transform: scale(1); opacity: 0.6; }
}
.live-status {
    position: absolute;
    top: 16px;
    left: 16px;
    display: flex;
    gap: 12px;
    align-items: center;
}
.live-badge {
    background: #ff4757;
    color: #fff;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 1px;
}
.viewer-count {
    background: rgba(0,0,0,0.6);
    color: #fff;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    backdrop-filter: blur(4px);
}
.video-caption {
    position: absolute;
    bottom: 16px;
    left: 16px;
    right: 16px;
    background: rgba(0,0,0,0.4);
    padding: 8px 14px;
    border-radius: 20px;
    color: #fff;
    font-size: 14px;
    backdrop-filter: blur(4px);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* 互动操作栏 */
.player-actions {
    display: flex;
    justify-content: space-around;
    padding: 12px 16px;
    background: #1a1a1e;
    border-bottom: 1px solid #2a2a2e;
    flex-shrink: 0;
}
.action-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    color: #adadb8;
    cursor: pointer;
    transition: 0.2s;
    font-size: 12px;
}
.action-btn i {
    font-size: 24px;
    margin-bottom: 2px;
}
.action-btn:active {
    color: #a970ff;
    transform: scale(0.9);
}

/* 聊天区域 */
.chat-area {
    flex: 1;
    overflow-y: auto;
    padding: 12px 16px;
    background: #0e0e10;
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 160px;
}
.chat-msg {
    display: flex;
    gap: 8px;
    font-size: 14px;
    color: #efeff1;
    animation: fadeIn 0.3s ease;
}
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}
.chat-user {
    color: #a970ff;
    font-weight: 600;
    flex-shrink: 0;
}
.chat-text {
    color: #d4d4d8;
    word-break: break-word;
}

/* 底部输入栏 */
.chat-input-wrap {
    display: flex;
    align-items: center;
    padding: 10px 16px;
    background: #1a1a1e;
    border-top: 1px solid #2a2a2e;
    gap: 12px;
    flex-shrink: 0;
}
.chat-input {
    flex: 1;
    background: #2a2a2e;
    border: none;
    border-radius: 24px;
    padding: 10px 16px;
    color: #efeff1;
    font-size: 14px;
    outline: none;
}
.chat-input::placeholder {
    color: #5a5a5e;
}
.chat-send-btn {
    background: #a970ff;
    color: #fff;
    border: none;
    padding: 8px 20px;
    border-radius: 24px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: 0.2s;
}
.chat-send-btn:active {
    transform: scale(0.95);
    opacity: 0.8;
}

/* 错误占位 */
.error-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 60vh;
    color: #adadb8;
}
.error-placeholder i {
    font-size: 48px;
    margin-bottom: 16px;
    color: #3a3a3d;
}
