/* Watch2gether Styles */

/* Hero Section */
.w2g-hero {
    background: linear-gradient(135deg, var(--primary-color) 0%, #ff4757 100%);
    padding: 60px 20px;
    text-align: center;
    margin-bottom: 40px;
    border-radius: 12px;
    position: relative;
    overflow: hidden;
}

.w2g-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="25" cy="25" r="1" fill="white" opacity="0.1"/><circle cx="75" cy="75" r="1" fill="white" opacity="0.1"/><circle cx="50" cy="10" r="0.5" fill="white" opacity="0.1"/><circle cx="20" cy="80" r="0.5" fill="white" opacity="0.1"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>') repeat;
    pointer-events: none;
}

.hero-content {
    position: relative;
    z-index: 1;
}

.w2g-hero h1 {
    font-size: 3rem;
    font-weight: 700;
    color: white;
    margin-bottom: 15px;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.w2g-hero p {
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.9);
    max-width: 600px;
    margin: 0 auto;
}

/* Join Room Section */
.join-room-section {
    margin-bottom: 50px;
}

.join-room-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 30px;
    text-align: center;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.join-room-card h2 {
    color: var(--text-primary);
    margin-bottom: 20px;
    font-size: 1.5rem;
}

.join-room-card h2 i {
    color: var(--primary-color);
    margin-right: 10px;
}

.join-room-form {
    max-width: 400px;
    margin: 0 auto;
}

.input-group {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

.input-group input {
    flex: 1;
    padding: 12px 16px;
    border: 2px solid var(--border);
    border-radius: 8px;
    background: var(--input-bg);
    color: var(--text-primary);
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    text-align: center;
    transition: all 0.3s ease;
}

.input-group input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(255, 44, 44, 0.1);
}

.btn-primary {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.btn-primary:hover {
    background: #e63946;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(255, 44, 44, 0.3);
}

.join-hint {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin: 0;
}

/* Public Rooms Section */
.public-rooms-section {
    margin-bottom: 50px;
}

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

.section-title {
    color: var(--text-primary);
    font-size: 1.8rem;
    font-weight: 600;
    margin: 0;
}

.section-title i {
    color: var(--primary-color);
    margin-right: 10px;
}

.room-filters {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.filter-btn {
    background: #2d1010;
    border: 2px solid #4a1a1a;
    color: #cccccc;
    padding: 10px 20px;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 0.9rem;
    font-weight: 600;
    white-space: nowrap;
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(10px);
}

.filter-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: left 0.5s ease;
}

.filter-btn:hover::before {
    left: 100%;
}

.filter-btn:hover {
    background: rgba(255, 44, 44, 0.1);
    border-color: #ff2c2c;
    color: #ff2c2c;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(255, 44, 44, 0.2);
}

.filter-btn.active {
    background: linear-gradient(135deg, #ff2c2c, #e63946);
    color: white;
    border-color: #ff2c2c;
    box-shadow: 0 4px 15px rgba(255, 44, 44, 0.3);
    transform: translateY(-2px);
}

.filter-btn i {
    margin-right: 8px;
    font-size: 0.85rem;
}

/* Rooms Grid */
.rooms-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 25px;
    margin-bottom: 40px;
    animation: fadeInUp 0.6s ease-out;
}

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

.room-card {
    background: #2d1010;
    border: 1px solid #4a1a1a;
    border-radius: 16px;
    padding: 24px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
    animation: slideInCard 0.5s ease-out forwards;
    opacity: 0;
    transform: translateY(20px);
}

@keyframes slideInCard {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.room-card:nth-child(1) { animation-delay: 0.1s; }
.room-card:nth-child(2) { animation-delay: 0.2s; }
.room-card:nth-child(3) { animation-delay: 0.3s; }
.room-card:nth-child(4) { animation-delay: 0.4s; }
.room-card:nth-child(5) { animation-delay: 0.5s; }
.room-card:nth-child(6) { animation-delay: 0.6s; }

.room-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color), #ff6b9d, #4ecdc4);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.room-card:hover::before {
    opacity: 1;
}

