/* ========== PHONE FRAME ========== */
.phone-frame {
    width: 360px;
    height: 740px;
    border-radius: 45px;
    box-shadow: 
        0 0 0 12px #1a1a1a,
        0 0 0 14px #0d0d0d,
        0 30px 60px rgba(0,0,0,0.5),
        inset 0 0 3px rgba(255,255,255,0.1);
    position: relative;
    overflow: hidden;
}

.phone-frame::before {
    content: '';
    position: absolute;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    width: 120px;
    height: 28px;
    background: #000;
    border-radius: 20px;
    z-index: 100;
}

/* ========== SCROLLBARS ========== */
.custom-scrollbar::-webkit-scrollbar {
    width: 5px;
}

.custom-scrollbar::-webkit-scrollbar-track {
    background: transparent;
}

.custom-scrollbar::-webkit-scrollbar-thumb {
    background: #374151;
    border-radius: 10px;
}

.custom-scrollbar::-webkit-scrollbar-thumb:hover {
    background: #4b5563;
}

#chat-area::-webkit-scrollbar {
    display: none;
}

#chat-area {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

/* ========== CONTROLS ========== */
.control-input {
    width: 100%;
    padding: 0.625rem 0.875rem;
    background: rgba(31, 41, 55, 0.8);
    border: 1px solid rgba(75, 85, 99, 0.3);
    border-radius: 0.5rem;
    color: white;
    outline: none;
    transition: all 0.2s;
}

.control-input:focus {
    border-color: rgba(16, 185, 129, 0.5);
    background: rgba(31, 41, 55, 1);
}

.control-input::placeholder {
    color: #6b7280;
}

/* ========== PLATFORM BUTTONS ========== */
.platform-btn {
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: rgba(55, 65, 81, 0.4);
    border: 1px solid transparent;
    color: #9ca3af;
    transition: all 0.2s ease;
    font-size: 16px;
}

.platform-btn:hover {
    background: rgba(55, 65, 81, 0.8);
    color: #fff;
    transform: translateY(-1px);
}

.platform-btn.active {
    background: rgba(16, 185, 129, 0.2);
    border-color: #10b981;
    color: #10b981;
    box-shadow: 0 0 12px rgba(16, 185, 129, 0.2);
}

/* ========== SENDER BUTTONS ========== */
.sender-btn {
    display: flex;
    align-items: center;
    padding: 0.5rem 0.75rem;
    background: rgba(55, 65, 81, 0.4);
    border: 2px solid transparent;
    border-radius: 0.5rem;
    color: #9ca3af;
    font-size: 0.75rem;
    font-weight: 500;
    transition: all 0.15s ease;
    cursor: pointer;
}

.sender-btn:hover {
    background: rgba(55, 65, 81, 0.7);
    color: #fff;
}

.sender-btn.active {
    background: rgba(16, 185, 129, 0.15);
    border-color: var(--sender-color, #10b981);
    color: #fff;
    box-shadow: 0 0 8px rgba(16, 185, 129, 0.15);
}

/* ========== MESSAGE LIST ========== */
.message-item {
    display: flex;
    align-items: center;
    padding: 0.5rem;
    background: rgba(31, 41, 55, 0.6);
    border-radius: 0.5rem;
    border: 1px solid rgba(75, 85, 99, 0.2);
    transition: all 0.15s;
}

.message-item:hover {
    background: rgba(31, 41, 55, 0.9);
}

.drag-handle {
    cursor: grab;
    color: #4b5563;
    padding: 0 0.375rem;
    margin-right: 0.25rem;
}

.drag-handle:hover {
    color: #9ca3af;
}

.sortable-ghost {
    opacity: 0.4;
    background: rgba(16, 185, 129, 0.1) !important;
    border-color: #10b981 !important;
}

/* ========== WHATSAPP BACKGROUND ========== */
.whatsapp-bg-pattern {
    background-color: #e5ddd5;
    background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23c8c8c8' fill-opacity='0.2'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

/* ========== TYPING INDICATOR ========== */
.typing-dot {
    width: 8px;
    height: 8px;
    background: #888;
    border-radius: 50%;
    animation: typingBounce 1.4s infinite ease-in-out;
}

.typing-dot:nth-child(1) { animation-delay: 0s; }
.typing-dot:nth-child(2) { animation-delay: 0.2s; }
.typing-dot:nth-child(3) { animation-delay: 0.4s; }

@keyframes typingBounce {
    0%, 60%, 100% {
        transform: translateY(0);
        opacity: 0.4;
    }
    30% {
        transform: translateY(-6px);
        opacity: 1;
    }
}

/* ========== KBD STYLING ========== */
kbd {
    font-family: inherit;
    font-size: inherit;
}

/* ========== ANIMATIONS ========== */
@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.msg-animate {
    animation: slideInUp 0.3s ease-out;
}
