/* Home Page Styles */

/* Hero Slider */
.hero-slider {
    position: relative;
    width: 100%;
    overflow: hidden;
    background-color: #f8f9fa;
}

.slider-container {
    position: relative;
    width: 100%;
    height: 600px;
}

.slider-track {
    display: flex;
    height: 100%;
    transition: transform 0.5s ease-in-out;
}

.slide {
    min-width: 100%;
    height: 100%;
    position: relative;
    display: none;
}

.slide.active {
    display: block;
}

/* 轮播图链接包裹器 */
.slide-link {
    display: block;
    width: 100%;
    height: 100%;
    position: relative;
    text-decoration: none;
    color: inherit;
    cursor: pointer;
}

.slide-link:hover .slide-content .btn {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(255, 99, 71, 0.4);
}

.slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.slide-content {
    position: absolute;
    top: 50%;
    left: 10%;
    transform: translateY(-50%);
    color: #fff;
    max-width: 600px;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.slide-content h2 {
    font-size: 56px;
    font-weight: 700;
    margin-bottom: 20px;
    line-height: 1.2;
}

.slide-content p {
    font-size: 24px;
    margin-bottom: 30px;
    opacity: 0.95;
}

.slide-content .btn {
    display: inline-block;
    transition: all 0.3s ease;
}

.slider-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(255, 255, 255, 0.9);
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    font-size: 30px;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #333;
}

.slider-btn:hover {
    background-color: #fff;
    transform: translateY(-50%) scale(1.1);
}

.slider-btn.prev {
    left: 20px;
}

.slider-btn.next {
    right: 20px;
}

.slider-dots {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 10;
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: all 0.3s ease;
}

.dot.active {
    background-color: #fff;
    width: 30px;
    border-radius: 6px;
}

/* Live Stream Banner */
.live-stream-banner {
    padding: 40px 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-bottom: 1px solid var(--border-color);
}

.live-banner-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 30px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 30px 40px;
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.live-banner-icon {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-shrink: 0;
}

.live-banner-icon svg {
    width: 60px;
    height: 60px;
    color: #fff;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.8;
        transform: scale(1.05);
    }
}

.live-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background-color: rgba(255, 255, 255, 0.95);
    color: #e91e63;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 700;
    animation: blink 1.5s infinite;
}

@keyframes blink {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
}

.live-banner-text {
    flex: 1;
    color: #fff;
}

.live-banner-text h3 {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 8px;
    color: #fff;
}

.live-banner-text p {
    font-size: 16px;
    opacity: 0.95;
    line-height: 1.5;
}

.btn-live {
    background-color: #fff;
    color: #667eea;
    padding: 16px 40px;
    font-size: 16px;
    font-weight: 700;
    border-radius: 30px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    flex-shrink: 0;
}

.btn-live:hover {
    background-color: #fff;
    color: #764ba2;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

/* Features Section */
.features {
    padding: 60px 0;
    background-color: #fff;
    border-bottom: 1px solid var(--border-color);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
}

.feature-item {
    text-align: center;
    padding: 20px;
}

.feature-icon {
    font-size: 48px;
    margin-bottom: 20px;
}

.feature-item h3 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 10px;
    color: var(--text-color);
}

.feature-item p {
    font-size: 14px;
    color: var(--text-light);
}

/* Bestsellers Section */
.bestsellers {
    padding: 80px 0;
    background-color: var(--bg-gray);
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
}

.section-title {
    font-size: 32px;
    font-weight: 700;
    color: var(--text-color);
}

.view-all {
    font-size: 16px;
    color: var(--primary-color);
    font-weight: 600;
    transition: all 0.3s ease;
}

.view-all:hover {
    transform: translateX(5px);
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
}

/* Categories Section */
.categories-section {
    padding: 80px 0;
    background-color: #fff;
}

.categories-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-top: 40px;
}

.category-large-card {
    position: relative;
    overflow: hidden;
    border-radius: 12px;
    aspect-ratio: 3/2;
    cursor: pointer;
    transition: all 0.3s ease;
}

.category-large-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.15);
}

.category-large-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.category-large-card:hover img {
    transform: scale(1.05);
}

.category-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.7), transparent);
    padding: 30px 20px;
}

.category-overlay h3 {
    color: #fff;
    font-size: 24px;
    font-weight: 700;
    text-transform: uppercase;
}

/* Promotional Banner */
.promo-banner-section {
    padding: 40px 0;
    background-color: var(--bg-gray);
}

.promo-banner-large {
    border-radius: 12px;
    overflow: hidden;
}

.promo-banner-large img {
    width: 100%;
    display: block;
}