.room-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 20px 40px rgba(255, 44, 44, 0.25);
    border-color: #ff2c2c;
    background: linear-gradient(135deg, #2d1010 0%, rgba(255, 44, 44, 0.1) 100%);
}

.room-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 18px;
    position: relative;
}

.room-info {
    flex: 1;
    margin-right: 12px;
}

.room-info h3 {
    color: #ffffff;
    font-size: 1.25rem;
    font-weight: 700;
    margin: 0 0 8px 0;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color 0.3s ease;
}

.room-card:hover .room-info h3 {
    color: #ff2c2c;
}

.room-type {
    background: var(--primary-color);
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 8px rgba(255, 44, 44, 0.3);
    position: relative;
    overflow: hidden;
    flex-shrink: 0;
}

.room-type::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.room-card:hover .room-type::before {
    left: 100%;
}

.room-type.movie {
    background: linear-gradient(135deg, #ff2c2c, #ff4757);
}

.room-type.anime {
    background: linear-gradient(135deg, #ff6b9d, #ff8fab);
}

.room-type.tvshow {
    background: linear-gradient(135deg, #4ecdc4, #6bcf7f);
}

.room-meta {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 18px;
    color: #cccccc;
    font-size: 0.9rem;
    flex-wrap: wrap;
}

.room-meta span {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 4px 8px;
    background: rgba(255, 44, 44, 0.1);
    border-radius: 8px;
    transition: all 0.3s ease;
}

.room-meta span:hover {
    background: rgba(255, 44, 44, 0.2);
    transform: scale(1.05);
}

.room-meta i {
    color: #ff2c2c;
    font-size: 0.85rem;
}

.room-description {
    color: #cccccc;
    font-size: 0.95rem;
    line-height: 1.5;
    margin-bottom: 20px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 48px;
}

.room-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 16px;
    border-top: 1px solid #4a1a1a;
}

.room-owner {
    color: #cccccc;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
}

.room-owner i {
    color: #ffd700;
    font-size: 1rem;
}

.join-room-btn {
    background: linear-gradient(135deg, #ff2c2c, #e63946);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 25px;
    font-size: 0.9rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 15px rgba(255, 44, 44, 0.3);
    position: relative;
    overflow: hidden;
}

.join-room-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.join-room-btn:hover::before {
    left: 100%;
}

.join-room-btn:hover {
    background: linear-gradient(135deg, #e63946, #dc2626);
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 8px 25px rgba(255, 44, 44, 0.4);
}

.join-room-btn:active {
    transform: translateY(0) scale(0.98);
}

/* Loading animation for room cards */
.room-card.loading {
    background: linear-gradient(90deg, var(--card-bg) 25%, rgba(255, 44, 44, 0.1) 50%, var(--card-bg) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
    0% {
        background-position: -200% 0;
    }
    100% {
        background-position: 200% 0;
    }
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 80px 20px;
    color: #cccccc;
    background: #2d1010;
    border-radius: 16px;
    border: 1px solid #4a1a1a;
    margin: 20px 0;
    animation: fadeInUp 0.6s ease-out;
}

.empty-state i {
    font-size: 5rem;
    margin-bottom: 25px;
    color: #ff2c2c;
    opacity: 0.6;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 0.6;
        transform: scale(1);
    }
    50% {
        opacity: 0.8;
        transform: scale(1.05);
    }
}

.empty-state h3 {
    color: #ffffff;
    margin-bottom: 15px;
    font-size: 1.5rem;
    font-weight: 700;
}

.empty-state p {
    font-size: 1.1rem;
    line-height: 1.5;
    max-width: 400px;
    margin: 0 auto;
}

/* How it Works Section */
.how-it-works {
    margin-bottom: 50px;
}

.how-it-works h2 {
    color: var(--text-primary);
    font-size: 1.8rem;
    font-weight: 600;
    margin-bottom: 30px;
    text-align: center;
}

.how-it-works h2 i {
    color: var(--primary-color);
    margin-right: 10px;
}

.steps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}

.step-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 30px 20px;
    text-align: center;
    transition: all 0.3s ease;
}

.step-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.step-number {
    width: 50px;
    height: 50px;
    background: var(--primary-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0 auto 20px;
}

.step-content h3 {
    color: var(--text-primary);
    margin-bottom: 10px;
    font-size: 1.2rem;
}

.step-content p {
    color: var(--text-secondary);
    line-height: 1.5;
    margin: 0;
}

/* Loading Placeholder */
.loading-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 80px 20px;
    color: #cccccc;
    background: #2d1010;
    border-radius: 16px;
    border: 1px solid #4a1a1a;
    margin: 20px 0;
    animation: fadeInUp 0.6s ease-out;
}

.loading-placeholder i {
    font-size: 3rem;
    margin-bottom: 20px;
    color: #ff2c2c;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

.loading-placeholder p {
    font-size: 1.1rem;
    font-weight: 500;
    margin: 0;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .w2g-hero {
        padding: 40px 20px;
        margin-bottom: 30px;
    }
    
    .w2g-hero h1 {
        font-size: 2rem;
    }
    
    .w2g-hero p {
        font-size: 1rem;
    }
    
    .join-room-card {
        padding: 20px;
    }
    
    .input-group {
        flex-direction: column;
    }
    
    .input-group input {
        margin-bottom: 10px;
    }
    
    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .room-filters {
        width: 100%;
        justify-content: flex-start;
    }
    
    .rooms-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .steps-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .step-card {
        padding: 20px 15px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }
    
    .room-card {
        padding: 15px;
    }
    
    .room-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .room-footer {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
}

/* Room Player Styles - Black Theme (matching player page) */
.room-player-page {
    /* Black theme variables to match player page */
    --bg-primary: #0d0d0d;
    --bg-secondary: #1a1a1a;
    --card-bg: #121212;
    --border: #2a2a2a;
    --text-primary: #ffffff;
    --text-secondary: #cccccc;
    --input-bg: #1a1a1a;
    --primary-color: #ff2c2c;
    
    /* Ensure black background matching player page */
    background: #0d0d0d !important;
}

/* Ensure body and html have black background for room-player page */
body.room-player-page,
html.room-player-page,
body:has(.room-player-page),
html:has(.room-player-page) {
    background: #0d0d0d !important;
}

.room-banner {
    background: linear-gradient(135deg, var(--card-bg) 0%, rgba(255, 44, 44, 0.2) 100%);
    border-bottom: 2px solid var(--primary-color);
    padding: 20px 0;
    margin-bottom: 20px;
    box-shadow: 0 4px 20px rgba(255, 44, 44, 0.1);
}

.room-info {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 20px;
    flex-wrap: wrap;
}

.room-details h1 {
    color: var(--text-primary);
    font-size: 1.8rem;
    font-weight: 600;
    margin: 0 0 10px 0;
    line-height: 1.3;
}

.room-meta {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

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

.room-meta i {
    color: var(--primary-color);
}

.room-code strong {
    color: var(--text-primary);
    font-family: 'Courier New', monospace;
    font-size: 1.1em;
    letter-spacing: 1px;
}

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

.btn-secondary {
    background: var(--card-bg);
    color: var(--text-primary);
    border: 1px solid var(--border);
    padding: 10px 16px;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}

.btn-secondary:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    transform: translateY(-2px);
}

.btn-danger {
    background: #dc3545;
    color: white;
    border: 1px solid #dc3545;
    padding: 10px 16px;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}

.btn-danger:hover {
    background: #c82333;
    border-color: #c82333;
    transform: translateY(-2px);
}

/* Room Content */
.room-content {
    min-height: 60vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(180deg, transparent 0%, rgba(255, 44, 44, 0.05) 100%);
}

.content-placeholder {
    text-align: center;
    padding: 60px 20px;
    background: var(--card-bg);
    border-radius: 16px;
    border: 1px solid var(--border);
    box-shadow: 0 8px 32px rgba(255, 44, 44, 0.1);
    max-width: 800px;
    margin: 0 auto;
}

.placeholder-content h2 {
    color: var(--text-primary);
    font-size: 2rem;
    margin-bottom: 15px;
}

.placeholder-content p {
    color: var(--text-secondary);
    font-size: 1.1rem;
    margin-bottom: 15px;
    line-height: 1.5;
}

.feature-list {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-top: 40px;
    flex-wrap: wrap;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-secondary);
    font-size: 1rem;
}

.feature-item i {
    color: var(--primary-color);
    font-size: 1.2rem;
}

/* Room Sidebar */
.room-sidebar {
    position: fixed;
    top: 0;
    right: -350px;
    width: 350px;
    height: 100vh;
    background: var(--card-bg);
    border-left: 2px solid var(--primary-color);
    z-index: 1000;
    transition: right 0.3s ease;
    display: flex;
    flex-direction: column;
    box-shadow: -4px 0 20px rgba(255, 44, 44, 0.2);
}

.room-sidebar.active {
    right: 0;
}

.sidebar-header {
    padding: 20px;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.sidebar-header h3 {
    color: var(--text-primary);
    margin: 0;
    font-size: 1.2rem;
}

.sidebar-header i {
    color: var(--primary-color);
    margin-right: 8px;
}

.close-sidebar {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 1.2rem;
    cursor: pointer;
    padding: 5px;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.close-sidebar:hover {
    color: var(--text-primary);
    background: var(--border);
}

.members-list {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
}

.member-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
}

.member-item:last-child {
    border-bottom: none;
}

.member-avatar {
    width: 40px;
    height: 40px;
    background: var(--primary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
}

.member-info {
    flex: 1;
}

.member-name {
    color: var(--text-primary);
    font-weight: 600;
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.owner-badge {
    color: #ffd700;
    font-size: 0.9rem;
}

.current-user-badge {
    background: var(--primary-color);
    color: white;
    padding: 2px 6px;
    border-radius: 10px;
    font-size: 0.7rem;
    font-weight: 600;
}

.member-status {
    color: var(--text-secondary);
    font-size: 0.8rem;
}

.empty-members {
    text-align: center;
    color: var(--text-secondary);
    padding: 40px 20px;
}

/* Members Toggle Button */
.mobile-members-toggle {
    position: fixed;
    bottom: 100px;
    right: 20px;
    width: 60px;
    height: 60px;
    background: #ff2c2c;
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 1.2rem;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(255, 44, 44, 0.3);
    z-index: 999;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.mobile-members-toggle:hover {
    transform: scale(1.1);
}

.mobile-members-toggle span {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #ffd700;
    color: #333;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    font-size: 0.7rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Modal Styles */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    padding: 20px;
}

.modal-container {
    background: var(--card-bg);
    border-radius: 12px;
    max-width: 500px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    border: 1px solid var(--border);
}

.modal-header {
    padding: 20px;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    color: var(--text-primary);
    margin: 0;
    font-size: 1.3rem;
}

.modal-header i {
    color: var(--primary-color);
    margin-right: 8px;
}

.modal-body {
    padding: 20px;
}

.invite-section {
    margin-bottom: 20px;
}

.invite-section label {
    display: block;
    color: var(--text-primary);
    font-weight: 600;
    margin-bottom: 8px;
}

.code-share,
.link-share {
    display: flex;
    gap: 10px;
}

.code-share input,
.link-share input {
    flex: 1;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: var(--input-bg);
    color: var(--text-primary);
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
}

.share-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 20px;
}

.share-btn {
    flex: 1;
    min-width: 120px;
    padding: 12px 16px;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

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

.share-btn.telegram {
    background: #0088cc;
    color: white;
}

.share-btn.discord {
    background: #5865f2;
    color: white;
}

.share-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

/* Create Room Modal */
.room-info-preview {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 20px;
}

.room-info-preview h4 {
    color: var(--text-primary);
    margin: 0 0 10px 0;
    font-size: 1.1rem;
}

.room-info-preview p {
    color: var(--text-secondary);
    margin: 5px 0;
    font-size: 0.9rem;
}

.radio-group {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-top: 10px;
}

.radio-option {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    cursor: pointer;
    padding: 15px;
    border: 2px solid var(--border);
    border-radius: 8px;
    transition: all 0.3s ease;
}

.radio-option:hover {
    border-color: var(--primary-color);
    background: rgba(255, 44, 44, 0.05);
}

.radio-option input[type="radio"] {
    margin: 0;
    width: 18px;
    height: 18px;
    accent-color: var(--primary-color);
}

.radio-option input[type="radio"]:checked + .radio-label {
    color: var(--primary-color);
}

.radio-option:has(input:checked) {
    border-color: var(--primary-color);
    background: rgba(255, 44, 44, 0.1);
}

.radio-label {
    display: flex;
    flex-direction: column;
    gap: 5px;
    flex: 1;
}

.radio-label i {
    margin-right: 8px;
}

.radio-label small {
    color: var(--text-secondary);
    font-size: 0.8rem;
    line-height: 1.3;
}

/* Settings Modal */
.setting-group {
    margin-bottom: 20px;
}

.setting-label {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-primary);
    font-weight: 600;
    cursor: pointer;
}

.setting-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--primary-color);
}

.setting-description {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin: 5px 0 0 28px;
}

.setting-group label {
    display: block;
    color: var(--text-primary);
    font-weight: 600;
    margin-bottom: 8px;
}

.setting-group textarea,
.setting-group select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: var(--input-bg);
    color: var(--text-primary);
    font-family: inherit;
    resize: vertical;
}

.setting-group textarea {
    min-height: 80px;
}

.modal-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--border);
}

/* Mobile Responsive for Room Player */
@media (max-width: 768px) {
    /* Hide desktop episodes sidebar on mobile */
    .room-player-page .episodes-left {
        display: none !important;
    }
    
    .room-info {
        flex-direction: row;
        align-items: center;
        gap: 15px;
        flex-wrap: wrap;
    }
    
    .room-details {
        flex: 1;
        min-width: 200px;
    }
    
    .room-details h1 {
        font-size: 1.5rem;
        margin-bottom: 8px;
    }
    
    .room-meta {
        gap: 15px;
        flex-wrap: wrap;
    }
    
    .room-actions {
        flex-shrink: 0;
        justify-content: flex-end;
    }
    
    .room-sidebar {
        width: 100%;
        right: -100%;
    }
    
    .feature-list {
        flex-direction: column;
        gap: 15px;
    }
    
    .share-buttons {
        flex-direction: column;
    }
    
    .share-btn {
        min-width: auto;
    }
    
    .modal-container {
        margin: 10px;
        max-width: none;
        width: calc(100% - 20px);
    }
}

@media (max-width: 480px) {
    .room-banner {
        padding: 15px 0;
    }
    
    .room-info {
        flex-direction: row;
        align-items: flex-start;
        gap: 10px;
    }
    
    .room-details {
        flex: 1;
        min-width: 150px;
    }
    
    .room-details h1 {
        font-size: 1.3rem;
        margin-bottom: 6px;
    }
    
    .room-meta {
        flex-direction: column;
        gap: 6px;
    }
    
    .room-actions {
        flex-direction: column;
        gap: 8px;
        flex-shrink: 0;
    }
    
    .btn-secondary,
    .btn-danger {
        justify-content: center;
        width: 100%;
        padding: 8px 12px;
        font-size: 0.9rem;
    }
    
    .placeholder-content h2 {
        font-size: 1.5rem;
    }
    
    .placeholder-content p {
        font-size: 1rem;
    }
}

/* Chatbox Styling for Room Player */
.room-player-page .chatbox {
    height: fit-content;
    min-height: 500px;
}

.room-player-page .chatbox-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    text-align: center;
    color: var(--text-secondary);
}

