* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --z-initial-loading: 9999;
    --z-notification-toast: 9000;
    --z-modal-overlay: 5000;
    --z-image-preview: 4000;
    --z-comment-menu: 3500;
    --z-notification-overlay: 3000;
    --z-live-stream-view: 2500;
    --z-broadcaster-controls: 2600;
    --z-audio-progress: 1000;
    --z-stream-overlay: 500;
    --z-comments-container: 450;
    --z-comment-input: 460;
    --z-video-grid: 200;
    --z-stream-image: 10;
    --z-top-nav: 100;
    --z-side-menu: 201;
    --z-side-menu-overlay: 200;
    --z-go-live-fab: 90;
    --z-audio-indicator: 600;
    --z-base: 1;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: #000;
    color: #fff;
    line-height: 1.4;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    position: relative;
    min-height: 100vh;
    touch-action: manipulation;
}

body.modal-open {
    overflow: hidden;
    position: fixed;
    width: 100%;
    height: 100%;
}

.audio-only-indicator {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 30px 50px;
    border-radius: 20px;
    z-index: var(--z-audio-indicator);
    animation: audioIndicatorPulse 2s ease-in-out infinite;
    box-shadow: 0 10px 40px rgba(102, 126, 234, 0.4);
    border: 2px solid rgba(102, 126, 234, 0.3);
    pointer-events: none;
    text-align: center;
}

.audio-only-indicator .audio-only-icon {
    font-size: 64px;
    margin-bottom: 10px;
}

.audio-only-indicator .audio-only-label {
    font-size: 16px;
    color: rgba(255, 255, 255, 0.8);
    font-weight: 600;
}

@keyframes audioIndicatorPulse {
    0%, 100% { 
        transform: translate(-50%, -50%) scale(1);
        box-shadow: 0 10px 40px rgba(102, 126, 234, 0.4);
    }
    50% { 
        transform: translate(-50%, -50%) scale(1.05);
        box-shadow: 0 15px 50px rgba(102, 126, 234, 0.6);
    }
}

.audio-upload-area {
    border: 2px dashed rgba(255, 255, 255, 0.3);
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
    background: rgba(255, 255, 255, 0.02);
}

.audio-upload-area:hover {
    border-color: #667eea;
    background: rgba(102, 126, 234, 0.05);
}

.audio-upload-preview {
    display: flex;
    align-items: center;
    gap: 12px;
    justify-content: center;
}

.audio-remove-btn {
    background: rgba(255, 59, 92, 0.2);
    border: 1px solid #ff3b5c;
    border-radius: 6px;
    color: #ff3b5c;
    padding: 4px 12px;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.2s;
}

.audio-remove-btn:hover {
    background: rgba(255, 59, 92, 0.3);
    transform: scale(1.05);
}

.initial-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: #000;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: var(--z-initial-loading);
    pointer-events: all;
}

.initial-loading .loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(255, 255, 255, 0.1);
    border-top-color: #667eea;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    will-change: transform;
    transform: translateZ(0);
}

.auth-screen {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    min-height: 100vh;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    background: linear-gradient(135deg, #fafafa 0%, #ffffff 50%, #f5f5f5 100%);
}

.auth-bg-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #fafafa 0%, #ffffff 50%, #f5f5f5 100%);
    z-index: 1;
}

.auth-bg-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
    overflow: hidden;
}

.auth-bg-gradient {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 20% 50%, rgba(102, 126, 234, 0.03) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(118, 75, 162, 0.03) 0%, transparent 50%),
        radial-gradient(circle at 40% 20%, rgba(99, 102, 241, 0.02) 0%, transparent 50%);
    animation: gradientShift 15s ease infinite;
}

@keyframes gradientShift {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.6; transform: scale(1.02); }
}

.auth-bg-shapes {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 3;
}

.shape {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.08;
    animation: floatShape 25s ease-in-out infinite;
    will-change: transform;
}

.shape-1 {
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(102, 126, 234, 0.4), transparent);
    top: -250px;
    left: -250px;
    animation-delay: 0s;
}

.shape-2 {
    width: 450px;
    height: 450px;
    background: radial-gradient(circle, rgba(118, 75, 162, 0.3), transparent);
    bottom: -225px;
    right: -225px;
    animation-delay: 5s;
}

.shape-3 {
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(79, 172, 254, 0.3), transparent);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation-delay: 10s;
}

.shape-4 {
    width: 350px;
    height: 350px;
    background: radial-gradient(circle, rgba(245, 87, 108, 0.2), transparent);
    top: 20%;
    right: 10%;
    animation-delay: 15s;
}

@keyframes floatShape {
    0%, 100% { transform: translate(0, 0) scale(1); }
    25% { transform: translate(30px, -50px) scale(1.05); }
    50% { transform: translate(-20px, 30px) scale(0.98); }
    75% { transform: translate(25px, 20px) scale(1.02); }
}

.auth-particles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 4;
    pointer-events: none;
}

.particle {
    position: absolute;
    width: 3px;
    height: 3px;
    background: rgba(102, 126, 234, 0.15);
    border-radius: 50%;
    animation: particleFloat 20s linear infinite;
    box-shadow: 0 0 8px rgba(102, 126, 234, 0.1);
}

.particle:nth-child(1) { left: 10%; animation-delay: 0s; animation-duration: 15s; }
.particle:nth-child(2) { left: 30%; animation-delay: 3s; animation-duration: 18s; }
.particle:nth-child(3) { left: 50%; animation-delay: 6s; animation-duration: 22s; }
.particle:nth-child(4) { left: 70%; animation-delay: 9s; animation-duration: 16s; }
.particle:nth-child(5) { left: 85%; animation-delay: 12s; animation-duration: 20s; }
.particle:nth-child(6) { left: 20%; animation-delay: 15s; animation-duration: 19s; }

@keyframes particleFloat {
    0% {
        transform: translateY(100vh) scale(0);
        opacity: 0;
    }
    10% {
        opacity: 0.3;
    }
    90% {
        opacity: 0.3;
    }
    100% {
        transform: translateY(-100vh) scale(1);
        opacity: 0;
    }
}

.auth-container {
    position: relative;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 40px 20px;
    width: 100%;
}

