/**
 * ================================================================================
 * CO-READIT - Sessions CSS (Livestream & Space)
 * ================================================================================
 * 
 * Styles for homepage session bubbles, livestream modals, space modals,
 * and active session interfaces.
 */

/* ========================================
   LUCIDE ICONS
   ======================================== */

.lucide-icon {
    display: inline-block;
    vertical-align: middle;
    flex-shrink: 0;
}

.session-btn .lucide-icon,
.reminder-btn .lucide-icon {
    margin-right: 6px;
    vertical-align: -2px;
}

.option-icon .lucide-icon {
    width: 24px;
    height: 24px;
}

.space-badge .lucide-icon {
    margin-right: 4px;
    vertical-align: -2px;
}

/* ========================================
   SESSION BUBBLES CONTAINER
   ======================================== */

.sessions-bubbles-container {
    padding: 2px 0;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 1px;
    /* Default hidden, shown by JS when content exists */
    display: none;
}

/* Show only when has content - JS sets display:block */
.sessions-bubbles-container.has-content {
    display: block;
}

/* Fallback: hide when empty using CSS :has() for modern browsers */
.sessions-bubbles-container:empty {
    display: none !important;
}

.bubbles-scroll-container {
    display: flex;
    gap: 2px;
    overflow-x: auto;
    padding: 0 5px;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.bubbles-scroll-container::-webkit-scrollbar {
    display: none;
}

/* ========================================
   INDIVIDUAL SESSION BUBBLE
   ======================================== */

.session-bubble {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    cursor: pointer;
    flex-shrink: 0;
    min-width: 72px;
    transition: transform 0.2s ease;
}

.session-bubble:hover {
    transform: scale(1.05);
}

.session-bubble:active {
    transform: scale(0.98);
}

.bubble-avatar-wrapper {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    position: relative;
    padding: 3px;
    background: var(--border-color);
}

.bubble-avatar {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--bg-primary);
}

/* Avatar placeholder with initial letter */
.avatar-placeholder {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: white;
    font-weight: 600;
    text-transform: uppercase;
}

/* Bubble avatar placeholder (64px wrapper) */
.bubble-avatar.avatar-placeholder {
    width: 100%;
    height: 100%;
    font-size: 24px;
    border: 2px solid var(--bg-primary);
}

/* Session host avatar placeholder (40px) */
.session-host-avatar.avatar-placeholder {
    width: 40px;
    height: 40px;
    font-size: 16px;
}

@media (max-width: 768px) {
    .session-host-avatar.avatar-placeholder {
        width: 32px;
        height: 32px;
        font-size: 14px;
    }
}

/* Speaker avatar placeholder (58px) */
.speaker-avatar.avatar-placeholder {
    width: 58px;
    height: 58px;
    font-size: 22px;
}

/* Listener avatar placeholder (48px) */
.listener-avatar.avatar-placeholder {
    width: 48px;
    height: 48px;
    font-size: 18px;
    border: 2px solid var(--border-color);
}

/* Chat message avatar placeholder (20px) */
.chat-message-avatar.avatar-placeholder {
    width: 20px;
    height: 20px;
    font-size: 10px;
}

/* Request avatar placeholder (40px) */
.request-avatar.avatar-placeholder {
    width: 40px;
    height: 40px;
    font-size: 16px;
}

/* Create bubble plus icon */
.session-bubble-create .bubble-plus-icon {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 22px;
    height: 22px;
    background: var(--primary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--bg-primary);
    color: white;
}

