/* ==============================================
   LIVE ROOM - CORE LAYOUT & CONTROLS
   ============================================== */

.live-header {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
}

.header-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: white;
    font-size: 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.25, 1, 0.5, 1);
}

.header-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.05);
}

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

.live-header-center {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    flex: 1;
    margin: 0 16px;
    overflow: hidden;
}

.live-avatars {
    display: flex;
    align-items: center;
}

.live-avatars .participant {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    margin-left: -8px;
    border: 2px solid rgba(0, 0, 0, 0.8);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    flex-shrink: 0;
}

.live-avatars .participant:first-child {
    margin-left: 0;
}

.live-title-row {
    display: flex;
    align-items: center;
    gap: 8px;
    max-width: 100%;
}

.live-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: white;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.live-topic-row {
    max-width: 100%;
}

.live-topic {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.6);
    font-weight: 400;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    display: block;
    max-width: 260px;
    /* Limits width and triggers ellipsis */
}

.live-pulse {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #ff3b30;
    animation: pulse 2s infinite;
    flex-shrink: 0;
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
        transform: scale(1);
    }

    50% {
        opacity: 0.5;
        transform: scale(1.2);
    }
}

/* Chat Container (Main Wrapper) */
.chat-container {
    display: none;
    flex-direction: column;
    overflow: hidden;
    height: calc(100vh - var(--top-bar-height));
    width: 100%;
    position: absolute;
    top: var(--top-bar-height);
    left: 0;
    z-index: 850;
    /* Below top-bar (900) */
    background: linear-gradient(135deg, rgba(8, 8, 12, 0.95) 0%, rgba(5, 5, 8, 0.98) 100%);
    backdrop-filter: blur(60px);
    -webkit-backdrop-filter: blur(60px);
    transition: opacity 0.3s ease;
    border-bottom-left-radius: 28px;
    border-bottom-right-radius: 28px;
    margin-top: 0;
}

.chat-container.active {
    display: flex;
    opacity: 1;
}

.chat-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
    width: 100%;
}

.action-bar {
    display: flex;
    gap: 8px;
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 28px;
    padding: 6px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.action-btn {
    position: relative;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.8);
    font-size: 1.1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.25s cubic-bezier(0.25, 1, 0.5, 1);
}

.action-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

.action-btn:active {
    transform: scale(0.9);
}

.action-btn.active {
    background: rgba(255, 255, 255, 0.15);
    color: var(--gold);
}

.action-btn.muted {
    color: rgba(255, 255, 255, 0.4);
}

.room-lang-select {
    appearance: none;
    -webkit-appearance: none;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 14px;
    height: 48px;
    padding: 0 36px 0 16px;
    color: white;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='rgba(255,255,255,0.6)' stroke-width='2.5'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 16px;
    margin-left: 4px;
}

.room-lang-select:hover {
    background-color: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-1px);
}

.room-lang-select:focus {
    outline: none;
    border-color: var(--gold);
    box-shadow: 0 0 0 4px rgba(243, 194, 106, 0.1);
}

.room-lang-select option {
    background-color: #1a1a1a;
    color: white;
}

/* Mic Action Button - Meeting Style */
.action-btn.mic-action {
    background: rgba(255, 255, 255, 0.05);
}

.action-btn.mic-action.speaking {
    background: rgba(52, 199, 89, 0.2);
    color: #34c759;
    animation: speaking-glow 1.5s infinite;
}

.action-btn.mic-action i {
    transition: transform 0.2s;
}

.action-btn.mic-action.speaking i {
    transform: scale(1.1);
}

@keyframes speaking-glow {

    0%,
    100% {
        box-shadow: 0 0 0 0 rgba(52, 199, 89, 0.3);
    }

    50% {
        box-shadow: 0 0 0 6px rgba(52, 199, 89, 0);
    }
}

/* Input Row */
.input-row {
    display: flex;
    gap: 12px;
    width: 100%;
    max-width: 500px;
}

.live-input {
    flex: 1;
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 14px 20px;
    border-radius: 24px;
    color: white;
    font-size: 1rem;
    outline: none;
    transition: all 0.3s;
}

.live-input::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.live-input:focus {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.2);
    box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.05);
}

.send-btn-live {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--cyan) 0%, var(--purple) 100%);
    color: white;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(94, 234, 212, 0.3);
}

.send-btn-live:hover {
    transform: scale(1.08);
    box-shadow: 0 6px 20px rgba(94, 234, 212, 0.4);
}

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

/* Creator Controls */
.creator-controls {
    margin-top: 8px;
}

.end-btn {
    background: rgba(255, 59, 48, 0.15);
    border: 1px solid rgba(255, 59, 48, 0.3);
    color: #ff3b30;
    padding: 10px 20px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 8px;
}

.end-btn:hover {
    background: rgba(255, 59, 48, 0.25);
}

/* Audio Progress */
.audio-progress-container {
    margin-bottom: 12px;
}

/* Online Indicator */
.online-indicator {
    display: flex;
    align-items: center;
    gap: 6px;
    background: rgba(255, 255, 255, 0.1);
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.9);
    margin-left: 8px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.online-indicator i {
    font-size: 0.75rem;
    color: #34c759;
}

/* Action Button Indicators (Likes/Dislikes) */
.action-btn span {
    position: absolute;
    bottom: -4px;
    right: -4px;
    background: var(--gold);
    color: black;
    font-size: 0.7rem;
    font-weight: 800;
    padding: 1px 5px;
    border-radius: 8px;
    min-width: 16px;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

/* Participant Drawer */
.participant-drawer {
    position: absolute;
    top: 100px;
    right: 20px;
    bottom: calc(100px + env(safe-area-inset-bottom));
    width: 320px;
    background: rgba(15, 15, 20, 0.8);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    border-radius: 24px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    display: none;
    flex-direction: column;
    z-index: 1001;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    transform: translateX(120%);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.participant-drawer.active {
    display: flex;
    transform: translateX(0);
}

.drawer-header {
    padding: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.drawer-header h4 {
    margin: 0;
    font-size: 1.1rem;
    color: white;
}

.drawer-close {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.5);
    font-size: 1.2rem;
    cursor: pointer;
    padding: 4px;
}

.participant-list {
    flex: 1;
    overflow-y: auto;
    padding: 10px;
}

.participant-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border-radius: 16px;
    transition: background 0.2s;
    cursor: pointer;
}

.participant-item:hover {
    background: rgba(255, 255, 255, 0.05);
}

.participant-item .item-avatar {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.participant-item .item-info {
    flex: 1;
}

.participant-item .item-name {
    display: block;
    color: white;
    font-weight: 600;
    font-size: 0.95rem;
}

.participant-item .item-role {
    display: block;
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.75rem;
}

.participant-item .item-actions {
    display: flex;
    gap: 8px;
    opacity: 0;
    transition: opacity 0.2s;
}

.participant-item:hover .item-actions {
    opacity: 1;
}

.participant-action-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    cursor: pointer;
}

.participant-action-btn:hover {
    background: var(--gold);
    color: black;
}.clickable-avatar { cursor: pointer; transition: transform 0.2s; } .clickable-avatar:hover { transform: scale(1.05); }