.auth-content {
    position: relative;
    width: 100%;
    max-width: 420px;
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.98);
    border: 1px solid rgba(219, 219, 219, 0.8);
    border-radius: 4px;
    padding: 0;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.08);
    animation: slideUpFadeIn 0.6s cubic-bezier(0.16, 1, 0.3, 1);
    overflow: hidden;
}

@keyframes slideUpFadeIn {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.auth-header {
    padding: 48px 40px 24px;
    text-align: center;
    background: #fff;
}

.auth-logo-container {
    position: relative;
    display: inline-block;
    margin-bottom: 24px;
}

.logo-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 120px;
    height: 120px;
    background: radial-gradient(circle, rgba(102, 126, 234, 0.08), transparent 70%);
    filter: blur(30px);
    animation: glowPulse 4s ease-in-out infinite;
    z-index: 1;
}

@keyframes glowPulse {
    0%, 100% {
        opacity: 0.3;
        transform: translate(-50%, -50%) scale(1);
    }
    50% {
        opacity: 0.5;
        transform: translate(-50%, -50%) scale(1.2);
    }
}

.logo-ring {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100px;
    height: 100px;
    border: 2px solid rgba(102, 126, 234, 0.1);
    border-radius: 50%;
    animation: ringPulse 3s ease-in-out infinite;
}

@keyframes ringPulse {
    0%, 100% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 0.15;
    }
    50% {
        transform: translate(-50%, -50%) scale(1.3);
        opacity: 0;
    }
}

.auth-title {
    font-size: 42px;
    font-weight: 700;
    margin-bottom: 8px;
    letter-spacing: -1.5px;
    line-height: 1.2;
}

.title-gradient {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

.auth-subtitle {
    font-size: 16px;
    color: #8e8e8e;
    font-weight: 400;
    letter-spacing: 0.3px;
    margin-top: 4px;
}

.auth-body {
    padding: 24px 40px 40px;
    background: #fff;
}

.auth-features {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-bottom: 28px;
}

.feature-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: #fafafa;
    padding: 20px 12px;
    border-radius: 8px;
    border: 1px solid #efefef;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    min-height: 100px;
}

.feature-item:hover {
    background: #f5f5f5;
    border-color: #dbdbdb;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.feature-icon-wrapper {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1), rgba(118, 75, 162, 0.1));
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(102, 126, 234, 0.15);
    transition: all 0.3s;
}

.feature-item:hover .feature-icon-wrapper {
    transform: scale(1.08);
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.15), rgba(118, 75, 162, 0.15));
}

.feature-icon {
    font-size: 24px;
}

.feature-text {
    font-size: 12px;
    font-weight: 600;
    color: #262626;
    text-align: center;
    line-height: 1.3;
}

.auth-buttons-container {
    display: flex;
    flex-direction: column;
    gap: 8px;  /* Changed from 16px to 8px */
    width: 100%;
}

.btn {
    width: 100%;
    min-height: 56px;
    padding: 16px 24px;
    border: none;
    border-radius: 12px;
    font-size: 17px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    overflow: hidden;
    touch-action: manipulation;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    -webkit-appearance: button;
    -webkit-user-select: none;
    user-select: none;
    z-index: 10;
}

.btn:active {
    transform: scale(0.98);
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.btn-google {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    color: #333333;
    border: 1px solid #dadce0;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
    -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
}

.btn-google:focus {
    outline: 2px solid #4285f4;
    outline-offset: 2px;
}

.btn-google:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
    transform: translateY(-2px);
}

.btn-facebook {
    background: linear-gradient(135deg, #1877f2 0%, #0e5fbd 100%);
    color: white;
    border: none;
    box-shadow: 0 6px 20px rgba(24, 119, 242, 0.3);
    -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
}

.btn-facebook:focus {
    outline: 2px solid #1877f2;
    outline-offset: 2px;
}

.btn-facebook:hover {
    box-shadow: 0 8px 24px rgba(24, 119, 242, 0.4);
    transform: translateY(-2px);
}

.google-icon {
    width: 20px;
    height: 20px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%234285f4' d='M22.56 12.25c0-.78-.07-1.53-.2-2.25H12v4.26h5.92c-.26 1.37-1.04 2.53-2.21 3.31v2.77h3.57c2.08-1.92 3.28-4.74 3.28-8.09z'/%3E%3Cpath fill='%2334a853' d='M12 23c2.97 0 5.46-.98 7.28-2.66l-3.57-2.77c-.98.66-2.23 1.06-3.71 1.06-2.86 0-5.29-1.93-6.16-4.53H2.18v2.84C3.99 20.53 7.7 23 12 23z'/%3E%3Cpath fill='%23fbbc05' d='M5.84 14.09c-.22-.66-.35-1.36-.35-2.09s.13-1.43.35-2.09V7.07H2.18C1.43 8.55 1 10.22 1 12s.43 3.45 1.18 4.93l2.85-2.22.81-.62z'/%3E%3Cpath fill='%23ea4335' d='M12 5.38c1.62 0 3.06.56 4.21 1.64l3.15-3.15C17.45 2.09 14.97 1 12 1 7.7 1 3.99 3.47 2.18 7.07l3.66 2.84c.87-2.6 3.3-4.53 6.16-4.53z'/%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
    flex-shrink: 0;
    pointer-events: none;
}

.facebook-icon {
    width: 20px;
    height: 20px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'%3E%3Cpath d='M24 12.073c0-6.627-5.373-12-12-12s-12 5.373-12 12c0 5.99 4.388 10.954 10.125 11.854v-8.385H7.078v-3.47h3.047V9.43c0-3.007 1.792-4.669 4.533-4.669 1.312 0 2.686.235 2.686.235v2.953H15.83c-1.491 0-1.956.925-1.956 1.874v2.25h3.328l-.532 3.47h-2.796v8.385C19.612 23.027 24 18.062 24 12.073z'/%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
    flex-shrink: 0;
    pointer-events: none;
}

.divider {
    display: flex;
    align-items: center;
    text-align: center;
    margin: 0;  /* Changed from 4px 0 to 0 */
    color: rgba(0, 0, 0, 0.4);
    font-size: 13px;  /* Slightly smaller */
}

.divider::before,
.divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid rgba(0, 0, 0, 0.12);  /* More subtle line */
}

.divider span {
    padding: 0 10px;  /* Slightly reduced from 12px */
}

