/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Malgun Gothic', 'Apple SD Gothic Neo', sans-serif;
    background: #1a1a1a;
    color: #fff;
    min-height: 100vh;
}

a {
    text-decoration: none;
    color: inherit;
}

/* 顶部导航 */
.top-header {
    background: #0f0f0f;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    border-bottom: 1px solid #2a2a2a;
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-left .logo {
    font-size: 24px;
    font-weight: bold;
    background: linear-gradient(45deg, #ff6b9d, #c44569);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.header-center {
    flex: 1;
    max-width: 400px;
    margin: 0 30px;
}

.search-box {
    display: flex;
    background: #2a2a2a;
    border-radius: 20px;
    overflow: hidden;
}

.search-box input {
    flex: 1;
    background: transparent;
    border: none;
    padding: 8px 15px;
    color: #fff;
    font-size: 14px;
}

.search-box input::placeholder {
    color: #666;
}

.search-btn {
    background: transparent;
    border: none;
    padding: 0 15px;
    cursor: pointer;
    font-size: 16px;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 15px;
}

.header-btn {
    background: #2a2a2a;
    border: none;
    color: #fff;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.2s;
}

.header-btn:hover {
    background: #3a3a3a;
}

.login-btn {
    background: #ff6b9d;
    color: #fff;
    padding: 8px 20px;
    border-radius: 4px;
    font-size: 14px;
    transition: background 0.2s;
}

.login-btn:hover {
    background: #ff5277;
}

.user-menu {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.user-badge {
    background: linear-gradient(45deg, #ffd700, #ffed4e);
    color: #000;
    padding: 2px 8px;
    border-radius: 3px;
    font-size: 12px;
    font-weight: bold;
}

.user-name {
    font-size: 14px;
}

.dropdown-arrow {
    font-size: 10px;
    color: #999;
}

/* 用户下拉菜单 */
.user-menu {
    position: relative;
}

.dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 10px;
    background: #1f1f1f;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.5);
    min-width: 250px;
    z-index: 1000;
    overflow: hidden;
}

.dropdown-menu.show {
    display: block;
}

.dropdown-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 15px;
    background: #2a2a2a;
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #3a3a3a;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.user-info {
    flex: 1;
}

.user-nick {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 3px;
}

.user-id {
    font-size: 12px;
    color: #999;
}

.dropdown-divider {
    height: 1px;
    background: #2a2a2a;
    margin: 0;
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 15px;
    cursor: pointer;
    transition: background 0.2s;
    font-size: 14px;
}

.dropdown-item:hover {
    background: #2a2a2a;
}

.dropdown-item.logout {
    color: #ff6b9d;
}

.dropdown-item.logout:hover {
    background: rgba(255, 107, 157, 0.1);
}

.item-icon {
    font-size: 16px;
}

/* 主容器 */
.main-container {
    display: flex;
    min-height: calc(100vh - 60px);
}

/* 侧边栏 */
.sidebar {
    width: 240px;
    background: #0f0f0f;
    border-right: 1px solid #2a2a2a;
    display: flex;
    flex-direction: column;
}

.sidebar-section {
    padding: 20px 15px;
    border-bottom: 1px solid #2a2a2a;
}

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

.section-header h3 {
    font-size: 14px;
    font-weight: 600;
}

.collapse-btn {
    background: transparent;
    border: none;
    color: #999;
    cursor: pointer;
    font-size: 12px;
}

.channel-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.channel-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px;
    border-radius: 6px;
    transition: background 0.2s;
    min-width: 0;
    overflow: hidden;
}

.channel-item:hover {
    background: #2a2a2a;
}

.channel-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    overflow: hidden;
    background: #3a3a3a;
    display: flex;
    align-items: center;
    justify-content: center;
}

.channel-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.default-avatar {
    font-size: 18px;
}

.channel-info {
    flex: 1;
}

