* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background-color: #1a1a1a;
    color: white;
    height: 100vh;
    overflow: hidden;
}

.meeting-container {
    display: flex;
    flex-direction: column;
    height: 100vh;
    padding: 20px;
    gap: 20px;
    position: relative;
}

.join-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(10px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.join-content {
    text-align: center;
    padding: 1rem;
    padding-top: 2rem;
    padding-bottom: 2rem;
    background-color: rgba(45, 45, 45, 0.9);
    border-radius: 15px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
    width: 90%;
    max-width: 400px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.join-content h2 {
    font-size: 1.8rem;
    color: #fff;
}

.join-btn {
    background-color: #2d8cff;
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 25px;
    font-size: 1.1rem;
    cursor: pointer;
    transition: background-color 0.3s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-width: 150px;
    margin: 0 auto;
}

.join-btn:disabled {
    background-color: #1a7ae6;
    cursor: not-allowed;
    opacity: 0.8;
}

.join-btn i {
    font-size: 1rem;
}

.join-btn:hover:not(:disabled) {
    background-color: #1a7ae6;
}

.video-container {
    flex: 1;
    position: relative;
    background-color: #2d2d2d;
    border-radius: 8px;
    overflow: hidden;
}

.main-video {
    width: 100%;
    height: 100%;
    background-color: #1a1a1a;
    position: relative;
}

.video-wrapper {
    width: 100%;
    height: 100%;
    position: relative;
}

#main-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border: none;
    background-color: #1a1a1a;
}

.video-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 10px;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.7));
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 3;
}

.participant-name {
    font-size: 14px;
    font-weight: 500;
}

.bottom-controls {
    display: flex;
    justify-content: center;
    gap: 15px;
    padding: 10px;
    background-color: #2d2d2d;
    border-radius: 8px;
    position: relative;
}

.menu-btn {
    display: none !important; /* Force hide in desktop */
    background-color: #3d3d3d;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background-color 0.2s;
    position: fixed;
    right: 10px;
    bottom: 10px;
    z-index: 1000;
}

.menu-btn:hover {
    background-color: #4d4d4d;
}

.controls-menu {
    display: flex;
    gap: 15px;
}

.control-btn {
    background: none;
    border: none;
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s;
    position: relative;
}

.control-btn:hover {
    background-color: #3d3d3d;
}

.control-btn i {
    font-size: 18px;
}

.participant-count {
    position: absolute;
    top: -5px;
    right: -5px;
    background-color: #e74c3c;
    color: white;
    font-size: 12px;
    padding: 2px 6px;
    border-radius: 10px;
    min-width: 20px;
    text-align: center;
}

.end-meeting {
    background-color: #e74c3c;
    width: auto;
    padding: 0 15px;
    border-radius: 20px;
    gap: 8px;
}

.end-meeting:hover {
    background-color: #c0392b;
}

.video-controls {
    display: flex;
    gap: 10px;
}

.buffering-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 10;
}

.buffering-overlay.active {
    opacity: 1;
}

.buffering-content {
    text-align: center;
    color: white;
}