.auth-disclaimer {
    font-size: 11px;
    color: rgba(0, 0, 0, 0.5);
    text-align: center;
    margin-top: 16px;
}

.profile-setup {
    display: none;
    flex-direction: column;
    align-items: center;
    padding: 40px 20px;
    min-height: 100vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.profile-card {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    padding: 40px;
    max-width: 450px;
    width: 100%;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.profile-avatar-upload {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    margin: 0 auto 30px;
    position: relative;
    overflow: hidden;
    cursor: pointer;
    border: 4px solid #667eea;
}

.profile-avatar-upload img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-avatar-upload input {
    display: none;
}

.profile-avatar-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.7);
    padding: 8px;
    text-align: center;
    font-size: 12px;
    color: #fff;
}

.profile-input-group {
    margin-bottom: 24px;
}

.profile-input-group label {
    display: block;
    color: #333;
    font-weight: 600;
    margin-bottom: 8px;
    font-size: 14px;
}

.profile-input-group input {
    width: 100%;
    padding: 14px;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    font-size: 16px;
    transition: border-color 0.3s;
    background: #fff;
    color: #333;
}

.profile-input-group input:focus {
    outline: none;
    border-color: #667eea;
}

.profile-submit-btn {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s;
    will-change: transform;
    transform: translateZ(0);
}

.profile-submit-btn:hover {
    transform: translateY(-2px) translateZ(0);
}

.profile-submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.app-container {
    display: none;
    flex-direction: column;
    height: 100vh;
}

.top-nav {
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: 12px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    position: sticky;
    top: 0;
    z-index: var(--z-top-nav);
}

.nav-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.menu-btn {
    width: 40px;
    height: 40px;
    background: none;
    border: none;
    color: #fff;
    font-size: 24px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    transition: background 0.2s;
    pointer-events: all;
}

.menu-btn:hover {
    background: rgba(255, 255, 255, 0.1);
}

.app-title {
    font-size: 20px;
    font-weight: 700;
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-avatar-nav {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #667eea;
    cursor: pointer;
}

.side-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: var(--z-side-menu-overlay);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
    pointer-events: none;
}

.side-menu-overlay.active {
    opacity: 1;
    visibility: visible;
    pointer-events: all;
}

.side-menu {
    position: fixed;
    top: 0;
    left: -320px;
    width: 320px;
    height: 100%;
    background: #1a1a1a;
    z-index: var(--z-side-menu);
    transition: left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    will-change: transform;
    transform: translateZ(0);
}

.side-menu.active {
    left: 0;
    transform: translate3d(0, 0, 0);
}

.menu-header {
    padding: 30px 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    gap: 16px;
}

.menu-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #fff;
}

.menu-user-info h3 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 4px;
}

.menu-user-info p {
    font-size: 14px;
    opacity: 0.9;
}

.menu-items {
    padding: 16px 0;
}

.menu-item {
    padding: 16px 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    cursor: pointer;
    transition: background 0.2s;
    color: #fff;
    text-decoration: none;
    pointer-events: all;
}

.menu-item:hover {
    background: rgba(255, 255, 255, 0.05);
}

.menu-item-icon {
    width: 24px;
    height: 24px;
    font-size: 20px;
    position: relative;
}

.menu-divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.1);
    margin: 16px 20px;
}

.main-content {
    flex: 1;
    overflow-y: auto;
    background: #0a0a0a;
    -webkit-overflow-scrolling: touch;
}

.tab-nav {
    display: flex;
    background: #1a1a1a;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    position: sticky;
    top: 0;
    z-index: 50;
}

.tab-btn {
    flex: 1;
    padding: 16px;
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.6);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    position: relative;
    transition: color 0.3s;
    pointer-events: all;
}

.tab-btn.active {
    color: #fff;
}

.tab-btn.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 3px 3px 0 0;
}

.tab-content {
    display: none;
    padding: 20px;
}

.tab-content.active {
    display: block;
}

.stream-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.stream-card {
    background: #1a1a1a;
    border-radius: 16px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    position: relative;
    will-change: transform;
    transform: translateZ(0);
}

.stream-card:hover {
    transform: translateY(-4px) translateZ(0);
    box-shadow: 0 8px 30px rgba(102, 126, 234, 0.3);
}

.stream-thumbnail {
    width: 100%;
    aspect-ratio: 16/9;
    object-fit: cover;
}

.stream-live-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    background: #ff3b5c;
    color: #fff;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 6px;
    animation: pulse 2s ease-in-out infinite;
    z-index: var(--z-base);
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.8; }
}

.stream-info {
    padding: 16px;
}

.stream-broadcaster {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.broadcaster-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

.broadcaster-name {
    font-size: 15px;
    font-weight: 600;
}

.stream-title {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 8px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.stream-stats {
    display: flex;
    gap: 16px;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.6);
}

.stream-stat {
    display: flex;
    align-items: center;
    gap: 6px;
}

.video-delete-btn {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 36px;
    height: 36px;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: none;
    border-radius: 8px;
    color: #999;
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    opacity: 0;
    z-index: 5;
    pointer-events: all;
}

.stream-card:hover .video-delete-btn {
    opacity: 1;
}

.video-delete-btn:hover {
    background: rgba(255, 59, 92, 0.9);
    color: #fff;
    transform: scale(1.1) translateZ(0);
}

.go-live-fab {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    border-radius: 50%;
    color: #fff;
    font-size: 28px;
    cursor: pointer;
    box-shadow: 0 8px 30px rgba(102, 126, 234, 0.5);
    transition: transform 0.2s, box-shadow 0.2s;
    z-index: var(--z-go-live-fab);
    pointer-events: all;
    will-change: transform;
    transform: translateZ(0);
}

.go-live-fab:hover {
    transform: scale(1.1) translateZ(0);
    box-shadow: 0 12px 40px rgba(102, 126, 234, 0.6);
}

.go-live-fab:active {
    transform: scale(0.95) translateZ(0);
}

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: var(--z-modal-overlay);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
    padding: 20px;
    pointer-events: none;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
    pointer-events: all;
}

.modal {
    background: #1a1a1a;
    border-radius: 20px;
    max-width: 500px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    transform: scale(0.9) translateZ(0);
    transition: transform 0.3s;
    -webkit-overflow-scrolling: touch;
    will-change: transform;
}