/* Age Categories */
.age-categories {
    padding: 80px 0;
    background-color: #fff;
}

.age-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
    margin-top: 40px;
}

.age-card {
    text-align: center;
    transition: all 0.3s ease;
    padding: 20px;
    border-radius: 12px;
}

.age-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

.age-card img {
    width: 100%;
    border-radius: 50%;
    margin-bottom: 20px;
    transition: transform 0.3s ease;
}

.age-card:hover img {
    transform: rotate(5deg) scale(1.05);
}

.age-card h3 {
    font-size: 20px;
    font-weight: 600;
    color: var(--text-color);
}

/* Reviews Section */
.reviews-section {
    padding: 80px 0;
    background-color: var(--bg-gray);
}

.reviews-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-top: 40px;
}

.review-card {
    background-color: #fff;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    transition: all 0.3s ease;
}

.review-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

.review-rating {
    color: #ffd43b;
    font-size: 18px;
    margin-bottom: 15px;
}

.review-text {
    font-size: 14px;
    line-height: 1.6;
    color: var(--text-color);
    margin-bottom: 20px;
}

.review-product {
    font-size: 13px;
    color: var(--text-light);
    font-style: italic;
    margin-bottom: 10px;
}

.review-author {
    display: flex;
    align-items: center;
    gap: 10px;
}

.review-author-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-color);
}

.review-date {
    font-size: 12px;
    color: var(--text-light);
}

/* 评论图片 */
.review-images {
    display: flex;
    gap: 10px;
    margin: 15px 0;
}

.review-images img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 8px;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.review-images img:hover {
    transform: scale(1.05);
}

/* 暂无评价 */
.no-reviews {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-light);
}

.no-reviews p {
    font-size: 16px;
}

/* 评论空状态 */
.empty-reviews-state {
    grid-column: 1 / -1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 80px 20px;
    min-height: 400px;
    text-align: center;
}

.empty-reviews-state .empty-icon {
    margin-bottom: 24px;
    animation: fadeInUp 0.6s ease-out;
}

.empty-reviews-state .empty-icon svg {
    filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.08));
}

.empty-reviews-state .empty-title {
    font-size: 24px;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 12px;
    animation: fadeInUp 0.6s ease-out 0.1s backwards;
}

.empty-reviews-state .empty-desc {
    font-size: 15px;
    color: var(--text-light);
    margin-bottom: 32px;
    max-width: 400px;
    line-height: 1.6;
    animation: fadeInUp 0.6s ease-out 0.2s backwards;
}

.empty-reviews-state .empty-btn {
    padding: 12px 32px;
    font-size: 15px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(255, 99, 71, 0.2);
    animation: fadeInUp 0.6s ease-out 0.3s backwards;
    transition: all 0.3s ease;
}

.empty-reviews-state .empty-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(255, 99, 71, 0.3);
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Instagram Section */
.instagram-section {
    padding: 80px 0;
    background-color: #fff;
}

.instagram-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 15px;
    margin-top: 40px;
}

.instagram-item {
    aspect-ratio: 1;
    overflow: hidden;
    border-radius: 8px;
    position: relative;
    transition: all 0.3s ease;
}

.instagram-item:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
    z-index: 10;
}

.instagram-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Product Card (reused from product-list.css) */
.product-card {
    background-color: #fff;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
}

.product-card:hover {
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.12);
    transform: translateY(-8px);
    border-color: var(--primary-color);
}

.product-image {
    position: relative;
    width: 100%;
    padding-top: 100%;
    background-color: var(--bg-gray);
    overflow: hidden;
}

.product-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.product-card:hover .product-image img {
    transform: scale(1.05);
}

.product-badges {
    position: absolute;
    top: 12px;
    left: 12px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    z-index: 10;
}

.product-badges .badge {
    padding: 5px 10px;
    font-size: 12px;
    font-weight: 700;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
}

.product-info {
    padding: 20px;
}

.product-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 10px;
    color: var(--text-color);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.4;
    min-height: 44px;
}

.product-rating {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    font-size: 13px;
}

.stars {
    color: #ffd43b;
}

.review-count {
    color: var(--text-light);
}

.product-price {
    display: flex;
    align-items: baseline;
    gap: 10px;
    margin-bottom: 15px;
}

.price-current {
    font-size: 24px;
    font-weight: 700;
    color: var(--primary-color);
}

.price-original {
    font-size: 16px;
    color: var(--text-light);
    text-decoration: line-through;
}

.price-discount {
    font-size: 13px;
    color: var(--success-color);
    font-weight: 600;
}