.room-player-page .chatbox-placeholder h3 {
    color: var(--text-primary);
    margin: 0 0 10px 0;
    font-size: 1.3rem;
    font-weight: 600;
}

.room-player-page .chatbox-placeholder p {
    color: var(--text-secondary);
    margin: 0;
    font-size: 0.95rem;
}

/* Tablet specific styling (769px to 1024px) */
@media (min-width: 769px) and (max-width: 1024px) {
    /* Hide desktop episodes sidebar on tablet */
    .room-player-page .episodes-left {
        display: none !important;
    }
    
    /* Show mobile controls on tablet */
    .room-player-page .controls-desktop {
        display: none !important;
    }
    
    .room-player-page .controls-mobile {
        display: flex !important;
    }
}

/* Mobile Episodes Section - Uses exact player.css styling */
/* Hide mobile episodes on desktop by default */
.room-player-page .episodes-mobile {
    display: none !important;
}

/* Let player.css media queries override for tablet/mobile */
@media (max-width: 1100px) {
    .room-player-page .episodes-mobile {
        display: block !important;
        order: 3;
        margin-top: 12px;
        margin-bottom: 12px;
        width: 100%;
        margin-left: 0;
        margin-right: 0;
    }
}

/* Hide mobile episodes for movies on all screen sizes */
.room-player-page .grid-main.movie-layout .episodes-mobile {
    display: none !important;
}