.modal-overlay.active .modal {
    transform: scale(1) translateZ(0);
}

.modal-header {
    padding: 24px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.modal-title {
    font-size: 20px;
    font-weight: 700;
}

.modal-close {
    width: 36px;
    height: 36px;
    background: none;
    border: none;
    color: #fff;
    font-size: 24px;
    cursor: pointer;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
    pointer-events: all;
}

.modal-close:hover {
    background: rgba(255, 255, 255, 0.1);
}

.modal-body {
    padding: 24px;
}

.image-upload-area {
    border: 3px dashed rgba(255, 255, 255, 0.3);
    border-radius: 16px;
    padding: 40px 20px;
    text-align: center;
    cursor: pointer;
    transition: border-color 0.3s, background 0.3s;
    margin-bottom: 24px;
    position: relative;
    overflow: hidden;
    pointer-events: all;
}

.image-upload-area:hover {
    border-color: #667eea;
    background: rgba(102, 126, 234, 0.05);
}

.image-upload-area.has-image {
    padding: 0;
    border: none;
}

.upload-preview {
    width: 100%;
    max-height: 300px;
    object-fit: contain;
    border-radius: 12px;
}

.upload-icon {
    font-size: 48px;
    margin-bottom: 16px;
    opacity: 0.6;
}

.upload-text {
    font-size: 16px;
    color: rgba(255, 255, 255, 0.8);
}

.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 8px;
    color: rgba(255, 255, 255, 0.9);
}

.form-input,
.form-textarea {
    width: 100%;
    padding: 14px;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    color: #fff;
    font-size: 15px;
    transition: border-color 0.3s;
}

.form-input:focus,
.form-textarea:focus {
    outline: none;
    border-color: #667eea;
}

.form-textarea {
    resize: vertical;
    min-height: 100px;
}

.modal-footer {
    padding: 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.btn-primary {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    border-radius: 12px;
    color: #fff;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s;
    pointer-events: all;
    will-change: transform;
    transform: translateZ(0);
}

.btn-primary:hover {
    transform: translateY(-2px) translateZ(0);
}

.btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
    pointer-events: none;
}

.live-stream-view {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #000;
    z-index: var(--z-live-stream-view);
}

.stream-image-container {
    position: relative;
    width: 100%;
    height: 100%;
    display: block;
    overflow: hidden;
    background: #000;
}

.stream-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    z-index: 10;
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.stream-image.hidden {
    display: none !important;
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
    z-index: 1 !important;
}

.video-grid {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    display: none !important;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2px;
    background: #000;
    z-index: 1 !important;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.video-grid.active {
    display: grid !important;
    opacity: 1 !important;
    visibility: visible !important;
    z-index: 200 !important;
    pointer-events: auto !important;
}

.video-participant {
    position: relative;
    overflow: hidden;
    background: #1a1a1a;
    aspect-ratio: 16/9;
    border-radius: 8px;
    pointer-events: auto;
}

.video-participant video,
.video-participant > div {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover;
    display: block;
}

.stream-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    z-index: var(--z-stream-overlay);
}

.stream-top-bar {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    padding: 16px 20px;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.8), transparent);
    display: flex;
    align-items: center;
    justify-content: space-between;
    pointer-events: auto;
    z-index: 510;
}

.stream-back-btn {
    width: 40px;
    height: 40px;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: none;
    border-radius: 50%;
    color: #fff;
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: all;
}

.stream-top-info {
    display: flex;
    align-items: center;
    gap: 16px;
}

.stream-live-indicator {
    background: #ff3b5c;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
}

.live-dot {
    width: 8px;
    height: 8px;
    background: #fff;
    border-radius: 50%;
    animation: blink 1.5s ease-in-out infinite;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

.stream-duration {
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
}

.stream-viewers {
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.comments-container {
    position: absolute;
    bottom: 80px;
    left: 0;
    right: 0;
    max-height: 50%;
    overflow-y: auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-y;
    overscroll-behavior-y: contain;
    pointer-events: auto;
    z-index: var(--z-comments-container);
}

.comments-container.hidden {
    display: none;
}

.comment-item {
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    padding: 12px 16px;
    border-radius: 16px;
    margin-bottom: 12px;
    animation: slideUp 0.3s ease-out;
    pointer-events: auto;
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.1);
    will-change: transform, opacity;
    transform: translateZ(0);
}

.comment-item.reply-new-style {
    margin-left: 0 !important;
    border-left: none !important;
}

.reply-parent-preview {
    background: rgba(255, 255, 255, 0.05);
    border-left: 3px solid #667eea;
    padding: 8px 12px;
    border-radius: 8px;
    margin-bottom: 12px;
    font-size: 13px;
    opacity: 0.8;
    cursor: pointer;
    transition: all 0.2s;
    pointer-events: all;
}

.reply-parent-preview:hover {
    background: rgba(255, 255, 255, 0.08);
    opacity: 1;
}

.reply-parent-author {
    font-weight: 600;
    color: #4d9fed;
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.reply-parent-text {
    color: rgba(255, 255, 255, 0.7);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.replying-to-label {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.5);
    margin-bottom: 8px;
}

.comment-item.pinned {
    background: rgba(102, 126, 234, 0.3);
    border: 2px solid #667eea;
    animation: none;
}

@keyframes slideUp {
    from {
        transform: translate3d(0, 20px, 0);
        opacity: 0;
    }
    to {
        transform: translate3d(0, 0, 0);
        opacity: 1;
    }
}

.comment-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
}

.comment-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
}

.comment-author {
    font-size: 14px;
    font-weight: 600;
    flex: 1;
}

.comment-actions {
    display: flex;
    gap: 8px;
}

.comment-action-btn {
    background: none;
    border: none;
    color: #fff;
    font-size: 16px;
    cursor: pointer;
    padding: 4px;
    opacity: 0.8;
    transition: opacity 0.2s, transform 0.2s;
    pointer-events: all;
}

.comment-action-btn:hover {
    opacity: 1;
    transform: scale(1.1) translateZ(0);
}

.comment-action-btn.liked {
    color: #ff3b5c;
}

.comment-text {
    font-size: 14px;
    line-height: 1.5;
    word-wrap: break-word;
    margin-bottom: 8px;
}

.comment-mention {
    color: #4d9fed;
    font-weight: 600;
    background: rgba(77, 159, 237, 0.1);
    padding: 2px 4px;
    border-radius: 4px;
}

