body, html {
    margin: 0;
    padding: 0;
    height: 100%;
    width: 100%;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: #0b141a; /* Darker WhatsApp Background */
    color: white;
    overflow: hidden;
}

.call-screen {
    display: flex;
    flex-direction: column;
    height: 100%;
    position: relative;
    z-index: 1;
}

/* Doodle Pattern with low opacity */
.call-screen::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url('/back.webp');
    background-size: cover; 
    opacity: 0.3; /* 60% Transparent */
    z-index: -1;
}

.top-info {
    padding-top: 60px;
    text-align: center;
    flex: 1;
    z-index: 2;
}

.phone-number {
    font-size: 28px;
    font-weight: 600;
    margin-bottom: 8px;
    letter-spacing: 0.5px;
}

.caller-id {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 16px;
    color: #8696a0;
    font-weight: 500;
}

.wa-icon {
    width: 16px;
    height: 16px;
    fill: #25D366;
}

.avatar-container {
    flex: 2;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    z-index: 2;
}

.avatar {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
}

.mid-controls {
    text-align: center;
    margin-bottom: 50px;
    z-index: 2;
}

.turn-on-video {
    background: transparent;
    border: 1px solid #7f8689; /* Darker grey border */
    color: #e9edef;
    padding: 8px 20px;
    border-radius: 24px;
    font-size: 14px;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    backdrop-filter: blur(4px);
}

.bottom-controls {
    display: flex;
    justify-content: space-around; /* Distribute evenly */
    align-items: flex-end; /* Align bottom */
    padding: 0 5% 50px 5%; /* Use percentage padding */
    z-index: 2;
    width: 100%;
    box-sizing: border-box;
}

.control-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    background: none;
    border: none;
    color: white;
    position: relative;
    flex: 1; /* Allow buttons to take available space */
    max-width: 120px; /* Limit width */
}

.btn-circle {
    width: 60px; /* Default size */
    height: 60px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 24px;
    transition: transform 0.2s;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
}

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

.btn-decline {
    background-color: #ff3b30; /* Bright Call Red */
}

.btn-accept {
    background-color: #25D366; /* WhatsApp Brand Green */
}

.btn-message {
    background-color: rgba(255, 255, 255, 0.15); /* Slightly lighter */
    /* Message button is same size as others in new UI */
    margin-bottom: 0; 
}

.label {
    font-size: 14px;
    color: #e9edef;
    font-weight: 500;
    text-shadow: 0 1px 2px rgba(0,0,0,0.5);
    width: 100%;
    text-align: center;
    line-height: 1.2;
    white-space: nowrap; /* Prevent wrapping if possible */
}

/* Specific tweaks for "Accept without video" label which is long */
.control-btn:nth-child(2) .label {
    white-space: nowrap; /* Force one line */
    max-width: none; /* Allow it to expand */
    font-size: 13px; /* Slightly smaller font to help fit */
    width: auto; /* Allow width to fit content */
    margin-left: -20px; /* Pull slightly left/right if needed to center visually */
    margin-right: -20px;
}

/* Responsive Adjustments */
@media (max-width: 380px) {
    .btn-circle {
        width: 50px;
        height: 50px;
        font-size: 20px;
    }
    
    .label {
        font-size: 12px;
    }
    
    .arrows-container {
        margin-bottom: 10px;
        height: 30px;
    }
    
    .bottom-controls {
        padding-bottom: 30px;
    }
}

/* Moving Arrows Animation */
.arrows-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 15px; /* Space between arrows and button */
    height: 40px;
    justify-content: flex-end;
}

.arrow {
    width: 12px;
    height: 12px;
    border-top: 2px solid rgba(255, 255, 255, 0.7);
    border-left: 2px solid rgba(255, 255, 255, 0.7);
    transform: rotate(45deg);
    animation: arrow-anim 1.5s infinite;
    margin-bottom: -6px; /* Stack them close */
}

.arrow:nth-child(1) { animation-delay: 0s; }
.arrow:nth-child(2) { animation-delay: 0.15s; }
.arrow:nth-child(3) { animation-delay: 0.3s; }

@keyframes arrow-anim {
    0% {
        opacity: 0;
        transform: rotate(45deg) translate(0, 0);
    }
    50% {
        opacity: 1;
    }
    100% {
        opacity: 0;
        transform: rotate(45deg) translate(0, -10px); /* Move up */
    }
}

/* Video Screen */
.video-screen {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: black;
    z-index: 100;
}

.video-player {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.end-call-overlay {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 101;
}

.btn-end {
    background-color: #ff2b42;
    width: 65px;
    height: 65px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 28px;
    color: white;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
}