.product-actions {
    display: flex;
    gap: 10px;
}

.product-actions .btn {
    flex: 1;
    padding: 10px;
    font-size: 14px;
}

.btn-quick-view {
    background-color: var(--bg-gray);
    color: var(--text-color);
}

.btn-quick-view:hover {
    background-color: var(--secondary-color);
    color: #fff;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .product-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .categories-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 992px) {
    .slider-container {
        height: 400px;
    }
    
    .slide-content h2 {
        font-size: 40px;
    }
    
    .slide-content p {
        font-size: 18px;
    }
    
    .live-banner-content {
        flex-direction: column;
        text-align: center;
        padding: 25px 30px;
    }
    
    .live-banner-icon {
        flex-direction: column;
        gap: 15px;
    }
    
    .live-banner-text h3 {
        font-size: 24px;
    }
    
    .live-banner-text p {
        font-size: 14px;
    }
    
    .features-grid {
        grid-template-columns: repeat(1, 1fr);
        gap: 30px;
    }
    
    .product-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .age-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .reviews-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .slider-container {
        height: 300px;
    }
    
    .slide-content {
        left: 5%;
        max-width: 90%;
    }
    
    .slide-content h2 {
        font-size: 28px;
    }
    
    .slide-content p {
        font-size: 14px;
    }
    
    .slider-btn {
        width: 40px;
        height: 40px;
        font-size: 24px;
    }
    
    .section-title {
        font-size: 24px;
    }
    
    .product-grid,
    .categories-grid,
    .age-grid,
    .reviews-grid {
        grid-template-columns: 1fr;
    }
    
    .instagram-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 480px) {
    .instagram-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Live Float Button */
.live-float-btn {
    position: fixed;
    bottom: 120px;
    right: 20px;
    width: 180px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    cursor: pointer;
    z-index: 999;
    overflow: hidden;
    transition: all 0.3s ease;
}

.live-float-btn:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.25);
}

.live-float-preview {
    position: relative;
    width: 100%;
    height: 240px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    overflow: hidden;
}

.live-float-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.live-float-badge-top {
    position: absolute;
    top: 10px;
    left: 10px;
    display: flex;
    align-items: center;
    gap: 5px;
    background: linear-gradient(135deg, rgba(255, 76, 76, 0.95), rgba(255, 26, 26, 0.95));
    padding: 5px 10px;
    border-radius: 15px;
    font-size: 12px;
    color: #fff;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.live-icon-img {
    width: 16px;
    height: 16px;
    animation: pulse-icon 2s infinite;
}

@keyframes pulse-icon {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
}

.live-viewers {
    font-size: 11px;
    letter-spacing: 0.5px;
}

.live-float-title {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
    padding: 30px 12px 12px;
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    text-align: center;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}

.live-float-info {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px;
    background: #fff;
}

.live-float-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #e91e63, #f06292);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(233, 30, 99, 0.3);
}

.live-float-text {
    flex: 1;
    overflow: hidden;
}

