* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body, html {
    width: 100%;
    height: 100%;
    background-color: #202124;
    color: #fff;
    font-family: Roboto, sans-serif;
    overflow: hidden;
}

.join-screen {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100vw;
    height: 100vh;
    background: #1e1e24;
}

.join-card {
    background: #292a2d;
    padding: 40px;
    border-radius: 16px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.5);
    text-align: center;
    width: 100%;
    max-width: 420px;
}

    .join-card h2 {
        margin-bottom: 24px;
        color: #fff;
        font-weight: 500;
    }

.join-input {
    width: 100%;
    padding: 14px 18px;
    border-radius: 8px;
    border: 1px solid #3c4043;
    background: #202124;
    color: #fff;
    font-size: 16px;
    outline: none;
    margin-bottom: 20px;
}

.btn-join {
    width: 100%;
    padding: 12px;
    border-radius: 24px;
    border: none;
    background-color: #1a73e8;
    color: #fff;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
}

.spinner {
    border: 4px solid rgba(255,255,255,0.1);
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border-left-color: #8ab4f8;
    animation: spin 1s linear infinite;
    margin: 20px auto;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.admission-banner {
    position: absolute;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: #292a2d;
    border: 1px solid #8ab4f8;
    border-radius: 12px;
    padding: 12px 24px;
    display: flex;
    align-items: center;
    gap: 16px;
    z-index: 1000;
    box-shadow: 0 4px 20px rgba(0,0,0,0.6);
}

.btn-admit {
    background: #1a73e8;
    color: #fff;
    border: none;
    padding: 6px 16px;
    border-radius: 16px;
    cursor: pointer;
    font-weight: 500;
}

.btn-deny {
    background: #ea4335;
    color: #fff;
    border: none;
    padding: 6px 16px;
    border-radius: 16px;
    cursor: pointer;
    font-weight: 500;
}

/* حاوية الاجتماع المتوافقة مع الموبايل والشاشات الكبيرة */
.meet-container {
    display: flex;
    flex-direction: column;
    height: 100vh;
    height: 100dvh;
    width: 100vw;
    overflow: hidden;
    position: relative;
}

.main-content {
    flex: 1;
    display: flex;
    position: relative;
    overflow: hidden;
    width: 100%;
}

/* شبكة الفيديوهات مع دعم تكبير شاشة المشاركة */
.video-grid {
    flex: 1;
    display: grid;
    gap: 12px;
    padding: 12px;
    align-content: center;
    justify-content: center;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    overflow-y: auto;
    width: 100%;
    height: 100%;
}

.video-card {
    position: relative;
    background-color: #3c4043;
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    aspect-ratio: 16 / 9;
    box-shadow: 0 4px 8px rgba(0,0,0,0.3);
    border: 3px solid transparent;
    transition: all 0.2s ease;
}

    .video-card.speaking {
        border-color: #8ab4f8;
        box-shadow: 0 0 20px rgba(138, 180, 248, 0.7);
    }

    /* تكبير شاشة العرض/المشاركة لتأخذ المساحة الكاملة */
    .video-card.featured-screen {
        grid-column: 1 / -1;
        grid-row: 1 / -1;
        width: 100%;
        height: 100%;
        aspect-ratio: unset;
        max-height: calc(100vh - 85px);
    }

    .video-card video {
        width: 100%;
        height: 100%;
        object-fit: contain;
    }

.avatar-placeholder {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background-color: #1a73e8;
    color: #fff;
    font-size: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 500;
}

.participant-label {
    position: absolute;
    bottom: 12px;
    left: 12px;
    background: rgba(32, 33, 36, 0.8);
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 13px;
    display: flex;
    gap: 6px;
    align-items: center;
    backdrop-filter: blur(4px);
}

.status-badge {
    font-size: 11px;
    background: #1a73e8;
    color: #fff;
    padding: 2px 6px;
    border-radius: 4px;
}

.hand-raised-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    background: #fbbc04;
    color: #202124;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 6px rgba(0,0,0,0.4);
}

.reaction-overlay {
    position: absolute;
    font-size: 64px;
    animation: popUp 2s ease-out forwards;
}

@keyframes popUp {
    0% {
        transform: scale(0.5);
        opacity: 0;
    }

    30% {
        transform: scale(1.3);
        opacity: 1;
    }

    100% {
        transform: translateY(-50px) scale(1);
        opacity: 0;
    }
}

.sidebar {
    width: 360px;
    background: #202124;
    border-left: 1px solid #3c4043;
    display: flex;
    flex-direction: column;
    margin: 16px;
    border-radius: 12px;
    overflow: hidden;
    z-index: 50;
}

.sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid #3c4043;
    font-weight: 500;
}

.sidebar-content {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
}

.participant-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px;
    background: #292a2d;
    border-radius: 8px;
    margin-bottom: 6px;
}

.btn-kick {
    background: none;
    border: none;
    color: #ea4335;
    cursor: pointer;
    border-radius: 50%;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
}

    .btn-kick:hover {
        background: rgba(234, 67, 53, 0.15);
    }

.chat-message {
    margin-bottom: 12px;
    background: #292a2d;
    padding: 10px 14px;
    border-radius: 8px;
}

.chat-sender {
    font-size: 12px;
    color: #8ab4f8;
    margin-bottom: 4px;
    display: flex;
    justify-content: space-between;
}

.chat-input-area {
    padding: 12px;
    border-top: 1px solid #3c4043;
    display: flex;
    gap: 8px;
}

.chat-input {
    flex: 1;
    background: #292a2d;
    border: 1px solid #3c4043;
    border-radius: 20px;
    padding: 10px 16px;
    color: #fff;
    outline: none;
}

/* شريط التحكم السفلي الثابت وغير القابل للاختفاء */
.control-bar {
    height: 75px;
    min-height: 75px;
    background-color: #202124;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 16px;
    z-index: 100;
    flex-shrink: 0;
    border-top: 1px solid #3c4043;
}

.center-controls {
    display: flex;
    align-items: center;
    gap: 8px;
}

.right-controls {
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-meet {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: none;
    background-color: #3c4043;
    color: #e8eaed;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

    .btn-meet:hover {
        background-color: #4a4e51;
    }

    .btn-meet.active-off {
        background-color: #ea4335;
        color: #fff;
    }

    .btn-meet.active-on {
        background-color: #8ab4f8;
        color: #202124;
    }

.btn-meet-end {
    width: 60px;
    height: 44px;
    border-radius: 22px;
    border: none;
    background-color: #ea4335;
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.emoji-popup {
    position: absolute;
    bottom: 85px;
    left: 50%;
    transform: translateX(-50%);
    background: #292a2d;
    border: 1px solid #3c4043;
    border-radius: 24px;
    padding: 8px 16px;
    display: flex;
    gap: 12px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.4);
    z-index: 100;
}

.emoji-btn {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    transition: transform 0.15s;
}

    .emoji-btn:hover {
        transform: scale(1.3);
    }

/* توافق تام مع شاشات الجوال */
@media (max-width: 768px) {
    .control-bar {
        padding: 0 8px;
        justify-content: space-around;
    }

    .btn-meet {
        width: 38px;
        height: 38px;
    }

    .btn-meet-end {
        width: 50px;
        height: 38px;
    }
}
