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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background-color: #000;
    color: #fff;
    overflow: hidden;
}

/* 微信直播间样式 */
.wechat-live {
    width: 100vw;
    height: 100vh;
    display: flex;
    flex-direction: column;
    background-color: #000;
    position: relative;
}

/* 顶部导航栏 */
.top-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 20px;
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(10px);
    z-index: 100;
}

.nav-btn {
    width: 40px;
    height: 40px;
    background: none;
    border: none;
    color: #fff;
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background-color 0.3s ease;
}

.nav-btn:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

/* 全屏按钮样式 */
.fullscreen-btn {
    font-size: 22px;
}

/* 全屏模式下的样式 */
.live-room.fullscreen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 9999;
}

/* 全屏模式下的顶部导航栏 */
.live-room.fullscreen .top-nav {
    background-color: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(10px);
}

/* 全屏模式下的底部控制栏 */
.live-room.fullscreen .bottom-controls {
    background-color: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(10px);
}

.nav-title {
    color: #fff;
    font-size: 18px;
    font-weight: 600;
    text-align: center;
    flex: 1;
}

/* 直播间主体区域 */
.room-main {
    flex: 1;
    position: relative;
    overflow: hidden;
}

.video-container {
    width: 100%;
    height: 100%;
    position: relative;
    background-color: #000;
    display: flex;
    align-items: center;
    justify-content: center;
}

#camera {
    width: 100%;
    height: 100%;
    object-fit: contain;
    max-width: 100%;
    max-height: 100%;
}

.curtain {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #f5f5f5 0%, #e0e0e0 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 36px;
    font-weight: 600;
    color: #333;
    z-index: 5;
}

.curtain.hidden {
    display: none;
}

/* 弹幕区域 */
.danmu-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 6;
    overflow: hidden;
}

.danmu {
    position: absolute;
    white-space: nowrap;
    font-size: 20px;
    font-weight: 500;
    color: #fff;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
    animation: danmu-move 8s linear forwards;
    z-index: 6;
    border-radius: 20px;
    padding: 5px 15px;
    background-color: rgba(0, 0, 0, 0.3);
}

/* 链接弹幕样式 */
.link-danmu {
    background-color: rgba(69, 183, 209, 0.4) !important;
    border: 2px solid #45b7d1;
    box-shadow: 0 0 15px rgba(69, 183, 209, 0.6);
}

.link-danmu a {
    color: #45b7d1 !important;
    text-decoration: none;
    font-weight: 700;
    transition: color 0.3s ease;
}

.link-danmu a:hover {
    color: #66c7e0 !important;
    text-decoration: underline;
    pointer-events: all;
}

@keyframes danmu-move {
    from {
        transform: translateX(100vw);
    }
    to {
        transform: translateX(-100%);
    }
}

/* 右上角信息 */
.top-right-info {
    position: absolute;
    top: 80px;
    right: 20px;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 15px;
    z-index: 10;
}

.online-info, .like-info, .fans-info {
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(10px);
    padding: 8px 12px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #fff;
    margin-bottom: 10px;
}

.online-icon, .like-icon, .fans-icon {
    font-size: 16px;
}

/* 左上角主播信息 */
.top-left-info {
    position: absolute;
    top: 80px;
    left: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    z-index: 10;
}

.avatar-container {
    position: relative;
    margin: 0;
}

.avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: 2px solid #fff;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
    object-fit: cover;
    cursor: pointer;
    transition: all 0.3s ease;
}

.avatar:hover {
    transform: scale(1.05);
}

.avatar-upload {
    display: none;
}

.avatar-upload-label {
    position: absolute;
    bottom: -5px;
    right: -5px;
    background-color: #07c160;
    color: white;
    font-size: 10px;
    padding: 3px 6px;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
    white-space: nowrap;
    opacity: 0;
}

.avatar-container:hover .avatar-upload-label {
    opacity: 1;
    transform: translateY(-2px);
}

.host-info {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.host-name {
    font-size: 16px;
    font-weight: 600;
    color: #fff;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
}

.follow-btn {
    background-color: #07c160;
    color: #fff;
    border: none;
    border-radius: 15px;
    padding: 4px 12px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s ease;
    min-width: 60px;
}

.follow-btn.following {
    background-color: rgba(255, 255, 255, 0.3);
}

.follow-btn:hover {
    background-color: #05a650;
}

.follow-btn.following:hover {
    background-color: rgba(255, 255, 255, 0.5);
}

/* 底部控制栏 */
.bottom-controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 20px;
    background-color: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    z-index: 100;
}

