/* Video Chat Container */
.video-chat-container {
    display: flex;
    flex-direction: column;
    height: 100vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    overflow: hidden;
    position: relative;
    touch-action: manipulation; /* Prevent double-tap zoom */
}

/* Auto-Reconnect Notice */
.auto-reconnect-notice {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 12px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    font-size: 15px;
    font-weight: 500;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    z-index: 1001;
    animation: slideDown 0.2s ease-out;
}

@keyframes slideDown {
    from {
        transform: translateY(-100%);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.reconnect-timer {
    font-weight: 700;
    font-size: 1.1rem;
    background: rgba(255, 255, 255, 0.2);
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    animation: pulse 1s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }

    50% {
        opacity: 0.7;
    }
}

.cancel-auto-find-btn {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #ff4757;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    padding: 0;
}

    .cancel-auto-find-btn:hover {
        background: #ff3838;
        transform: scale(1.1);
    }

    .cancel-auto-find-btn svg {
        stroke: white;
    }

/* Avatar and Contact Details */
.avatar {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    font-weight: 700;
    flex-shrink: 0;
}

.contact-details {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.contact-name {
    margin: 0;
    font-size: 1.2rem;
    color: #2d3748;
    font-weight: 600;
}

.contact-status {
    font-size: 0.85rem;
    color: #718096;
}

/* Online Badge */
.online-badge {
    display: flex;
    align-items: center;
    gap: 6px;
    background: #f0f2f5;
    padding: 6px 12px;
    border-radius: 20px;
    margin-left: 15px;
}

    .online-badge svg {
        fill: #10b981;
        stroke: none;
    }

    .online-badge span {
        font-size: 0.9rem;
        font-weight: 600;
        color: #2d3748;
    }

/* Settings Overlay */
.settings-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    backdrop-filter: blur(4px);
}

.settings-modal {
    background: white;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    width: 90%;
    max-width: 450px;
    overflow: hidden;
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Options Overlay */
.options-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.2s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: scale(0.8) translateY(-20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

/* Confirmation Dialog */
.confirm-dialog {
    background: white;
    border-radius: 16px;
    padding: 1.5rem;
    max-width: 400px;
    width: 90%;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    animation: modalSlideIn 0.3s ease-out;
}

.confirm-header {
    margin-bottom: 1rem;
}

.confirm-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #1f2937;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0;
}

.confirm-title svg {
    color: #ff9800;
}

.confirm-body {
    margin-bottom: 1.5rem;
}

.confirm-message {
    font-size: 1rem;
    line-height: 1.6;
    color: #6b7280;
    margin: 0;
}

.confirm-actions {
    display: flex;
    gap: 0.75rem;
    justify-content: flex-end;
}

.btn-confirm-cancel,
.btn-confirm-ok {
    padding: 0.625rem 1.25rem;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
}

.btn-confirm-cancel {
    background: #f0f2f5;
    color: #1f2937;
}

.btn-confirm-cancel:hover {
    background: #e4e6eb;
}

.btn-confirm-ok {
    background: #dc3545;
    color: white;
}

.btn-confirm-ok:hover {
    background: #c82333;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(220, 53, 69, 0.3);
}

.settings-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid #e5e7eb;
}

    .settings-header h3 {
        margin: 0;
        font-size: 1.3rem;
        color: #1f2937;
        font-weight: 600;
    }

.close-btn {
    width: 32px;
    height: 32px;
    border: none;
    background: #f3f4f6;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: #6b7280;
    transition: all 0.2s ease;
}

    .close-btn:hover {
        background: #e5e7eb;
        color: #374151;
    }

.settings-content {
    padding: 24px;
}

.setting-item {
    margin-bottom: 16px;
}

.setting-label {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    padding: 16px;
    border-radius: 12px;
    transition: background 0.2s ease;
}

    .setting-label:hover {
        background: #f9fafb;
    }

/* Modern Toggle Switch */
.setting-checkbox {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.checkbox-custom {
    position: relative;
    width: 48px;
    height: 28px;
    background: #d1d5db;
    border-radius: 14px;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

    .checkbox-custom::before {
        content: '';
        position: absolute;
        width: 22px;
        height: 22px;
        background: white;
        border-radius: 50%;
        top: 3px;
        left: 3px;
        transition: all 0.3s ease;
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    }

.setting-checkbox:checked + .checkbox-custom {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

    .setting-checkbox:checked + .checkbox-custom::before {
        left: 23px;
    }

.setting-text {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
}

.setting-title {
    font-weight: 600;
    font-size: 1rem;
    color: #1f2937;
}

.setting-description {
    font-size: 0.875rem;
    color: #6b7280;
    line-height: 1.4;
}

/* Video Chat Header - Mobile First */
.video-chat-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1rem;
    background: #ffffff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    z-index: 10;
    min-height: 60px;
    position: relative;
}

/* Adjust header position when auto-reconnect notice is visible */
.video-chat-container.has-auto-reconnect .video-chat-header {
    margin-top: 48px; /* Height of auto-reconnect notice */
}

/* Contact Info Section */
.contact-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex: 1;
    min-width: 0; /* Allow text truncation */
}

.chat-header-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    font-weight: 700;
    flex-shrink: 0;
}

.contact-details {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0; /* Allow text truncation */    
}

.contact-name {
    margin: 0;
    font-size: 0.95rem;
    color: #1a202c;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.contact-status {
    font-size: 0.8rem;
    font-weight: 500;
}

    .contact-status.online {
        color: #10b981;
    }

    .contact-status.offline {
        color: #6b7280;
    }

    .contact-status.searching {
        color: #667eea;
        animation: pulse 2s ease-in-out infinite;
    }

/* Online Users Badge */
.online-users-badge {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    padding: 0.475rem 0.95rem;
    background: linear-gradient(135deg, #00a884 0%, #00c9a0 100%);
    color: white;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(0, 168, 132, 0.3);
    animation: fadeIn 0.3s ease-out;
}

    .online-users-badge svg {
        width: 16px;
        height: 16px;
        stroke: white;
    }

.online-count {
    font-size: 0.85rem;
    font-weight: 600;
}

.video-chat-actions {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    flex-shrink: 0;
}

/* Buttons - Touch-Friendly for Mobile */
.btn-find-partner {
    padding: 0.875rem 1.75rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 30px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
    min-height: 44px; /* iOS minimum touch target */
    white-space: nowrap;
    -webkit-tap-highlight-color: transparent;
}

    .btn-find-partner:active {
        transform: scale(0.98);
        box-shadow: 0 2px 8px rgba(102, 126, 234, 0.4);
    }

@media (hover: hover) {
    .btn-find-partner:hover {
        transform: translateY(-2px);
        box-shadow: 0 6px 16px rgba(102, 126, 234, 0.5);
    }
}

.btn-cancel-search {
    padding: 0.875rem 1.75rem;
    background: #ff4757;
    color: white;
    border: none;
    border-radius: 30px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    min-height: 44px;
    -webkit-tap-highlight-color: transparent;
}

    .btn-cancel-search:active {
        transform: scale(0.98);
        background: #ff3838;
    }

@media (hover: hover) {
    .btn-cancel-search:hover {
        background: #ff3838;
        transform: translateY(-2px);
    }
}

.icon-btn {
    width: 44px;
    height: 44px;
    min-width: 44px; /* iOS minimum touch target */
    min-height: 44px;
    border-radius: 50%;
    border: none;
    background: #f3f4f6;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
    -webkit-tap-highlight-color: transparent;
}

    .icon-btn:active {
        transform: scale(0.95);
        background: #e5e7eb;
    }

@media (hover: hover) {
    .icon-btn:hover {
        background: #e5e7eb;
        box-shadow: 0 3px 8px rgba(0, 0, 0, 0.12);
    }
}

.icon-btn.btn-leave {
    background: #ff4757;
}

    .icon-btn.btn-leave:active {
        background: #ff3838;
    }

@media (hover: hover) {
    .icon-btn.btn-leave:hover {
        background: #ff3838;
    }
}

.icon-btn .icon {
    width: 20px;
    height: 20px;
    stroke: #4b5563;
}

.icon-btn.btn-leave .icon {
    stroke: white;
}

/* Video Chat Content */
.video-chat-content {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

@media (max-width: 768px) {
    .video-chat-content {
        padding: 0; /* Full screen on mobile */
    }
}

/* Searching Overlay */
.searching-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
}

.searching-content {
    text-align: center;
    padding: 3rem;
    background: white;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

    .searching-content h3 {
        margin: 1.5rem 0 0.5rem;
        font-size: 1.5rem;
        color: #333;
    }

    .searching-content p {
        margin: 0;
        color: #666;
        font-size: 1rem;
    }

/* Spinner */
.spinner {
    width: 60px;
    height: 60px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* Find Partner Center Card */
.find-partner-center {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 1;
    width: 100%;
    min-height: 400px;
}

.find-partner-card {
    background: white;
    border-radius: 24px;
    padding: 3rem 2rem;
    text-align: center;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    max-width: 420px;
    width: 90%;
    animation: fadeInUp 0.5s ease-out;
}

.find-partner-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 1.5rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 24px rgba(102, 126, 234, 0.3);
    animation: pulse 2s ease-in-out infinite;
}

    .find-partner-icon svg {
        color: white;
        width: 48px;
        height: 48px;
    }

.find-partner-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: #1a202c;
    margin: 0 0 0.75rem 0;
}

.find-partner-description {
    font-size: 1rem;
    color: #6b7280;
    margin: 0 0 2rem 0;
    line-height: 1.6;
}

.btn-find-partner-center {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 1rem 2.5rem;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 16px rgba(102, 126, 234, 0.3);
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
}

    .btn-find-partner-center:hover {
        background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
        transform: translateY(-2px);
        box-shadow: 0 6px 24px rgba(102, 126, 234, 0.4);
    }

    .btn-find-partner-center:active {
        transform: translateY(0);
    }

    .btn-find-partner-center svg {
        width: 20px;
        height: 20px;
    }

/* Searching Animation */
.searching-animation {
    background: white;
    border-radius: 24px;
    padding: 3rem 2rem;
    text-align: center;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    max-width: 420px;
    width: 90%;
    animation: fadeInUp 0.5s ease-out;
}

.searching-dots {
    display: flex;
    justify-content: center;
    gap: 0.75rem;
    margin-bottom: 2rem;
}

.searching-dot {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    animation: searchingBounce 1.4s infinite ease-in-out;
}

    .searching-dot:nth-child(1) {
        animation-delay: 0s;
    }

    .searching-dot:nth-child(2) {
        animation-delay: 0.2s;
    }

    .searching-dot:nth-child(3) {
        animation-delay: 0.4s;
    }

@keyframes searchingBounce {
    0%, 60%, 100% {
        transform: translateY(0);
    }

    30% {
        transform: translateY(-20px);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.searching-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1a202c;
    margin: 0 0 0.5rem 0;
}

.searching-subtitle {
    font-size: 1rem;
    color: #6b7280;
    margin: 0 0 2rem 0;
}

.btn-cancel-search-center {
    background: transparent;
    color: #ff4757;
    border: 2px solid #ff4757;
    padding: 0.75rem 2rem;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

    .btn-cancel-search-center:hover {
        background: #ff4757;
        color: white;
        transform: translateY(-2px);
        box-shadow: 0 4px 16px rgba(255, 71, 87, 0.3);
    }

    .btn-cancel-search-center:active {
        transform: translateY(0);
    }

    .btn-cancel-search-center svg {
        width: 16px;
        height: 16px;
    }

/* No Partner Message - Legacy (kept for backward compatibility) */
.no-partner-message {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.no-partner-content {
    text-align: center;
    padding: 3rem;
    background: white;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    max-width: 500px;
}

.video-icon {
    font-size: 5rem;
    margin-bottom: 1rem;
}

.no-partner-content h3 {
    margin: 1rem 0;
    font-size: 1.8rem;
    color: #333;
}

.no-partner-content p {
    margin: 0;
    color: #666;
    font-size: 1.1rem;
    line-height: 1.6;
}

/* Video Call Interface */
.video-call-interface {
    width: 100%;
    height: 100%;
    position: relative;
}

/* Video Streams */
.video-streams {
    width: 100%;
    height: 100%;
    position: relative;
    background: #000;
    overflow: hidden;
    box-shadow: 0 10px 50px rgba(0, 0, 0, 0.3);
    cursor: pointer; /* Indicate entire area is tappable */
}

@media (max-width: 768px) {
    .video-streams {
        border-radius: 0; /* Full screen on mobile */
        box-shadow: none;
    }
}

/* Remote Video Container */
.remote-video-container {
    width: 100%;
    height: 100%;
    position: relative;
    background: #1a1a1a;
    cursor: pointer; /* Indicate tappable */
    -webkit-tap-highlight-color: transparent;
    pointer-events: auto; /* Ensure clickable */
    z-index: 1; /* Below controls but above background */
}

.remote-video {
    width: 100%;
    height: 100%;
    object-fit: contain; /* Prevent stretching, maintain aspect ratio, prevent over-zooming */
    background: #000;
    pointer-events: none; /* Allow clicks to pass through to container */
    max-height: 100dvh;
}

.partner-info {
    position: absolute;
    top: 20px;
    left: 20px;
    display: flex;
    align-items: center;
    gap: 1rem;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(10px);
    padding: 0.75rem 1.5rem;
    border-radius: 25px;
    color: white;
    pointer-events: none; /* Don't block clicks on video */
}

.partner-label {
    font-size: 1rem;
    font-weight: 600;
}

.call-time {
    font-size: 0.9rem;
    color: #ddd;
}

.mute-indicator {
    display: inline-flex;
    align-items: center;
    color: #ff6b6b;
    margin-left: 0.5rem;
}

    .mute-indicator svg {
        width: 14px;
        height: 14px;
    }

/* Local Video Container */
.local-video-container {
    position: absolute;
    bottom: 100px; /* Above controls */
    right: 20px;
    width: 280px;
    height: 210px;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
    border: 3px solid white;
    background: #000;
    cursor: pointer; /* Indicate tappable */
    -webkit-tap-highlight-color: transparent;
    transition: all 0.3s ease;
    z-index: 10; /* Above remote video */
    pointer-events: auto; /* Ensure clickable */
}

    .local-video-container:active {
        transform: scale(0.98);
    }

.local-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scaleX(-1); /* Mirror effect for local video */
    max-height: 100dvh;
    pointer-events: none; /* Allow clicks to pass through to container */
}

/* Swapped state - when local video is main view */
.local-video-container.swapped {
    position: relative;
    width: 100%;
    height: 100%;
    bottom: 0;
    right: 0;
    border-radius: 0;
    border: none;
    z-index: 1;
    pointer-events: auto; /* Ensure clickable when swapped */
}

.remote-video-container.swapped {
    position: absolute;
    width: 280px;
    height: 210px;
    bottom: 100px;
    right: 20px;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
    border: 3px solid white;
    z-index: 10;
    pointer-events: auto; /* Ensure clickable when swapped */
}

    .remote-video-container.swapped .remote-video {
        object-fit: contain; /* Prevent over-zooming when swapped */
    }

.local-label {
    position: absolute;
    bottom: 10px;
    left: 10px;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(10px);
    padding: 0.4rem 1rem;
    border-radius: 15px;
    color: white;
    font-size: 0.85rem;
    font-weight: 600;
    pointer-events: none; /* Don't block clicks on video */
}

/* Video Controls */
.video-controls {
    position: absolute;
    bottom: 100px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 1rem;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(10px);
    padding: 1rem 2rem;
    border-radius: 50px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
    z-index: 200; /* Ensure always visible above video */
    pointer-events: auto; /* Ensure buttons are clickable */
}

    .video-controls * {
        pointer-events: auto; /* Ensure all buttons inside are clickable */
    }

@media (max-width: 768px) {
    .video-controls {
        bottom: 20px;
    }
}

.video-btn {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.9);
}

    .video-btn:hover {
        transform: scale(1.1);
        background: white;
    }

    .video-btn.muted {
        background: #ff4757;
    }

        .video-btn.muted:hover {
            background: #ff3838;
        }

    .video-btn .icon {
        width: 24px;
        height: 24px;
        stroke: #333;
    }

    .video-btn.muted .icon {
        stroke: white;
    }

    .video-btn.hangup-btn {
        background: #ff4757;
    }

        .video-btn.hangup-btn:hover {
            background: #ff3838;
        }

        .video-btn.hangup-btn .icon {
            stroke: white;
            width: 28px;
            height: 28px;
        }

/* Call Status Banner */
.call-status-banner {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(102, 126, 234, 0.9);
    backdrop-filter: blur(10px);
    padding: 0.75rem 1.5rem;
    border-radius: 25px;
    color: white;
    font-size: 0.9rem;
    font-weight: 600;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    z-index: 1;
}

/* Connecting View */
.connecting-view {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
    border-radius: 15px;
}

.connecting-content {
    text-align: center;
    padding: 3rem;
    background: white;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

    .connecting-content h3 {
        margin: 1.5rem 0 0.5rem;
        font-size: 1.5rem;
        color: #333;
    }

    .connecting-content p {
        margin: 0;
        color: #666;
        font-size: 1rem;
    }

/* Responsive Design - Mobile First Approach */

/* Small Mobile Phones (320px - 480px) */
@media (max-width: 480px) {
    .video-chat-header {
        padding: 0.625rem 0.875rem;
        min-height: 56px;
    }

    .video-chat-container.has-auto-reconnect .video-chat-header {
        margin-top: 48px;
    }

    /* Confirmation Dialog */
    .confirm-dialog {
        max-width: 92%;
        padding: 1.25rem;
    }

    .confirm-title {
        font-size: 1.1rem;
    }

    .confirm-message {
        font-size: 0.9rem;
    }

    .btn-confirm-cancel,
    .btn-confirm-ok {
        padding: 0.5rem 1rem;
        font-size: 0.875rem;
    }

    .chat-header-avatar {
        width: 36px;
        height: 36px;
        font-size: 1rem;
    }

    .contact-info {
        gap: 0.625rem;
    }

    .contact-name {
        font-size: 0.875rem;
    }

    .contact-status {
        font-size: 0.75rem;
    }
  
    .video-chat-actions {
        gap: 0.375rem;
    }

        .video-chat-actions .btn-find-partner, .video-chat-actions .btn-cancel-search {
            display: none;
        }

    .btn-find-partner,
    .btn-cancel-search {
        padding: 0.75rem 1.25rem;
        font-size: 0.875rem;
    }

    .icon-btn {
        width: 40px;
        height: 40px;
        min-width: 40px;
        min-height: 40px;
    }

        .icon-btn .icon {
            width: 18px;
            height: 18px;
        }

    /* Video Layout */
    .local-video-container {
        width: 120px;
        height: 90px;
        bottom: 150px;
        right: 10px;
        border: 2px solid white;
    }

        .local-video-container.swapped {
            border-radius: 0;
        }

    .remote-video-container.swapped {
        width: 120px;
        height: 90px;
        bottom: 150px;
        right: 10px;
        border: 2px solid white;
    }

    .video-controls {
        padding: 0.75rem 1rem;
        gap: 0.5rem;
        bottom: 50px;
        z-index: 100;
    }

    .video-btn {
        width: 52px;
        height: 52px;
    }

        .video-btn.hangup-btn {
            width: 60px;
            height: 60px;
        }

        .video-btn .icon {
            width: 22px;
            height: 22px;
        }

    .partner-info {
        top: 12px;
        left: 12px;
        padding: 0.5rem 0.875rem;
        font-size: 0.8rem;
    }

    .call-time {
        font-size: 0.75rem;
    }

    .mute-indicator {
        margin-left: 0.25rem;
    }

        .mute-indicator svg {
            width: 12px;
            height: 12px;
        }

    .no-partner-content,
    .searching-content,
    .connecting-content {
        padding: 2rem 1.5rem;
    }

        .no-partner-content h3,
        .searching-content h3,
        .connecting-content h3 {
            font-size: 1.25rem;
        }

    .video-icon {
        font-size: 4rem;
    }
}

/* Tablets and Medium Mobile (481px - 768px) */
@media (min-width: 481px) and (max-width: 768px) {
    .video-chat-header {
        padding: 0.75rem 1rem;
    }

    .online-users-badge {
        display: flex; /* Show on tablets */
    }

    .local-video-container {
        width: 160px;
        height: 120px;
        bottom: 95px;
        right: 15px;
    }

    .remote-video-container.swapped {
        width: 160px;
        height: 120px;
        bottom: 95px;
        right: 15px;
    }

    .video-controls {
        padding: 0.875rem 1.5rem;
        gap: 0.75rem;
        bottom: 15px;
    }

    .video-btn {
        width: 56px;
        height: 56px;
    }

        .video-btn.hangup-btn {
            width: 66px;
            height: 66px;
        }
}

/* Landscape Mobile Orientation */
@media (max-height: 500px) and (orientation: landscape) {
    .video-chat-header {
        padding: 0.5rem 1rem;
        min-height: 50px;
    }

    .chat-header-avatar {
        width: 32px;
        height: 32px;
        font-size: 0.9rem;
    }

    .contact-name {
        font-size: 0.85rem;
    }

    .video-controls {
        padding: 0.5rem 1rem;
        gap: 0.5rem;
        bottom: 8px;
    }

    .local-video-container {
        width: 140px;
        height: 105px;
        bottom: 65px;
        right: 10px;
    }

    .remote-video-container.swapped {
        width: 140px;
        height: 105px;
        bottom: 65px;
        right: 10px;
    }

    .partner-info {
        top: 8px;
        left: 8px;
        padding: 0.4rem 0.75rem;
    }
}

/* Desktop and Larger Screens (769px+) */
@media (min-width: 769px) {
    .video-chat-header {
        padding: 1rem 1.5rem;
    }

    .chat-header-avatar {
        width: 44px;
        height: 44px;
        font-size: 1.2rem;
    }

    .contact-info {
        gap: 1rem;
    }

    .contact-name {
        font-size: 1.1rem;
    }

    .contact-status {
        font-size: 0.9rem;
    }

    .video-chat-actions {
        gap: 0.75rem;
    }

    /* Desktop - disable swap feature */
    .local-video-container,
    .remote-video-container {
        cursor: default;
    }

        .local-video-container:active {
            transform: none;
        }
}