.spinner-logo {
    width: 80px;
    height: 80px;
    margin-bottom: 20px;
    animation: spin 2s linear infinite;
    mix-blend-mode: screen;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.buffering-content p {
    margin: 0;
    font-size: 1.2rem;
    color: #fff;
}

.passcode-input {
    margin: 1.5rem 0;
}

.passcode-input input {
    width: 100%;
    padding: 12px;
    border: 2px solid #2d8cff;
    border-radius: 8px;
    background-color: rgba(255, 255, 255, 0.1);
    color: white;
    font-size: 1rem;
    margin-bottom: 0.5rem;
    transition: border-color 0.3s;
}

.passcode-input input:focus {
    outline: none;
    border-color: #1a7ae6;
}

.passcode-input input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.error-message {
    color: #e74c3c;
    font-size: 0.9rem;
    margin: 0;
    min-height: 1.2rem;
    opacity: 0;
    transition: opacity 0.3s;
}

.error-message.show {
    opacity: 1;
}

.meeting-timer {
    margin: 15px 0;
    font-size: 14px;
    color: #666;
    text-align: center;
}

.meeting-timer span {
    display: inline-block;
}

.fullscreen-btn {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: rgba(0, 0, 0, 0.5);
    color: white;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.3s ease, background-color 0.3s ease;
    z-index: 10;
}

.main-video:hover .fullscreen-btn {
    opacity: 1;
}

.fullscreen-btn i {
    font-size: 24px;
}

/* Mobile Responsive Styles */
@media (max-width: 915px) {
    .meeting-container {
        padding: 0;
        gap: 0;
    }

    .video-container {
        height: calc(100vh - 80px); /* Leave space for mobile controls */
        border-radius: 0;
    }

    .main-video {
        height: 100%;
    }

    .video-overlay {
        padding: 8px;
        background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
    }

    /* Hide Sync2VA logo in mobile view */
    .video-overlay img {
        display: none;
    }

    .participant-name {
        font-size: 12px;
    }

    .video-controls {
        gap: 8px;
    }

    .control-btn {
        width: 36px;
        height: 36px;
    }

    .control-btn i {
        font-size: 16px;
    }

    .bottom-controls {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        padding: 10px;
        background-color: #2d2d2d;
        border-radius: 0;
        display: flex;
        justify-content: flex-end;
        z-index: 100;
    }

    .menu-btn {
        display: flex !important;
        position: absolute;
        right: 10px;
        bottom: 10px;
        margin-left: 0;
    }

    .controls-menu {
        position: fixed;
        bottom: 70px;
        right: 10px;
        background-color: #2d2d2d;
        border-radius: 8px;
        padding: 10px;
        display: none;
        z-index: 101;
        width: 200px;
    }

    .controls-menu.show {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        grid-template-rows: auto auto auto;
        gap: 10px;
    }

    /* First row: microphone, camera, share screen */
    .controls-menu .control-btn:nth-child(1),
    .controls-menu .control-btn:nth-child(2),
    .controls-menu .control-btn:nth-child(3) {
        grid-row: 1;
    }

    /* Second row: participant, react, message */
    .controls-menu .control-btn:nth-child(4),
    .controls-menu .control-btn:nth-child(5),
    .controls-menu .control-btn:nth-child(6) {
        grid-row: 2;
    }

    /* Third row: end button spanning all columns */
    .controls-menu .end-meeting {
        grid-row: 3;
        grid-column: 1 / span 3;
        justify-self: center;
        width: 80%;
    }

    .control-btn {
        width: 36px;
        height: 36px;
    }

    .control-btn i {
        font-size: 16px;
    }

    .end-meeting {
        width: auto;
        padding: 0 12px;
        border-radius: 18px;
    }

    .join-content {
        width: 90%;
        max-width: 320px;
        padding: 1.5rem;
    }

    .join-content h2 {
        font-size: 1.5rem;
        margin-bottom: 1rem;
    }

    .passcode-input {
        margin: 1rem 0;
    }

    .passcode-input input {
        padding: 10px;
        font-size: 0.9rem;
    }

    .join-btn {
        padding: 10px 25px;
        font-size: 1rem;
    }

    /* Mobile-specific controls layout */
    .bottom-controls {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 8px;
        padding: 12px;
    }

    .end-meeting {
        grid-column: span 3;
        justify-content: center;
        margin-top: 8px;
    }

    /* Adjust participant count position for mobile */
    .participant-count {
        font-size: 10px;
        padding: 1px 4px;
        min-width: 16px;
    }

    /* Mobile video controls */
    .video-controls {
        position: absolute;
        bottom: 0;
        right: 0;
        padding: 8px;
    }

    /* Adjust buffering overlay for mobile */
    .buffering-overlay {
        padding: 20px;
    }

    .spinner-logo {
        width: 60px;
        height: 60px;
    }

    .buffering-content p {
        font-size: 1rem;
    }

    .fullscreen-btn {
        width: 40px;
        height: 40px;
    }

    .fullscreen-btn i {
        font-size: 20px;
    }
}

/* Mobile Landscape Mode */
@media (max-width: 768px) and (orientation: landscape) {
    .bottom-controls {
        display: flex;
        justify-content: flex-end;
        padding: 10px;
    }

    .controls-menu {
        display: none;
    }

    .menu-btn {
        display: flex;
        position: relative;
        right: 0;
        bottom: 0;
    }

    .controls-menu.show {
        display: grid;
    }

    .video-container {
        height: calc(100vh - 60px);
    }

    .user-camera-feed {
        bottom: 60px;
    }
}

/* Small mobile devices */
@media (max-width: 360px) {
    .control-btn {
        width: 32px;
        height: 32px;
    }

    .control-btn i {
        font-size: 14px;
    }

    .join-content {
        padding: 1rem;
    }

    .join-content h2 {
        font-size: 1.3rem;
    }

    .bottom-controls {
        padding: 8px;
    }
}

/* Tablet devices */
@media (min-width: 769px) and (max-width: 1024px) {
    .meeting-container {
        padding: 15px;
    }

    .video-container {
        height: calc(100vh - 100px);
    }

    .bottom-controls {
        padding: 15px;
    }
}

.reaction-effects {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 5;
}

.reaction-emoji {
    position: absolute;
    font-size: 48px;
    animation: reactionFloat 3s ease-out forwards;
    pointer-events: none;
    user-select: none;
}

@keyframes reactionFloat {
    0% {
        transform: translate(-50%, 0) scale(0.5);
        opacity: 0;
    }
    20% {
        transform: translate(-50%, -20px) scale(1);
        opacity: 1;
    }
    100% {
        transform: translate(-50%, -100px) scale(0.5);
        opacity: 0;
    }
}

.reaction-panel {
    position: fixed;
    bottom: 100px;
    left: 50%;
    transform: translateX(-50%);
    background-color: rgba(0, 0, 0, 0.8);
    padding: 10px;
    border-radius: 20px;
    display: flex;
    gap: 10px;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    backdrop-filter: blur(5px);
}

.reaction-panel.show {
    opacity: 1;
    visibility: visible;
}

.reaction-option {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.2s ease;
    font-size: 24px;
    background-color: rgba(255, 255, 255, 0.1);
}

.reaction-option:hover {
    transform: scale(1.2);
    background-color: rgba(255, 255, 255, 0.2);
}

.chat-sidebar {
    position: fixed;
    top: 0;
    right: -400px;
    width: 400px;
    height: 100vh;
    background-color: #2d2d2d;
    transition: right 0.3s ease;
    z-index: 1000;
    display: flex;
    flex-direction: column;
}

.chat-sidebar.open {
    right: 0;
}

.chat-header {
    padding: 15px;
    background-color: #1a1a1a;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #3d3d3d;
}

.chat-header h3 {
    margin: 0;
    color: white;
    font-size: 1.2rem;
}

.close-chat {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    padding: 5px;
    font-size: 1.2rem;
}

.close-chat:hover {
    color: #ccc;
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 15px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.message-container {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    max-width: 80%;
}

.message-container.received {
    align-self: flex-start;
    align-items: flex-start;
}

.message-container.sent {
    align-self: flex-end;
    align-items: flex-end;
}

.sender-label {
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 5px;
    display: flex;
    align-items: center;
    gap: 5px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    opacity: 0.8;
}

.message-container.sent .sender-label {
    align-self: flex-end;
}

.message-container.received .sender-label {
    align-self: flex-start;
}

.user-icon {
    width: 20px;
    height: 20px;
    background-color: #3d3d3d;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 5px;
    color: white;
    font-size: 12px;
}

.message-container.received .user-icon {
    background-color: #3d3d3d;
}

.message-container.sent .user-icon {
    background-color: #2d8cff;
}

.chat-message {
    background-color: #3d3d3d;
    padding: 10px 15px;
    border-radius: 8px;
    word-wrap: break-word;
    color: white;
}

.message-container.received .chat-message {
    background-color: #3d3d3d;
}

.message-container.sent .chat-message {
    background-color: #2d8cff;
}

/* Admin message styles */
.message-container.received .user-icon i.fa-user-shield {
    color: white;
}

.message-container.received .chat-message[style*="background-color: #4CAF50"] {
    background-color: #4CAF50 !important;
    color: white;
    font-weight: 500;
}

.chat-input-container {
    padding: 15px;
    background-color: #1a1a1a;
    border-top: 1px solid #3d3d3d;
    display: flex;
    gap: 10px;
}

#chat-input {
    flex: 1;
    padding: 10px;
    border: none;
    border-radius: 4px;
    background-color: #3d3d3d;
    color: white;
    font-size: 1rem;
}

#chat-input:focus {
    outline: none;
    background-color: #4d4d4d;
}