/* Ring colors for active sessions */
.bubble-live-ring {
    background: linear-gradient(135deg, #ff0000, #ff6b6b);
    animation: pulse-live 2s ease-in-out infinite;
}

.bubble-space-ring {
    background: linear-gradient(135deg, #8b5cf6, #a78bfa);
    animation: pulse-space 2s ease-in-out infinite;
}

@keyframes pulse-live {
    0%, 100% { box-shadow: 0 0 0 0 rgba(255, 0, 0, 0.4); }
    50% { box-shadow: 0 0 0 4px rgba(255, 0, 0, 0); }
}

@keyframes pulse-space {
    0%, 100% { box-shadow: 0 0 0 0 rgba(139, 92, 246, 0.4); }
    50% { box-shadow: 0 0 0 4px rgba(139, 92, 246, 0); }
}

/* Scheduled session bubble styling */
.session-bubble-scheduled {
    opacity: 0.9;
}

.bubble-scheduled-ring {
    background: linear-gradient(135deg, #f59e0b, #fbbf24);
    border: 2px dashed var(--bg-primary);
}

.bubble-scheduled-badge {
    border: solid 2px #fff;
    position: absolute;
    bottom: 0px;
    right: -2px;
    font-size: 14px;
    background: #f59e0b;
    border-radius: 50%;
    padding: 2px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.bubble-scheduled-badge .lucide-icon {
    color: white;
    width: 12px;
    height: 12px;
}

@keyframes pulse-scheduled {
    0%, 100% { box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.4); }
    50% { box-shadow: 0 0 0 4px rgba(245, 158, 11, 0); }
}

/* Live/Space badges on bubbles */
.bubble-live-badge {
    border: 2px solid;
    position: absolute;
    bottom: -4px;
    left: 50%;
    transform: translateX(-50%);
    background: #ff0000;
    color: white;
    font-size: 8px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 3px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.bubble-space-badge {
    border: solid 2px #fff;
    position: absolute;
    bottom: 0px;
    right: -2px;
    font-size: 14px;
    background: #8b5cf6;
    border-radius: 50%;
    padding: 3px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.bubble-space-badge .lucide-icon {
    color: white;
    width: 12px;
    height: 12px;
}

/* Labels under bubbles */
.bubble-label {
    font-size: 11px;
    color: var(--text-primary);
    max-width: 72px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    text-align: center;
    font-weight: 500;
}

.bubble-label .verified-badge {
    color: var(--primary-color);
    vertical-align: middle;
    margin-left: 2px;
}

.bubble-viewers {
    font-size: 10px;
    color: var(--text-secondary);
    text-align: center;
}

/* ========================================
   SESSION MODALS
   ======================================== */

.session-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    backdrop-filter: blur(4px);
}

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

.session-modal-header h2 {
    margin: 0;
    font-size: 18px;
    color: var(--text-primary);
}

.session-modal-close {
    background: none;
    border: none;
    font-size: 24px;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.2s;
}

.session-modal-close:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

/* Create session modal */
.session-create-modal {
    background: var(--bg-primary);
    border-radius: 16px;
    width: 90%;
    max-width: 400px;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.session-create-options {
    padding: 12px;
}

.session-create-option {
    display: flex;
    align-items: center;
    gap: 16px;
    width: 100%;
    padding: 16px;
    background: none;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: background 0.2s;
}

.session-create-option:hover {
    background: var(--bg-secondary);
}

.option-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
}

.option-icon.livestream-icon {
    background: rgba(255, 0, 0, 0.1);
}

.option-icon.space-icon {
    background: rgba(139, 92, 246, 0.1);
}

.option-info {
    text-align: left;
}

.option-info h3 {
    margin: 0 0 4px 0;
    font-size: 16px;
    color: var(--text-primary);
}

.option-info p {
    margin: 0;
    font-size: 13px;
    color: var(--text-secondary);
}

/* Scheduled session modal */
.scheduled-session-modal {
    background: var(--bg-primary);
    border-radius: 16px;
    width: 90%;
    max-width: 400px;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.scheduled-session-content {
    padding: 20px;
    text-align: center;
}

.scheduled-session-type {
    display: inline-block;
    padding: 4px 12px;
    background: var(--bg-secondary);
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 16px;
}

.scheduled-session-host {
    margin-bottom: 16px;
}

.scheduled-session-host .host-label {
    color: var(--text-secondary);
    font-size: 13px;
}

.scheduled-session-host .host-name {
    color: var(--text-primary);
    font-weight: 600;
}

.scheduled-session-time {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 16px;
    font-size: 14px;
    color: var(--text-secondary);
}

.scheduled-session-time .lucide-icon,
.scheduled-date .lucide-icon,
.scheduled-time .lucide-icon {
    vertical-align: middle;
    margin-right: 4px;
}

.scheduled-countdown {
    font-size: 18px;
    font-weight: 600;
    color: #f59e0b;
    margin-bottom: 20px;
    padding: 12px;
    background: rgba(245, 158, 11, 0.1);
    border-radius: 8px;
}

.scheduled-countdown.ready {
    color: #10b981;
    background: rgba(16, 185, 129, 0.1);
}

.scheduled-session-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.scheduled-session-actions .session-btn {
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all 0.2s;
}

.scheduled-session-actions .session-btn-primary {
    background: var(--primary-color);
    color: white;
}

.scheduled-session-actions .session-btn-primary:hover:not(:disabled) {
    background: var(--primary-color-hover, #3b82f6);
}

.scheduled-session-actions .session-btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.scheduled-session-actions .session-btn-secondary {
    background: var(--bg-secondary);
    color: var(--text-primary);
}

.scheduled-session-actions .session-btn-secondary:hover {
    background: var(--bg-tertiary, #374151);
}

.scheduled-session-actions .reminder-set {
    color: #10b981;
}

.go-live-hint {
    font-size: 12px;
    color: var(--text-secondary);
    margin-top: 8px;
}

/* Setup modals (livestream & space) */
.session-setup-modal {
    background: var(--bg-primary);
    border-radius: 16px;
    width: 90%;
    max-width: 500px;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.session-setup-form {
    padding: 5px;
}

.session-setup-form .form-group {
    margin-bottom: 16px;
}

.session-setup-form label {
    display: flex;
    margin-bottom: 8px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
}

.session-setup-form input,
.session-setup-form textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: var(--bg-secondary);
    color: var(--text-primary);
    font-size: 14px;
    transition: border-color 0.2s;
}

.session-setup-form input:focus,
.session-setup-form textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

.session-setup-form textarea {
    resize: vertical;
    min-height: 80px;
}

.session-preview {
    position: relative;
    width: 100%;
    aspect-ratio: 16/9;
    background: var(--bg-tertiary);
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 16px;
}

.session-preview video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.session-preview .preview-placeholder {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: var(--text-secondary);
    font-size: 14px;
}

.session-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

/* Toggle Switch */
.toggle-switch-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    user-select: none;
    gap: 12px;
    position: relative;
}

.toggle-switch-input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
    pointer-events: none;
}

.toggle-switch-slider {
    position: relative;
    width: 44px;
    min-width: 44px;
    height: 24px;
    background: var(--bg-tertiary, #374151);
    border-radius: 24px;
    transition: background 0.3s ease;
    flex-shrink: 0;
    order: -1;
}

.toggle-switch-slider::before {
    content: '';
    position: absolute;
    width: 18px;
    height: 18px;
    left: 3px;
    top: 3px;
    background: white;
    border-radius: 50%;
    transition: transform 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.toggle-switch-input:checked + .toggle-switch-slider {
    background: var(--primary-color, #3b82f6);
}

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

.toggle-switch-input:focus + .toggle-switch-slider {
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.3);
}

.toggle-switch-text {
    font-size: 14px;
    color: var(--text-primary);
    font-weight: 400;
}

/* ========================================
   ACTIVE SESSION VIEW (FULL SCREEN)
   ======================================== */
img.speaker-avatar {
    height: 58px !important;
}

.session-active-overlay {
    background: rgba(0, 0, 0, 0.95);
}

.session-active-modal {
    width: 100%;
    height: 100%;
    max-width: none;
    max-height: none;
    display: flex;
    flex-direction: column;
    background: var(--bg-primary);
    border-radius: 0;
}

@media (min-width: 768px) {
    .session-active-modal {
        width: 95%;
        height: 90%;
        max-width: 1200px;
        border-radius: 16px;
    }
}

.session-active-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 5px 6px;
    border-bottom: 1px solid var(--border-color);
    background: var(--bg-secondary);
    flex-wrap: nowrap;
    gap: 12px;
}

@media (max-width: 768px) {
    .session-active-header {
        padding: 4px 5px;
        gap: 4px;
    }
    
    .session-host-avatar {
        width: 32px;
        height: 32px;
    }
    
    .session-host-name {
        font-size: 13px;
    }
    
    .session-title-text {
        font-size: 11px;
        max-width: 120px;
        -webkit-line-clamp: 2;
        line-clamp: 2;
    }
    
    .session-stats {
        gap: 8px;
    }
    
    .session-close-btn {
        width: 36px;
        height: 36px;
        min-width: 36px;
    }
    
    .session-close-btn svg {
        width: 18px;
        height: 18px;
    }
}

/* Ensure close button is always visible */
.session-active-header .session-close-btn {
    flex-shrink: 0;
    order: 3;
}

.session-host-info {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
    min-width: 0;
    overflow: hidden;
}

.session-host-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

.session-host-details {
    display: flex;
    flex-direction: column;
    min-width: 0;
    overflow: hidden;
}

.session-host-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 4px;
}

.session-host-name .verified-badge {
    flex-shrink: 0;
}

.session-title-text {
    font-size: 12px;
    color: var(--text-secondary);
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    white-space: normal;
    line-height: 1.3;
}

.session-stats {
    display: flex;
    align-items: center;
    gap: 16px;
}

.session-stats .participant-count {
    font-size: 13px;
    color: var(--text-secondary);
}

.session-close-btn {
    width: 40px;
    height: 40px;
    min-width: 40px;
    border-radius: 50%;
    border: 1px solid var(--border-color);
    background: var(--bg-primary);
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.2s;
    display: flex !important;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.session-close-btn svg {
    width: 20px;
    height: 20px;
}

.session-close-btn:hover {
    background: var(--bg-tertiary);
}

.session-close-btn[data-action="end"] {
    background: #ff4444;
    color: white;
    border-color: #ff4444;
}

.session-close-btn[data-action="end"]:hover {
    background: #cc0000;
    border-color: #cc0000;
}

.session-stat {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 13px;
    color: var(--text-secondary);
}

.session-stat svg {
    width: 16px;
    height: 16px;
}

.live-indicator {
    display: flex;
    align-items: center;
    gap: 6px;
    background: #ff0000;
    color: white;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
}

.live-indicator-dot {
    width: 6px;
    height: 6px;
    background: white;
    border-radius: 50%;
    animation: blink 1s ease-in-out infinite;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

/* Session content area */
.session-active-content {
    flex: 1;
    display: flex;
    overflow: hidden;
    position: relative;
}

@media (max-width: 768px) {
    .session-active-content {
        flex-direction: column;
    }
}

.session-video-container {
    flex: 1;
    background: #000;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 300px;
    overflow: hidden;
}

.session-video-container #local-video-container,
.session-video-container #remote-video-container {
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
}

/* Agora creates divs inside, ensure they fill container */
.session-video-container #local-video-container > div,
.session-video-container #remote-video-container > div,
.session-video-container #local-video-container > video,
.session-video-container #remote-video-container > video,
.session-video-container video {
    width: 100% !important;
    height: 100% !important;
    object-fit: contain;
}

/* Reactions overlay */
.session-reactions-overlay {
    position: absolute;
    bottom: 80px;
    left: 20px;
    pointer-events: none;
}

.reaction-float {
    position: absolute;
    animation: float-up 2s ease-out forwards;
    font-size: 24px;
}

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

/* Video controls */
.session-video-controls {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 20px;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
    display: flex;
    justify-content: center;
    gap: 12px;
}

.session-control-btn {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.session-control-btn:hover {
    background: rgba(255, 255, 255, 0.3);
}

.session-control-btn.btn-end {
    background: #ff0000;
    width: 56px;
    height: 56px;
}

.session-control-btn.btn-end:hover {
    background: #cc0000;
}

/* Chat sidebar */
.session-chat-sidebar {
    width: 320px;
    display: flex;
    flex-direction: column;
    border-left: 1px solid var(--border-color);
    background: var(--bg-primary);
}

@media (max-width: 768px) {
    .session-chat-sidebar {
        display: none;
        width: 100%;
    }
    
    .session-chat-sidebar.show {
        display: flex;
        position: absolute;
        right: 0;
        top: 0;
        bottom: 0;
        z-index: 100;
        width: 100%;
        background: var(--bg-primary);
    }
}

/* Mobile video controls */
.mobile-video-controls {
    display: none;
    position: absolute;
    bottom: 280px; /* Position above mobile chat overlay */
    right: 16px;
    flex-direction: column;
    gap: 8px;
    z-index: 60;
}

@media (max-width: 768px) {
    .mobile-video-controls {
        display: flex;
    }
}

/* Mobile chat overlay - shows live comments on video */
.mobile-chat-overlay {
    display: none;
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    max-height: 50%;
    flex-direction: column;
    z-index: 40;
    pointer-events: none;
    padding: 12px;
}

@media (max-width: 768px) {
    .mobile-chat-overlay {
        display: flex;
    }
}

.mobile-chat-messages {
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding-bottom: 8px;
    max-height: 200px;
    pointer-events: auto;
    /* Fade effect at top */
    -webkit-mask-image: linear-gradient(to bottom, transparent 0%, black 20%);
    mask-image: linear-gradient(to bottom, transparent 0%, black 20%);
}

.mobile-chat-message {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px;
    background: rgba(0, 0, 0, 0.6);
    padding: 6px 10px;
    border-radius: 16px;
    font-size: 13px;
    backdrop-filter: blur(4px);
    width: fit-content;
    max-width: 85%;
    animation: slideInChat 0.3s ease-out;
}

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

.mobile-chat-message.tip-message {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.8), rgba(217, 119, 6, 0.8));
}

.mobile-chat-username {
    font-weight: 600;
    color: #60a5fa;
    display: inline-flex;
    align-items: center;
    gap: 2px;
}

.mobile-chat-text {
    color: white;
    word-break: break-word;
}

.mobile-tip-badge {
    background: #f59e0b;
    color: white;
    padding: 2px 6px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 600;
}

.mobile-chat-input-row {
    display: flex;
    gap: 8px;
    padding-top: 8px;
    pointer-events: auto;
}

.mobile-chat-input-row input {
    flex: 1;
    background: rgba(0, 0, 0, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    padding: 10px 16px;
    color: white;
    font-size: 14px;
    backdrop-filter: blur(4px);
}

.mobile-chat-input-row input::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

.mobile-chat-input-row input:focus {
    outline: none;
    border-color: var(--primary-color);
}

.mobile-send-btn {
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 50%;
    width: 44px;
    height: 44px;
    min-width: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.mobile-send-btn svg {
    width: 20px;
    height: 20px;
}

.mobile-send-btn:active {
    transform: scale(0.95);
}

.mobile-chat-input-row .mobile-tip-btn {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: white;
    border: none;
    border-radius: 50%;
    width: 44px;
    height: 44px;
    min-width: 44px;
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mobile-chat-input-row .mobile-tip-btn:active {
    transform: scale(0.95);
}

/* Mobile reactions column - positioned vertically on right side */
.mobile-reactions-column {
    display: none;
    position: absolute;
    right: 12px;
    bottom: 100px;
    flex-direction: column;
    gap: 10px;
    z-index: 50;
    pointer-events: auto;
}

span.mobile-chat-username {
    color: var(--primary-color) !important;
}

@media (max-width: 768px) {
    .mobile-reactions-column {
        display: flex;
    }
}

.mobile-reaction-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.2);
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(4px);
    transition: transform 0.2s, background 0.2s;
}

.mobile-reaction-btn:hover {
    background: rgba(0, 0, 0, 0.7);
}

.mobile-reaction-btn:active {
    transform: scale(0.9);
    background: rgba(255, 255, 255, 0.2);
}

.mobile-reactions-column .mobile-tip-btn {
    width: 44px;
    height: 44px;
    min-width: 44px;
    border-radius: 50%;
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: white;
    border: none;
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mobile-reactions-column .mobile-tip-btn:active {
    transform: scale(0.9);
}

/* Desktop only elements */
.desktop-only {
    display: flex;
}

@media (max-width: 768px) {
    .desktop-only {
        display: none !important;
    }
}

/* Mobile stats overlay - positioned on video */
.mobile-stats-overlay {
    display: none;
    position: absolute;
    top: 12px;
    left: 12px;
    flex-direction: column;
    gap: 6px;
    z-index: 50;
}

@media (max-width: 768px) {
    .mobile-stats-overlay {
        display: flex;
    }
}

.mobile-stats-overlay .live-indicator {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #ff0000;
    color: white;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    width: fit-content;
}

.mobile-stats-overlay .mobile-stat {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 12px;
    backdrop-filter: blur(4px);
    width: fit-content;
}

/* Total tips stat in header */
.total-tips-stat {
    color: #ffa500;
    font-weight: 600;
}

.mobile-chat-toggle,
.mobile-tip-btn {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: none;
    background: rgba(0, 0, 0, 0.6);
    color: white;
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(8px);
    transition: all 0.2s;
}

.mobile-chat-toggle:hover,
.mobile-tip-btn:hover {
    background: rgba(0, 0, 0, 0.8);
    transform: scale(1.1);
}

/* Chat header with close button */
.session-chat-header {
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-color);
    font-weight: 600;
    color: var(--text-primary);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.close-chat-btn {
    display: none;
    background: none;
    border: none;
    font-size: 24px;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 0;
    line-height: 1;
}

@media (max-width: 768px) {
    .close-chat-btn {
        display: block;
    }
}

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

.session-chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.chat-message {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.chat-message-header {
    display: flex;
    align-items: center;
    gap: 6px;
}

.chat-message-avatar {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    object-fit: cover;
}

.chat-message-username {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-primary);
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.chat-message-username .verified-badge {
    flex-shrink: 0;
}

.chat-message-content {
    font-size: 13px;
    color: var(--text-primary);
    line-height: 1.4;
    padding-left: 26px;
}

.chat-message.tip-message {
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.1), rgba(255, 165, 0, 0.1));
    padding: 8px;
    margin-bottom: 8px;
    border-radius: 8px;
    border: 1px solid rgba(255, 215, 0, 0.3);
}

.chat-message.tip-message .tip-amount {
    color: #ffa500;
    font-weight: 700;
}

.session-chat-input {
    padding: 12px;
    border-top: 1px solid var(--border-color);
    display: flex;
    gap: 8px;
}

.session-chat-input input {
    flex: 1;
    padding: 10px 14px;
    border: 1px solid var(--border-color);
    border-radius: 20px;
    background: var(--bg-secondary);
    color: var(--text-primary);
    font-size: 14px;
}

.session-chat-input input:focus {
    outline: none;
    border-color: var(--primary-color);
}

.session-chat-input button {
    width: 40px;
    height: 40px;
    min-width: 40px;
    padding: 0;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.session-chat-input button svg {
    width: 18px;
    height: 18px;
}

/* Reactions bar */
.session-reactions-bar {
    padding: 8px 12px;
    border-top: 1px solid var(--border-color);
    display: flex;
    gap: 8px;
    justify-content: center;
}

.reaction-btn {
    padding: 8px 12px;
    background: var(--bg-secondary);
    border: none;
    border-radius: 20px;
    cursor: pointer;
    font-size: 18px;
    transition: transform 0.2s, background 0.2s;
}

.reaction-btn:hover {
    transform: scale(1.1);
    background: var(--bg-tertiary);
}

.reaction-btn:active {
    transform: scale(0.95);
}

/* Tip button */
.tip-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: linear-gradient(135deg, #ffd700, #ffa500);
    color: #000;
    border: none;
    border-radius: 20px;
    cursor: pointer;
    font-weight: 600;
    font-size: 14px;
}

.tip-btn:hover {
    opacity: 0.9;
}

/* ========================================
   SPACE-SPECIFIC STYLES
   ======================================== */

.space-modal {
    display: flex;
    flex-direction: column;
    background: var(--bg-primary);
}

.space-modal .session-active-header {
    flex-wrap: wrap;
    gap: 5px;
}

/* Space header right section */
.space-header-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 6px;
}

.mobile-listener-count {
    display: none;
    font-size: 12px;
    color: var(--text-secondary);
}

.mobile-tip-total {
    display: none;
    font-size: 12px;
    color: #ffa500;
    font-weight: 600;
}

@media (max-width: 768px) {
    .mobile-listener-count {
        display: block;
    }
    
    .mobile-tip-total {
        display: block;
    }
    
    .space-header-right {
        order: 3;
    }
}

.space-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: #8b5cf6;
    color: white;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.session-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.session-info h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
}

.host-info {
    font-size: 13px;
    color: var(--text-secondary);
}

/* Space content layout */
.session-content.space-content {
    flex: 1;
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto 1fr auto auto;
    gap: 0;
    overflow-y: auto;
    min-height: 300px;
}

@media (max-width: 768px) {
    .session-content.space-content {
        display: flex;
        flex-direction: column;
    }
}

.speakers-section {
    grid-column: 1 / -1;
    padding: 16px;
    border-bottom: 1px solid var(--border-color);
}

.speakers-section h4 {
    margin: 0 0 12px;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.speakers-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 5px;
    padding: 5px 0;
}

.listeners-section {
    grid-column: 1;
    padding: 16px;
    border-right: 1px solid var(--border-color);
}

@media (max-width: 768px) {
    .listeners-section {
        border-right: none;
        border-bottom: 1px solid var(--border-color);
    }
}

.listeners-section h4 {
    margin: 0 0 12px;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.listeners-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

/* Chat section in space - takes right side on desktop */
.chat-section {
    grid-column: 2;
    grid-row: 2 / 4;
    display: flex;
    flex-direction: column;
    border-top: none;
    min-height: 200px;
}

@media (max-width: 768px) {
    .chat-section {
        border-top: 1px solid var(--border-color);
        height: 200px;
        max-height: 200px;
    }
}

/* Space actions */
.space-actions {
    grid-column: 1;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
    padding: 16px;
    border-top: 1px solid var(--border-color);
}

@media (max-width: 768px) {
    .space-actions {
        grid-column: 1 / -1;
    }
}

.space-actions .btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 20px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    border: none;
    transition: all 0.2s;
}

.space-actions .btn-secondary {
    background: var(--bg-secondary);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.space-actions .btn-secondary:hover {
    background: var(--bg-tertiary);
}

.space-actions .btn-primary {
    background: linear-gradient(135deg, #ffd700, #ffa500);
    color: #000;
}

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

.chat-input-area {
    display: flex;
    gap: 8px;
    padding: 5px 6px;
    border-top: 1px solid var(--border-color);
    background: var(--bg-secondary);
}

.chat-input-area input {
    flex: 1;
    padding: 10px 14px;
    border: 1px solid var(--border-color);
    border-radius: 20px;
    background: var(--bg-primary);
    color: var(--text-primary);
    font-size: 14px;
}

.chat-input-area input:focus {
    outline: none;
    border-color: var(--primary-color);
}

.chat-input-area .send-btn {
    width: 40px;
    height: 40px;
    min-width: 40px;
    border-radius: 50%;
    background: var(--primary-color);
    color: white;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.chat-input-area .send-btn svg {
    width: 18px;
    height: 18px;
}

.chat-input-area .send-btn:hover {
    opacity: 0.9;
}

/* Space participant avatar grid styles */
.space-participants-grid,
.speakers-grid,
.listeners-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: flex-start;
    gap: 5px;
}

.speakers-grid {
    padding: 5px;
    gap: 5px;
}

/* Speaker card styles - Twitter Spaces like */
.speaker-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    width: 100px;
    padding: 12px 8px;
    background: transparent;
    border-radius: 12px;
    position: relative;
    transition: background 0.2s;
}

.speaker-card:hover {
    background: var(--bg-secondary);
}

.speaker-card.host {
    order: -1;
}

.speaker-avatar-wrapper {
    position: relative;
    width: 64px;
    height: 64px;
    border-radius: 50%;
    padding: 3px;
    background: var(--border-color);
    transition: all 0.3s;
}

.speaker-avatar-wrapper.speaking {
    background: linear-gradient(135deg, #22c55e, #16a34a);
    animation: speaking-ring 1.5s ease-in-out infinite;
}

@keyframes speaking-ring {
    0%, 100% { 
        box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.4);
        transform: scale(1);
    }
    50% { 
        box-shadow: 0 0 0 6px rgba(34, 197, 94, 0);
        transform: scale(1.02);
    }
}

.speaker-card.host .speaker-avatar-wrapper {
    background: linear-gradient(135deg, #8b5cf6, #7c3aed);
}

.speaker-card.host .speaker-avatar-wrapper.speaking {
    background: linear-gradient(135deg, #8b5cf6, #22c55e);
}

.speaker-avatar {
    width: 70%;
    height: 70%;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--bg-primary);
}

.mute-badge {
    position: absolute;
    bottom: -2px;
    right: -2px;
    width: 22px;
    height: 22px;
    background: #ef4444;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    border: 2px solid var(--bg-primary);
}

.speaker-card.muted .speaker-avatar-wrapper {
    background: #ef4444;
    opacity: 0.8;
}

.speaker-name {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-primary);
    text-align: center;
    max-width: 95px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 3px;
}

.speaker-name .verified-badge {
    flex-shrink: 0;
}

.speaker-role {
    font-size: 10px;
    padding: 2px 8px;
    border-radius: 10px;
    background: var(--bg-tertiary);
    color: var(--text-secondary);
}

.speaker-role.host {
    background: linear-gradient(135deg, #8b5cf6, #7c3aed);
    color: white;
}

.speaker-role.co_host {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: white;
}

/* Remove speaker button */
.remove-speaker-btn {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: rgba(239, 68, 68, 0.8);
    color: white;
    border: none;
    font-size: 12px;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.speaker-card:hover .remove-speaker-btn {
    display: flex;
}

.remove-speaker-btn:hover {
    background: #ef4444;
    transform: scale(1.1);
}

/* Request to speak button states */
#request-speak-btn.requested {
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    cursor: not-allowed;
    opacity: 0.7;
}

.no-speakers,
.no-listeners {
    color: var(--text-secondary);
    font-size: 13px;
    padding: 20px;
    text-align: center;
    width: 100%;
}

/* Listeners section */
.listeners-section {
    padding: 16px 20px;
    border-top: 1px solid var(--border-color);
}

.listeners-section h4 {
    margin: 0 0 12px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.listeners-grid {
    gap: 12px;
    justify-content: flex-start;
    display: flex;
    flex-wrap: wrap;
}

/* Listener card */
.listener-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    width: 70px;
}

.listener-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--border-color);
    cursor: pointer;
    transition: all 0.2s;
}

.listener-avatar:hover {
    transform: scale(1.1);
    border-color: var(--primary-color);
}

.listener-name {
    font-size: 11px;
    font-weight: 500;
    color: var(--text-primary);
    text-align: center;
    max-width: 70px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 2px;
}

.listener-name .verified-badge {
    flex-shrink: 0;
}

.listener-more {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    font-size: 12px;
    font-weight: 600;
}

/* Speaker Requests Panel */
.speaker-requests-panel {
    position: absolute;
    top: 60px;
    right: 16px;
    width: 280px;
    background: var(--bg-secondary);
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    z-index: 200;
    overflow: hidden;
}

.speaker-requests-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: var(--bg-tertiary);
    font-weight: 600;
    color: var(--text-primary);
}

.close-requests-btn {
    background: none;
    border: none;
    font-size: 20px;
    color: var(--text-secondary);
    cursor: pointer;
}

.speaker-requests-list {
    max-height: 300px;
    overflow-y: auto;
}

.speaker-request-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-color);
}

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

.request-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

.request-username {
    flex: 1;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.request-actions {
    display: flex;
    gap: 8px;
}

.approve-btn,
.reject-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.approve-btn {
    background: #22c55e;
    color: white;
}

.approve-btn:hover {
    background: #16a34a;
}

.reject-btn {
    background: #ef4444;
    color: white;
}

.reject-btn:hover {
    background: #dc2626;
}

/* Legacy space-participant styles for compatibility */
.space-participant {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    width: 80px;
    position: relative;
}

.space-participant-avatar {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid transparent;
    transition: border-color 0.3s;
}

.listeners-grid .space-participant-avatar {
    width: 40px;
    height: 40px;
    border-width: 2px;
}

.space-participant.speaking .space-participant-avatar {
    border-color: var(--primary-color);
    animation: speaking-pulse 1s ease-in-out infinite;
}

@keyframes speaking-pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(var(--primary-rgb), 0.4); }
    50% { box-shadow: 0 0 0 8px rgba(var(--primary-rgb), 0); }
}

.space-participant-name {
    font-size: 12px;
    font-weight: 500;
    color: var(--text-primary);
    text-align: center;
    max-width: 100px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.space-participant-role {
    font-size: 10px;
    color: var(--text-secondary);
    text-transform: uppercase;
}

.space-participant.host .space-participant-role {
    color: var(--primary-color);
}

.space-participant .mute-indicator {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 24px;
    height: 24px;
    background: var(--bg-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--border-color);
}

.space-participant .mute-indicator svg {
    width: 12px;
    height: 12px;
    color: #ff4444;
}

/* Speaker request button */
.speaker-request-btn {
    position: fixed;
    bottom: 100px;
    left: 50%;
    transform: translateX(-50%);
    padding: 12px 24px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 24px;
    cursor: pointer;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.speaker-request-btn:disabled {
    background: var(--text-secondary);
    cursor: not-allowed;
}

/* ========================================
   TIP MODAL
   ======================================== */

.tip-modal {
    background: var(--bg-primary);
    border-radius: 16px;
    width: 90%;
    max-width: 360px;
    overflow: hidden;
}

.tip-modal-content {
    padding: 24px;
    text-align: center;
}

.tip-recipient {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    margin-bottom: 20px;
}

.tip-recipient img {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    object-fit: cover;
}

.tip-recipient-name {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
}

.tip-amounts {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-bottom: 16px;
}

.tip-amount-btn {
    padding: 12px;
    background: var(--bg-secondary);
    border: 2px solid var(--border-color);
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    transition: all 0.2s;
}

.tip-amount-btn:hover {
    border-color: var(--primary-color);
}

.tip-amount-btn.selected {
    border-color: var(--primary-color);
    background: rgba(var(--primary-rgb), 0.1);
}

.tip-custom-amount {
    margin-bottom: 16px;
}

.tip-custom-amount input {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: var(--bg-secondary);
    color: var(--text-primary);
    font-size: 16px;
    text-align: center;
}

.tip-message-input {
    margin-bottom: 20px;
}

.tip-message-input textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: var(--bg-secondary);
    color: var(--text-primary);
    font-size: 14px;
    resize: none;
    height: 60px;
}

.tip-balance {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 16px;
}

.tip-send-btn {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #ffd700, #ffa500);
    color: #000;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 700;
    font-size: 16px;
}

.tip-send-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ========================================
   RESPONSIVE ADJUSTMENTS
   ======================================== */

@media (max-width: 480px) {
    .sessions-bubbles-container {
        padding: 1px 0;
    }
    
    .bubbles-scroll-container {
        gap: 2px;
        padding: 0 12px;
    }
    
    .bubble-avatar-wrapper {
        width: 56px;
        height: 56px;
    }
    
    .bubble-label {
        font-size: 10px;
        max-width: 60px;
    }
    
    .session-create-modal,
    .session-setup-modal,
    .tip-modal {
        width: 95%;
        border-radius: 12px;
    }
    
    .space-participants-grid {
        padding: 20px;
        gap: 12px;
    }
    
    .space-participant {
        width: 80px;
    }
    
    .space-participant-avatar {
        width: 56px;
        height: 56px;
    }
}

/* Dark mode adjustments */
@media (prefers-color-scheme: dark) {
    .session-video-controls {
        background: linear-gradient(transparent, rgba(0, 0, 0, 0.9));
    }
}

/* ========================================
   TIP CELEBRATION EFFECT
   ======================================== */

.tip-celebration-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(ellipse at center, rgba(255, 215, 0, 0.3) 0%, rgba(0, 0, 0, 0.7) 100%);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: celebration-fade-in 0.5s ease-out;
    pointer-events: none;
    overflow: hidden;
}

.tip-celebration-overlay.fade-out {
    animation: celebration-fade-out 0.5s ease-out forwards;
}

@keyframes celebration-fade-in {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes celebration-fade-out {
    from {
        opacity: 1;
    }
    to {
        opacity: 0;
    }
}

.tip-stars-container {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    overflow: hidden;
}

.celebration-star {
    position: absolute;
    animation: star-twinkle 2s ease-in-out infinite, star-float 3s ease-in-out infinite;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.8), 0 0 20px rgba(255, 215, 0, 0.5);
}

@keyframes star-twinkle {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.5;
        transform: scale(1.2);
    }
}