.control-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    background: none;
    border: none;
    color: #fff;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    gap: 5px;
}

.control-btn .btn-icon {
    font-size: 28px;
}

.like-btn.active .btn-icon {
    color: #f53d3d;
    animation: like-pulse 0.6s ease;
}

@keyframes like-pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.3); }
    100% { transform: scale(1); }
}

@keyframes like-float {
    0% {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
    100% {
        transform: translateY(-100px) scale(1.5);
        opacity: 0;
    }
}

.input-container {
    flex: 1;
    max-width: 500px;
    margin: 0 20px;
    position: relative;
}

#danmu-input {
    width: 100%;
    height: 40px;
    padding: 0 15px;
    font-size: 14px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 20px;
    background-color: rgba(255, 255, 255, 0.1);
    color: #fff;
    outline: none;
    transition: all 0.3s ease;
}

#danmu-input:focus {
    border-color: #07c160;
    background-color: rgba(255, 255, 255, 0.15);
}

#danmu-input::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

.send-btn {
    position: absolute;
    right: 3px;
    top: 3px;
    height: 34px;
    padding: 0 15px;
    background-color: #07c160;
    border: none;
    border-radius: 17px;
    color: #fff;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.send-btn:hover {
    background-color: #05a650;
}

.more-btn {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.1);
}

.more-btn:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

/* 后台控制面板 */
.admin-controls {
    display: none;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: rgba(0, 0, 0, 0.95);
    padding: 20px;
    border-radius: 12px;
    z-index: 200;
    max-height: 80vh;
    overflow-y: auto;
    min-width: 400px;
}

