:root {
    --whatsapp-green: #008069;
    --whatsapp-teal: #128C7E;
    --whatsapp-light: #25D366;
    --msg-outgoing: #E7FFDB;
    --msg-incoming: #FFFFFF;
    --bg-color: #E5DDD5;
    --text-primary: #111B21;
    --text-secondary: #667781;
    --glass-bg: rgba(255, 255, 255, 0.25);
    --glass-border: rgba(255, 255, 255, 0.3);
    --shadow-soft: 0 8px 32px 0 rgba(31, 38, 135, 0.37);
}

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

body {
    font-family: 'Inter', sans-serif;
    background-color: #0f0f0f;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
    color: white;
}

/* Background Effects */
.app-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
}

.glow-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
}

.orb-1 {
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, #7F00FF, #E100FF);
    top: -100px;
    left: -100px;
    animation: drift 10s infinite alternate;
}

.orb-2 {
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, #00C6FF, #0072FF);
    bottom: -50px;
    right: -50px;
    animation: drift 12s infinite alternate-reverse;
}

@keyframes drift {
    from {
        transform: translate(0, 0);
    }

    to {
        transform: translate(30px, 30px);
    }
}

/* Main Layout */
.main-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 40px;
}

/* Smartphone Frame */
.smartphone {
    width: 360px;
    height: 720px;
    background: linear-gradient(180deg, #f0f0f0 0%, #e0e0e0 100%);
    border-radius: 40px;
    box-shadow:
        0 0 0 12px #333,
        0 0 0 14px #555,
        20px 20px 50px rgba(0, 0, 0, 0.5);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.notch {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 150px;
    height: 30px;
    background: #333;
    border-bottom-left-radius: 20px;
    border-bottom-right-radius: 20px;
    z-index: 10;
}

/* Header */
.chat-header {
    background: var(--whatsapp-green);
    padding: 40px 15px 10px;
    display: flex;
    align-items: center;
    color: white;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
    z-index: 5;
}

.back-arrow {
    margin-right: 5px;
    cursor: pointer;
}

.profile-pic-container {
    position: relative;
    margin-right: 10px;
}

.profile-pic {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

.chat-info {
    flex: 1;
}

.chat-name {
    font-size: 16px;
    font-weight: 500;
}

.chat-status {
    font-size: 12px;
    opacity: 0.8;
}

.header-icons {
    display: flex;
    gap: 15px;
    color: white;
}

/* Chat Area */
.chat-area {
    flex: 1;
    background-color: var(--bg-color);
    background-image: url("data:image/svg+xml,%3Csvg width='100' height='100' viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M10 10h10v10H10V10z' fill='%23d1d7db' opacity='0.4'/%3E%3C/svg%3E");
    padding: 15px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.message {
    max-width: 80%;
    padding: 8px 10px;
    border-radius: 8px;
    position: relative;
    font-size: 14px;
    line-height: 1.4;
    animation: popIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes popIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

.received {
    align-self: flex-start;
    background: var(--msg-incoming);
    border-top-left-radius: 0;
    box-shadow: 0 1px 1px rgba(0, 0, 0, 0.1);
    color: var(--text-primary);
}

.sent {
    align-self: flex-end;
    background: var(--msg-outgoing);
    border-top-right-radius: 0;
    box-shadow: 0 1px 1px rgba(0, 0, 0, 0.1);
    color: var(--text-primary);
}

.time {
    font-size: 10px;
    color: var(--text-secondary);
    float: right;
    margin-top: 5px;
    margin-left: 8px;
}

/* Input Area */
.input-area {
    background: #f0f0f0;
    padding: 8px 10px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.input-wrapper {
    flex: 1;
    background: white;
    border-radius: 24px;
    padding: 8px 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.emoji-icon {
    color: #8696a0;
    cursor: pointer;
}

input {
    border: none;
    outline: none;
    width: 100%;
    font-size: 15px;
    font-family: inherit;
}

.send-btn {
    background: var(--whatsapp-green);
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.2s;
    flex-shrink: 0;
}

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

/* Popup */
.popup-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
}

.popup-content {
    background: white;
    padding: 30px 20px;
    width: 85%;
    border-radius: 20px;
    text-align: center;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
    animation: popupSlide 0.4s ease-out;
}

@keyframes popupSlide {
    from {
        transform: translateY(50px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.popup-icon {
    font-size: 40px;
    margin-bottom: 15px;
    animation: bounce 2s infinite;
}

@keyframes bounce {

    0%,
    20%,
    50%,
    80%,
    100% {
        transform: translateY(0);
    }

    40% {
        transform: translateY(-10px);
    }

    60% {
        transform: translateY(-5px);
    }
}

.popup-content h3 {
    color: #111B21;
    margin-bottom: 10px;
    font-family: 'Outfit', sans-serif;
    font-weight: 600;
}

.popup-content p {
    color: #54656F;
    font-size: 14px;
    margin-bottom: 20px;
    line-height: 1.5;
}

#closePopupBtn {
    background: var(--whatsapp-green);
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 24px;
    font-weight: 600;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.3s;
}

#closePopupBtn:hover {
    background: var(--whatsapp-teal);
}

.hidden {
    display: none !important;
}

/* Explanation */
.app-explanation {
    text-align: center;
    font-family: 'Outfit', sans-serif;
}

.app-explanation h1 {
    font-weight: 600;
    margin-bottom: 8px;
    background: linear-gradient(to right, #25D366, #128C7E);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.app-explanation p {
    color: rgba(255, 255, 255, 0.7);
    font-size: 14px;
    line-height: 1.6;
}

/* Scrollbar styling */
.chat-area::-webkit-scrollbar {
    width: 6px;
}

.chat-area::-webkit-scrollbar-track {
    background: transparent;
}

.chat-area::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 3px;
}