@keyframes star-float {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
    }
    50% {
        transform: translateY(-20px) rotate(180deg);
    }
}

.tip-celebration-content {
    position: relative;
    z-index: 10;
}

.tip-celebration-info {
    text-align: center;
    animation: celebration-bounce 0.6s ease-out;
}

@keyframes celebration-bounce {
    0% {
        transform: scale(0);
        opacity: 0;
    }
    50% {
        transform: scale(1.2);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.tip-celebration-emoji {
    font-size: 64px;
    margin-bottom: 16px;
    animation: emoji-pulse 1s ease-in-out infinite;
}

@keyframes emoji-pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
}

.tip-celebration-text {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 20px 40px;
    background: rgba(0, 0, 0, 0.8);
    border-radius: 20px;
    border: 2px solid rgba(255, 215, 0, 0.5);
    box-shadow: 0 0 30px rgba(255, 215, 0, 0.3);
}

.tip-celebration-username {
    font-size: 24px;
    font-weight: 700;
    color: #ffd700;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
}

.tip-celebration-message {
    font-size: 16px;
    color: #ffffff;
}

.tip-celebration-amount {
    font-size: 48px;
    font-weight: 800;
    color: #00ff88;
    text-shadow: 0 0 20px rgba(0, 255, 136, 0.5);
    animation: amount-glow 1.5s ease-in-out infinite;
}

@keyframes amount-glow {
    0%, 100% {
        text-shadow: 0 0 20px rgba(0, 255, 136, 0.5);
    }
    50% {
        text-shadow: 0 0 40px rgba(0, 255, 136, 0.8), 0 0 60px rgba(0, 255, 136, 0.4);
    }
}

/* Mobile adjustments for celebration */
@media (max-width: 768px) {
    .tip-celebration-emoji {
        font-size: 48px;
    }
    
    .tip-celebration-text {
        padding: 16px 24px;
    }
    
    .tip-celebration-username {
        font-size: 18px;
    }
    
    .tip-celebration-message {
        font-size: 14px;
    }
    
    .tip-celebration-amount {
        font-size: 36px;
    }
    
    .celebration-star {
        font-size: 16px !important;
    }
}