/* Minimal chatbox styling - let tlk.io handle its own styling */
.room-player-page .chatbox {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.room-player-page .chatbox-header {
    padding: 15px;
    border-bottom: 1px solid var(--border);
    background: var(--card-bg);
}

.room-player-page .chatbox-header h3 {
    margin: 0;
    color: var(--text-primary);
    font-size: 16px;
    font-weight: 600;
}

.room-player-page .chatbox-content {
    flex: 1;
    position: relative;
}

.room-player-page .chatbox-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    padding: 20px;
    text-align: center;
}

.room-player-page .chatbox-placeholder p {
    color: var(--text-secondary);
    margin: 0;
}

/* Player Styles for Room Player */
.room-player-page .player {
    background: var(--card-bg);
    border-radius: 16px;
    border: 1px solid var(--border);
    overflow: hidden;
}

.room-player-page .video-wrap {
    position: relative;
    width: 100%;
    height: 0;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    background: #000;
    border-radius: 16px 16px 0 0;
    overflow: hidden;
}

.room-player-page .video-wrap iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

.room-player-page .controls {
    padding: 15px 20px;
    background: var(--card-bg);
    border-top: 1px solid var(--border);
}

.room-player-page .controls-desktop {
    display: flex;
    align-items: center;
    gap: 15px;
}