.channel-name {
    font-size: 13px;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.live-badge {
    background: #ff6b9d;
    color: #fff;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 15px;
    font-weight: bold;
}

.no-channels {
    text-align: center;
    color: #666;
    font-size: 13px;
    padding: 20px 0;
}

.more-channels {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 15px;
    padding: 8px;
    background: #2a2a2a;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    color: #fff;
    text-decoration: none;
    transition: background 0.2s;
}

.more-channels:hover {
    background: #3a3a3a;
    color: #fff;
    text-decoration: none;
}

/* 主导航 */
.main-nav {
    padding: 15px;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 15px;
    border-radius: 6px;
    transition: background 0.2s;
    font-size: 14px;
}

.nav-item:hover {
    background: #2a2a2a;
}

.nav-item.active {
    background: #ff6b9d;
}

.nav-icon {
    font-size: 18px;
}

.nav-text {
    font-weight: 500;
    white-space: nowrap;
}

/* 内容区域 */
.content-area {
    flex: 1;
    padding: 30px;
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 30px;
    align-items: start;
}

/* 介绍板块 */
.intro-section {
    background: #1f1f1f;
    border-radius: 12px;
    padding: 30px;
}

.intro-tag {
    display: inline-block;
    background: #2a2a2a;
    color: #ff6b9d;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: bold;
    margin-bottom: 15px;
}

.intro-title {
    font-size: 24px;
    line-height: 1.4;
    margin-bottom: 15px;
}

.intro-desc {
    color: #999;
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 25px;
}

.stats-box {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    margin-bottom: 25px;
}

.stat-item {
    background: #2a2a2a;
    padding: 15px;
    border-radius: 8px;
    text-align: center;
}

.stat-number {
    font-size: 24px;
    font-weight: bold;
    color: #ff6b9d;
    margin-bottom: 5px;
}

.stat-label {
    font-size: 11px;
    color: #999;
}

.intro-buttons {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.btn-primary {
    background: #ff6b9d;
    color: #fff;
    padding: 12px;
    border-radius: 6px;
    text-align: center;
    font-weight: 500;
    transition: background 0.2s;
}

.btn-primary:hover {
    background: #ff5277;
}

.btn-secondary {
    background: #2a2a2a;
    color: #fff;
    padding: 12px;
    border-radius: 6px;
    text-align: center;
    font-weight: 500;
    transition: background 0.2s;
}

.btn-secondary:hover {
    background: #3a3a3a;
}

/* 推荐直播板块 */
.feature-section {
    background: #1f1f1f;
    border-radius: 12px;
    padding: 30px;
}

.feature-header {
    margin-bottom: 20px;
}

.feature-tag {
    display: inline-block;
    background: #2a2a2a;
    color: #ff6b9d;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: bold;
    margin-bottom: 10px;
}

.feature-title {
    font-size: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.stream-count {
    font-size: 14px;
    color: #999;
    font-weight: normal;
}

/* 轮播容器 */
.carousel-container {
    position: relative;
}

.carousel-wrapper {
    overflow: hidden;
}

.live-cards {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
}

.live-card {
    min-width: 260px;
    background: #2a2a2a;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.2s;
}

.live-card:hover {
    transform: translateY(-5px);
}

.card-image {
    position: relative;
    width: 100%;
    height: 340px;
    background: #3a3a3a;
    overflow: hidden;
}

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

.placeholder-img {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 60px;
    color: #666;
}

.card-image .live-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: #ff6b9d;
    color: #fff;
    padding: 10px 18px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: bold;
}

.viewer-count {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(0,0,0,0.8);
    color: #fff;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    height: auto;
    line-height: 1.2;
    white-space: nowrap;
    display: inline-block;
    width: auto;
}

.card-info {
    padding: 12px;
}

.streamer-name {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 5px;
}

.stream-title {
    font-size: 12px;
    color: #999;
    margin-bottom: 8px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.tags {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.tag {
    font-size: 11px;
    color: #ff6b9d;
}

.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.6);
    border: none;
    color: #fff;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 24px;
    cursor: pointer;
    z-index: 10;
    transition: background 0.2s;
}

.carousel-btn:hover {
    background: rgba(0, 0, 0, 0.8);
}

.carousel-btn.prev {
    left: -20px;
}

.carousel-btn.next {
    right: -20px;
}

/* 悬浮聊天按钮 */
.floating-chat-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 56px;
    height: 56px;
    background: #ff6b9d;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(255, 107, 157, 0.4);
    transition: transform 0.2s;
    z-index: 1000;
}

.floating-chat-btn:hover {
    transform: scale(1.1);
}

/* 响应式 */
@media (max-width: 1200px) {
    .content-area {
        grid-template-columns: 1fr;
    }
}

/* 平板适配 */
@media (max-width: 992px) {
    .content-area {
        padding: 20px;
        gap: 20px;
    }
    
    .intro-title {
        font-size: 20px;
    }
    
    .stats-box {
        gap: 10px;
    }
    
    .stat-number {
        font-size: 20px;
    }
}

/* 手机适配 */
@media (max-width: 768px) {
    /* 顶部导航 */
    .top-header {
        height: auto;
        min-height: 50px;
        padding: 8px 15px;
        flex-wrap: wrap;
        gap: 8px;
    }
    
    .header-left .logo {
        font-size: 20px;
    }
    
    .header-center {
        display: block;
        order: 3;
        width: 100%;
        max-width: 100%;
        margin: 0;
    }
    
    .header-right {
        gap: 8px;
    }
    
    .header-btn {
        padding: 6px 10px;
        font-size: 12px;
    }
    
    .login-btn {
        padding: 6px 12px;
        font-size: 12px;
    }
    
    /* 主容器 */
    .main-container {
        flex-direction: column;
    }
    
    /* 侧边栏 - 底部导航 */
    .sidebar {
        width: 100%;
        height: auto;
        border-right: none;
        border-top: 1px solid #2a2a2a;
        position: fixed;
        bottom: 0;
        left: 0;
        z-index: 99;
        background: #0f0f0f;
    }
    
    .sidebar-section {
        display: none;
    }
    
    .main-nav {
        flex-direction: row;
        justify-content: space-around;
        padding: 8px 0;
        gap: 0;
    }
    
    .nav-item {
        flex-direction: column;
        gap: 4px;
        padding: 8px 12px;
        font-size: 11px;
    }
    
    .nav-icon {
        font-size: 20px;
    }
    
    .nav-text {
        font-size: 10px;
    }
    
    /* 内容区域 */
    .content-area {
        padding: 15px;
        padding-bottom: 80px;
        gap: 15px;
    }
    
    /* 介绍板块 */
    .intro-section {
        padding: 20px;
    }
    
    .intro-tag {
        font-size: 11px;
        padding: 3px 10px;
    }
    
    .intro-title {
        font-size: 18px;
        line-height: 1.3;
    }
    
    .intro-desc {
        font-size: 13px;
    }
    
    .stats-box {
        grid-template-columns: repeat(3, 1fr);
        gap: 8px;
        margin-bottom: 20px;
    }
    
    .stat-item {
        padding: 12px 8px;
    }
    
    .stat-number {
        font-size: 18px;
    }
    
    .stat-label {
        font-size: 10px;
    }
    
    .intro-buttons {
        gap: 8px;
    }
    
    .btn-primary,
    .btn-secondary {
        padding: 10px;
        font-size: 13px;
    }
    
    /* 推荐直播板块 */
    .feature-section {
        padding: 20px;
    }
    
    .feature-tag {
        font-size: 11px;
        padding: 3px 10px;
    }
    
    .feature-title {
        font-size: 16px;
    }
    
    .stream-count {
        font-size: 12px;
    }
    
    /* 直播卡片 */
    .live-card {
        min-width: 200px;
    }
    
    .card-image {
        height: 260px;
    }
    
    .card-info {
        padding: 10px;
    }
    
    .streamer-name {
        font-size: 13px;
    }
    
    .stream-title {
        font-size: 11px;
    }
    
    .tag {
        font-size: 10px;
    }
    
    /* 轮播按钮 */
    .carousel-btn {
        width: 32px;
        height: 32px;
        font-size: 18px;
    }
    
    .carousel-btn.prev {
        left: -10px;
    }
    
    .carousel-btn.next {
        right: -10px;
    }
    
    /* 悬浮按钮 */
    .floating-chat-btn {
        bottom: 80px;
        right: 15px;
        width: 48px;
        height: 48px;
        font-size: 20px;
    }
    
    /* 弹窗适配 */
    .live-modal-content {
        width: 95%;
        max-width: 95%;
        margin: 10% auto;
    }
    
    .age-modal-content {
        width: 90%;
        max-width: 90%;
        margin: 20% auto;
    }
    
    /* 下拉菜单 */
    .dropdown-menu {
        min-width: 200px;
        right: -10px;
    }
}

/* 小屏手机 */
@media (max-width: 480px) {
    .top-header {
        height: auto;
        min-height: 45px;
        padding: 8px 10px;
        flex-wrap: wrap;
        gap: 8px;
    }
    
    .header-left .logo {
        font-size: 18px;
    }
    
    .header-center {
        display: block;
        order: 3;
        width: 100%;
        max-width: 100%;
        margin: 0;
    }
    
    .header-btn {
        padding: 5px 10px;
        font-size: 11px;
    }
    
    .login-btn {
        padding: 5px 10px;
        font-size: 11px;
    }
    
    .content-area {
        padding: 10px;
        padding-bottom: 70px;
    }
    
    .intro-section {
        padding: 15px;
    }
    
    .intro-title {
        font-size: 16px;
    }
    
    .stats-box {
        gap: 5px;
    }
    
    .stat-item {
        padding: 10px 5px;
    }
    
    .stat-number {
        font-size: 16px;
    }
    
    .stat-label {
        font-size: 9px;
    }
    
    .feature-section {
        padding: 15px;
    }
    
    .live-card {
        min-width: 160px;
    }
    
    .card-image {
        height: 220px;
    }
    
    .nav-item {
        padding: 6px 8px;
    }
    
    .nav-icon {
        font-size: 18px;
    }
    
    .nav-text {
        font-size: 9px;
    }
    
    .floating-chat-btn {
        bottom: 70px;
        width: 44px;
        height: 44px;
        font-size: 18px;
    }
}