.comment-image-thumbnail {
    width: 60px;
    height: 60px;
    border-radius: 8px;
    object-fit: cover;
    cursor: pointer;
    margin-top: 8px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    transition: transform 0.2s;
    pointer-events: all;
}

.comment-image-thumbnail:hover {
    transform: scale(1.05) translateZ(0);
}

.audio-player-container {
    margin-top: 12px;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.15), rgba(118, 75, 162, 0.15));
    border: 2px solid rgba(102, 126, 234, 0.3);
    border-radius: 16px;
    padding: 16px;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.audio-player-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.audio-icon {
    width: 44px;
    height: 44px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
}

.audio-info {
    flex: 1;
    min-width: 0;
}

.audio-filename {
    font-size: 14px;
    font-weight: 600;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.audio-duration {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.6);
    margin-top: 2px;
}

.audio-player-controls {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 12px;
}

.audio-play-btn {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    border-radius: 50%;
    color: #fff;
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s;
    pointer-events: all;
}

.audio-play-btn:hover {
    transform: scale(1.1) translateZ(0);
}

.audio-progress-container {
    flex: 1;
    height: 6px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    pointer-events: all;
}

.audio-progress-bar {
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    width: 0%;
    transition: width 0.1s;
}

.audio-time {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.7);
    min-width: 45px;
    text-align: center;
}

.audio-secondary-controls {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.audio-control-btn {
    padding: 6px 12px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    color: #fff;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 6px;
    pointer-events: all;
}

.audio-control-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

.audio-control-btn.active {
    background: rgba(102, 126, 234, 0.3);
    border-color: #667eea;
}

.audio-volume-container {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
}

.audio-volume-slider {
    flex: 1;
    height: 4px;
    -webkit-appearance: none;
    appearance: none;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 2px;
    outline: none;
    cursor: pointer;
    pointer-events: all;
}

.audio-volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 14px;
    height: 14px;
    background: #667eea;
    border-radius: 50%;
    cursor: pointer;
}

.audio-volume-slider::-moz-range-thumb {
    width: 14px;
    height: 14px;
    background: #667eea;
    border-radius: 50%;
    cursor: pointer;
    border: none;
}

.comment-footer {
    display: flex;
    align-items: center;
    gap: 16px;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.6);
    margin-top: 8px;
}

.comment-stat {
    display: flex;
    align-items: center;
    gap: 6px;
}

.comment-timestamp {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.5);
}

.comment-reply-btn {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.6);
    font-size: 13px;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    transition: all 0.2s;
    pointer-events: all;
}

.comment-reply-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.view-replies-btn {
    background: rgba(102, 126, 234, 0.2);
    border: none;
    color: #4d9fed;
    font-size: 12px;
    padding: 4px 12px;
    border-radius: 12px;
    cursor: pointer;
    margin-top: 8px;
    transition: all 0.2s;
    pointer-events: all;
}

.view-replies-btn:hover {
    background: rgba(102, 126, 234, 0.3);
}

.comment-input-container {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 16px 20px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.95), rgba(0, 0, 0, 0.7));
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    pointer-events: auto;
    z-index: var(--z-comment-input);
}

.comment-input-wrapper {
    display: flex;
    gap: 12px;
    align-items: flex-end;
    position: relative;
}

.comment-input-section {
    flex: 1;
    position: relative;
}

.replying-to-indicator {
    background: rgba(102, 126, 234, 0.2);
    padding: 8px 12px;
    border-radius: 8px 8px 0 0;
    font-size: 12px;
    color: #4d9fed;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.cancel-reply-btn {
    background: none;
    border: none;
    color: #fff;
    cursor: pointer;
    padding: 0 4px;
    font-size: 16px;
    pointer-events: all;
}

.comment-input {
    flex: 1;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 24px;
    color: #fff;
    font-size: 15px;
    transition: border-color 0.3s;
    max-height: 120px;
    resize: none;
    font-family: inherit;
    pointer-events: all;
}

.comment-input.with-reply {
    border-radius: 0 0 24px 24px;
}

.comment-input:focus {
    outline: none;
    border-color: #667eea;
}

.comment-input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.mention-overlay {
    position: absolute;
    bottom: 100%;
    left: 0;
    right: 0;
    max-height: 200px;
    background: rgba(20, 20, 20, 0.98);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    margin-bottom: 8px;
    overflow-y: auto;
    display: none;
    z-index: 10;
    pointer-events: all;
}

.mention-overlay.active {
    display: block;
}

.mention-user {
    padding: 12px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    transition: background 0.2s;
    pointer-events: all;
}

.mention-user:hover {
    background: rgba(102, 126, 234, 0.2);
}

.mention-user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
}

.mention-user-info {
    flex: 1;
}

.mention-user-name {
    font-size: 14px;
    font-weight: 600;
    color: #fff;
}

.mention-user-username {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.6);
}

.comment-buttons {
    display: flex;
    gap: 8px;
}

.attach-image-btn,
.send-comment-btn {
    width: 44px;
    height: 44px;
    border: none;
    border-radius: 50%;
    color: #fff;
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s;
    pointer-events: all;
    position: relative;
    z-index: 1;
}

.attach-image-btn {
    background: rgba(255, 255, 255, 0.1);
}

.attach-image-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.05) translateZ(0);
}

.send-comment-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.send-comment-btn:hover {
    transform: scale(1.1) translateZ(0);
}

.send-comment-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
    pointer-events: none;
}

.audio-upload-progress {
    position: fixed;
    bottom: 100px;
    left: 50%;
    transform: translateX(-50%) translateZ(0);
    background: rgba(0, 0, 0, 0.95);
    padding: 20px 30px;
    border-radius: 16px;
    z-index: var(--z-audio-progress);
    min-width: 300px;
}

.audio-progress-bar-upload {
    width: 100%;
    height: 8px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    overflow: hidden;
    margin-top: 12px;
}

.audio-progress-fill-upload {
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    transition: width 0.3s;
}

.image-preview-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: var(--z-image-preview);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
    pointer-events: none;
}

.image-preview-overlay.active {
    opacity: 1;
    visibility: visible;
    pointer-events: all;
}

.image-preview-content {
    max-width: 90%;
    max-height: 90%;
    position: relative;
}

