/* Base Styles */
:root {
    --primary-color: #4285f4
;
    --secondary-color: #4285f4;    --dark-color: #2c3e50;
    --light-color: #f4f4f4;
    --success-color: #28a745;
    --danger-color: #dc3545;
    --box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

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

body {
    font-family: 'Montserrat', sans-serif;
    line-height: 1.4;
    color: var(--dark-color);
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    min-height: 100vh;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
    width: 100%;
}

.page-header {
    margin: 15px 0 20px;
    text-align: center;
}

.page-header h1 {
    font-size: 1.8rem;
    color: var(--primary-color);
    margin-bottom: 5px;
}

.page-header p {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

a {
    text-decoration: none;
    color: var(--dark-color);
    transition: var(--transition);
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
}

/* Button Styles */
.btn {
    display: inline-block;
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-weight: 600;
    transition: var(--transition);
    background: transparent;
    color: var(--dark-color);
}

.btn:hover {
    transform: translateY(-3px);
}

.btn-primary {
    background: linear-gradient(to right, var(--primary-color), var(--secondary-color));
    color: white;
}

.btn-large {
    padding: 12px 30px;
    font-size: 1.1rem;
}

/* Header Styles */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: var(--box-shadow);
    
    transition: padding 0.3s ease, height 0.3s ease;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

/* Header compact khi scroll */
header.header-compact {
    padding: 8px 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

header.header-compact .logo h1 {
    font-size: 90%;
    transition: font-size 0.3s ease;
}

header.header-compact .auth-buttons .btn {
    padding: 6px 12px;
    font-size: 0.9rem;
}

header.header-compact .mini-coins {
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

/* Header styles cho các kích thước màn hình khác nhau */
header.header-md {
    padding: 12px 0;
}

header.header-sm {
    padding: 10px 0;
}

header.header-xs {
    padding: 8px 0;
}

.mini-coins {
    display: flex;
    align-items: center;
    gap: 5px;
    background: linear-gradient(to right, #ffd700, #ffcc00);
    color: #333;
    padding: 3px 8px;
    border-radius: 15px;
    font-size: 0.85rem;
    font-weight: bold;
    margin-left: 5px;
    transition: transform 0.3s ease, font-size 0.3s ease, padding 0.3s ease;
}

.mini-coins i {
    color: #ff9900;
}

.logo h1 {
    font-size: 1.5rem;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    gap: 10px;
    transition: font-size 0.3s ease, transform 0.3s ease;
}

.logo a {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary-color);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: font-size 0.3s ease, transform 0.3s ease;
}

nav ul, .nav-links {
    display: flex;
    gap: 20px;
}

nav a {
    font-weight: 600;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    transition: all 0.3s ease;
}

nav a i {
    font-size: 1.5rem;
}

nav a:hover, nav a.active {
    color: var(--primary-color);
    background-color: rgba(255, 94, 98, 0.1);
}

nav a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 3px;
    background: linear-gradient(to right, var(--primary-color), var(--secondary-color));
    transition: var(--transition);
    border-radius: 3px;
}

nav a:hover::after, nav a.active::after {
    width: 20px;
}

/* Mobile Menu Styles */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--primary-color);
    cursor: pointer;
    padding: 10px;
    z-index: 100;
}

/* Styles for mobile devices */
@media (max-width: 992px) {
    .chat-page-layout {
        grid-template-columns: 1fr;
    }
    
    .chat-sidebar {
        display: none;
    }
    
    .chat-main {
        min-height: 500px;
    }
}

@media (max-width: 768px) {
    .mobile-menu-toggle {
        display: block;
    }
    
    header {
        padding: 10px 0;
    }
    
    .logo h1 {
        font-size: 1.5rem;
    }
    
    .mini-coins {
        font-size: 0.75rem;
        padding: 2px 6px;
    }
    
    nav ul {
        position: fixed;
        top: 0;
        right: -100%;
        width: 70%;
        height: 100vh;
        background: white;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 20px;
        transition: 0.3s ease-in-out;
        z-index: 99;
        box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
    }
    
    nav ul.active {
        right: 0;
    }
    
    nav a {
        font-size: 1.2rem;
    }
    
    .auth-buttons {
        margin-left: auto;
        gap: 5px;
    }
    
    .auth-buttons .btn {
        padding: 6px 12px;
        font-size: 0.9rem;
    }
    
    .user-profile {
        scale: 0.9;
    }
}

/* Styles for mobile body class */
body.mobile-device {
    touch-action: manipulation;
}

/* Landscape mode optimization */
@media (max-width: 768px) and (orientation: landscape) {
    header {
        padding: 8px 0;
    }
    
    .logo h1 {
        font-size: 1.4rem;
    }
    
    .mini-coins {
        font-size: 0.75rem;
        padding: 2px 6px;
    }
    
    .auth-buttons .btn {
        padding: 5px 10px;
        font-size: 0.85rem;
    }
    
    .user-profile {
        scale: 0.85;
    }
    
    header.header-compact {
        padding: 5px 0;
    }
    
    header.header-compact .logo h1 {
        font-size: 1.3rem;
    }
}

/* Header landscape class */
header.header-landscape {
    padding: 6px 0;
    max-height: 60px;
}

header.header-landscape .logo h1 {
    font-size: 1.3rem;
}

header.header-landscape .mini-coins {
    font-size: 0.7rem;
    padding: 1px 5px;
}

header.header-landscape .auth-buttons .btn {
    padding: 5px 10px;
    font-size: 0.8rem;
}

header.header-landscape .user-profile {
    scale: 0.8;
}

header.header-landscape.header-compact {
    padding: 4px 0;
    max-height: 50px;
}

/* Media query cho thiết bị di động cỡ trung bình */
@media (max-width: 480px) {
    header {
        padding: 10px 0;
    }
    
    .logo h1 {
        font-size: 1.4rem;
    }
    
    .mini-coins {
        font-size: 0.75rem;
        padding: 2px 6px;
    }
    
    .auth-buttons .btn {
        padding: 6px 12px;
        font-size: 0.85rem;
    }
    
    .user-profile {
        scale: 0.85;
    }
}

.auth-buttons, .header-buttons {
    display: flex;
    gap: 10px;
    align-items: center;
    transition: gap 0.3s ease;
}

.icon-button {
    background: none;
    border: none;
    font-size: 1.2rem;
    color: var(--text-color);
    cursor: pointer;
    padding: 5px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.icon-button:hover {
    color: var(--primary-color);
    background-color: rgba(var(--primary-rgb), 0.1);
}

.user-profile {
    position: relative;
    cursor: pointer;
}

.user-profile img {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--primary-color);
}

.dropdown-content {
    display: none;
    position: absolute;
    right: 0;
    top: 45px;
    background-color: white;
    min-width: 160px;
    box-shadow: var(--box-shadow);
    border-radius: 8px;
    padding: 10px 0;
    z-index: 1;
}

.dropdown-content a {
    color: var(--text-color);
    padding: 8px 16px;
    text-decoration: none;
    display: block;
    transition: all 0.2s ease;
}

.dropdown-content a:hover {
    background-color: rgba(var(--primary-rgb), 0.1);
    color: var(--primary-color);
}

.user-profile:hover .dropdown-content {
    display: block;
}

.menu-toggle {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-color);
}

@media (max-width: 768px) {
    .menu-toggle {
        display: block;
    }
    
    .nav-links {
        display: none;
        position: absolute;
        top: 60px;
        left: 0;
        right: 0;
        background: white;
        flex-direction: column;
        padding: 20px;
        box-shadow: var(--box-shadow);
        border-radius: 0 0 15px 15px;
    }
    
    .nav-links.active {
        display: flex;
    }
}

.auth-buttons .btn {
    transition: padding 0.3s ease, font-size 0.3s ease, transform 0.3s ease;
}

/* Hero Section */
.hero {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: center;
    padding: 60px 0;
}

.hero-content h2 {
    font-size: 2.5rem;
    margin-bottom: 20px;
    background: linear-gradient(to right, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.hero-content p {
    font-size: 1.1rem;
    margin-bottom: 30px;
    color: #666;
}

.hero-image {
    display: flex;
    justify-content: center;
    align-items: center;
}

.hero-image img {
    max-width: 100%;
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-20px);
    }
    100% {
        transform: translateY(0px);
    }
}

/* Rooms Section */
.rooms-section {
    padding: 60px 0;
    text-align: center;
}

.rooms-section h2 {
    font-size: 2rem;
    margin-bottom: 30px;
    position: relative;
    display: inline-block;
}

.rooms-section h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 50px;
    height: 3px;
    background: linear-gradient(to right, var(--primary-color), var(--secondary-color));
}

.search-and-filters {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    gap: 15px;
}

.search-container {
    display: flex;
    max-width: 400px;
    width: 100%;
}

.search-container input {
    flex: 1;
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 20px 0 0 20px;
    outline: none;
    font-size: 14px;
}

