/* WhatsApp Video Call UI - Pixel Perfect Design */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body,
html {
    height: 100%;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background-color: #0d1418;
    color: white;
    overflow: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    position: fixed;
    width: 100%;
}

.call-screen {
    display: flex;
    flex-direction: column;
    height: 100vh;
    background: #0d1418;
    position: relative;
    justify-content: space-between;
}

/* WhatsApp Top Header */
.top-info {
    padding: 16px 16px 24px;
    padding-top: max(16px, env(safe-area-inset-top, 16px));
    text-align: center;
    z-index: 100;
    background: linear-gradient(180deg, rgba(13, 20, 24, 1) 0%, rgba(13, 20, 24, 0.9) 70%, transparent 100%);
}

.encryption-msg {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    font-weight: 400;
}

.encryption-msg i {
    font-size: 12px;
    opacity: 0.8;
}

.caller-name {
    font-size: 26px;
    font-weight: 500;
    margin-bottom: 6px;
    color: #ffffff;
    letter-spacing: 0.2px;
}

.call-status {
    font-size: 16px;
    color: rgba(255, 255, 255, 0.65);
    font-weight: 400;
}

.call-timer {
    font-size: 16px;
    color: rgba(255, 255, 255, 0.65);
    margin-top: 4px;
    font-weight: 400;
}

/* Profile Picture - Centered */
.profile-pic-container {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 20px;
}

.profile-pic {
    width: 160px;
    height: 160px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.5);
    animation: subtle-pulse 4s ease-in-out infinite;
}

@keyframes subtle-pulse {

    0%,
    100% {
        transform: scale(1);
        box-shadow: 0 8px 40px rgba(0, 0, 0, 0.5);
    }

    50% {
        transform: scale(1.015);
        box-shadow: 0 8px 48px rgba(0, 0, 0, 0.6);
    }
}

/* WhatsApp Bottom Controls */
.bottom-controls {
    width: 100%;
    background: linear-gradient(180deg, transparent 0%, rgba(13, 20, 24, 0.8) 15%, rgba(13, 20, 24, 1) 100%);
    padding: 32px 20px;
    padding-bottom: max(32px, env(safe-area-inset-bottom, 32px));
    display: flex;
    flex-direction: column;
    gap: 40px;
    z-index: 100;
}

/* Top Action Buttons (Volume, Video, Mic) */
.action-buttons {
    display: flex;
    justify-content: center;
    gap: 32px;
    align-items: center;
}

.btn-group {
    display: flex;
    align-items: center;
    justify-content: center;
}

.icon-btn {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: #ffffff;
    transition: all 0.15s ease;
    cursor: pointer;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.icon-btn:active {
    transform: scale(0.92);
    background: rgba(255, 255, 255, 0.3);
}

/* Answer/Decline Buttons - WhatsApp Layout */
.answer-decline {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 24px;
    max-width: 100%;
}

.decline-btn,
.answer-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    text-decoration: none;
    min-width: 80px;
}

.decline-btn span,
.answer-btn span {
    font-size: 15px;
    color: #ffffff;
    font-weight: 400;
    letter-spacing: 0.2px;
}

.decline-btn i,
.answer-btn i {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    color: white;
    transition: all 0.15s ease;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

.decline-btn i {
    background: linear-gradient(135deg, #ff3b30 0%, #ea0038 100%);
}

.decline-btn:active i {
    transform: scale(0.92);
}

.answer-btn i {
    background: linear-gradient(135deg, #00d95f 0%, #00a884 100%);
    position: relative;
    animation: whatsapp-ring-pulse 2.5s ease-in-out infinite;
}

.answer-btn:active i {
    transform: scale(0.92);
}

/* Authentic WhatsApp pulse animation */
@keyframes whatsapp-ring-pulse {
    0% {
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4), 0 0 0 0 rgba(0, 217, 95, 0.6);
    }

    40% {
        box-shadow: 0 4px 24px rgba(0, 217, 95, 0.4), 0 0 0 16px rgba(0, 217, 95, 0);
    }

    100% {
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4), 0 0 0 0 rgba(0, 217, 95, 0);
    }
}

/* Reset anchor styles */
a {
    text-decoration: none;
    color: inherit;
}

/* WhatsApp Notification Banner */
.notification-banner {
    position: fixed;
    top: 8px;
    left: 8px;
    right: 8px;
    background: #202c33;
    border-radius: 12px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.5);
    z-index: 9999;
    transform: translateY(-150%);
    transition: transform 0.35s cubic-bezier(0.25, 0.8, 0.25, 1);
    overflow: hidden;
}

.notification-link {
    text-decoration: none;
    color: inherit;
    display: block;
    padding: 14px 16px;
}

.notification-banner.slide-down {
    transform: translateY(0);
}

.notification-banner.slide-up {
    transform: translateY(-150%);
}

.notification-content {
    display: flex;
    align-items: center;
    gap: 12px;
}

.notification-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(255, 255, 255, 0.1);
    flex-shrink: 0;
}

.notification-text {
    display: flex;
    flex-direction: column;
    gap: 3px;
    flex: 1;
    min-width: 0;
}

.app-name {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.6);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.notification-message {
    font-size: 15px;
    color: #e9edef;
    font-weight: 400;
    line-height: 1.4;
}

/* Custom Action Button */
.custom-action-btn {
    background: linear-gradient(135deg, #00d95f 0%, #00a884 100%);
    color: white;
    padding: 14px 28px;
    border-radius: 24px;
    font-size: 16px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s ease;
    text-align: center;
    box-shadow: 0 4px 16px rgba(0, 168, 132, 0.3);
    z-index: 10;
    pointer-events: auto;
    margin-top: 20px;
    letter-spacing: 0.3px;
}

.custom-action-btn:active {
    transform: scale(0.96);
    box-shadow: 0 2px 8px rgba(0, 168, 132, 0.3);
}

/* In-Call Controls */
#inCallControls .action-buttons {
    gap: 24px;
}

#inCallControls .icon-btn {
    width: 60px;
    height: 60px;
    font-size: 26px;
}

/* Audio elements hidden */
audio {
    display: none;
}

/* Disable text selection and highlight */
body {
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
}

/* Responsive adjustments */
@media (max-height: 700px) {
    .profile-pic {
        width: 140px;
        height: 140px;
    }

    .caller-name {
        font-size: 24px;
    }

    .bottom-controls {
        gap: 32px;
        padding: 24px 20px;
    }
}

@media (max-width: 360px) {
    .action-buttons {
        gap: 24px;
    }

    .icon-btn {
        width: 52px;
        height: 52px;
        font-size: 22px;
    }

    .decline-btn i,
    .answer-btn i {
        width: 60px;
        height: 60px;
        font-size: 24px;
    }
}

/* Loading state for images */
img {
    image-rendering: -webkit-optimize-contrast;
}