.live-float-name {
    font-size: 13px;
    font-weight: 700;
    color: #333;
    margin-bottom: 3px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.live-float-desc {
    font-size: 11px;
    color: #999;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Live Modal */
.live-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    z-index: 9999;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.live-modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.live-modal-content {
    position: relative;
    width: 90%;
    max-width: 1400px;
    height: 85vh;
    background-color: #fff;
    border-radius: 16px;
    overflow: hidden;
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from {
        transform: translateY(50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.live-modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 40px;
    height: 40px;
    background-color: rgba(0, 0, 0, 0.5);
    color: #fff;
    border: none;
    border-radius: 50%;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
    z-index: 10;
    transition: all 0.3s ease;
}

.live-modal-close:hover {
    background-color: rgba(0, 0, 0, 0.8);
    transform: rotate(90deg);
}

.live-modal-body {
    display: grid;
    grid-template-columns: 1fr 400px;
    height: 100%;
    gap: 0;
}

/* Live Video Section in Modal */
.live-modal .live-video-section {
    background-color: #000;
    display: flex;
    flex-direction: column;
}

.live-modal .live-video-container {
    position: relative;
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #000;
}

.live-video-player {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.live-modal .live-indicator {
    position: absolute;
    top: 20px;
    left: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
    background-color: rgba(255, 255, 255, 0.95);
    color: #e91e63;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 700;
    z-index: 10;
}

.live-modal .video-stats {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    gap: 20px;
    padding: 15px 20px;
    background-color: rgba(0, 0, 0, 0.9);
    color: #fff;
}

.live-modal .stat-item {
    display: flex;
    align-items: center;
    gap: 6px;
}

.live-modal .stat-icon-img {
    width: 16px;
    height: 16px;
    filter: brightness(0) invert(1);
}

.live-modal .stat-icon-svg {
    color: rgba(255, 255, 255, 0.8);
}

.live-modal .stat-value {
    font-size: 14px;
    font-weight: 600;
    color: #fff;
}

.btn-like {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: linear-gradient(135deg, #ff6b6b, #ee5a6f);
    border: none;
    border-radius: 20px;
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-like:hover {
    background: linear-gradient(135deg, #ff5252, #e63946);
    transform: scale(1.05);
}

.btn-like.liked {
    background: linear-gradient(135deg, #ff4757, #ff6348);
    animation: likeAnimation 0.5s ease;
}

@keyframes likeAnimation {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.2);
    }
}

.btn-like svg {
    width: 18px;
    height: 18px;
}

/* Danmaku (Bullet Screen) */
.danmaku-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    overflow: hidden;
    z-index: 5;
}

.danmaku-item {
    position: absolute;
    white-space: nowrap;
    font-size: 18px;
    font-weight: 600;
    color: #fff;
    text-shadow: 0 0 4px rgba(0, 0, 0, 0.8), 
                 0 0 8px rgba(0, 0, 0, 0.6),
                 1px 1px 2px rgba(0, 0, 0, 1);
    animation: danmaku-scroll linear;
    padding: 4px 8px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 4px;
}

@keyframes danmaku-scroll {
    from {
        transform: translateX(0);
    }
    to {
        transform: translateX(-100%);
    }
}

/* Like Animation */
@keyframes likeFloat {
    0% {
        opacity: 1;
        transform: translateY(0) rotate(0deg);
    }
    100% {
        opacity: 0;
        transform: translateY(-200px) rotate(20deg);
    }
}

/* Live Sidebar in Modal */
.live-modal .live-sidebar {
    display: flex;
    flex-direction: column;
    background-color: #fff;
    border-left: 1px solid var(--border-color);
}

.live-modal .sidebar-tabs {
    display: flex;
    border-bottom: 2px solid var(--border-color);
    background-color: #fff;
}

.live-modal .tab-btn {
    flex: 1;
    padding: 15px;
    background-color: transparent;
    border: none;
    font-size: 15px;
    font-weight: 600;
    color: var(--text-light);
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.live-modal .tab-btn:hover {
    color: var(--primary-color);
    background-color: var(--bg-gray);
}

.live-modal .tab-btn.active {
    color: var(--primary-color);
}

.live-modal .tab-btn.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 2px;
    background-color: var(--primary-color);
}

.live-modal .tab-content {
    display: none;
    flex: 1;
    overflow: hidden;
}

.live-modal .tab-content.active {
    display: flex;
    flex-direction: column;
}

/* Chat Container in Modal */
.live-modal .chat-container {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.live-modal .chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 15px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.chat-message {
    display: flex;
    flex-direction: column;
    gap: 5px;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.chat-message-header {
    display: flex;
    align-items: center;
    gap: 8px;
}

.chat-username {
    font-size: 13px;
    font-weight: 600;
    color: var(--primary-color);
}

.chat-time {
    font-size: 11px;
    color: var(--text-light);
}

.chat-text {
    font-size: 14px;
    line-height: 1.5;
    color: var(--text-color);
    padding: 10px 12px;
    background-color: var(--bg-gray);
    border-radius: 8px;
    word-break: break-word;
}

.chat-message.system .chat-text {
    background-color: #e3f2fd;
    color: #1976d2;
    text-align: center;
}

.live-modal .chat-input-container {
    display: flex;
    gap: 10px;
    padding: 15px;
    background-color: #fff;
    border-top: 1px solid var(--border-color);
    align-items: center;
}

.danmaku-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    flex-shrink: 0;
    -webkit-user-select: none;
    user-select: none;
    position: relative;
}

.danmaku-toggle input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: relative;
    width: 40px;
    height: 22px;
    background-color: #ccc;
    border-radius: 22px;
    transition: background-color 0.3s ease;
}

.toggle-slider::before {
    content: '';
    position: absolute;
    width: 18px;
    height: 18px;
    left: 2px;
    top: 2px;
    background-color: #fff;
    border-radius: 50%;
    transition: transform 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.danmaku-toggle input[type="checkbox"]:checked + .toggle-slider {
    background-color: var(--primary-color);
}

.danmaku-toggle input[type="checkbox"]:checked + .toggle-slider::before {
    transform: translateX(18px);
}

.toggle-label {
    font-size: 13px;
    color: var(--text-color);
    font-weight: 500;
}

.live-modal .chat-input-container input {
    flex: 1;
    padding: 12px 15px;
    border: 1px solid var(--border-color);
    border-radius: 25px;
    font-size: 14px;
    transition: all 0.3s ease;
}

.live-modal .chat-input-container input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.btn-send {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background-color: var(--primary-color);
    border: none;
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.btn-send:hover {
    background-color: var(--primary-dark);
    transform: scale(1.05);
}

.btn-send:active {
    transform: scale(0.95);
}

/* Live Products in Modal */
.live-modal .live-products {
    overflow-y: auto;
    padding: 15px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    height: 100%;
}

.live-product-item {
    display: flex;
    gap: 12px;
    padding: 12px;
    background-color: #fff;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.live-product-item:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border-color: var(--primary-color);
}

.live-product-image {
    width: 80px;
    height: 80px;
    flex-shrink: 0;
    border-radius: 8px;
    overflow: hidden;
    background-color: var(--bg-gray);
}

.live-product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.live-product-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.live-product-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-color);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.4;
}

.live-product-price {
    display: flex;
    align-items: baseline;
    gap: 8px;
    margin-top: 5px;
}

.live-product-current-price {
    font-size: 16px;
    font-weight: 700;
    color: var(--primary-color);
}

.live-product-original-price {
    font-size: 12px;
    color: var(--text-light);
    text-decoration: line-through;
}

.live-product-btn {
    padding: 6px 12px;
    font-size: 12px;
    background-color: var(--primary-color);
    color: #fff;
    border: none;
    border-radius: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    align-self: flex-start;
    margin-top: 5px;
}

.live-product-btn:hover {
    background-color: var(--primary-dark);
}

/* Scrollbar Styling */
.live-modal .chat-messages::-webkit-scrollbar,
.live-modal .live-products::-webkit-scrollbar {
    width: 6px;
}

.live-modal .chat-messages::-webkit-scrollbar-track,
.live-modal .live-products::-webkit-scrollbar-track {
    background: var(--bg-gray);
}

.live-modal .chat-messages::-webkit-scrollbar-thumb,
.live-modal .live-products::-webkit-scrollbar-thumb {
    background: var(--text-light);
    border-radius: 3px;
}

.live-modal .chat-messages::-webkit-scrollbar-thumb:hover,
.live-modal .live-products::-webkit-scrollbar-thumb:hover {
    background: var(--primary-color);
}

/* Responsive Design for Live Modal */
@media (max-width: 1200px) {
    .live-modal-body {
        grid-template-columns: 1fr 350px;
    }
}

@media (max-width: 992px) {
    .live-modal-content {
        width: 95%;
        height: 90vh;
    }
    
    .live-modal-body {
        grid-template-columns: 1fr;
        grid-template-rows: 1fr auto;
    }
    
    .live-modal .live-sidebar {
        border-left: none;
        border-top: 1px solid var(--border-color);
        max-height: 300px;
    }
}

@media (max-width: 768px) {
    .live-float-btn {
        width: 150px;
        bottom: 100px;
        right: 15px;
    }
    
    .live-float-preview {
        height: 200px;
    }
    
    .live-float-badge-top {
        font-size: 11px;
        padding: 4px 8px;
    }
    
    .live-float-title {
        font-size: 13px;
    }
    
    .live-float-avatar {
        width: 36px;
        height: 36px;
    }
    
    .live-float-name {
        font-size: 12px;
    }
    
    .live-float-desc {
        font-size: 10px;
    }
    
    .live-modal-content {
        width: 100%;
        height: 100vh;
        border-radius: 0;
    }
    
    .live-modal .live-sidebar {
        max-height: 250px;
    }
}

@media (max-width: 480px) {
    .live-float-btn {
        width: 130px;
        bottom: 80px;
        right: 10px;
    }
    
    .live-float-preview {
        height: 170px;
    }
    
    .live-float-badge-top {
        font-size: 10px;
        padding: 3px 6px;
    }
    
    .live-icon-img {
        width: 14px;
        height: 14px;
    }
    
    .live-viewers {
        font-size: 10px;
    }
    
    .live-float-title {
        font-size: 12px;
        padding: 20px 10px 10px;
    }
    
    .live-float-info {
        padding: 10px;
        gap: 8px;
    }
    
    .live-float-avatar {
        width: 32px;
        height: 32px;
    }
    
    .live-float-avatar svg {
        width: 20px;
        height: 20px;
    }
    
    .live-float-name {
        font-size: 11px;
    }
    
    .live-float-desc {
        font-size: 9px;
    }
}