.image-preview-img {
    max-width: 100%;
    max-height: 80vh;
    object-fit: contain;
    border-radius: 8px;
}

.image-preview-close {
    position: absolute;
    top: -40px;
    right: 0;
    width: 36px;
    height: 36px;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    border-radius: 50%;
    color: #fff;
    font-size: 24px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: all;
}

.broadcaster-menu-toggle {
    position: absolute;
    top: 80px;
    right: 20px;
    width: 48px;
    height: 48px;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    color: #fff;
    font-size: 24px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s, background 0.2s;
    pointer-events: auto;
    z-index: calc(var(--z-broadcaster-controls) + 1);
}

.broadcaster-menu-toggle:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1) translateZ(0);
}

.broadcaster-menu-toggle.active {
    background: rgba(102, 126, 234, 0.8);
}

.broadcaster-controls {
    position: absolute;
    top: 140px;
    right: 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    pointer-events: auto;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px) translateZ(0);
    transition: opacity 0.3s, visibility 0.3s, transform 0.3s;
    z-index: var(--z-broadcaster-controls);
}

.broadcaster-controls.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) translateZ(0);
    pointer-events: auto;
}

.broadcaster-controls .control-btn {
    pointer-events: auto;
    position: relative;
    z-index: calc(var(--z-broadcaster-controls) + 2);
}

.control-btn {
    width: 48px;
    height: 48px;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    color: #fff;
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s, background 0.2s;
    pointer-events: auto;
}

.control-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1) translateZ(0);
}

.control-btn.end-stream {
    background: rgba(255, 59, 92, 0.8);
    border-color: #ff3b5c;
}

.control-btn.toggle-comments {
    background: rgba(102, 126, 234, 0.7);
    border-color: #667eea;
}

.control-btn.mute-audio {
    background: rgba(102, 126, 234, 0.7);
    border-color: #667eea;
    transition: all 0.3s ease;
}

.control-btn.mute-audio:hover {
    background: rgba(102, 126, 234, 0.9);
    transform: scale(1.15) translateZ(0);
}

.control-btn.mute-audio:active {
    transform: scale(0.95) translateZ(0);
}

.viewer-controls {
    position: absolute;
    top: 80px;
    right: 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    pointer-events: auto;
    z-index: var(--z-broadcaster-controls);
}

.loading-spinner {
    display: inline-block;
    width: 24px;
    height: 24px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    will-change: transform;
    transform: translateZ(0);
}

@keyframes spin {
    to { transform: rotate(360deg) translateZ(0); }
}

.toast {
    position: fixed;
    bottom: 100px;
    left: 50%;
    transform: translateX(-50%) translateY(100px) translateZ(0);
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: #fff;
    padding: 16px 24px;
    border-radius: 12px;
    font-size: 15px;
    z-index: 500;
    opacity: 0;
    transition: opacity 0.3s, transform 0.3s;
    pointer-events: none;
}

.toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0) translateZ(0);
}

.empty-state {
    text-align: center;
    padding: 60px 20px;
}

.empty-icon {
    font-size: 64px;
    opacity: 0.3;
    margin-bottom: 20px;
    animation: float 3s ease-in-out infinite;
}

.empty-text {
    font-size: 18px;
    color: rgba(255, 255, 255, 0.6);
}

.comment-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: var(--z-comment-menu);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
    pointer-events: none;
}

.comment-menu-overlay.active {
    opacity: 1;
    visibility: visible;
    pointer-events: all;
}

.comment-menu {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #1a1a1a;
    border-radius: 20px 20px 0 0;
    padding: 24px;
    z-index: calc(var(--z-comment-menu) + 1);
    transform: translateY(100%) translateZ(0);
    transition: transform 0.3s;
    will-change: transform;
}

.comment-menu-overlay.active .comment-menu {
    transform: translateY(0) translateZ(0);
}

.comment-menu-item {
    padding: 16px;
    display: flex;
    align-items: center;
    gap: 16px;
    cursor: pointer;
    border-radius: 12px;
    transition: background 0.2s;
    font-size: 16px;
    pointer-events: all;
}

.comment-menu-item:hover {
    background: rgba(255, 255, 255, 0.05);
}

.comment-menu-item.danger {
    color: #ff3b5c;
}

.notification-highlighted {
    animation: highlightPulse 1.5s ease-in-out 2;
    background: rgba(102, 126, 234, 0.2) !important;
    border-left: 4px solid #667eea !important;
}

@keyframes highlightPulse {
    0%, 100% { background: rgba(102, 126, 234, 0.2); }
    50% { background: rgba(102, 126, 234, 0.35); }
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

#localVideo,
[id^="remote-"] {
    width: 100% !important;
    height: 100% !important;
    display: block;
}

#localVideo > div,
[id^="remote-"] > div {
    width: 100% !important;
    height: 100% !important;
}

.stream-controls {
    display: flex;
    gap: 10px;
    padding: 15px;
    background: rgba(0, 0, 0, 0.8);
    border-radius: 12px;
    align-items: center;
    position: absolute;
    bottom: 100px;
    left: 50%;
    transform: translateX(-50%);
    z-index: var(--z-broadcaster-controls);
    pointer-events: auto;
}

.stream-controls .control-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    padding: 10px 15px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 8px;
    color: white;
    cursor: pointer;
    transition: all 0.2s;
    width: auto;
    height: auto;
}

.stream-controls .control-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.05);
}

.stream-controls .control-btn.active {
    background: rgba(0, 200, 0, 0.3);
}

.stream-controls .control-btn .icon {
    font-size: 24px;
}

.stream-controls .control-btn .label {
    font-size: 12px;
}

.stream-controls .viewer-count {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 10px 15px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: white;
}

.viewer-info {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 15px;
    background: rgba(0, 0, 0, 0.8);
    border-radius: 12px;
    position: absolute;
    top: 80px;
    right: 20px;
    z-index: var(--z-broadcaster-controls);
    pointer-events: auto;
}

.connection-status {
    display: flex;
    align-items: center;
    gap: 8px;
    color: white;
    font-size: 14px;
}

.status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: gray;
    animation: statusPulse 2s infinite;
}

.status-dot.connected {
    background: #00ff00;
}

.status-dot.connecting {
    background: #ffff00;
}

.status-dot.disconnected {
    background: #ff0000;
}