.search-container button {
    padding: 10px 15px;
    background: linear-gradient(to right, var(--primary-color), var(--secondary-color));
    color: white;
    border: none;
    border-radius: 0 20px 20px 0;
    cursor: pointer;
    transition: var(--transition);
}

.search-container button:hover {
    opacity: 0.9;
}

.room-filters {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 30px;
}

.filter-btn {
    padding: 8px 20px;
    border: none;
    border-radius: 20px;
    background: white;
    cursor: pointer;
    font-weight: 600;
    transition: var(--transition);
    box-shadow: var(--box-shadow);
}

.filter-btn.active, .filter-btn:hover {
    background: linear-gradient(to right, var(--primary-color), var(--secondary-color));
    color: white;
}

.rooms-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
}

.room-card {
    background: white;
    
    overflow: hidden;
    box-shadow: var(--box-shadow);
    transition: var(--transition);
}

.room-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
}

.room-thumbnail {
    height: 180px;
    background: #eee;
    position: relative;
    overflow: hidden;
}

.room-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.room-card:hover .room-thumbnail img {
    transform: scale(1.1);
}

.room-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
}

.badge-public {
    background: var(--success-color);
    color: white;
}

.badge-private {
    background: var(--danger-color);
    color: white;
}

.badge-ticket {
    background: linear-gradient(to right, #f39c12, #e67e22);
    color: white;
    top: 85px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.badge-cloudinary {
    background: linear-gradient(to right, #3498db, #2980b9);
    color: white;
    top: 50px;
    display: flex;
    align-items: center;
    gap: 5px;
    font-weight: bold;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.ticket-info {
    background: linear-gradient(to right, #ffd700, #ffcc00);
    color: #333;
    padding: 8px 15px;
    border-radius: 15px;
    font-size: 0.9rem;
    font-weight: bold;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 10px 0;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.ticket-info strong {
    color: #d32f2f;
    font-size: 1rem;
}

.room-info {
    padding: 20px;
    text-align: left;
}

.room-info h3 {
    margin-bottom: 10px;
    font-size: 1.2rem;
}

.room-info p {
    color: #666;
    margin-bottom: 15px;
    font-size: 0.9rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.room-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9rem;
    color: #888;
}

.room-host {
    display: flex;
    align-items: center;
    gap: 5px;
}

.room-host img {
    width: 25px;
    height: 25px;
    border-radius: 50%;
}

.join-room {
    display: block;
    text-align: center;
    padding: 10px;
    background: linear-gradient(to right, var(--primary-color), var(--secondary-color));
    color: white;
    font-weight: 600;
    transition: var(--transition);
}

.join-room:hover {
    background: linear-gradient(to right, var(--secondary-color), var(--primary-color));
}

.request-ticket {
    display: block;
    text-align: center;
    padding: 10px;
    background: linear-gradient(to right, #f39c12, #e67e22);
    color: white;
    font-weight: 600;
    transition: var(--transition);
}

.request-ticket:hover {
    background: linear-gradient(to right, #e67e22, #f39c12);
}

.modal-buttons {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 20px;
}

/* About Section */
.about-section {
    padding: 60px 0;
    text-align: center;
    background: white;
    border-radius: 20px;
    box-shadow: var(--box-shadow);
    margin: 40px 0;
}

.about-section h2 {
    font-size: 2rem;
    margin-bottom: 50px;
    position: relative;
    display: inline-block;
}

.about-section h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 50px;
    height: 3px;
    background: linear-gradient(to right, var(--primary-color), var(--secondary-color));
}

.features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    padding: 0 20px;
}

.feature-card {
    padding: 30px 20px;
    border-radius: 15px;
    background: #f9f9f9;
    box-shadow: var(--box-shadow);
    transition: var(--transition);
}

.feature-card:hover {
    transform: translateY(-10px);
}

.feature-card i {
    font-size: 2.5rem;
    margin-bottom: 20px;
    color: var(--primary-color);
}

.feature-card h3 {
    margin-bottom: 15px;
    font-size: 1.3rem;
}

.feature-card p {
    color: #666;
}

/* Footer */
footer {
    background: var(--dark-color);
    color: white;
    padding: 60px 0 20px;
    border-radius: 20px 20px 0 0;
    margin-top: 40px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-logo h2 {
    font-size: 1.8rem;
    margin-bottom: 15px;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    gap: 10px;
}

.footer-links h3, .footer-contact h3 {
    font-size: 1.2rem;
    margin-bottom: 20px;
    position: relative;
    display: inline-block;
}

.footer-links h3::after, .footer-contact h3::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 30px;
    height: 2px;
    background: var(--primary-color);
}

.footer-links ul {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.footer-links a {
    color: #ddd;
    transition: var(--transition);
}

.footer-links a:hover {
    color: var(--primary-color);
    padding-left: 5px;
}

.footer-contact p {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
}

.footer-contact p a {
    color: #fff;
    text-decoration: underline;
    transition: var(--transition);
}

.footer-contact p a:hover {
    color: var(--primary-color);
}

.social-icons {
    display: flex;
    gap: 15px;
}

.social-icons a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    transition: var(--transition);
}

.social-icons a:hover {
    background: var(--primary-color);
    transform: translateY(-5px);
}

.social-icons .lazi-icon {
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.social-icons .lazi-icon img {
    width: 20px;
    height: 20px;
    object-fit: cover;
}

.footer-nav-icons {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-top: 10px;
}

.footer-nav-icons a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.1);
    color: #ddd;
    font-size: 1rem;
    transition: var(--transition);
}

.footer-nav-icons a:hover {
    background-color: var(--primary-color);
    color: white;
    transform: translateY(-3px);
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.9rem;
    color: #aaa;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
}

.modal-content {
    background-color: white;
    margin: 10% auto;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    width: 90%;
    max-width: 500px;
    position: relative;
    animation: modalOpen 0.4s;
}

/* Keyboard Shortcuts Modal Styles */
.shortcuts-list {
    margin: 20px 0;
}

.shortcut-item {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
}

.shortcut-key {
    background-color: #01010166;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 5px 10px;
    margin-right: 15px;
    font-weight: bold;
    min-width: 80px;
    text-align: center;
}

.shortcut-description {
    flex: 1;
}

.shortcuts-note {
    font-style: italic;
    color: #666;
    margin-top: 20px;
    font-size: 0.9rem;
}

@keyframes modalOpen {
    from {opacity: 0; transform: translateY(-50px);}
    to {opacity: 1; transform: translateY(0);}
}

.close {
    position: absolute;
    right: 20px;
    top: 15px;
    font-size: 28px;
    font-weight: bold;
    color: #aaa;
    cursor: pointer;
    transition: var(--transition);
}

.close:hover {
    color: var(--primary-color);
}

.modal h2 {
    margin-bottom: 20px;
    color: var(--dark-color);
    text-align: center;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
}

.form-group input, .form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 1rem;
    transition: var(--transition);
}

.form-group input:focus, .form-group textarea:focus {
    border-color: var(--primary-color);
    outline: none;
    box-shadow: 0 0 0 3px rgba(255, 94, 98, 0.2);
}

.form-group textarea {
    min-height: 100px;
    resize: vertical;
}

/* Social Login Styles */
.social-login {
    margin-top: 20px;
    text-align: center;
    border-top: 1px solid #eee;
    padding-top: 15px;
}

.social-login p {
    margin-bottom: 10px;
    color: #666;
}

.btn-google {
    background-color: #fff;
    color: #444;
    border: 1px solid #ddd;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin: 0 auto;
    transition: var(--transition);
}

.btn-google:hover {
    background-color: #f1f1f1;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.btn-google i {
    color: #DB4437;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
}

.checkbox-label input {
    width: auto;
}

/* Room Page Styles */
.room-page {
    display: grid;
    grid-template-columns: 1fr 300px;
    grid-template-areas: 
        "video sidebar"
        "info sidebar";
    gap: 20px;
    padding: 40px 0;
}

.video-container {
    grid-area: video;
}

.video-info {
    grid-area: info;
    background: linear-gradient(145deg, #f9f9f9, #fff);
    color: var(--dark-color);
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.dark-theme .video-info {
    background: linear-gradient(145deg, #2a2a2a, #222);
    color: white;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.room-sidebar {
    grid-area: sidebar;
}

/* Đảm bảo các phần tử có thể cuộn trên thiết bị di động */
@media (max-width: 768px) {
    .room-page {
        grid-template-columns: 1fr;
        grid-template-areas: 
            "video"
            "info"
            "sidebar";
        padding: 20px 0;
    }
    
    .room-sidebar {
        max-height: none;
        overflow: visible;
    }
    
    .chat-container {
        height: 250px;
    }
}

.video-container {
    background: #000;
    border-radius: 15px;
    overflow: hidden;
    position: relative;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    justify-content: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.video-container:fullscreen,
.video-container:-webkit-full-screen,
.video-container:-moz-full-screen,
.video-container:-ms-fullscreen {
    border-radius: 0;
    padding: 0;
    width: 100%;
    height: 100vh;
    max-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.video-container:fullscreen #player,
.video-container:-webkit-full-screen #player,
.video-container:-moz-full-screen #player,
.video-container:-ms-fullscreen #player {
    width: 100%;
    height: 100%;
    min-height: 95vh;
    max-height: 100vh;
    object-fit: contain;
}

.video-container:fullscreen .video-controls,
.video-container:-webkit-full-screen .video-controls,
.video-container:-moz-full-screen .video-controls,
.video-container:-ms-fullscreen .video-controls {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    background: rgba(34, 34, 34, 0.8);
    transition: opacity 0.3s ease;
    opacity: 0;
}

.video-container:fullscreen:hover .video-controls,
.video-container:-webkit-full-screen:hover .video-controls,
.video-container:-moz-full-screen:hover .video-controls,
.video-container:-ms-fullscreen:hover .video-controls {
    opacity: 1;
}

.video-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10;
    background-color: transparent;
    pointer-events: all;
    cursor: default;
}

.video-container iframe {
    width: 100%;
    height: 500px;
    border: none;
}

.video-container:fullscreen iframe,
.video-container:-webkit-full-screen iframe,
.video-container:-moz-full-screen iframe,
.video-container:-ms-fullscreen iframe {
    width: 100%;
    height: 100%;
    min-height: 95vh;
    max-height: 100vh;
    object-fit: contain;
}

.video-controls {
    display: flex;
    justify-content: space-between;
    background: rgba(34, 34, 34, 0.85);
    backdrop-filter: blur(10px);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    align-items: center;
    padding: 15px;
    background: #222;
    color: white;
    flex-wrap: nowrap;
}

.start-btn {
    background-color: #27ae60;
    color: white;
}

.start-btn:hover {
    background-color: #219653;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(33, 150, 83, 0.3);
}

.delete-btn {
    background-color: #e74c3c;
    color: white;
}

.delete-btn:hover {
    background-color: #c0392b;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(192, 57, 43, 0.3);
}

.participants-counter {
    display: flex;
    align-items: center;
    gap: 8px;
    background-color: rgba(0, 0, 0, 0.5);
    color: white;
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 0.9rem;
    position: absolute;
    top: 15px;
    right: 15px;
    z-index: 10;
}

.participants-counter i {
    color: var(--primary-color);
}

.participants {
    background: #f9f9f9;
    border-radius: 10px;
    padding: 15px;
    margin-top: 0;
}

.participants h3 {
    margin-bottom: 15px;
    font-size: 1.1rem;
    color: var(--dark-color);
    display: flex;
    align-items: center;
    gap: 5px;
}

.participants h3::before {
    content: '\f0c0';
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    color: var(--primary-color);
}

.participant-list {
    max-height: 200px;
    overflow-y: auto;
}

.participant {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 0;
    border-bottom: 1px solid #eee;
}

.participant:last-child {
    border-bottom: none;
}

.participant img {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    object-fit: cover;
}

.participant span {
    font-size: 0.9rem;
    font-weight: 500;
}

.participant .btn-small {
    padding: 3px 8px;
    font-size: 0.8rem;
    margin-left: auto;
}

.gift-coin-btn {
    background-color: #ffc107;
    color: #333;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.gift-coin-btn:hover {
    background-color: #ffb300;
    transform: translateY(-2px);
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.control-buttons {
    display: flex;
    align-items: center;
    gap: 15px;
}

.host-controls {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: nowrap;
    overflow-x: auto;
}

.control-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    backdrop-filter: blur(4px);
}

.control-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

/* Cải thiện nút điều khiển trên thiết bị di động */
@media (max-width: 768px) {
    .control-btn {
        padding: 8px 12px;
        margin: 0 5px;
    }
    
    .video-controls {
        padding: 10px;
    }
    
    .time-display {
        font-size: 0.8rem;
    }
}

.room-sidebar {
    background: linear-gradient(145deg, var(--light-color), var(--light-color));
    color: var(--dark-color);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.dark-theme .room-sidebar {
    background: linear-gradient(145deg, #2a2a2a, #222);
    color: white;
}

.video-info h2 {
    margin-bottom: 10px;
    font-size: 1.5rem;
    color: var(--dark-color);
}

.dark-theme .video-info h2 {
    color: white;
}

.video-info p {
    color: var(--dark-color);
    margin-bottom: 15px;
}

.dark-theme .video-info p {
    color: #ddd;
}

.host-info {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
    color: var(--dark-color);
}

.dark-theme .host-info {
    color: white;
}

.host-info img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
}

.chat-container {
    height: 400px;
    display: flex;
    flex-direction: column;
    background: var(--light-color);
    color: var(--dark-color);
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 20px;
}

.dark-theme .chat-container {
    background: #222;
    color: white;
}

.chat-messages {
    flex: 1;
    padding: 15px;
    overflow-y: auto;
}

.message {
    margin-bottom: 15px;
}

.message-info {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 5px;
}

.message-info img {
    width: 30px;
    height: 30px;
    border-radius: 50%;
}

.message-info .name {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--dark-color);
}

.dark-theme .message-info .name {
    color: white;
}

.message-info .time {
    font-size: 0.8rem;
    color: #777;
}

.dark-theme .message-info .time {
    color: #bbb;
}

.message-content {
    background: #e0e0e0;
    padding: 10px 15px;
    border-radius: 15px;
    font-size: 0.95rem;
    color: var(--dark-color);
}

.dark-theme .message-content {
    background: #333;
    color: white;
}

.message.own .message-content {
    background: #d0d0d0;
    color: var(--dark-color);
}

.dark-theme .message.own .message-content {
    background: #444;
    color: white;
}

.chat-input {
    display: flex;
    padding: 15px;
    border-top: 1px solid #ddd;
    background: var(--light-color);
}

.dark-theme .chat-input {
    border-top: 1px solid #444;
    background: #222;
}

.chat-input input {
    flex: 1;
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 20px;
    font-size: 0.95rem;
}

.chat-input button {
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 20px;
    padding: 10px 15px;
    margin-left: 10px;
    cursor: pointer;
    transition: var(--transition);
}

.chat-input button:hover {
    background: var(--secondary-color);
}

.participants {
    padding: 20px;
    border-top: 1px solid #ddd;
    background: var(--light-color);
    color: var(--dark-color);
}

.dark-theme .participants {
    border-top: 1px solid #444;
    background: #222;
    color: white;
}

.participants h3 {
    margin-bottom: 15px;
    font-size: 1.1rem;
}

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

.participant {
    display: flex;
    align-items: center;
    gap: 10px;
}

.participant img {
    width: 30px;
    height: 30px;
    border-radius: 50%;
}

.participant .name {
    font-size: 0.95rem;
    color: var(--dark-color);
}

.dark-theme .participant .name {
    color: white;
}

.host-badge {
    background: var(--primary-color);
    color: white;
    font-size: 0.7rem;
    padding: 2px 8px;
    border-radius: 10px;
    margin-left: 5px;
}

.guest-badge {
    background: #95a5a6;
    color: white;
    font-size: 0.7rem;
    padding: 2px 8px;
    border-radius: 10px;
    margin-left: 5px;
}

.guest-message .message-info {
    background-color: #ecf0f1;
}

.dark-theme .guest-message .message-info {
    background-color: #2c3e50;
}

.badge-ticket {
    background: linear-gradient(to right, #f39c12, #e67e22);
    color: white;
    font-size: 0.75rem;
    padding: 3px 10px;
    font-weight: bold;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    border-radius: 10px;
    position: absolute;
    top: 50px;
    right: 10px;
    display: flex;
    align-items: center;
    gap: 5px;
}

/* Additional Room Styles */
#player {
    width: 100%;
    height: 500px;
    background-color: #000;
}

.time-display {
    font-size: 0.9rem;
    margin-left: 15px;
    color: white;
    font-weight: 500;
    background-color: rgba(0, 0, 0, 0.4);
    padding: 6px 12px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(4px);
}

.system-message {
    background-color: rgba(255, 255, 255, 0.1);
    color: #bbb;
    text-align: center;
    font-style: italic;
    padding: 8px 15px;
    border-radius: 15px;
}

.error-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100vh;
    text-align: center;
    padding: 20px;
}

.error-container h2 {
    margin-bottom: 20px;
    color: var(--primary-color);
}

.error-container p {
    margin-bottom: 30px;
    color: #666;
}

.share-container {
    padding: 20px;
    border-top: 1px solid #eee;
}

.share-container h3 {
    margin-bottom: 15px;
    font-size: 1.1rem;
}

.share-buttons {
    display: flex;
    gap: 10px;
}

.share-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1rem;
    cursor: pointer;
    transition: transform 0.3s, box-shadow 0.3s;
}

.share-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 10px rgba(0, 0, 0, 0.1);
}

.share-btn.copy {
    background-color: #6c757d;
}

.share-btn.facebook {
    background-color: #3b5998;
}

.share-btn.twitter {
    background-color: #1da1f2;
}

.share-btn.whatsapp {
    background-color: #25d366;
}

.request-ticket {
    display: inline-block;
    padding: 10px 20px;
    background: linear-gradient(135deg, #ff9800, #ff5722);
    color: white;
    text-align: center;
    border-radius: 5px;
    font-weight: 500;
    transition: all 0.3s ease;
    text-decoration: none;
    cursor: pointer;
}

.request-ticket:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 152, 0, 0.3);
}

.modal-buttons {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    margin-top: 20px;
}

/* Chat List Styles */
.chat-list {
    background-color: white;
    border-radius: 10px;
    box-shadow: var(--box-shadow);
    margin-bottom: 20px;
    overflow: hidden;
}

.chat-list-header {
    padding: 15px;
    background: linear-gradient(to right, var(--primary-color), var(--secondary-color));
    color: white;
    font-weight: 600;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.chat-list-content {
    max-height: 400px;
    overflow-y: auto;
}

.chat-item {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    border-bottom: 1px solid #eee;
    transition: background-color 0.2s;
    cursor: pointer;
}

.chat-item:hover {
    background-color: #f5f5f5;
}

.chat-item.active {
    background-color: #f0f0f0;
}

.chat-item-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    margin-right: 12px;
    position: relative;
}

.chat-item-avatar img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

.chat-item-status {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 2px solid white;
}

.chat-item-status.online {
    background-color: #2ecc71;
}

.chat-item-status.offline {
    background-color: #95a5a6;
}

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

.chat-item-name {
    font-weight: 600;
    margin-bottom: 3px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.chat-item-last-message {
    font-size: 0.85rem;
    color: #666;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.chat-item-meta {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    margin-left: 10px;
}

.chat-item-time {
    font-size: 0.75rem;
    color: #888;
    margin-bottom: 5px;
}

.chat-item-badge {
    background-color: var(--primary-color);
    color: white;
    font-size: 0.7rem;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 10px;
    min-width: 20px;
    text-align: center;
}

/* Online Chat Styles */
.online-chat {
    display: flex;
    flex-direction: column;
    height: 500px;
    background-color: white;
    border-radius: 10px;
    box-shadow: var(--box-shadow);
    overflow: hidden;
}

.online-chat-header {
    padding: 15px;
    background: linear-gradient(to right, var(--primary-color), var(--secondary-color));
    color: white;
    font-weight: 600;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.online-chat-body {
    flex: 1;
    display: flex;
    overflow: hidden;
}

.online-chat-sidebar {
    width: 250px;
    border-right: 1px solid #eee;
    overflow-y: auto;
}

.online-chat-main {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.online-chat-messages {
    flex: 1;
    padding: 15px;
    overflow-y: auto;
}

.online-chat-input {
    padding: 10px 15px;
    border-top: 1px solid #eee;
    display: flex;
    align-items: center;
}

.online-chat-input input {
    flex: 1;
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 20px;
    font-size: 0.9rem;
}

.online-chat-input button {
    background: linear-gradient(to right, var(--primary-color), var(--secondary-color));
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    margin-left: 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Dark Theme for Chat */
.dark-theme .chat-list,
.dark-theme .online-chat {
    background-color: #16213e;
}

.dark-theme .chat-item {
    border-bottom-color: #2c3e50;
}

.dark-theme .chat-item:hover {
    background-color: #1a1a2e;
}

.dark-theme .chat-item.active {
    background-color: #2c3e50;
}

.dark-theme .chat-item-name {
    color: #f4f4f4;
}

.dark-theme .chat-item-last-message,
.dark-theme .chat-item-time {
    color: #aaa;
}

.dark-theme .online-chat-sidebar {
    border-right-color: #2c3e50;
}

.dark-theme .online-chat-input {
    border-top-color: #2c3e50;
}

.dark-theme .online-chat-input input {
    background-color: #1a1a2e;
    color: #f4f4f4;
    border-color: #2c3e50;
}

/* Chat Page Layout */
.chat-page-layout {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 20px;
    margin-top: 20px;
}

.chat-sidebar {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.chat-main {
    min-height: 600px;
    height: 100%;
}

/* Chat Search Styles */
.chat-search {
    background-color: white;
    border-radius: 10px;
    box-shadow: var(--box-shadow);
    padding: 15px;
    margin-bottom: 0;
}

.search-input {
    position: relative;
    display: flex;
    align-items: center;
}

.search-input i {
    position: absolute;
    left: 12px;
    color: #888;
}

.search-input input {
    width: 100%;
    padding: 10px 15px 10px 35px;
    border: 1px solid #ddd;
    border-radius: 20px;
    font-size: 0.9rem;
    transition: var(--transition);
}

.search-input input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(255, 94, 98, 0.2);
}

.dark-theme .chat-search {
    background-color: #16213e;
}

.dark-theme .search-input input {
    background-color: #1a1a2e;
    color: #f4f4f4;
    border-color: #2c3e50;
}

.dark-theme .search-input i {
    color: #aaa;
}

.chat-welcome-message {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: #666;
    text-align: center;
    padding: 20px;
}

.chat-welcome-icon {
    font-size: 3rem;
    margin-bottom: 15px;
    color: var(--primary-color);
}

.chat-user-info {
    display: flex;
    align-items: center;
}

.chat-user-info img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    margin-right: 10px;
}

.chat-actions {
    display: flex;
    gap: 10px;
}

.message {
    display: flex;
    margin-bottom: 5px;
    align-items: flex-end;
    width: 100%;
}

.message.message-first {
    margin-top: 15px;
}

.message.message-continuation {
    margin-top: 2px;
}

.message-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    margin-right: 10px;
    flex-shrink: 0;
}

.message-avatar.empty-avatar {
    width: 36px;
    visibility: hidden;
}

.message-avatar img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

.message-sender-name {
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 3px;
    color: #555;
    padding: 0 5px;
}

.message.outgoing .message-sender-name {
    color: #2a7d2a;
    text-align: right;
}

.message.incoming .message-sender-name {
    color: #2a5d8d;
}

.message-content {
    width: auto;
    padding: 10px 15px;
    position: relative;
    word-wrap: break-word;
    box-shadow: 0 1px 2px rgba(0,0,0,0.1);
    max-width: 100%;
    box-sizing: border-box;
}

/* Hiển thị hình ảnh trong tin nhắn */
.message-image-container {
    margin: -5px -10px 5px;
    border-radius: 15px 15px 0 0;
    overflow: hidden;
}

.message-image {
    max-width: 100%;
    max-height: 300px;
    display: block;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.message-image:hover {
    transform: scale(0.98);
}

.message-text {
    margin-top: 5px;
}

/* Tin nhắn chỉ có hình ảnh */
.message-content .message-image-container:last-child {
    margin-bottom: -5px;
    border-radius: 15px;
}

/* Modal xem trước hình ảnh */
.image-preview-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.image-preview-container {
    position: relative;
    max-width: 90%;
    max-height: 90%;
}

.preview-image {
    max-width: 100%;
    max-height: 90vh;
    border-radius: 5px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.close-preview {
    position: absolute;
    top: -40px;
    right: 0;
    color: white;
    font-size: 30px;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.close-preview:hover {
    transform: scale(1.2);
}

.download-image-btn {
    position: absolute;
    bottom: -40px;
    right: 0;
    color: white;
    font-size: 20px;
    cursor: pointer;
    transition: transform 0.3s ease;
    background-color: rgba(255, 255, 255, 0.2);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.download-image-btn:hover {
    transform: scale(1.1);
    background-color: rgba(255, 255, 255, 0.3);
}

/* Hiển thị loading khi đang tải ảnh lên */
.loading-message .message-content {
    padding: 15px;
}

.image-upload-loading {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #666;
}

.image-upload-loading i {
    color: var(--primary-color);
}



.message-bubble {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    max-width: 100%;
    width: auto;
    box-sizing: border-box;
}

.message.outgoing .message-bubble {
    align-items: flex-end;
    width: 100%;
}



.message.incoming {
    justify-content: flex-start;
    align-self: flex-start;
    width: 70%;
    margin-right: auto;
}

.message.outgoing {
    flex-direction: row-reverse;
    justify-content: flex-end;
    align-self: flex-end;
    width: 70%;
    margin-left: auto;
    padding-right: 0;
    box-sizing: border-box;
}

.online-chat-messages {
    display: flex;
    flex-direction: column;
    padding: 20px 10px;
    overflow-y: auto;
    height: 100%;
    max-height: calc(100vh - 180px);
    width: 100%;
    background-color: #f9f9f9;
    border-radius: 10px;
    box-shadow: inset 0 0 10px rgba(0,0,0,0.05);
}

.online-chat-body {
    flex: 1;
    overflow: hidden;
    position: relative;
    height: calc(100% - 110px);
    display: flex;
    flex-direction: column;
    padding: 10px 5px;
    background-color: #f0f0f0;
    background-image: linear-gradient(to bottom, #e8e8e8, #f5f5f5);
    border-radius: 0 0 10px 10px;
}

.online-chat-header {
    padding: 12px 20px;
    border-bottom: 1px solid #e0e0e0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: white;
    border-radius: 10px 10px 0 0;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.online-chat-input {
    padding: 12px 20px;
    border-top: 1px solid #e0e0e0;
    display: flex;
    align-items: center;
    gap: 10px;
    background-color: white;
    border-radius: 0 0 10px 10px;
    box-shadow: 0 -1px 3px rgba(0,0,0,0.05);
}

.online-chat-input input {
    flex: 1;
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 20px;
    font-size: 0.9rem;
    transition: var(--transition);
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.online-chat-input input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(var(--primary-rgb), 0.2);
    outline: none;
}

.online-chat-input button {
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.online-chat-input button:hover {
    background-color: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.online-chat-input button:hover {
    background-color: var(--secondary-color);
}

/* Nút tải ảnh lên */
.image-upload-btn {
    background-color: #3498db !important;
    margin-right: 0;
}

.image-upload-btn.has-image {
    background-color: #27ae60 !important;
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(46, 204, 113, 0.4);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(46, 204, 113, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(46, 204, 113, 0);
    }
}

/* Định dạng góc bo tròn cho tin nhắn liên tiếp */
.message.message-continuation.incoming .message-content {
    border-top-left-radius: 5px;
    border-radius: 5px 18px 18px 18px;
}

.message.message-continuation.outgoing .message-content {
    border-top-right-radius: 5px;
    border-radius: 18px 5px 18px 18px;
}

/* Định dạng cho tin nhắn ở giữa */
.message.message-middle.incoming .message-content {
    border-radius: 5px 18px 18px 18px;
}

.message.message-middle.outgoing .message-content {
    border-radius: 18px 5px 18px 18px;
}

.message.outgoing {
    flex-direction: row-reverse;
    justify-content: flex-end;
    align-self: flex-end;
}

.online-chat {
    display: flex;
    flex-direction: column;
    height: 95vh;
    background-color: #f9f9f9;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
    overflow: hidden;
    border: 1px solid #e0e0e0;
    transition: all 0.3s ease;
}

.message.outgoing .message-avatar {
    margin-right: 0;
    margin-left: 10px;
}

.message.outgoing .message-avatar.empty-avatar {
    margin-left: 10px;
}

.message.outgoing .message-content {
    background-color: #dcf8c6;
    color: #333;
    border-radius: 18px 0 18px 18px;
    margin-left: auto;
    margin-right: 0;
    max-width: calc(100% - 10px);
}

.message.incoming .message-content {
    background-color: #ffffff;
    color: #333;
    border-radius: 0 18px 18px 18px;
    margin-right: auto;
}

.message-time {
    font-size: 0.65rem;
    color: #aaa;
    margin-top: 2px;
    text-align: left;
    opacity: 0;
    transition: opacity 0.2s ease;
    position: absolute;
    right: -65px;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(240, 240, 240, 0.8);
    padding: 2px 5px;
    border-radius: 3px;
    white-space: nowrap;
    z-index: 10;
}

.message-bubble:hover .message-time {
    opacity: 1;
}

.message.outgoing .message-time {
    text-align: right;
    right: auto;
    left: -65px;
}

/* Dark Theme for Chat Page */
.dark-theme .chat-welcome-message {
    color: #aaa;
}

.dark-theme .message-content {
    background-color: #1a1a2e;
    color: #f4f4f4;
}

.dark-theme .message.outgoing .message-content {
    background-color: #1e3a5f;
    color: #f4f4f4;
}

.dark-theme .online-chat {
    background-color: #0f172a;
}

.dark-theme .online-chat-body {
    background-color: #1a1a2e;
}

.dark-theme .online-chat-messages {
    background-color: #1a1a2e;
}

.dark-theme .online-chat-header,
.dark-theme .online-chat-input {
    background-color: #1a1a2e;
    border-color: #2c3e50;
}

.dark-theme .online-chat-input input {
    background-color: #16213e;
    color: #f4f4f4;
    border-color: #2c3e50;
}

.dark-theme .message-time {
    color: #888;
    opacity: 0;
    background: rgba(22, 33, 62, 0.8);
}

.dark-theme .message-bubble:hover .message-time {
    opacity: 1;
}

/* Responsive Styles */
@media (max-width: 1200px) {
    .hero {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .room-page {
        grid-template-columns: 1fr;
    }
    
    .video-container iframe {
        height: 450px;
    }
    
    #player {
        height: 450px;
    }
    
    /* Cải thiện kích thước nút trên màn hình cảm ứng */
    .btn, .control-btn {
        min-height: 44px;
        min-width: 44px;
    }
    
    /* Đảm bảo khoảng cách chạm đủ lớn */
    .participant, .message-info, .social-icons a {
        padding: 8px 0;
    }
    
    /* Cải thiện hiển thị thông báo */
    .notification {
        width: 90%;
        max-width: 400px;
    }
}

@media (max-width: 768px) {
    header {
        flex-direction: column;
        gap: 20px;
    }
    
    nav ul {
        gap: 20px;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .footer-links h3::after, .footer-contact h3::after {
        left: 50%;
        transform: translateX(-50%);
    }
    
    .footer-links ul {
        align-items: center;
    }
    
    .footer-contact p {
        justify-content: center;
    }
    
    .social-icons {
        justify-content: center;
    }
    
    .video-container iframe {
        height: 350px;
    }
    
    #player {
        height: 350px;
    }
}

@media (max-width: 576px) {
    nav ul {
        gap: 15px;
        font-size: 0.9rem;
    }
    
    .auth-buttons {
        flex-direction: column;
        gap: 10px;
    }
    
    .hero-content h2 {
        font-size: 2rem;
    }
    
    .rooms-section h2, .about-section h2 {
        font-size: 1.8rem;
    }
    
    .room-filters {
        flex-wrap: wrap;
    }
    
    .video-container iframe {
        height: 300px;
    }
    
    #player {
        height: 300px;
    }
    
    .video-controls {
        flex-direction: column;
        gap: 10px;
    }
    
    .control-buttons {
        width: 100%;
        justify-content: space-between;
    }
    
    .host-controls {
        width: 100%;
        display: flex;
        justify-content: center;
        flex-wrap: nowrap;
        gap: 10px;
        overflow-x: auto;
        padding: 5px 0;
    }
    
    .host-controls {
        width: 100%;
        display: flex;
        justify-content: center;
        flex-wrap: nowrap;
        gap: 10px;
        overflow-x: auto;
        padding: 5px 0;
        scrollbar-width: thin;
        scrollbar-color: rgba(255, 255, 255, 0.2) transparent;
    }
    
    .host-controls::-webkit-scrollbar {
        height: 4px;
    }
    
    .host-controls::-webkit-scrollbar-track {
        background: transparent;
    }
    
    .host-controls::-webkit-scrollbar-thumb {
        background-color: rgba(255, 255, 255, 0.2);
        border-radius: 10px;
    }
    
    .host-controls .btn {
        font-size: 0.85rem;
        padding: 8px 12px;
        margin: 0 3px;
        flex: 0 0 auto;
        border-radius: 8px;
        transition: all 0.2s ease;
        box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
        white-space: nowrap;
    }
    
    .modal-content {
        width: 95%;
        padding: 15px;
    }
    
    .form-group input, .form-group textarea {
        padding: 10px;
    }
    
    .room-card {
        width: 100%;
    }
    
    .feature-card {
        padding: 15px;
    }
    
    .chat-input {
        padding: 10px;
    }
    
    .chat-input input {
        padding: 8px 12px;
    }
    
    .chat-input button {
        padding: 8px 12px;
    }
    
    .participant img, .message-info img {
        width: 25px;
        height: 25px;
    }
}

/* Notification Styles */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    padding: 15px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-width: 300px;
    max-width: 400px;
    z-index: 1000;
    animation: slideIn 0.3s ease-out forwards;
}

.notification.hide {
    animation: slideOut 0.3s ease-out forwards;
}

.notification-content {
    display: flex;
    align-items: center;
    gap: 10px;
}

.notification i {
    font-size: 1.2rem;
}

.notification.success i {
    color: var(--success-color);
}

.notification.error i {
    color: var(--danger-color);
}

.notification.info i {
    color: #3498db;
}

.notification .close-btn {
    background: none;
    border: none;
    cursor: pointer;
    color: #999;
    font-size: 0.9rem;
    transition: var(--transition);
}

.notification .close-btn:hover {
    color: #333;
}

@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;
    }
}

/* Video Badge */
.video-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background-color: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 12px;
    z-index: 10;
    pointer-events: none;
}

/* Thêm hiệu ứng cho badge */
.badge-cloudinary, .video-badge {
    animation: fadeIn 0.5s ease-in-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Thêm media query cho màn hình siêu nhỏ */
@media (max-width: 375px) {
    header {
        padding: 8px 0;
    }
    
    .logo h1 {
        font-size: 1.3rem;
    }
    
    .mini-coins {
        font-size: 0.7rem;
        padding: 1px 5px;
    }
    
    .mobile-menu-toggle {
        font-size: 1.2rem;
        padding: 5px;
    }
    
    .auth-buttons .btn {
        padding: 5px 10px;
        font-size: 0.8rem;
    }
    
    .user-profile {
        scale: 0.8;
    }
    
    /* Compact header cho màn hình siêu nhỏ */
    header.header-compact {
        padding: 5px 0;
    }
    
    header.header-compact .logo h1 {
        font-size: 1.2rem;
    }
    
    header.header-compact .mini-coins {
        font-size: 0.65rem;
        padding: 1px 4px;
    }
    
    header.header-compact .auth-buttons .btn {
        padding: 4px 8px;
        font-size: 0.75rem;
    }
    
    header.header-compact .user-profile {
        scale: 0.75;
    }
    
    header.header-compact .mobile-menu-toggle {
        font-size: 1.1rem;
        padding: 4px;
    }
    
    nav ul {
        gap: 10px;
        font-size: 0.8rem;
    }
    
    .hero-content h2 {
        font-size: 1.8rem;
    }
    
    .btn {
        padding: 8px 15px;
        font-size: 0.9rem;
    }
    
    .host-controls .btn {
        font-size: 0.75rem;
        padding: 6px 8px;
        margin: 0 2px;
    }
    
    .video-container iframe {
        height: 200px;
    }
    
    #player {
        height: 200px;
    }
    
    .room-details h2 {
        font-size: 1.3rem;
    }
    
    .notification {
        min-width: 250px;
        max-width: 300px;
        padding: 10px;
    }
}

/* Forum Styles */
.forum-header {
    text-align: center;
    padding: 40px 0 30px;
    background: linear-gradient(rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0.7)), 
                url('https://res.cloudinary.com/demo/image/upload/v1312461204/sample.jpg') no-repeat center center;
    background-size: cover;
    border-radius: 15px;
    margin-bottom: 20px;
    box-shadow: var(--box-shadow);
}

.forum-header h2 {
    font-size: 2.2rem;
    margin-bottom: 10px;
    background: linear-gradient(to right, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.forum-header p {
    color: var(--dark-color);
    margin-bottom: 20px;
    font-size: 1.1rem;
}

.forum-categories {
    margin-bottom: 20px;
}

.category-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    margin-bottom: 20px;
}

.category-tab {
    padding: 8px 16px;
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 20px;
    cursor: pointer;
    transition: var(--transition);
    font-weight: 500;
}

.category-tab:hover {
    background-color: #f0f0f0;
}

.category-tab.active {
    background: linear-gradient(to right, var(--primary-color), var(--secondary-color));
    color: white;
    border-color: transparent;
}

.forum-search {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 15px;
}

.search-container {
    display: flex;
    flex: 1;
    max-width: 500px;
}

.search-container input {
    flex: 1;
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 5px 0 0 5px;
    font-size: 1rem;
}

.search-container button {
    background: linear-gradient(to right, var(--primary-color), var(--secondary-color));
    color: white;
    border: none;
    padding: 10px 15px;
    border-radius: 0 5px 5px 0;
    cursor: pointer;
}

.sort-options {
    display: flex;
    align-items: center;
    gap: 10px;
}

.sort-options select {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 5px;
    background-color: white;
    font-size: 0.9rem;
}

/* Forum Layout */
.forum-layout {
    display: flex;
    gap: 20px;
    margin-top: 20px;
    margin-bottom: 40px;
}

.forum-main {
    flex: 1;
    min-width: 0; /* Để tránh overflow */
}

.forum-sidebar {
    width: 300px;
    flex-shrink: 0;
}

.sidebar-section {
    background-color: white;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 15px;
    margin-bottom: 20px;
}

.sidebar-title {
    font-size: 1.2rem;
    color: var(--primary-color);
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}

/* Lazi Ads Styles */
.lazi-ads {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.lazi-ad-item {
    display: flex;
    background-color: #f9f9f9;
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
}

.lazi-ad-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.lazi-ad-item a {
    display: flex;
    text-decoration: none;
    color: inherit;
    width: 100%;
}

.lazi-ad-item img {
    width: 60px;
    height: 60px;
    object-fit: cover;
}

.lazi-ad-content {
    padding: 10px;
}

.lazi-ad-content h4 {
    font-size: 0.9rem;
    margin: 0 0 5px 0;
    color: #333;
}

.lazi-ad-content p {
    font-size: 0.8rem;
    margin: 0;
    color: #666;
}

/* User Ranking Styles */
.user-ranking {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.user-rank-item {
    display: flex;
    align-items: center;
    padding: 10px;
    background-color: #f9f9f9;
    border-radius: 8px;
    transition: background-color 0.2s;
}

.user-rank-item:hover {
    background-color: #f0f0f0;
}

.rank-number {
    width: 24px;
    height: 24px;
    background-color: var(--primary-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 0.8rem;
    margin-right: 10px;
}

.user-rank-item img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    margin-right: 10px;
    border: 2px solid #ddd;
}

.user-rank-info {
    flex: 1;
}

.user-rank-info h4 {
    font-size: 0.9rem;
    margin: 0 0 3px 0;
    color: #333;
}

.user-rank-info p {
    font-size: 0.8rem;
    margin: 0;
    color: #666;
}

.coin-amount {
    font-weight: bold;
    color: #f1c40f;
}

.total-users-info {
    margin-bottom: 10px;
    font-size: 0.8rem;
    color: #666;
    text-align: center;
}

.posts-list {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.post-card {
    background-color: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: var(--box-shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
    border: 1px solid #dddfe2;
}

.post-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
}

.post-media {
    overflow: hidden;
    position: relative;
    max-height: 350px;
}

.post-media.no-media-container {
    height: auto;
    max-height: none;
    display: none;
}

.post-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.post-card:hover .post-media img {
    transform: scale(1.05);
}

/* Video styles */
.post-video-container {
    position: relative;
    width: 100%;
    height: 100%;
    cursor: pointer;
    overflow: hidden;
    border-radius: 8px 8px 0 0;
}

.post-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.post-video-container:hover .post-video {
    transform: scale(1.05);
}

.video-play-button {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60px;
    height: 60px;
    background-color: rgba(0, 0, 0, 0.7);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    color: white;
    font-size: 24px;
    transition: all 0.3s ease;
    opacity: 0.8;
    z-index: 2;
}

.post-video-container:hover .video-play-button {
    background-color: var(--primary-color);
    transform: translate(-50%, -50%) scale(1.1);
    opacity: 1;
}

.post-video-container.playing .video-play-button {
    opacity: 0;
    pointer-events: none;
}

.post-video-container.playing:hover .video-play-button {
    opacity: 0.5;
}

.post-detail-video-container {
    width: 100%;
    max-height: 500px;
    margin-bottom: 20px;
    border-radius: 8px;
    overflow: hidden;
    position: relative;
}

.post-detail-video {
    width: 100%;
    max-height: 500px;
    display: block;
    object-fit: contain;
}

.post-category {
    position: absolute;
    top: 10px;
    left: 10px;
    background: linear-gradient(to right, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
}

/* Media type buttons */
.media-type-selector {
    display: flex;
    margin-bottom: 15px;
    border-bottom: 1px solid #eee;
}

.media-type-btn {
    padding: 8px 15px;
    margin-right: 10px;
    border: none;
    background: none;
    color: #666;
    font-weight: 500;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: all 0.3s ease;
}

.media-type-btn.active {
    color: var(--primary-color);
    border-bottom: 2px solid var(--primary-color);
}

.media-upload-container {
    margin-bottom: 15px;
}

.video-upload-container, .image-upload-container {
    position: relative;
}

.video-preview-container, .image-preview-container {
    position: relative;
    margin-top: 10px;
    border-radius: 8px;
    overflow: hidden;
    max-height: 300px;
}

.video-preview-container video, .image-preview-container img {
    width: 100%;
    max-height: 300px;
    object-fit: contain;
}

.video-preview-container button, .image-preview-container button {
    position: absolute;
    top: 10px;
    right: 10px;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    font-size: 14px;
}

.dark-theme .media-type-selector {
    border-bottom: 1px solid #444;
}

.dark-theme .media-type-btn {
    color: #aaa;
}

.dark-theme .media-type-btn.active {
    color: var(--primary-color);
}

.post-content {
    padding: 12px 16px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.post-title {
    font-size: 1.2rem;
    margin-bottom: 10px;
    font-weight: 600;
    color: var(--dark-color);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.post-excerpt {
    font-size: 0.95rem;
    color: #1c1e21;
    margin-bottom: 12px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex: 1;
}

.post-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
    padding-top: 8px;
    border-top: 1px solid #eee;
    font-size: 0.9rem;
    color: #888;
}

.post-author {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #050505;
    font-weight: 500;
}

.post-author img {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid #dddfe2;
}

.post-stats {
    display: flex;
    gap: 10px;
}

.post-stat {
    display: flex;
    align-items: center;
    gap: 3px;
}

/* Post Detail Modal */
.post-modal-content {
    max-width: 800px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
}

.post-detail {
    background-color: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: var(--box-shadow);
    margin-bottom: 30px;
    border: 1px solid #dddfe2;
}

.post-detail-header {
    padding: 16px 16px 8px;
    margin-bottom: 20px;
}

.post-detail-title {
    font-size: 1.5rem;
    margin-bottom: 10px;
    color: #050505;
    line-height: 1.3;
}

.post-detail-author {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}

.post-detail-author-info {
    display: flex;
    flex-direction: column;
}

.post-detail-author-name {
    font-weight: 600;
    color: #050505;
    font-size: 1rem;
}

.post-detail-time {
    font-size: 0.8rem;
    color: #65676b;
}

.post-detail-category {
    margin-bottom: 12px;
}

.post-detail-category span {
    background: linear-gradient(to right, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
}

.post-detail-author img {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid #dddfe2;
}

.post-detail-image-container {
    margin: 12px 0;
    border-radius: 8px;
    overflow: hidden;
}

.post-detail-image {
    width: 100%;
    max-height: 500px;
    object-fit: contain;
}

.post-detail-content {
    padding: 0 16px 30px;
}

.post-detail-text {
    line-height: 1.5;
    color: #050505;
    white-space: pre-line;
    margin-bottom: 16px;
    font-size: 1.05rem;
}

.post-actions {
    display: flex;
    flex-direction: row;
    padding: 8px 16px;
    justify-content: space-between;
}

.post-reactions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 0 12px;
    border-bottom: 1px solid #eee;
    margin-bottom: 8px;
    font-size: 0.9rem;
    color: #65676b;
}

.post-reactions span {
    display: inline-block;
    margin-left: 4px;
}

.post-reactions-buttons {
    display: flex;
    justify-content: space-between;
    width: 100%;
    align-items: center;
    flex-wrap: wrap;
}

.action-btn {
    background: none;
    border: none;
    color: #65676b;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 8px 12px;
    border-radius: 4px;
    transition: background-color 0.2s;
    flex: 1;
    justify-content: center;
}

.action-btn:hover {
    background-color: rgba(0, 0, 0, 0.05);
}

.action-btn.active {
    color: var(--primary-color);
}

.reaction-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    background: none;
    border: none;
    cursor: pointer;
    color: #65676b;
    font-size: 0.95rem;
    font-weight: 600;
    padding: 8px 12px;
    border-radius: 4px;
    transition: background-color 0.2s;
    flex: 0 1 auto;
    justify-content: center;
}

.reaction-btn:hover {
    background-color: rgba(0, 0, 0, 0.05);
}

.reaction-btn.active {
    color: var(--primary-color);
}

.post-options {
    position: relative;
    margin-left: auto;
}

.options-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.2rem;
    color: #666;
}

.options-menu {
    position: absolute;
    right: 0;
    top: 100%;
    background-color: white;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    border-radius: 5px;
    min-width: 150px;
    z-index: 100;
    display: none;
}

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

.options-menu button {
    display: block;
    width: 100%;
    text-align: left;
    padding: 8px 15px;
    background: none;
    border: none;
    cursor: pointer;
    transition: var(--transition);
}

.options-menu button:hover {
    background-color: #f5f5f5;
}

.options-menu .delete-btn {
    color: var(--danger-color);
}

/* Comments Section */
.post-comments {
    margin-top: 20px;
}

.post-comments h3 {
    font-size: 1.3rem;
    margin-bottom: 15px;
    color: var(--dark-color);
}

.comment-item {
    background-color: #f0f2f5;
    border-radius: 18px;
    padding: 12px 16px;
    margin-bottom: 10px;
    position: relative;
}

.comment-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
}

.comment-author {
    display: flex;
    align-items: center;
    gap: 8px;
}

.comment-author img {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid #dddfe2;
}

.comment-author-name {
    font-weight: 600;
    color: #050505;
    font-size: 0.9rem;
}

.comment-date {
    font-size: 0.75rem;
    color: #65676b;
}

.comment-content {
    margin-bottom: 10px;
    color: #333;
    white-space: pre-line;
}

.comment-actions {
    display: flex;
    gap: 15px;
}

.comment-action {
    background: none;
    border: none;
    color: #65676b;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 4px 8px;
    border-radius: 4px;
    transition: background-color 0.2s;
}

.comment-action:hover {
    background-color: rgba(0, 0, 0, 0.05);
}

.comment-action:hover {
    color: var(--primary-color);
}

.comment-action.active {
    color: var(--primary-color);
}

.comment-form {
    margin-top: 20px;
}

.comment-form textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 5px;
    resize: vertical;
    min-height: 80px;
    margin-bottom: 10px;
    font-family: inherit;
}

/* Image Upload */
.image-upload-container {
    margin-top: 10px;
}

.image-preview-container {
    position: relative;
    margin-top: 15px;
    max-width: 300px;
}

.image-preview-container img {
    width: 100%;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.image-preview-container button {
    position: absolute;
    top: -10px;
    right: -10px;
    width: 25px;
    height: 25px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    font-size: 0.8rem;
}

/* Loading Animation */
.loading {
    text-align: center;
    padding: 20px;
    color: #666;
    font-style: italic;
}

/* Responsive Styles for Forum */
@media (max-width: 1200px) {
    .forum-layout {
        flex-direction: column;
    }
    
    .forum-sidebar {
        width: 100%;
    }
    
    .forum-sidebar-left {
        order: 2;
    }
    
    .forum-sidebar-right {
        order: 3;
    }
    
    .forum-main {
        order: 1;
    }
    
    .lazi-ads, .user-ranking {
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 15px;
    }
}

@media (max-width: 768px) {
    .forum-header {
        padding: 30px 0 20px;
    }
    
    .forum-header h2 {
        font-size: 1.8rem;
    }
    
    .forum-search {
        flex-direction: column;
        align-items: stretch;
    }
    
    .search-container {
        max-width: 100%;
    }
    
    .lazi-ads, .user-ranking {
        grid-template-columns: 1fr;
    }
    
    .post-detail-title {
        font-size: 1.5rem;
    }
}

@media (max-width: 480px) {
    .forum-header h2 {
        font-size: 1.5rem;
    }
    
    .forum-header p {
        font-size: 0.9rem;
    }
    
    .category-tab {
        padding: 6px 12px;
        font-size: 0.9rem;
    }
    
    .posts-list {
        grid-template-columns: 1fr;
    }
    
    .post-image {
        height: 160px;
    }
    
    .post-title {
        font-size: 1.1rem;
    }
    
    .post-detail-title {
        font-size: 1.3rem;
    }
    
    .post-detail-image {
        max-height: 250px;
    }
    
    .post-reactions {
        gap: 10px;
    }
}

/* Profile Page Styles */
.profile-container {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 30px;
    margin: 40px auto;
    max-width: 1200px;
    padding: 0 20px;
}

.profile-sidebar {
    background: white;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    padding: 25px;
    position: sticky;
    top: 100px;
    height: fit-content;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.profile-sidebar:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.profile-avatar {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    margin: 0 auto 20px;
    position: relative;
    border: 5px solid white;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: transform 0.3s ease;
}

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

.profile-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: filter 0.3s ease;
}

.profile-avatar:hover img {
    filter: brightness(1.1);
}

.profile-avatar .edit-avatar {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.6);
    color: white;
    text-align: center;
    padding: 8px 0;
    font-size: 0.9rem;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.profile-avatar:hover .edit-avatar {
    opacity: 1;
}

.profile-name {
    text-align: center;
    margin-bottom: 5px;
    font-size: 1.5rem;
    font-weight: 700;
    background: linear-gradient(to right, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.profile-status {
    text-align: center;
    color: #666;
    margin-bottom: 20px;
    font-size: 0.9rem;
}

.profile-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-bottom: 25px;
    text-align: center;
}

.stat-item {
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    padding: 10px;
    border-radius: 10px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.stat-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 10px rgba(0, 0, 0, 0.1);
}

.stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 5px;
}

.stat-label {
    font-size: 0.8rem;
    color: #666;
}

.profile-menu {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.profile-menu-item {
    padding: 12px 15px;
    border-radius: 10px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 10px;
    color: #555;
}

.profile-menu-item i {
    font-size: 1.2rem;
    width: 24px;
    text-align: center;
    color: var(--primary-color);
    transition: transform 0.3s ease;
}

.profile-menu-item:hover {
    background-color: rgba(var(--primary-rgb), 0.1);
    color: var(--primary-color);
}

.profile-menu-item:hover i {
    transform: translateX(5px);
}

.profile-menu-item.active {
    background: linear-gradient(to right, var(--primary-color), var(--secondary-color));
    color: white;
}

.profile-menu-item.active i {
    color: white;
}

.profile-content {
    background: white;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    padding: 30px;
    min-height: 600px;
}

.profile-tab {
    display: none;
    animation: fadeIn 0.5s ease;
}

.profile-tab.active {
    display: block;
}

.profile-section {
    display: block;
    animation: fadeIn 0.5s ease;
}

.profile-section.active {
    display: block;
}

.profile-section h3 {
    font-size: 1.5rem;
    margin-bottom: 25px;
    color: var(--primary-color);
    position: relative;
    padding-bottom: 10px;
}

.profile-section h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 50px;
    height: 3px;
    background: linear-gradient(to right, var(--primary-color), var(--secondary-color));
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #555;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.2);
    outline: none;
}

.form-group textarea {
    min-height: 120px;
    resize: vertical;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 15px;
    margin-top: 30px;
}

.btn-save {
    background: linear-gradient(to right, var(--primary-color), var(--secondary-color));
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.btn-save:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(var(--primary-rgb), 0.3);
}

.btn-cancel {
    background: #f8f9fa;
    color: #555;
    border: 1px solid #ddd;
    padding: 12px 25px;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.btn-cancel:hover {
    background-color: #e9ecef;
}

.toggle-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px;
    background-color: #f8f9fa;
    border-radius: 10px;
    margin-bottom: 15px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.toggle-container:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 10px rgba(0, 0, 0, 0.05);
}

.toggle-label {
    font-weight: 500;
    color: #555;
}

.toggle-switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 24px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
    border-radius: 24px;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked + .toggle-slider {
    background: linear-gradient(to right, var(--primary-color), var(--secondary-color));
}

input:checked + .toggle-slider:before {
    transform: translateX(26px);
}

.activity-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.activity-item {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    padding: 15px;
    background-color: #f8f9fa;
    border-radius: 10px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.activity-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 10px rgba(0, 0, 0, 0.05);
}

.activity-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(to right, var(--primary-color), var(--secondary-color));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
}

.activity-content {
    flex: 1;
}

.activity-text {
    margin-bottom: 5px;
    color: #555;
}

.activity-time {
    font-size: 0.8rem;
    color: #888;
}

.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: #888;
}

.empty-state i {
    font-size: 3rem;
    margin-bottom: 15px;
    color: #ddd;
}

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

/* Responsive styles for profile page */
@media (max-width: 992px) {
    .profile-container {
        grid-template-columns: 1fr;
    }
    
    .profile-sidebar {
        position: relative;
        top: 0;
        margin-bottom: 30px;
    }
    
    .profile-menu {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .profile-menu-item {
        flex: 1 1 auto;
        min-width: 120px;
        text-align: center;
        justify-content: center;
    }
}

@media (max-width: 768px) {
    .form-row {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .profile-stats {
        grid-template-columns: 1fr 1fr;
    }
    
    .profile-content {
        padding: 20px;
    }
}

@media (max-width: 480px) {
    .profile-avatar {
        width: 120px;
        height: 120px;
    }
    
    .profile-name {
        font-size: 1.3rem;
    }
    
    .profile-menu-item {
        padding: 10px;
        font-size: 0.9rem;
    }
    
    .profile-menu-item i {
        font-size: 1rem;
    }
    
    .profile-section h3 {
        font-size: 1.3rem;
    }
    
    .btn-save, .btn-cancel {
        padding: 10px 20px;
        font-size: 0.9rem;
    }
}

/* Dark Mode Styles */
.dark-mode {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    color: #f0f0f0;
}

.dark-mode header {
    background: rgba(26, 26, 46, 0.95);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.dark-mode nav ul li a {
    color: #f0f0f0;
}

.dark-mode .auth-buttons button {
    color: #f0f0f0;
    border-color: #f0f0f0;
}

.dark-mode .user-profile {
    background-color: rgba(26, 26, 46, 0.8);
    color: #f0f0f0;
}

.dark-mode .dropdown-content {
    background-color: #16213e;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.dark-mode .dropdown-content a {
    color: #f0f0f0;
}

.dark-mode .dropdown-content a:hover {
    background-color: #1a1a2e;
}

.dark-mode .post-card {
    background-color: rgba(26, 26, 46, 0.8);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.dark-mode .post-title,
.dark-mode .post-meta,
.dark-mode .post-content {
    color: #f0f0f0;
}

/* Dark mode for profile page */
.dark-mode .profile-sidebar,
.dark-mode .profile-content {
    background-color: #16213e;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.dark-mode .profile-avatar {
    border-color: #16213e;
}

.dark-mode .profile-status {
    color: #aaa;
}

.dark-mode .stat-item {
    background: linear-gradient(135deg, #1a1a2e, #16213e);
}

.dark-mode .stat-label {
    color: #aaa;
}

.dark-mode .profile-menu-item {
    color: #ddd;
}

.dark-mode .profile-menu-item:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.dark-mode .profile-section h3 {
    color: var(--primary-color);
}

.dark-mode .form-group label {
    color: #ddd;
}

.dark-mode .form-group input,
.dark-mode .form-group textarea,
.dark-mode .form-group select {
    background-color: #1a1a2e;
    border-color: #333;
    color: #f0f0f0;
}

.dark-mode .btn-cancel {
    background-color: #1a1a2e;
    color: #ddd;
    border-color: #333;
}

.dark-mode .btn-cancel:hover {
    background-color: #242444;
}

.dark-mode .toggle-container {
    background-color: #1a1a2e;
}

.dark-mode .toggle-label {
    color: #ddd;
}

.dark-mode .activity-item {
    background-color: #1a1a2e;
}

.dark-mode .activity-text {
    color: #ddd;
}

.dark-mode .activity-time {
    color: #aaa;
}

.dark-mode .empty-state {
    color: #aaa;
}

.dark-mode .empty-state i {
    color: #333;
}

.dark-mode .category-tab {
    background-color: rgba(26, 26, 46, 0.8);
    color: #f0f0f0;
}

.dark-mode .category-tab.active {
    background: linear-gradient(to right, var(--primary-color), var(--secondary-color));
}

.dark-mode .modal-content {
    background-color: #16213e;
    color: #f0f0f0;
}

.dark-mode input,
.dark-mode textarea,
.dark-mode select {
    background-color: #1a1a2e;
    color: #f0f0f0;
    border-color: #333;
}

.dark-mode .comment-card {
    background-color: rgba(26, 26, 46, 0.8);
}

.dark-mode #darkModeToggle {
    color: #f0f0f0;
}
/* Fix chat trong phòng chiếu (room.html) */
.chat-container .message {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.chat-container .message-info {
    display: flex;
    align-items: center;
    gap: 6px;
    justify-content: flex-start;
}

.chat-container .message-content {
    display: block;
    margin-top: 4px;
    line-height: 1.4;
}
@media (max-width: 768px) {
  header {
    padding: 0 8px;
    height: 50px;               /* Chiều cao tối đa */
    display: flex;
    align-items: center;
    justify-content: space-between;
  }

  /* Logo nhỏ gọn */
  header .logo h1 {
    font-size: 1rem;
    margin: 0;
    line-height: 1;
  }

  /* Menu nav thành thanh icon ngang */
  header nav ul {
    display: flex;
    gap: 12px;
    margin: 0;
    padding: 0;
    list-style: none;
  }

  header nav ul li a {
    padding: 0;
    font-size: 1.2rem;          /* Chỉ giữ icon */
  }

  /* Ẩn text, chỉ giữ icon */
  header nav ul li a span {
    display: none !important;
  }

  /* Nút đăng nhập/đăng ký nhỏ lại */
  .auth-buttons {
    display: flex;
    gap: 5px;
  }

  .auth-buttons .btn {
    padding: 2px 6px;
    font-size: 0.75rem;
  }
}
/* Thu nhỏ icon, ảnh, văn bản, nút khi mobile */
@media (max-width: 768px) {
    /* Icon nhỏ hơn */
    i, .fas, .far, .fab {
        font-size: 0.85rem !important;
    }

    /* Ảnh nhỏ hơn */
    img {
        max-width: 80%;
        height: auto;
    }

    /* Văn bản nhỏ hơn */
    body, p, span, a, li, button, input, textarea {
        font-size: 0.85rem !important;
    }

    h1 { font-size: 1.5rem; }
    h2 { font-size: 1.2rem; }
    h3 { font-size: 1rem; }

    /* Nút gọn lại */
    .btn, button {
        padding: 6px 12px;
        font-size: 0.8rem !important;
    }

    /* Các badge nhỏ lại */
    .points-badge, .filter-btn, .category {
        font-size: 0.75rem !important;
        padding: 3px 6px;
    }

    /* Ảnh trong card gọn hơn */
    .exercise-image {
        height: 100px;
    }
}
@media (max-width: 768px) {
    .user-profile-mini {
        font-size: 0.75rem;
        gap: 4px;
    }
    .user-profile-mini img {
        width: 24px;
        height: 24px;
    }
    .user-profile-mini .btn {
        padding: 3px 6px;
        font-size: 0.7rem;
    }
}
@media (max-width: 768px) {
    header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 8px 12px;
        flex-direction: row !important; /* ép header nằm ngang */
    }

    header .logo h1 {
        font-size: 1.2rem;
    }

    header nav ul {
        display: none; /* Ẩn menu khi mobile, có thể thay bằng nút ☰ sau */
    }

    .auth-buttons {
        display: flex;
        gap: 6px;
    }

    .auth-buttons .btn {
        font-size: 0.75rem;
        padding: 5px 8px;
    }
}