.admin-controls.visible {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.admin-controls .control-btn {
    width: 80px;
    height: 70px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
}

/* 产品链接管理样式 */
.product-link-controls {
    display: flex;
    flex-direction: column;
    gap: 15px;
    width: 100%;
}

.control-title {
    color: #fff;
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 5px;
}

.product-input-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.product-input {
    padding: 10px 15px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    background-color: rgba(255, 255, 255, 0.1);
    color: #fff;
    font-size: 14px;
    outline: none;
    transition: all 0.3s ease;
}

.product-input:focus {
    border-color: #07c160;
    background-color: rgba(255, 255, 255, 0.15);
}

.product-input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

/* 产品描述输入框样式 */
.product-description {
    resize: vertical;
    min-height: 80px;
}

/* 产品列表中的价格和描述样式 */
.product-item-price {
    color: #07c160;
    font-size: 14px;
    font-weight: 600;
    margin: 3px 0;
}

.product-item-description {
    color: rgba(255, 255, 255, 0.8);
    font-size: 12px;
    line-height: 1.4;
    margin: 3px 0;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

/* 产品列表中的图片样式 */
.product-item-image {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 8px;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.add-product-btn {
    align-self: flex-start;
    width: auto;
    padding: 8px 20px;
    background-color: #07c160;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.add-product-btn:hover {
    background-color: #05a650;
    transform: translateY(-1px);
}

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

.product-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 15px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.product-item-info {
    flex: 1;
}

.product-item-name {
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 3px;
}

.product-item-link {
    color: #07c160;
    font-size: 12px;
    text-decoration: none;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    display: block;
}

.product-item-link:hover {
    text-decoration: underline;
}

.remove-product-btn {
    background-color: rgba(245, 61, 61, 0.8);
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.remove-product-btn:hover {
    background-color: #f53d3d;
}

/* 产品卡片展示区域 */
.product-cards-container {
    position: fixed;
    bottom: 120px;
    left: 20px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    z-index: 100;
    max-width: 280px;
}

.product-card {
    background-color: rgba(255, 255, 255, 0.95);
    border-radius: 12px;
    padding: 15px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid #fff;
}

.product-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(0, 0, 0, 0.4);
}

.product-card-name {
    color: #333;
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 8px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* 产品卡片中的价格和描述样式 */
.product-card-price {
    color: #e63946;
    font-size: 18px;
    font-weight: 700;
    margin: 5px 0;
}

.product-card-description {
    color: #666;
    font-size: 14px;
    line-height: 1.5;
    margin: 5px 0 10px;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

/* 产品卡片中的图片样式 */
.product-card-image {
    width: 100%;
    height: 180px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 10px;
    border: 2px solid #f0f0f0;
    transition: transform 0.3s ease;
}

.product-card:hover .product-card-image {
    transform: scale(1.02);
}

.product-card-link {
    color: #07c160;
    font-size: 14px;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 5px;
}

.product-card-link:hover {
    text-decoration: underline;
}

.product-card-link::after {
    content: '🔗';
    font-size: 12px;
}

/* 链接分享样式 */
.link-share-controls {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    margin-top: 10px;
    width: 100%;
}

.link-input {
    width: 100%;
    height: 40px;
    padding: 0 12px;
    font-size: 14px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    background-color: rgba(255, 255, 255, 0.1);
    color: #fff;
    outline: none;
    transition: all 0.3s ease;
}

.link-input:focus {
    border-color: #07c160;
    background-color: rgba(255, 255, 255, 0.15);
}

.link-input::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

.link-btn {
    width: 100%;
    height: 50px;
    margin-top: 5px;
}

.admin-controls.visible {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

/* 人数设置样式 */
.people-controls {
    display: flex;
    flex-direction: column;
    gap: 15px;
    width: 100%;
}

.people-input-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.people-input-item {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.people-input-item label {
    color: rgba(255, 255, 255, 0.9);
    font-size: 14px;
    font-weight: 500;
    min-width: 80px;
}

.set-count-btn {
    align-self: flex-start;
    width: auto;
    padding: 8px 15px;
    background-color: #07c160;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.set-count-btn:hover {
    background-color: #05a650;
    transform: translateY(-1px);
}

/* 通知样式 */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 12px 20px;
    border-radius: 8px;
    color: white;
    font-weight: 600;
    z-index: 1000;
    animation: slideIn 0.3s ease;
    font-size: 14px;
}

.notification-info {
    background-color: #07c160;
}

.notification-error {
    background-color: #f53d3d;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOut {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

/* 响应式设计 */
@media (max-width: 768px) {
    .nav-title {
        font-size: 16px;
    }
    
    .top-right-info, .top-left-info {
        top: 70px;
        z-index: 10;
    }
    
    .avatar {
        width: 45px;
        height: 45px;
    }
    
    .host-name {
        font-size: 14px;
    }
    
    .follow-btn {
        padding: 3px 10px;
        font-size: 11px;
    }
    
    .danmu {
        font-size: 16px;
        padding: 3px 10px;
        max-width: 80%;
    }
    
    .input-container {
        max-width: none;
        margin: 0 5px;
        flex: 1;
    }
    
    #danmu-input {
        height: 36px;
        font-size: 13px;
    }
    
    .send-btn {
        height: 30px;
        font-size: 13px;
    }
    
    .control-btn {
        width: 50px;
        height: 50px;
        font-size: 11px;
    }
    
    .control-btn .btn-icon {
        font-size: 22px;
    }
    
    /* 移动设备视频优化 */
    .video-container {
        height: calc(100% - 90px); /* 考虑顶部导航和底部控制栏的高度 */
    }
    
    #camera {
        width: 100%;
        height: 100%;
        object-fit: contain;
    }
    
    /* 移动端底部控制栏优化 */
    .bottom-controls {
        padding: 10px 10px;
        gap: 5px;
    }
    
    /* 移动端更多按钮优化 */
    .more-btn {
        width: 45px;
        height: 45px;
    }
    
    /* 移动端产品卡片优化 */
    .product-cards-container {
        max-width: 250px;
        bottom: 100px;
    }
    
    /* 移动端管理面板优化 */
    .admin-controls {
        min-width: 300px;
        padding: 15px;
    }
}

/* 小屏手机优化 */
@media (max-width: 480px) {
    .nav-btn {
        width: 36px;
        height: 36px;
        font-size: 18px;
    }
    
    .top-nav {
        padding: 10px 15px;
    }
    
    .nav-title {
        font-size: 15px;
    }
    
    .top-right-info, .top-left-info {
        top: 60px;
    }
    
    .online-info, .like-info, .fans-info {
        font-size: 13px;
        padding: 6px 10px;
    }
    
    .control-btn {
        width: 45px;
        height: 45px;
    }
    
    .control-btn .btn-icon {
        font-size: 20px;
    }
    
    .btn-text {
        display: none;
    }
    
    /* 小屏手机视频优化 */
    .video-container {
        height: calc(100% - 80px);
    }
}

/* 横屏设备优化 */
@media (orientation: landscape) {
    .video-container {
        height: 100%;
    }
    
    #camera {
        object-fit: contain;
    }
}

/* 竖屏设备优化 */
@media (orientation: portrait) {
    .video-container {
        height: calc(100vh - 130px); /* 减去顶部导航和底部控制栏高度 */
    }
}

/* 移动端全屏按钮优化 */
.fullscreen-btn {
    font-size: 20px;
}