.status-dot.failed {
    background: #ff0000;
    animation: statusError 0.5s infinite;
}

@keyframes statusPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

@keyframes statusError {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

.quality-indicator {
    color: white;
    font-size: 14px;
}

.quality-menu {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.95);
    padding: 20px;
    border-radius: 12px;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-width: 200px;
    pointer-events: all;
}

.quality-option {
    padding: 12px 20px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 8px;
    color: white;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 14px;
    text-align: left;
    pointer-events: all;
}

.quality-option:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateX(4px);
}

.quality-option.active {
    background: rgba(0, 200, 0, 0.3);
    border: 2px solid #00ff00;
}

.newsfeed-modal {
    max-width: 800px;
    height: 90vh;
    display: flex;
    flex-direction: column;
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
}

.feed-filters {
    display: flex;
    gap: 12px;
    padding: 16px 24px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    flex-shrink: 0;
    background: rgba(0,0,0,0.3);
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.feed-filter-btn {
    padding: 10px 20px;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 20px;
    color: rgba(255,255,255,0.7);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 14px;
    font-weight: 600;
    white-space: nowrap;
}

.feed-filter-btn:hover {
    background: rgba(255,255,255,0.1);
    transform: translateY(-2px);
}

.feed-filter-btn.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    border-color: #667eea;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.modal-body {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
}

.feed-post {
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 20px;
    animation: slideUp 0.3s ease-out;
    transition: all 0.3s ease;
}

.feed-post:hover {
    background: rgba(255,255,255,0.08);
    border-color: rgba(255,255,255,0.2);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.3);
}

.post-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.post-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.post-avatar:hover {
    border-color: #667eea;
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.post-user-info {
    flex: 1;
}

.post-username {
    font-size: 16px;
    font-weight: 600;
    color: #fff;
    cursor: pointer;
    transition: color 0.2s;
}

.post-username:hover {
    color: #667eea;
}

.post-timestamp {
    font-size: 12px;
    color: rgba(255,255,255,0.5);
    display: flex;
    align-items: center;
    gap: 4px;
}

.post-menu-btn {
    width: 36px;
    height: 36px;
    background: rgba(255,255,255,0.1);
    border: none;
    border-radius: 50%;
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    transition: all 0.2s;
}

.post-menu-btn:hover {
    background: rgba(255,255,255,0.2);
    transform: rotate(90deg);
}

.post-content {
    margin-bottom: 16px;
    color: rgba(255,255,255,0.9);
    line-height: 1.6;
    white-space: pre-wrap;
    word-wrap: break-word;
}

.post-media-grid {
    display: grid;
    gap: 8px;
    margin-bottom: 16px;
    border-radius: 12px;
    overflow: hidden;
}

.post-media-grid.single { grid-template-columns: 1fr; }
.post-media-grid.double { grid-template-columns: repeat(2, 1fr); }
.post-media-grid.triple { grid-template-columns: repeat(3, 1fr); }
.post-media-grid.quad { grid-template-columns: repeat(2, 1fr); }
.post-media-grid.many { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }

.post-media-item {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 8px;
}

.post-media-item:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(0,0,0,0.4);
    z-index: 1;
}

.post-video-player {
    width: 100%;
    border-radius: 12px;
    max-height: 500px;
}

.post-actions {
    display: flex;
    gap: 16px;
    padding-top: 12px;
    border-top: 1px solid rgba(255,255,255,0.1);
}

.post-action-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: rgba(255,255,255,0.05);
    border: none;
    border-radius: 20px;
    color: rgba(255,255,255,0.7);
    cursor: pointer;
    transition: all 0.2s;
    font-size: 14px;
    position: relative;
}

.post-action-btn:hover {
    background: rgba(255,255,255,0.1);
    transform: translateY(-2px);
}

.post-action-btn.active {
    color: #ff3b5c;
    background: rgba(255,59,92,0.2);
}

.post-action-btn.loading {
    opacity: 0.6;
    pointer-events: none;
}

.post-action-btn.loading::after {
    content: '';
    position: absolute;
    width: 12px;
    height: 12px;
    border: 2px solid transparent;
    border-top-color: currentColor;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

.reaction-picker {
    position: absolute;
    bottom: 100%;
    left: 0;
    display: flex;
    gap: 8px;
    padding: 12px;
    background: rgba(20,20,20,0.98);
    border-radius: 30px;
    margin-bottom: 8px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.5);
    transform: scale(0);
    transition: transform 0.2s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    z-index: 10;
}

.reaction-picker.active {
    transform: scale(1);
}

.reaction-btn {
    width: 40px;
    height: 40px;
    background: transparent;
    border: none;
    font-size: 24px;
    cursor: pointer;
    transition: transform 0.2s;
    border-radius: 50%;
}

.reaction-btn:hover {
    transform: scale(1.3);
    background: rgba(255,255,255,0.1);
}

.feed-loading {
    text-align: center;
    padding: 40px;
    color: rgba(255,255,255,0.5);
}

.loading-text {
    margin-top: 12px;
    font-size: 14px;
}