#send-message {
    background-color: #2d8cff;
    color: white;
    border: none;
    border-radius: 4px;
    padding: 10px 15px;
    cursor: pointer;
    transition: background-color 0.3s;
}

#send-message:hover {
    background-color: #1a7ae6;
}

/* Mobile Responsive Styles */
@media (max-width: 768px) {
    .chat-sidebar {
        width: 100%;
        right: -100%;
    }

    .menu-btn {
        display: flex !important; /* Force show in mobile */
        right: 10px; /* Ensure right positioning */
        left: auto; /* Reset any left positioning */
    }
}

.typing-indicator {
    background-color: #3d3d3d;
    padding: 10px 15px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.typing-indicator span {
    width: 8px;
    height: 8px;
    background-color: #fff;
    border-radius: 50%;
    display: inline-block;
    animation: typing 1.4s infinite ease-in-out;
}

.typing-indicator span:nth-child(1) {
    animation-delay: 0s;
}

.typing-indicator span:nth-child(2) {
    animation-delay: 0.2s;
}

.typing-indicator span:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes typing {
    0%, 60%, 100% {
        transform: translateY(0);
    }
    30% {
        transform: translateY(-4px);
    }
}

/* Announcement Overlay Styles */
.announcement-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 75px;
    background-color: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(27px);
    z-index: 4;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.announcement-overlay.show {
    opacity: 1;
    visibility: visible;
}

.announcement-content {
    width: 100%;
    padding: 0 20px;
    color: white;
    font-size: 2rem;
    font-family: 'Poppins', sans-serif;
    text-align: center;
    line-height: 1.4;
}

/* Mobile Responsive Styles for Announcement */
@media (max-width: 768px) {
    .announcement-overlay {
        height: 100px;
    }

    .announcement-content {
        font-size: 1rem;
        padding: 0 15px;
    }
}

/* User Camera Feed Styles */
.user-camera-feed {
    position: absolute;
    bottom: 20px;
    left: 20px;
    width: 255px;
    height: 160px;
    background-color: #1a1a1a;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    z-index: 5;
    display: none;
    touch-action: none; /* Prevents default touch actions */
    cursor: move; /* Shows move cursor on desktop */
    user-select: none; /* Prevents text selection while dragging */
}

.user-camera-feed.active {
    display: block;
}

.user-camera-feed video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    pointer-events: none; /* Prevents video interaction while dragging */
}

/* Mobile Responsive Styles for Camera Feed */
@media (max-width: 768px) {
    .user-camera-feed {
        width: 120px;
        height: 160px;
        bottom: 80px; /* Position above bottom controls */
        left: 10px;
        cursor: grab; /* Shows grab cursor on mobile */
    }

    .user-camera-feed:active {
        cursor: grabbing; /* Shows grabbing cursor while dragging */
    }
}

/* Small mobile devices */
@media (max-width: 360px) {
    .user-camera-feed {
        width: 100px;
        height: 140px;
    }
} 

.message-badge {
    position: absolute;
    top: -2px;
    right: 2px;
    background-color: #e74c3c;
    color: white;
    border-radius: 10px;
    padding: 2px 6px;
    font-size: 12px;
    min-width: 16px;
    height: 16px;
    display: none; /* Hidden by default */
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.message-badge.show {
    display: flex;
} 