.room-player-page .server-section {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.room-player-page .control-section {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.room-player-page .spacer {
    flex: 1;
}

.room-player-page .pill {
    padding: 8px 16px;
    border-radius: 20px;
    border: 1px solid var(--border);
    background: var(--input-bg);
    color: var(--text-primary);
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.room-player-page .pill:hover {
    background: rgba(255, 44, 44, 0.1);
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.room-player-page .pill.active {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

.room-player-page .pill.server.active {
    background: linear-gradient(135deg, #ff2c2c, #e63946);
    border-color: #ff2c2c;
}

.room-player-page .controls-mobile {
    display: none;
    flex-direction: column;
    gap: 15px;
}

/* Show mobile controls on mobile devices */
@media (max-width: 768px) {
    .room-player-page .controls-desktop {
        display: none !important;
    }
    
    .room-player-page .controls-mobile {
        display: flex !important;
    }
}

.room-player-page .mobile-nav-row,
.room-player-page .mobile-server-row {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: center;
}

/* Mobile button optimizations - Match animeplayer/player layout */
@media (max-width: 768px) {
    .room-player-page .mobile-nav-row {
        display: flex;
        gap: 6px;
        margin-bottom: 8px;
        justify-content: space-between;
        flex-wrap: wrap;
    }
    
    .room-player-page .mobile-nav-row .pill {
        flex: 1;
        min-width: 0;
        font-size: 12px;
        padding: 8px 6px;
        justify-content: center;
    }
    
    /* Make prev/next buttons more compact (icon only) */
    .room-player-page .mobile-nav-row .control-btn {
        flex: 0 0 auto;
        min-width: 40px;
        max-width: 50px;
    }
    
    /* Sub/Dub buttons can take more space */
    .room-player-page .mobile-nav-row .subdub-btn {
        flex: 1;
        min-width: 0;
    }
    
    /* When Sub/Dub buttons are hidden (TV shows), reduce spacing between remaining buttons */
    .room-player-page .mobile-nav-row .subdub-btn[style*="display: none"] {
        display: none !important;
    }
    
    /* Adjust spacing for TV shows (when sub/dub buttons are hidden) */
    .room-player-page .mobile-nav-row:has(.subdub-btn[style*="display: none"]) {
        justify-content: center;
        gap: 12px;
    }
    
    .room-player-page .mobile-nav-row:has(.subdub-btn[style*="display: none"]) .control-btn {
        flex: 0 0 auto;
        min-width: 50px;
        max-width: 60px;
    }
    
    /* Alternative approach using class for better browser support */
    .room-player-page .mobile-nav-row.tvshow-layout {
        justify-content: center;
        gap: 12px;
    }
    
    .room-player-page .mobile-nav-row.tvshow-layout .control-btn {
        flex: 0 0 auto;
        min-width: 50px;
        max-width: 60px;
    }
    
    .room-player-page .mobile-server-row {
        display: flex;
        gap: 6px;
        flex-wrap: wrap;
        margin-bottom: 0;
    }
    
    .room-player-page .mobile-server-row .pill {
        flex: 1;
        min-width: 60px;
        font-size: 11px;
        padding: 8px 6px;
        text-align: center;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    
    .room-player-page .mobile-subdub-row {
        display: none;
    }
}

/* Extra small mobile screens - ensure server buttons have enough width */
@media (max-width: 480px) {
    .room-player-page .mobile-server-row .pill {
        min-width: 70px;
        font-size: 10px;
        padding: 8px 4px;
    }
    
    .room-player-page .mobile-server-row {
        gap: 4px;
    }
}

.room-player-page .episodes-section {
    padding: 20px;
    background: var(--card-bg);
    border-top: 1px solid var(--border);
}

.room-player-page .season-selector {
    margin-bottom: 15px;
}

.room-player-page .season-select {
    padding: 10px 15px;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: var(--input-bg);
    color: var(--text-primary);
    font-size: 1rem;
}

.room-player-page .episodes-header h3 {
    color: var(--text-primary);
    margin-bottom: 15px;
    font-size: 1.2rem;
}

.room-player-page .episodes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
}

.room-player-page .episode-placeholder {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-secondary);
    background: var(--input-bg);
    border-radius: 12px;
    border: 1px solid var(--border);
}

/* Download Modal */
.download-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(10px);
    z-index: 9999;
    align-items: center;
    justify-content: center;
}

.download-content {
    background: var(--card-bg);
    border-radius: 16px;
    border: 1px solid var(--border);
    width: 90%;
    max-width: 800px;
    max-height: 90vh;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.download-header {
    padding: 20px;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--bg-secondary);
}

.download-header h3 {
    color: var(--text-primary);
    margin: 0;
    font-size: 1.3rem;
}

.download-header .close-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 1.2rem;
    cursor: pointer;
    padding: 5px;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.download-header .close-btn:hover {
    color: var(--primary-color);
    background: rgba(255, 44, 44, 0.1);
}

.download-body {
    height: 500px;
    position: relative;
}

.download-iframe {
    width: 100%;
    height: 100%;
    border: none;
}