.create-post-fab {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    border-radius: 50%;
    color: #fff;
    cursor: pointer;
    box-shadow: 0 8px 24px rgba(102, 126, 234, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 10;
}

.create-post-fab:hover {
    transform: scale(1.1) rotate(90deg);
    box-shadow: 0 12px 32px rgba(102, 126, 234, 0.6);
}

.profile-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(10px);
    z-index: 6000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.profile-overlay.active {
    opacity: 1;
    visibility: visible;
}

.profile-card {
    background: linear-gradient(135deg, rgba(26, 26, 26, 0.95) 0%, rgba(40, 40, 40, 0.95) 100%);
    border-radius: 24px;
    padding: 0;
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.profile-overlay.active .profile-card {
    transform: scale(1);
}

.profile-header {
    position: relative;
    padding: 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 24px 24px 0 0;
}

.profile-close-btn {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 36px;
    height: 36px;
    background: rgba(0, 0, 0, 0.5);
    border: none;
    border-radius: 50%;
    color: #fff;
    font-size: 24px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.profile-close-btn:hover {
    background: rgba(0, 0, 0, 0.8);
    transform: rotate(90deg);
}

.profile-avatar-large {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    margin: 20px auto;
    display: block;
    border: 4px solid #fff;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
    object-fit: cover;
}

.profile-info {
    text-align: center;
    padding: 24px;
}

.profile-name {
    font-size: 24px;
    font-weight: 700;
    color: #fff;
    margin-bottom: 8px;
}

.profile-username {
    font-size: 16px;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 20px;
}

.profile-stats {
    display: flex;
    justify-content: space-around;
    padding: 20px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    margin: 0 24px;
}

.stat-item {
    text-align: center;
}

.stat-value {
    font-size: 24px;
    font-weight: 700;
    color: #fff;
    display: block;
}

.stat-label {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.5);
    margin-top: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.profile-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 24px;
}

.profile-action-btn {
    padding: 14px 24px;
    border: none;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.profile-action-btn.primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
}

.profile-action-btn.secondary {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.profile-action-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.image-viewer-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.95);
    z-index: 7000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.image-viewer-overlay.active {
    opacity: 1;
    visibility: visible;
}

.image-viewer-content {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
}

.image-viewer-img {
    max-width: 100%;
    max-height: 90vh;
    object-fit: contain;
    border-radius: 8px;
}

.image-viewer-close {
    position: absolute;
    top: -50px;
    right: 0;
    width: 44px;
    height: 44px;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    border-radius: 50%;
    color: #fff;
    font-size: 28px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.image-viewer-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

.post-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    z-index: 5500;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.post-menu-overlay.active {
    opacity: 1;
    visibility: visible;
}

.post-menu {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #1a1a1a;
    border-radius: 20px 20px 0 0;
    padding: 24px;
    z-index: 5501;
    transform: translateY(100%);
    transition: transform 0.3s;
}

.post-menu-overlay.active .post-menu {
    transform: translateY(0);
}

.post-menu-item {
    padding: 16px;
    display: flex;
    align-items: center;
    gap: 16px;
    cursor: pointer;
    border-radius: 12px;
    transition: background 0.2s;
    font-size: 16px;
}

.post-menu-item:hover {
    background: rgba(255, 255, 255, 0.05);
}

.post-menu-item.danger {
    color: #ff3b5c;
}

.messaging-badge {
    background: #ff3b5c;
    color: #fff;
    border-radius: 12px;
    padding: 2px 8px;
    font-size: 11px;
    font-weight: 700;
    margin-left: auto;
}

.messaging-badge.hidden {
    display: none;
}

@media (max-width: 768px) {
    .auth-container {
        padding: 30px 16px;
    }

    .auth-content {
        max-width: 100%;
        border-radius: 4px;
    }

    .auth-header {
        padding: 40px 32px 20px;
    }

    .auth-body {
        padding: 20px 32px 32px;
    }

    .auth-title {
        font-size: 36px;
    }

    .auth-subtitle {
        font-size: 15px;
    }

    .auth-features {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .feature-item {
        padding: 18px 10px;
        min-height: 95px;
    }

    .feature-icon-wrapper {
        width: 44px;
        height: 44px;
    }

    .feature-icon {
        font-size: 22px;
    }

    .feature-text {
        font-size: 11px;
    }

    .btn-google,
    .btn-facebook {
        padding: 13px 20px;
        font-size: 16px;
        min-height: 52px;
    }

    .stream-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .go-live-fab {
        bottom: 20px;
        right: 20px;
        width: 56px;
        height: 56px;
        font-size: 24px;
    }

    .comments-container {
        max-height: 40%;
    }

    .broadcaster-menu-toggle {
        right: 12px;
        top: 70px;
    }

    .broadcaster-controls {
        right: 12px;
        top: 130px;
    }

    .control-btn {
        width: 44px;
        height: 44px;
        font-size: 18px;
    }

    .viewer-controls {
        right: 12px;
        top: 70px;
    }

    .stream-controls {
        bottom: 80px;
        padding: 12px;
        gap: 8px;
    }
    
    .stream-controls .control-btn {
        padding: 8px 12px;
    }
    
    .stream-controls .control-btn .icon {
        font-size: 20px;
    }
    
    .stream-controls .control-btn .label {
        font-size: 11px;
    }
    
    .viewer-info {
        right: 12px;
        top: 70px;
        padding: 12px;
    }
    
    .quality-menu {
        min-width: 160px;
        padding: 16px;
    }
    
    .video-grid {
        grid-template-columns: 1fr !important;
        gap: 0;
    }
    
    .video-participant {
        border-radius: 0;
    }

    .newsfeed-modal {
        max-width: 100%;
        height: 100vh;
        border-radius: 0;
    }

    .feed-filters {
        gap: 8px;
        padding: 12px 16px;
        overflow-x: auto;
    }

    .feed-filter-btn {
        padding: 8px 16px;
        font-size: 13px;
    }

    .post-media-grid.triple,
    .post-media-grid.quad {
        grid-template-columns: repeat(2, 1fr);
    }

    .create-post-fab {
        bottom: 20px;
        right: 20px;
        width: 48px;
        height: 48px;
    }

    .profile-card {
        width: 95%;
        max-height: 85vh;
    }
}

::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}

.hidden {
    display: none !important;
}

[dir="rtl"] {
    direction: rtl;
}

[dir="ltr"] {
    direction: ltr;
}

.language-option {
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.language-option:hover {
    transform: translateX(4px);
}

[dir="rtl"] .language-option:hover {
    transform: translateX(-4px);
}

[data-i18n] {
    transition: opacity 0.15s ease;
}

[dir="rtl"] .menu-item {
    flex-direction: row-reverse;
}

[dir="rtl"] .notification-text,
[dir="rtl"] .comment-text {
    text-align: right;
}

[dir="rtl"] .stream-top-bar {
    flex-direction: row-reverse;
}

.sort-btn.active {
    background: rgba(102, 126, 234, 0.3) !important;
    border-color: rgba(102, 126, 234, 0.6) !important;
    color: #fff !important;
    font-weight: 600;
}

.sort-btn:hover {
    background: rgba(102, 126, 234, 0.15) !important;
    border-color: rgba(102, 126, 234, 0.4) !important;
}

.local-video, 
.remote-video,
#localVideo,
[id^="remote-"] {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 0;
}

.remote-video {
    position: absolute;
    top: 0;
    left: 0;
}

[id^="remote-"] > video,
#localVideo > video,
.video-participant video {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    display: block !important;
    background: #000 !important;
}