@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');

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

html, body {
    overflow-x: hidden;
    max-width: 100%;
    width: 100%;
}

:root {
    --vh: 1vh;
}

body {
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(135deg, #0a0e27 0%, #1a0b2e 50%, #16003b 100%);
    height: 100vh;
    height: calc(var(--vh, 1vh) * 100);
    min-height: -webkit-fill-available;
    overflow: hidden;
    overflow-x: hidden;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    -khtml-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    margin: 0;
    padding: 0;
    width: 100%;
    max-width: 100%;
}

body::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 20% 50%, rgba(0, 71, 171, 0.1) 0%, transparent 50%),
                radial-gradient(circle at 80% 80%, rgba(138, 43, 226, 0.1) 0%, transparent 50%);
    pointer-events: none;
}

.container {
    display: flex;
    height: 100vh;
    height: calc(var(--vh, 1vh) * 100);
    min-height: -webkit-fill-available;
    max-width: 1600px;
    margin: 0 auto;
    background: #0f1419;
    width: 100%;
    overflow: hidden;
}

@media (max-width: 768px) {
    .container {
        max-width: none;
        margin: 0;
    }
}

/* Sidebar */
.sidebar {
    width: 380px;
    min-width: 300px;
    background: rgba(17, 27, 33, 0.7);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    display: flex;
    flex-direction: column;
    border-right: 1px solid rgba(0, 71, 171, 0.2);
    box-shadow: 0 8px 32px rgba(0, 71, 171, 0.1);
}

/* Group Call Styles */
.participant-video-container {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    background: #000;
    min-height: 200px;
}

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

.participant-item {
    display: flex;
    align-items: center;
    padding: 8px 12px;
    margin: 4px 0;
    background: rgba(255,255,255,0.05);
    border-radius: 8px;
    transition: background 0.2s;
}

.participant-item:hover {
    background: rgba(255,255,255,0.1);
}

.call-btn {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    border: none;
    background: rgba(255,255,255,0.1);
    color: white;
    font-size: 24px;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.call-btn:hover {
    background: rgba(255,255,255,0.2);
    transform: scale(1.1);
}

.call-btn.end-call {
    background: #ff4444;
}

.call-btn.end-call:hover {
    background: #cc0000;
}

.call-btn.muted {
    background: #ff4444;
}

.call-btn.disabled {
    background: #666;
}

/* Responsive grid for group calls */
@media (max-width: 768px) {
    #participantsGrid {
        grid-template-columns: 1fr !important;
        gap: 10px !important;
    }
    
    .participant-video-container {
        min-height: 150px;
    }
}

.sidebar-header {
    background: rgba(30, 42, 50, 0.6);
    backdrop-filter: blur(10px);
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(0, 71, 171, 0.1);
}

.profile-avatar {
    position: relative;
    cursor: pointer;
}

.avatar-circle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 14px;
    box-shadow: 0 4px 12px rgba(0, 71, 171, 0.4), inset 0 -2px 4px rgba(0, 0, 0, 0.2), inset 0 2px 4px rgba(255, 255, 255, 0.2);
    position: relative;
    transition: all 0.3s ease;
}

.avatar-circle::before {
    content: '';
    position: absolute;
    inset: -3px;
    border-radius: 50%;
    padding: 2px;
    background: linear-gradient(135deg, #0047AB, #8a2be2);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask-composite: exclude;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.profile-avatar:hover .avatar-circle::before,
.chat-item:hover .avatar-circle::before {
    opacity: 1;
    animation: pulse-ring 2s infinite;
}

@keyframes pulse-ring {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.1); opacity: 0.7; }
}

.avatar-circle.large {
    width: 200px;
    height: 200px;
    font-size: 60px;
    box-shadow: 0 12px 32px rgba(0, 71, 171, 0.5), inset 0 -4px 8px rgba(0, 0, 0, 0.3), inset 0 4px 8px rgba(255, 255, 255, 0.2);
}

.online-indicator {
    position: absolute;
    bottom: 2px;
    right: 2px;
    width: 10px;
    height: 10px;
    background: #0047AB;
    border-radius: 50%;
    border: 2px solid #1e2a32;
    box-shadow: 0 0 10px rgba(0, 71, 171, 0.8);
    animation: pulse-glow 2s infinite;
}

@keyframes pulse-glow {
    0%, 100% { box-shadow: 0 0 10px rgba(0, 71, 171, 0.8); }
    50% { box-shadow: 0 0 20px rgba(0, 71, 171, 1); }
}

.header-icons {
    display: flex;
    gap: 20px;
}

.icon-btn {
    background: none;
    border: none;
    color: #8696a0;
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.icon-btn svg {
    filter: drop-shadow(0 2px 4px rgba(0, 71, 171, 0.3));
    transition: all 0.3s ease;
}

.icon-btn:hover {
    background: rgba(0, 71, 171, 0.15);
    color: #0047AB;
    transform: scale(1.1);
}

.icon-btn:hover svg {
    filter: drop-shadow(0 4px 10px rgba(0, 71, 171, 0.7)) drop-shadow(0 0 15px rgba(0, 71, 171, 0.5));
    transform: scale(1.05) rotate(5deg);
}

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

/* Audio Control Buttons */
#playAudioBtn, #stopAudioBtn {
    position: relative;
}

#playAudioBtn svg path:last-child {
    fill: #00CC66;
}

#stopAudioBtn svg rect {
    fill: #CC0000;
}

#playAudioBtn:hover svg path:last-child {
    fill: #00FF88;
}

#stopAudioBtn:hover svg rect {
    fill: #FF0000;
}

/* Search */
.search-container {
    padding: 10px 15px;
    background: #111b21;
    display: flex;
    gap: 10px;
}

.search-box {
    flex: 1;
    background: rgba(30, 42, 50, 0.5);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    padding: 10px 14px;
    display: flex;
    align-items: center;
    gap: 10px;
    border: 1px solid rgba(0, 71, 171, 0.2);
    transition: all 0.3s ease;
}

.search-box:focus-within {
    background: rgba(30, 42, 50, 0.7);
    border-color: rgba(0, 71, 171, 0.5);
    box-shadow: 0 0 20px rgba(0, 71, 171, 0.3);
}

.search-box svg {
    color: #8696a0;
    filter: drop-shadow(0 2px 4px rgba(0, 71, 171, 0.2));
    transition: all 0.3s ease;
}

.search-box:focus-within svg {
    color: #0047AB;
    filter: drop-shadow(0 2px 6px rgba(0, 71, 171, 0.6));
}

.search-box input {
    flex: 1;
    background: none;
    border: none;
    color: #d1d7db;
    font-size: 14px;
    outline: none;
}

.search-box input::placeholder {
    color: #667781;
}

.filter-btn {
    background: none;
    border: none;
    color: #8696a0;
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.filter-btn svg {
    filter: drop-shadow(0 2px 4px rgba(0, 71, 171, 0.2));
    transition: all 0.3s ease;
}

.filter-btn:hover {
    background: rgba(0, 71, 171, 0.15);
    transform: scale(1.1);
}

.filter-btn:hover svg {
    color: #0047AB;
    filter: drop-shadow(0 3px 8px rgba(0, 71, 171, 0.6));
}

/* Tabs */
.tabs {
    display: flex;
    background: #111b21;
    border-bottom: 1px solid #2a3942;
}

.tab {
    flex: 1;
    background: none;
    border: none;
    color: #8696a0;
    padding: 15px 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 14px;
    border-bottom: 3px solid transparent;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.tab-icon-3d {
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.tab-icon-3d svg {
    filter: drop-shadow(0 2px 5px rgba(0, 71, 171, 0.4));
    transition: all 0.3s ease;
}

.tab:hover .tab-icon-3d svg {
    filter: drop-shadow(0 4px 10px rgba(0, 71, 171, 0.7));
    transform: translateY(-2px) scale(1.05);
}

.tab.active .tab-icon-3d svg {
    filter: drop-shadow(0 4px 12px rgba(0, 71, 171, 0.9)) drop-shadow(0 0 20px rgba(0, 71, 171, 0.6));
    animation: icon-float 3s ease-in-out infinite;
}

@keyframes icon-float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-3px); }
}

.tab:hover {
    background: rgba(255, 255, 255, 0.03);
}

.tab.active {
    color: #0047AB;
    border-bottom-color: #0047AB;
    background: rgba(0, 71, 171, 0.05);
}

.tab.active::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, transparent, #0047AB, transparent);
    animation: slide-glow 2s infinite;
}

@keyframes slide-glow {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 1; }
}

.badge {
    background: linear-gradient(135deg, #0047AB 0%, #0066CC 100%);
    color: white;
    font-size: 11px;
    padding: 2px 6px;
    border-radius: 10px;
    font-weight: 600;
    box-shadow: 0 2px 6px rgba(0, 71, 171, 0.4), inset 0 -1px 2px rgba(0, 0, 0, 0.2);
}

/* Chat List */
.chat-list {
    flex: 1;
    overflow-y: auto;
    background: #111b21;
}

.chat-list::-webkit-scrollbar {
    width: 6px;
}

.chat-list::-webkit-scrollbar-thumb {
    background: #374248;
    border-radius: 3px;
}

/* Welcome Text in Chat List */
.chat-list-welcome {
    padding: 20px 15px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 200px;
    animation: fadeInText 1.5s ease-in-out;
    gap: 15px;
}

.welcome-title {
    color: white;
    font-size: 24px;
    font-weight: 700;
    text-align: center;
    margin: 0;
    background: linear-gradient(135deg, #0047AB, #0066CC, #00BFFF);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: 1px;
    opacity: 0;
    animation: fadeInText 1.5s ease-in-out forwards;
}

.welcome-text {
    color: rgba(255, 255, 255, 0.9);
    font-size: 16px;
    line-height: 1.7;
    text-align: center;
    font-weight: 400;
    letter-spacing: 0.3px;
    padding: 0 15px;
    margin: 0;
    opacity: 0;
    animation: fadeInText 1.5s ease-in-out 0.3s forwards;
}

@keyframes fadeInText {
    0% {
        opacity: 0;
        transform: translateY(10px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive for mobile */
@media (max-width: 768px) {
    .chat-list-welcome {
        padding: 15px 10px;
        min-height: 150px;
        gap: 12px;
    }
    
    .welcome-title {
        font-size: 20px;
        letter-spacing: 0.8px;
    }
    
    .welcome-text {
        font-size: 15px;
        line-height: 1.6;
        padding: 0 12px;
    }
}

/* Responsive for very small screens */
@media (max-width: 400px) {
    .welcome-title {
        font-size: 18px;
        letter-spacing: 0.5px;
    }
    
    .welcome-text {
        font-size: 14px;
        line-height: 1.5;
    }
}

.chat-item {
    display: flex;
    padding: 12px 15px;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    gap: 12px;
    border-bottom: 1px solid rgba(42, 57, 66, 0.3);
    border-radius: 12px;
    margin: 4px 8px;
    position: relative;
    align-items: center; /* Vertically align items */
}

.chat-item:hover {
    background: rgba(0, 71, 171, 0.1);
    transform: translateX(5px);
    box-shadow: 0 4px 20px rgba(0, 71, 171, 0.2);
}

.chat-item.active {
    background: rgba(0, 71, 171, 0.15);
    border: 1px solid rgba(0, 71, 171, 0.3);
    box-shadow: 0 4px 20px rgba(0, 71, 171, 0.3), inset 0 0 20px rgba(0, 71, 171, 0.1);
}

.chat-item.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 60%;
    background: linear-gradient(180deg, #0047AB, #8a2be2);
    border-radius: 0 4px 4px 0;
    box-shadow: 0 0 10px rgba(0, 71, 171, 0.8);
}

.chat-info {
    flex: 1;
    min-width: 0;
}

.chat-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 4px;
}

.chat-header h3 {
    color: #d1d7db;
    font-size: 16px;
    font-weight: 500;
}

.time {
    color: #667781;
    font-size: 12px;
}

.chat-preview {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.chat-preview p {
    color: #8696a0;
    font-size: 14px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.unread-badge {
    background: linear-gradient(135deg, #0047AB 0%, #0066CC 100%);
    color: white;
    font-size: 11px;
    padding: 2px 6px;
    border-radius: 10px;
    font-weight: 600;
    min-width: 20px;
    text-align: center;
    box-shadow: 0 2px 6px rgba(0, 71, 171, 0.5), inset 0 -1px 2px rgba(0, 0, 0, 0.2);
}

/* Resizer */
.resizer {
    width: 5px;
    background: rgba(17, 27, 33, 0.5);
    cursor: col-resize;
    transition: all 0.3s ease;
    position: relative;
}

.resizer::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 3px;
    height: 40px;
    background: rgba(0, 71, 171, 0.3);
    border-radius: 2px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.resizer:hover {
    background: rgba(0, 71, 171, 0.3);
    box-shadow: 0 0 20px rgba(0, 71, 171, 0.5);
}

.resizer:hover::before {
    opacity: 1;
}

/* Main Chat */
.main-chat {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: rgba(11, 20, 26, 0.5);
    backdrop-filter: blur(10px);
    position: relative;
}

/* Welcome Screen */
.welcome-screen {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    background: linear-gradient(135deg, rgba(15, 20, 25, 0.8) 0%, rgba(26, 26, 46, 0.8) 100%);
    backdrop-filter: blur(20px);
}

.welcome-content {
    text-align: center;
    max-width: 800px;
    padding: 40px;
}

.welcome-icon {
    margin-bottom: 30px;
}

.welcome-content h1 {
    font-size: 42px;
    margin-bottom: 15px;
    font-weight: 300;
    animation: breathe 3s ease-in-out infinite;
}

@keyframes breathe {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.02); opacity: 0.9; }
}

.subtitle {
    color: #8696a0;
    font-size: 16px;
    margin-bottom: 50px;
    animation: fadeIn 1.5s ease-in;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 50px;
}

.feature-card {
    background: rgba(30, 42, 50, 0.3);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: 30px;
    border-radius: 20px;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(0, 71, 171, 0.2);
    position: relative;
    overflow: hidden;
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(0, 71, 171, 0.1), transparent);
    transition: left 0.5s;
}

.feature-card:hover::before {
    left: 100%;
}

.feature-card:hover {
    background: rgba(30, 42, 50, 0.6);
    transform: translateY(-10px) scale(1.02);
    border-color: #0047AB;
    box-shadow: 0 12px 40px rgba(0, 71, 171, 0.5), 0 0 40px rgba(138, 43, 226, 0.2);
}

.feature-card svg {
    margin-bottom: 15px;
    filter: drop-shadow(0 4px 8px rgba(0, 71, 171, 0.4)) drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
    transition: all 0.3s ease;
    animation: icon-pulse 3s ease-in-out infinite;
}

@keyframes icon-pulse {
    0%, 100% { filter: drop-shadow(0 4px 8px rgba(0, 71, 171, 0.4)); }
    50% { filter: drop-shadow(0 4px 16px rgba(0, 71, 171, 0.8)); }
}

.feature-card:hover svg {
    filter: drop-shadow(0 8px 16px rgba(0, 71, 171, 0.8)) drop-shadow(0 4px 8px rgba(138, 43, 226, 0.4));
    transform: translateY(-5px) scale(1.15) rotate(5deg);
    animation: none;
}

.feature-card h3 {
    color: #d1d7db;
    font-size: 16px;
    font-weight: 500;
}

.welcome-footer {
    color: #667781;
    font-size: 14px;
}

.icon-glow {
    display: inline-block;
    position: relative;
}

.icon-glow::after {
    content: '';
    position: absolute;
    inset: -10px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(0, 71, 171, 0.3), transparent 70%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.feature-card:hover .icon-glow::after {
    opacity: 1;
    animation: glow-pulse 1.5s infinite;
}

@keyframes glow-pulse {
    0%, 100% { transform: scale(1); opacity: 0.5; }
    50% { transform: scale(1.2); opacity: 1; }
}

/* Chat Window */
.chat-window {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.chat-window-header {
    background: rgba(30, 42, 50, 0.6);
    backdrop-filter: blur(20px);
    padding: 12px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(0, 71, 171, 0.2);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.chat-user-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.chat-user-info h3 {
    color: #d1d7db;
    font-size: 16px;
    font-weight: 500;
}

.status {
    color: #8696a0;
    font-size: 13px;
}

.chat-actions {
    display: flex;
    gap: 15px;
}

/* Messages Area */
.messages-area {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    background: rgba(11, 20, 26, 0.3);
    background-image: 
        radial-gradient(circle at 10% 20%, rgba(0, 71, 171, 0.05) 0%, transparent 50%),
        radial-gradient(circle at 90% 80%, rgba(138, 43, 226, 0.05) 0%, transparent 50%);
}

.messages-area::-webkit-scrollbar {
    width: 6px;
}

.messages-area::-webkit-scrollbar-thumb {
    background: #374248;
    border-radius: 3px;
}

.date-divider {
    text-align: center;
    margin: 20px 0;
    animation: fadeIn 0.8s ease;
}

.date-divider span {
    background: rgba(30, 42, 50, 0.6);
    backdrop-filter: blur(10px);
    color: #8696a0;
    padding: 6px 12px;
    border-radius: 12px;
    font-size: 13px;
    border: 1px solid rgba(0, 71, 171, 0.2);
}

.message {
    display: flex;
    margin-bottom: 12px;
    animation: messageSlide 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes messageSlide {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.message.received {
    justify-content: flex-start;
}

.message.sent {
    justify-content: flex-end;
}

.message-content {
    max-width: 65%;
    padding: 12px 16px;
    border-radius: 18px;
    position: relative;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    line-height: 1.4; /* Add line-height */
}

.message-content:hover {
    transform: scale(1.02);
}

.message.received .message-content {
    background: rgba(30, 42, 50, 0.6);
    border: 1px solid rgba(0, 71, 171, 0.2);
    color: #d1d7db;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.message.sent .message-content {
    background: linear-gradient(135deg, #0047AB 0%, #0066CC 100%);
    color: white;
    box-shadow: 0 4px 20px rgba(0, 71, 171, 0.5), 0 0 20px rgba(0, 71, 171, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.message-content p {
    margin-bottom: 4px;
    line-height: 1.5;
    font-size: 14px;
}

.message-time {
    font-size: 11px;
    opacity: 0;
    float: right;
    margin-left: 10px;
    transition: opacity 0.3s ease;
}

.message-content:hover .message-time {
    opacity: 0.7;
}

/* Message Input */
.message-input-container {
    background: rgba(30, 42, 50, 0.6);
    backdrop-filter: blur(20px);
    padding: 12px 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    border-top: 1px solid rgba(0, 71, 171, 0.2);
}

.input-wrapper {
    flex: 1;
    background: rgba(42, 57, 66, 0.5);
    backdrop-filter: blur(10px);
    border-radius: 24px;
    padding: 12px 18px;
    border: 1px solid rgba(0, 71, 171, 0.2);
    transition: all 0.3s ease;
}

.input-wrapper:focus-within {
    background: rgba(42, 57, 66, 0.7);
    border-color: rgba(0, 71, 171, 0.5);
    box-shadow: 0 0 20px rgba(0, 71, 171, 0.3);
}

.input-wrapper input {
    width: 100%;
    background: none;
    border: none;
    color: #d1d7db;
    font-size: 15px;
    outline: none;
}

.input-wrapper input::placeholder {
    color: #667781;
}

.send-btn {
    background: linear-gradient(135deg, #0047AB 0%, #0066CC 100%);
    color: white;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    box-shadow: 0 4px 12px rgba(0, 71, 171, 0.5), inset 0 -2px 4px rgba(0, 0, 0, 0.2), inset 0 1px 2px rgba(255, 255, 255, 0.3);
}

.send-btn svg {
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

.send-btn:hover {
    transform: scale(1.15) rotate(15deg);
    box-shadow: 0 8px 24px rgba(0, 71, 171, 0.8), 0 0 30px rgba(138, 43, 226, 0.4), inset 0 -2px 4px rgba(0, 0, 0, 0.2), inset 0 1px 2px rgba(255, 255, 255, 0.3);
}

.send-btn:active {
    transform: scale(1.05) rotate(0deg);
}

/* Profile Panel */
.profile-panel {
    position: absolute;
    right: -400px;
    top: 0;
    width: 400px;
    height: 100%;
    background: rgba(17, 27, 33, 0.9);
    backdrop-filter: blur(20px);
    border-left: 1px solid rgba(0, 71, 171, 0.3);
    transition: right 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1100;
    box-shadow: -8px 0 32px rgba(0, 0, 0, 0.3);
}

.profile-panel.active {
    right: 0;
}

.profile-header {
    background: rgba(30, 42, 50, 0.8);
    backdrop-filter: blur(10px);
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 20px;
    border-bottom: 1px solid rgba(0, 71, 171, 0.2);
}

.profile-header h2 {
    color: #d1d7db;
    font-size: 18px;
    font-weight: 500;
}

.profile-content {
    overflow-y: auto;
    height: calc(100% - 70px);
}

.profile-photo-section {
    background: rgba(30, 42, 50, 0.5);
    backdrop-filter: blur(10px);
    padding: 40px;
    text-align: center;
}

.profile-photo {
    display: inline-block;
}

.profile-info-section {
    padding: 20px;
}

.info-row {
    padding: 20px 0;
    border-bottom: 1px solid rgba(42, 57, 66, 0.5);
    transition: all 0.3s ease;
}

.info-row:hover {
    background: rgba(0, 71, 171, 0.05);
    padding-left: 10px;
}

.info-row label {
    color: #0047AB;
    font-size: 13px;
    display: block;
    margin-bottom: 8px;
}

.info-row p {
    color: #d1d7db;
    font-size: 16px;
}

/* Mobile Back Button */
.mobile-back-btn {
    display: none;
    background: none;
    border: none;
    color: #00bfff;
    padding: 8px;
    cursor: pointer;
    border-radius: 50%;
    transition: all 0.3s ease;
    position: relative;
}

.mobile-back-btn:hover {
    background: rgba(0, 191, 255, 0.15);
    color: #00d4ff;
    transform: translateX(-2px);
}

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

.mobile-back-btn svg {
    display: block;
    filter: drop-shadow(0 0 4px rgba(0, 191, 255, 0.3));
}

/* Desktop Back Button */
.desktop-back-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 71, 171, 0.1);
    border: 1px solid rgba(0, 102, 204, 0.3);
    color: #00bfff;
    padding: 8px;
    cursor: pointer;
    border-radius: 50%;
    transition: all 0.3s ease;
    margin-right: 12px;
    min-width: 40px;
    height: 40px;
}

.desktop-back-btn:hover {
    background: rgba(0, 102, 204, 0.2);
    border-color: rgba(0, 191, 255, 0.5);
    color: #00d4ff;
    transform: translateX(-3px);
    box-shadow: 0 0 15px rgba(0, 191, 255, 0.3);
}

.desktop-back-btn:active {
    transform: translateX(-3px) scale(0.95);
}

.desktop-back-btn svg {
    display: block;
    filter: drop-shadow(0 0 4px rgba(0, 191, 255, 0.4));
}


/* Mobile Chat Header */
.mobile-chat-header {
    display: none;
    background: rgba(30, 42, 50, 0.9);
    backdrop-filter: blur(20px);
    padding: 12px 15px;
    align-items: center;
    gap: 12px;
    border-bottom: 1px solid rgba(0, 71, 171, 0.2);
    position: sticky;
    top: 0;
    z-index: 100;
}

.mobile-chat-info {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 12px;
}

.mobile-chat-info h3 {
    color: #d1d7db;
    font-size: 16px;
    font-weight: 500;
    margin: 0;
}

.mobile-chat-info .status {
    color: #8696a0;
    font-size: 12px;
}

.mobile-actions {
    display: flex;
    gap: 8px;
}

/* Mobile Message Input */
.mobile-message-input {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(30, 42, 50, 0.95);
    backdrop-filter: blur(20px);
    padding: 12px 15px;
    display: none;
    align-items: center;
    gap: 8px;
    border-top: 1px solid rgba(0, 71, 171, 0.2);
    z-index: 200;
}

.mobile-input-wrapper {
    flex: 1;
    background: rgba(42, 57, 66, 0.7);
    border-radius: 20px;
    padding: 10px 15px;
    border: 1px solid rgba(0, 71, 171, 0.2);
}

.mobile-input-wrapper input {
    width: 100%;
    background: none;
    border: none;
    color: #d1d7db;
    font-size: 16px;
    outline: none;
}

.mobile-send-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #0047AB 0%, #0066CC 100%);
    border: none;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

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

/* Mobile Sidebar Toggle */
.mobile-sidebar-toggle {
    display: none;
    position: fixed;
    top: 15px;
    left: 15px;
    z-index: 1001;
    background: rgba(0, 71, 171, 0.9);
    border: none;
    color: white;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0, 71, 171, 0.5);
    transition: all 0.3s ease;
}

.mobile-sidebar-toggle:active {
    transform: scale(0.95);
}

/* Mobile Overlay */
.mobile-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
}

/* Bottom Navigation Bar */
.bottom-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(30, 42, 50, 0.95);
    backdrop-filter: blur(20px);
    padding: 8px 0 max(8px, env(safe-area-inset-bottom));
    border-top: 1px solid rgba(0, 71, 171, 0.2);
    z-index: 1000;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.3);
}

.bottom-nav-items {
    display: flex;
    justify-content: space-around;
    align-items: center;
    max-width: 600px;
    margin: 0 auto;
}

.nav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 8px;
    background: none;
    border: none;
    color: #8696a0;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.nav-item.active {
    color: #0047AB;
}

.nav-item svg {
    width: 24px;
    height: 24px;
    transition: all 0.3s ease;
}

.nav-item.active svg {
    transform: scale(1.1);
    filter: drop-shadow(0 2px 8px rgba(0, 71, 171, 0.6));
}

.nav-item span {
    font-size: 11px;
    font-weight: 500;
}

.nav-badge {
    position: absolute;
    top: 4px;
    right: 20%;
    background: linear-gradient(135deg, #0047AB, #0066CC);
    color: white;
    font-size: 10px;
    padding: 2px 5px;
    border-radius: 10px;
    font-weight: 600;
    min-width: 18px;
    text-align: center;
}

.new-chat-fab {
    display: flex;
    align-items: center;
    justify-content: center;
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #0047AB, #0066CC);
    border: none;
    color: white;
    box-shadow: 0 8px 24px rgba(0, 71, 171, 0.6);
    z-index: 999;
    cursor: pointer;
    transition: all 0.3s ease;
    opacity: 1;
}

.new-chat-fab:hover {
    transform: scale(1.1) rotate(90deg);
    box-shadow: 0 12px 32px rgba(0, 71, 171, 0.8);
}

.new-chat-fab:active {
    transform: scale(1.05);
}

.new-chat-fab.hidden {
    opacity: 0;
    pointer-events: none;
}

/* Responsive Breakpoints */
@media (max-width: 1200px) {
    .sidebar {
        width: 350px;
    }
    
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
    
    .feature-card {
        padding: 20px;
    }
}

@media (max-width: 1024px) {
    .sidebar {
        width: 320px;
    }
    
    .container {
        max-width: 100%;
    }
    
    .welcome-content {
        padding: 30px;
    }
    
    .welcome-content h1 {
        font-size: 36px;
    }
}

@media (max-width: 768px) {
    html {
        height: -webkit-fill-available;
        overflow-x: hidden;
        width: 100%;
    }
    
    body {
        overflow: hidden;
        background: linear-gradient(180deg, #0a0e27 0%, #1a0b2e 100%);
        width: 100%;
        max-width: 100%;
        height: 100vh;
        height: -webkit-fill-available;
        min-height: 100vh;
        min-height: -webkit-fill-available;
        position: fixed;
        inset: 0;
        margin: 0;
        padding: 0;
    }
    
    .container {
        flex-direction: column;
        height: 100vh;
        height: -webkit-fill-available;
        min-height: 100vh;
        min-height: -webkit-fill-available;
        position: fixed;
        inset: 0;
        padding-bottom: 60px;
        width: 100%;
        max-width: none;
        overflow: hidden;
        margin: 0;
    }
    
    .bottom-nav {
        display: block;
        width: 100%;
        max-width: none;
        box-sizing: border-box;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
    }
    
    .new-chat-fab {
        display: flex !important;
        align-items: center;
        justify-content: center;
        bottom: 80px;
        right: 20px;
    }
    
    .sidebar {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        max-width: none;
        height: 100%;
        height: -webkit-fill-available;
        padding-bottom: 60px;
        z-index: 999;
        transition: transform 0.3s ease;
        box-shadow: none;
        transform: translateX(0);
        overflow-x: hidden;
        overflow-y: auto;
        margin: 0;
    }
    
    .sidebar.hidden {
        transform: translateX(-100%);
    }
    
    .mobile-overlay.active {
        display: none;
    }
    
    .main-chat {
        position: fixed;
        inset: 0;
        bottom: 60px;
        width: 100%;
        max-width: none;
        height: calc(100% - 60px);
        height: calc(-webkit-fill-available - 60px);
        transform: translateX(100%);
        transition: transform 0.3s ease;
        z-index: 1001;
        overflow-x: hidden;
        margin: 0;
    }
    
    .main-chat.chat-active {
        transform: translateX(0);
    }
    
    .main-chat.chat-active .welcome-screen {
        display: none;
    }
    
    .main-chat.chat-active .chat-window {
        display: flex !important;
    }
    
    .main-chat.chat-active ~ .mobile-message-input {
        display: flex !important;
    }
    
    .resizer {
        display: none;
    }
    
    .chat-window {
        height: 100%;
    }
    
    .chat-window-header {
        display: none;
    }
    
    .desktop-back-btn {
        display: none;
    }
    
    .mobile-chat-header {
        display: flex;
        padding-top: max(12px, env(safe-area-inset-top));
    }
    
    .mobile-back-btn {
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .messages-area {
        padding: 16px;
        padding-bottom: 140px;
        height: 100%;
        flex: 1;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        scroll-behavior: smooth;
        background: linear-gradient(180deg, rgba(11, 20, 26, 0.5) 0%, rgba(15, 20, 25, 0.5) 100%);
    }
    
    .message-input-container {
        display: none;
    }
    
    .mobile-message-input {
        display: none;
        position: fixed;
        bottom: 60px;
        left: 0;
        right: 0;
        width: 100%;
        max-width: none;
        background: rgba(30, 42, 50, 0.98);
        backdrop-filter: blur(20px);
        padding: 10px 16px;
        padding-bottom: max(10px, env(safe-area-inset-bottom));
        align-items: center;
        gap: 10px;
        border-top: 1px solid rgba(0, 71, 171, 0.2);
        z-index: 998;
        box-shadow: 0 -2px 12px rgba(0, 0, 0, 0.2);
        box-sizing: border-box;
    }
    
    .mobile-input-wrapper {
        flex: 1;
        background: rgba(42, 57, 66, 0.8);
        border-radius: 24px;
        padding: 12px 18px;
        border: 1px solid rgba(0, 71, 171, 0.3);
    }
    
    .mobile-input-wrapper input {
        font-size: 16px;
        font-family: inherit;
    }
    
    .mobile-send-btn {
        width: 48px;
        height: 48px;
        box-shadow: 0 4px 12px rgba(0, 71, 171, 0.5);
    }
    
    .mobile-send-btn:active {
        transform: scale(0.92);
        box-shadow: 0 2px 8px rgba(0, 71, 171, 0.6);
    }
    
    .mobile-sidebar-toggle {
        display: none !important;
    }
    
    /* Mobile Welcome Screen */
    .welcome-content {
        padding: 20px;
        max-width: 100%;
    }
    
    .welcome-content h1 {
        font-size: 28px;
        margin-bottom: 10px;
    }
    
    .subtitle {
        font-size: 14px;
        margin-bottom: 30px;
    }
    
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
        margin-bottom: 30px;
    }
    
    .feature-card {
        padding: 20px 15px;
    }
    
    .feature-card svg {
        width: 40px;
        height: 40px;
    }
    
    .feature-card h3 {
        font-size: 14px;
    }
    
    .chat-list {
        padding: 8px 0;
        background: transparent;
        width: 100%;
        max-width: none;
        overflow-x: hidden;
        box-sizing: border-box;
    }
    
    .chat-item {
        padding: 16px;
        margin: 6px 16px;
        border-radius: 16px;
        background: rgba(30, 42, 50, 0.6);
        backdrop-filter: blur(10px);
        border: 1px solid rgba(0, 71, 171, 0.15);
        box-shadow: 0 2px 12px rgba(0, 0, 0, 0.2);
        width: auto;
        max-width: none;
        box-sizing: border-box;
    }
    
    .chat-item:active {
        transform: scale(0.98);
        background: rgba(0, 71, 171, 0.2);
    }
    
    .avatar-circle {
        width: 56px;
        height: 56px;
        font-size: 18px;
        box-shadow: 0 4px 12px rgba(0, 71, 171, 0.5);
    }
    
    .chat-header h3 {
        font-size: 17px;
        font-weight: 600;
    }
    
    .chat-preview p {
        font-size: 15px;
        line-height: 1.4;
    }
    
    .unread-badge {
        background: linear-gradient(135deg, #00cc66, #00aa55);
        font-size: 12px;
        padding: 3px 8px;
        min-width: 22px;
        box-shadow: 0 2px 8px rgba(0, 204, 102, 0.5);
    }
    
    .message {
        margin-bottom: 8px;
    }
    
    .message-content {
        max-width: 80%;
        padding: 12px 16px;
        font-size: 15px;
        line-height: 1.5;
        border-radius: 12px;
    }
    
    .message.received .message-content {
        border-bottom-left-radius: 4px;
        background: rgba(30, 42, 50, 0.8);
    }
    
    .message.sent .message-content {
        border-bottom-right-radius: 4px;
    }
    
    .message-content p {
        font-size: 15px;
        margin-bottom: 6px;
    }
    
    .message-time {
        font-size: 11px;
        opacity: 0.7;
    }
    
    .tabs {
        display: none;
    }
    
    .search-container {
        padding: 12px 16px;
        width: 100%;
        max-width: none;
        box-sizing: border-box;
    }
    
    .search-box {
        padding: 12px 16px;
        border-radius: 24px;
        background: rgba(30, 42, 50, 0.7);
    }
    
    .search-box input {
        font-size: 16px;
    }
    
    .filter-btn {
        padding: 12px;
    }
    
    .sidebar-header {
        padding: 14px 16px;
        background: rgba(30, 42, 50, 0.9);
        justify-content: space-between;
        position: relative;
        width: 100%;
        max-width: none;
        box-sizing: border-box;
        display: flex;
        align-items: center;
    }
    
    .profile-avatar {
        position: static;
        flex-shrink: 0;
    }
    
    .sidebar-header::after {
        content: 'RAOUFz';
        position: absolute;
        left: 50%;
        transform: translateX(-50%);
        font-size: 20px;
        font-weight: 700;
        background: linear-gradient(135deg, #0047AB, #0066CC);
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
        background-clip: text;
        letter-spacing: 0.5px;
    }
    
    .header-icons {
        position: static;
        display: flex;
        gap: 8px;
        flex-shrink: 0;
    }
    
    /* Mobile Audio Button Styles */
    #playAudioBtn, #stopAudioBtn {
        padding: 6px;
    }
    
    #playAudioBtn svg, #stopAudioBtn svg {
        width: 20px;
        height: 20px;
    }
    
    .icon-btn {
        padding: 6px;
        min-width: 32px;
        height: 32px;
    }
    
    .icon-btn svg {
        width: 20px;
        height: 20px;
    }
    
    .fab {
        display: none;
    }
    
    /* Mobile Modal */
    .modal-content {
        margin: 20px;
        padding: 30px 25px;
        max-width: calc(100% - 40px);
    }
    
    .modal-content h2 {
        font-size: 24px;
    }
    
    .modal-options {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .modal-btn {
        padding: 20px;
    }
    
    .code-box {
        font-size: 28px;
        letter-spacing: 4px;
        padding: 15px;
    }
    
    /* Mobile Profile Panel */
    .profile-panel {
        position: fixed;
        width: 100%;
        right: -100%;
        top: 0;
        bottom: 0;
        z-index: 1100;
    }
    
    .profile-panel.active {
        right: 0;
    }
}

@media (max-width: 480px) {
    .container {
        max-width: none !important;
        width: 100% !important;
    }
    
    .sidebar {
        width: 100% !important;
        max-width: none !important;
    }
    
    .welcome-content h1 {
        font-size: 24px;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .feature-card {
        padding: 15px;
    }
    
    .chat-item {
        padding: 12px;
        margin: 6px 12px;
        width: auto !important;
    }
    
    .avatar-circle {
        width: 45px;
        height: 45px;
        font-size: 14px;
        flex-shrink: 0;
    }
    
    .mobile-input-wrapper {
        padding: 8px 12px;
        width: 100%;
    }
    
    .mobile-send-btn {
        width: 36px;
        height: 36px;
        flex-shrink: 0;
    }
    
    .fab {
        width: 50px;
        height: 50px;
        bottom: 105px;
    }
    
    .new-chat-fab {
        bottom: 80px !important;
        right: 20px !important;
        width: 56px;
        height: 56px;
    }
    
    .sidebar-header,
    .search-container,
    .chat-list {
        width: 100% !important;
        max-width: none !important;
    }
    
    /* Smaller Audio Buttons for Very Small Screens */
    .header-icons {
        gap: 8px;
    }
    
    #playAudioBtn, #stopAudioBtn {
        padding: 5px;
    }
    
    #playAudioBtn svg, #stopAudioBtn svg {
        width: 18px;
        height: 18px;
    }
    
    .sidebar-header {
        padding: 12px 12px;
    }
    
    .sidebar-header::after {
        font-size: 18px;
    }
    
    .header-icons {
        gap: 6px;
    }
    
    .icon-btn {
        padding: 5px;
        min-width: 28px;
        height: 28px;
    }
    
    .icon-btn svg {
        width: 18px;
        height: 18px;
    }
    
    .profile-avatar .avatar-circle {
        width: 32px;
        height: 32px;
        font-size: 12px;
    }
}

/* RAOUFz-like Mobile Enhancements */
@media (max-width: 768px) {
    /* Smooth scrolling for messages */
    .messages-area {
        scroll-behavior: smooth;
    }
    
    /* Better message bubbles for mobile */
    .message-content {
        border-radius: 12px;
        max-width: 80%;
    }
    
    .message.received .message-content {
        border-bottom-left-radius: 4px;
    }
    
    .message.sent .message-content {
        border-bottom-right-radius: 4px;
    }
    
    /* Mobile status bar color */
    .mobile-chat-header {
        padding-top: env(safe-area-inset-top, 12px);
    }
    
    /* Better mobile input */
    .mobile-input-wrapper input {
        font-size: 16px; /* Prevents zoom on iOS */
    }
    
    /* Swipe indicator for sidebar */
    .sidebar::before {
        content: '';
        position: absolute;
        top: 50%;
        right: -10px;
        width: 4px;
        height: 40px;
        background: rgba(0, 71, 171, 0.5);
        border-radius: 0 4px 4px 0;
        transform: translateY(-50%);
        opacity: 0;
        transition: opacity 0.3s ease;
    }
    
    .sidebar.mobile-open::before {
        opacity: 1;
    }
    
    /* Pull to refresh indicator */
    .messages-area::before {
        content: '';
        position: absolute;
        top: -20px;
        left: 50%;
        transform: translateX(-50%);
        width: 30px;
        height: 4px;
        background: rgba(0, 71, 171, 0.3);
        border-radius: 2px;
        opacity: 0;
        transition: opacity 0.3s ease;
    }
    
    /* Typing indicator space */
    .messages-area::after {
        content: '';
        display: block;
        height: 20px;
    }
}

/* Touch Improvements */
@media (hover: none) and (pointer: coarse) {
    .chat-item:hover {
        transform: none;
    }
    
    .chat-item:active {
        background: rgba(0, 71, 171, 0.2);
        transform: scale(0.98);
    }
    
    .icon-btn:hover {
        transform: none;
    }
    
    .icon-btn:active {
        transform: scale(0.95);
        background: rgba(0, 71, 171, 0.2);
    }
    
    /* Audio Button Touch Feedback */
    #playAudioBtn:active {
        background: rgba(0, 204, 102, 0.2);
    }
    
    #stopAudioBtn:active {
        background: rgba(204, 0, 0, 0.2);
    }
    
    .tab:hover {
        background: none;
    }
    
    .tab:active {
        background: rgba(255, 255, 255, 0.1);
    }
    
    .feature-card:hover {
        transform: none;
    }
    
    .feature-card:active {
        transform: scale(0.98);
    }
    
    /* Better button feedback */
    .mobile-send-btn:active {
        transform: scale(0.9);
        background: linear-gradient(135deg, #003d82 0%, #0047AB 100%);
    }
    
    .mobile-back-btn:active {
        background: rgba(0, 71, 171, 0.3);
    }
    
    .mobile-sidebar-toggle:active {
        transform: scale(0.9);
        background: rgba(0, 71, 171, 1);
    }
}

/* Safe area support for notched devices */
@supports (padding: max(0px)) {
    .mobile-chat-header {
        padding-top: max(12px, env(safe-area-inset-top));
    }
    
    .mobile-message-input {
        padding-bottom: max(12px, env(safe-area-inset-bottom));
    }
    
    .sidebar {
        padding-top: env(safe-area-inset-top, 0);
    }
}

/* Dark mode improvements */
@media (prefers-color-scheme: dark) {
    .mobile-input-wrapper {
        background: rgba(42, 57, 66, 0.9);
    }
    
    .mobile-chat-header {
        background: rgba(30, 42, 50, 0.95);
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .sidebar {
        transition: none;
    }
    
    .message {
        animation: none;
    }
    
    .feature-card {
        transition: none;
    }
    
    .icon-btn {
        transition: none;
    }
}


/* Floating Action Button */
.fab {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #0047AB 0%, #0066CC 100%);
    border: none;
    cursor: pointer;
    box-shadow: 0 8px 24px rgba(0, 71, 171, 0.6), 0 0 40px rgba(0, 71, 171, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1000;
    animation: fab-pulse 3s infinite;
}

@keyframes fab-pulse {
    0%, 100% { box-shadow: 0 8px 24px rgba(0, 71, 171, 0.6), 0 0 40px rgba(0, 71, 171, 0.3); }
    50% { box-shadow: 0 12px 32px rgba(0, 71, 171, 0.8), 0 0 60px rgba(0, 71, 171, 0.5); }
}

.fab:hover {
    transform: scale(1.15) rotate(90deg);
    box-shadow: 0 12px 40px rgba(0, 71, 171, 0.8), 0 0 80px rgba(138, 43, 226, 0.5);
}

.fab:active {
    transform: scale(1.05) rotate(90deg);
}

/* Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 99999 !important;
    animation: fadeIn 0.3s ease;
    -webkit-backface-visibility: hidden;
    -moz-backface-visibility: hidden;
    backface-visibility: hidden;
    -webkit-transform: translate3d(0, 0, 0);
    -moz-transform: translate3d(0, 0, 0);
    transform: translate3d(0, 0, 0);
}

.modal-overlay.active {
    display: flex;
}

.modal-content {
    background: rgba(17, 27, 33, 0.95);
    backdrop-filter: blur(30px);
    border-radius: 24px;
    padding: 40px;
    max-width: 500px;
    width: 90%;
    border: 1px solid rgba(0, 71, 171, 0.3);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5), 0 0 100px rgba(0, 71, 171, 0.3);
    position: relative;
    animation: slideUp 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(50px) scale(0.9); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: #8696a0;
    font-size: 32px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.modal-close:hover {
    background: rgba(255, 0, 0, 0.2);
    color: #ff4444;
    transform: rotate(90deg);
}

.modal-content h2 {
    color: #d1d7db;
    font-size: 28px;
    margin-bottom: 8px;
    text-align: center;
}

.modal-subtitle {
    color: #8696a0;
    text-align: center;
    margin-bottom: 30px;
    font-size: 14px;
}

.modal-options {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-bottom: 20px;
}

.modal-btn {
    background: rgba(30, 42, 50, 0.5);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(0, 71, 171, 0.2);
    border-radius: 16px;
    padding: 25px 15px;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    text-align: center;
}

.modal-btn:hover {
    background: rgba(0, 71, 171, 0.15);
    border-color: #0047AB;
    transform: translateY(-5px);
    box-shadow: 0 12px 30px rgba(0, 71, 171, 0.4);
}

.modal-btn svg {
    margin-bottom: 10px;
    filter: drop-shadow(0 4px 8px rgba(0, 71, 171, 0.5));
}

.modal-btn h3 {
    color: #d1d7db;
    font-size: 16px;
    margin-bottom: 5px;
}

.modal-btn p {
    color: #8696a0;
    font-size: 12px;
}

.room-view {
    animation: fadeIn 0.4s ease;
}

.room-view label {
    color: #0047AB;
    font-size: 14px;
    display: block;
    margin-bottom: 10px;
    font-weight: 500;
}

.room-code-display {
    text-align: center;
    margin-bottom: 25px;
}

.code-box {
    background: rgba(0, 71, 171, 0.1);
    border: 2px solid #0047AB;
    border-radius: 16px;
    padding: 20px;
    font-size: 36px;
    font-weight: 700;
    color: #0047AB;
    letter-spacing: 8px;
    margin: 15px 0;
    box-shadow: 0 0 30px rgba(0, 71, 171, 0.3), inset 0 0 20px rgba(0, 71, 171, 0.1);
    animation: glow-pulse 2s infinite;
}

.code-hint {
    color: #8696a0;
    font-size: 13px;
}

.share-options {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.share-btn {
    flex: 1;
    background: rgba(0, 71, 171, 0.2);
    border: 1px solid rgba(0, 71, 171, 0.3);
    border-radius: 12px;
    padding: 12px;
    color: #d1d7db;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 14px;
    transition: all 0.3s ease;
}

.share-btn:hover {
    background: rgba(0, 71, 171, 0.3);
    border-color: #0047AB;
    transform: translateY(-2px);
}

.waiting-text {
    text-align: center;
    color: #8696a0;
    font-size: 14px;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 1; }
}

.code-input {
    width: 100%;
    background: rgba(30, 42, 50, 0.5);
    border: 1px solid rgba(0, 71, 171, 0.3);
    border-radius: 12px;
    padding: 15px;
    color: #d1d7db;
    font-size: 24px;
    text-align: center;
    letter-spacing: 4px;
    text-transform: uppercase;
    margin-bottom: 20px;
    outline: none;
    transition: all 0.3s ease;
}

.code-input:focus {
    border-color: #0047AB;
    box-shadow: 0 0 20px rgba(0, 71, 171, 0.4);
    background: rgba(30, 42, 50, 0.7);
}

.primary-btn {
    width: 100%;
    background: linear-gradient(135deg, #0047AB 0%, #0066CC 100%);
    border: none;
    border-radius: 12px;
    padding: 15px;
    color: white;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    margin-bottom: 10px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 71, 171, 0.4);
}

.primary-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 71, 171, 0.6);
}

.secondary-btn {
    width: 100%;
    background: rgba(30, 42, 50, 0.5);
    border: 1px solid rgba(0, 71, 171, 0.2);
    border-radius: 12px;
    padding: 12px;
    color: #8696a0;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.secondary-btn:hover {
    background: rgba(30, 42, 50, 0.7);
    color: #d1d7db;
}

/* Video/Audio Call Styles */
.video-call-container {
    position: relative;
    width: 100%;
    height: 500px;
    background: #000;
    border-radius: 16px;
    overflow: hidden;
    margin: 20px 0;
    animation: slideUp 0.4s ease;
}

#remoteVideo {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

#localVideo {
    position: absolute;
    bottom: 20px;
    right: 20px;
    width: 150px;
    height: 150px;
    border-radius: 12px;
    object-fit: cover;
    border: 2px solid #0047AB;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

.call-controls {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 15px;
}

.call-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;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.end-call {
    background: linear-gradient(135deg, #ff4444, #cc0000);
}

.end-call:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(255, 68, 68, 0.5);
}

.audio-call-container {
    background: rgba(30, 42, 50, 0.8);
    backdrop-filter: blur(20px);
    border-radius: 16px;
    padding: 40px;
    margin: 20px 0;
    text-align: center;
    animation: slideUp 0.4s ease;
}

.audio-call-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.audio-avatar {
    width: 100px;
    height: 100px;
    background: linear-gradient(135deg, #0047AB, #0066CC);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
    animation: pulse 2s infinite;
}

.audio-call-info p {
    color: #d1d7db;
    font-size: 18px;
    font-weight: 500;
}

.audio-call-info .call-btn {
    width: auto;
    padding: 12px 30px;
    border-radius: 12px;
}

/* Video Call Styles */
#videoCallContainer {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: #000;
    z-index: 3000;
    display: flex;
    flex-direction: column;
}

.video-grid {
    flex: 1;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

#videoCallContainer #remoteVideo {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

#videoCallContainer #localVideo {
    position: absolute;
    bottom: 100px;
    right: 30px;
    width: 200px;
    height: 150px;
    border-radius: 16px;
    object-fit: cover;
    border: 3px solid #0047AB;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.6);
}

.video-controls {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 20px;
    z-index: 10;
}

.control-btn {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: none;
    background: rgba(30, 42, 50, 0.9);
    backdrop-filter: blur(10px);
    color: white;
    font-size: 24px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

.control-btn:hover {
    transform: scale(1.1);
    background: rgba(0, 71, 171, 0.8);
}

.end-btn {
    background: linear-gradient(135deg, #ff4444, #cc0000);
}

.end-btn:hover {
    background: linear-gradient(135deg, #ff6666, #ff0000);
    box-shadow: 0 6px 30px rgba(255, 68, 68, 0.6);
}

/* Video Call Modal */
.video-modal {
    max-width: 400px;
}

.video-modal h2 {
    font-size: 24px;
    margin-bottom: 20px;
}

.video-modal #callerName {
    color: #d1d7db;
    font-size: 18px;
    margin-bottom: 30px;
    text-align: center;
}

.call-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
}

.call-actions .call-btn {
    padding: 15px 40px;
    border-radius: 12px;
    border: none;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.accept-call {
    background: linear-gradient(135deg, #00cc66, #00aa55);
    color: white;
    box-shadow: 0 4px 15px rgba(0, 204, 102, 0.4);
}

.accept-call:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 204, 102, 0.6);
}

.reject-call {
    background: linear-gradient(135deg, #ff4444, #cc0000);
    color: white;
    box-shadow: 0 4px 15px rgba(255, 68, 68, 0.4);
}

.reject-call:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 68, 68, 0.6);
}

/* ========================================
   WebRTC Call Styles - Video & Audio
   ======================================== */

/* Incoming Call Modal */
.call-modal {
    max-width: 420px;
    background: rgba(17, 27, 33, 0.98);
    backdrop-filter: blur(30px);
    padding: 40px 30px;
}

.call-modal-header {
    text-align: center;
    margin-bottom: 40px;
    position: relative;
}

.caller-avatar {
    margin: 0 auto 20px;
    position: relative;
    width: fit-content;
}

.avatar-circle.large {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 2;
    box-shadow: 0 8px 32px rgba(0, 71, 171, 0.4);
}

.avatar-circle.xlarge {
    width: 160px;
    height: 160px;
}

.call-modal h2 {
    font-size: 28px;
    color: white;
    margin-bottom: 8px;
    font-weight: 600;
}

.call-type-text {
    font-size: 18px;
    color: #00cc66;
    font-weight: 500;
}

/* Call Animation */
.call-animation {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 120px;
    height: 120px;
}

.pulse-ring {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 120px;
    height: 120px;
    border: 3px solid rgba(0, 204, 102, 0.6);
    border-radius: 50%;
    animation: pulse 2s ease-out infinite;
}

.pulse-ring.delay-1 {
    animation-delay: 0.5s;
}

.pulse-ring.delay-2 {
    animation-delay: 1s;
}

@keyframes pulse {
    0% {
        transform: translate(-50%, -50%) scale(0.8);
        opacity: 1;
    }
    100% {
        transform: translate(-50%, -50%) scale(2);
        opacity: 0;
    }
}

/* Call Action Buttons */
.call-actions {
    display: flex;
    gap: 20px;
    justify-content: center;
}

.call-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 18px 30px;
    border-radius: 16px;
    border: none;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 140px;
}

.call-btn svg {
    margin-bottom: 4px;
}

.call-btn span {
    font-size: 14px;
}

.accept-call {
    background: linear-gradient(135deg, #00cc66, #00aa55);
    color: white;
    box-shadow: 0 4px 20px rgba(0, 204, 102, 0.4);
}

.accept-call:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(0, 204, 102, 0.6);
}

.reject-call {
    background: linear-gradient(135deg, #ff4444, #cc0000);
    color: white;
    box-shadow: 0 4px 20px rgba(255, 68, 68, 0.4);
}

.reject-call:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(255, 68, 68, 0.6);
}

/* Call Container */
#callContainer {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: #0a0e27;
    z-index: 9999;
    display: none;
}

/* Video Call Container */
#videoCallContainer {
    width: 100%;
    height: 100%;
    position: relative;
}

.video-call-wrapper {
    width: 100%;
    height: 100%;
    position: relative;
    background: #000;
}

.remote-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    background: #1a1a1a;
}

.local-video {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 200px;
    height: 150px;
    border-radius: 16px;
    object-fit: cover;
    background: #2a2a2a;
    border: 3px solid rgba(0, 71, 171, 0.6);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.6);
    z-index: 10;
}

.call-info {
    position: absolute;
    top: 20px;
    left: 20px;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(10px);
    padding: 12px 20px;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    gap: 5px;
    z-index: 10;
}

.call-info span {
    color: white;
    font-size: 14px;
}

#callStatus {
    color: #00cc66;
    font-weight: 600;
}

.video-controls {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 20px;
    z-index: 10;
}

.control-btn {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: none;
    background: rgba(30, 42, 50, 0.9);
    backdrop-filter: blur(10px);
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
}

.control-btn:hover {
    transform: scale(1.1);
    background: rgba(0, 71, 171, 0.9);
}

.control-btn.muted {
    background: rgba(255, 68, 68, 0.9);
}

.control-btn.disabled {
    background: rgba(255, 152, 0, 0.9);
}

.end-btn {
    background: linear-gradient(135deg, #ff4444, #cc0000);
    width: 70px;
    height: 70px;
}

.end-btn:hover {
    background: linear-gradient(135deg, #ff6666, #ff0000);
    box-shadow: 0 8px 40px rgba(255, 68, 68, 0.6);
}

/* Audio Call Container */
#audioCallContainer {
    width: 100%;
    height: 100%;
    position: relative;
    background: linear-gradient(135deg, #0a0e27 0%, #1a0b2e 50%, #16003b 100%);
}

.audio-call-wrapper {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: relative;
}

.audio-call-content {
    text-align: center;
    margin-bottom: 60px;
}

.audio-call-content .caller-avatar {
    position: relative;
    margin-bottom: 30px;
}

.sound-waves {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    gap: 6px;
    z-index: 1;
}

.wave {
    width: 4px;
    height: 30px;
    background: linear-gradient(180deg, #0047AB, #0066CC);
    border-radius: 4px;
    animation: wave 1s ease-in-out infinite;
}

.wave:nth-child(2) { animation-delay: 0.1s; }
.wave:nth-child(3) { animation-delay: 0.2s; }
.wave:nth-child(4) { animation-delay: 0.3s; }

@keyframes wave {
    0%, 100% { height: 30px; }
    50% { height: 60px; }
}

#audioCallUserName {
    font-size: 32px;
    color: white;
    margin-bottom: 10px;
    font-weight: 600;
}

#audioCallStatus {
    font-size: 18px;
    color: #00cc66;
    margin-bottom: 15px;
}

#audioCallDuration {
    font-size: 16px;
    color: #d1d7db;
}

.audio-controls {
    display: flex;
    gap: 25px;
    justify-content: center;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .local-video {
        width: 120px;
        height: 90px;
        top: 80px;
        right: 15px;
    }

    .video-controls, .audio-controls {
        bottom: 80px;
        gap: 15px;
    }

    .control-btn {
        width: 50px;
        height: 50px;
    }

    .end-btn {
        width: 60px;
        height: 60px;
    }

    .call-info {
        top: 15px;
        left: 15px;
        padding: 10px 15px;
    }

    .call-modal {
        margin: 20px;
        padding: 30px 20px;
    }

    .avatar-circle.large {
        width: 100px;
        height: 100px;
    }

    .call-animation {
        width: 100px;
        height: 100px;
    }

    .pulse-ring {
        width: 100px;
        height: 100px;
    }

    #audioCallUserName {
        font-size: 24px;
    }
}

/* Connection Status Banner */
.connection-status-banner {
    position: absolute;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, #00AA55, #00CC66);
    color: white;
    padding: 12px 20px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 15px;
    box-shadow: 0 8px 24px rgba(0, 170, 85, 0.4);
    z-index: 1000;
    min-width: 320px;
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        transform: translateX(-50%) translateY(-20px);
        opacity: 0;
    }
    to {
        transform: translateX(-50%) translateY(0);
        opacity: 1;
    }
}

.connection-status-banner.warning {
    background: linear-gradient(135deg, #FF9800, #FF6B00);
}

.connection-status-banner.error {
    background: linear-gradient(135deg, #DC3545, #C82333);
}

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

.status-icon svg {
    display: block;
}

.status-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.status-text strong {
    font-size: 14px;
    font-weight: 600;
}

.status-text span {
    font-size: 12px;
    opacity: 0.9;
}

.status-close {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 18px;
    line-height: 1;
    transition: all 0.2s;
}

.status-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

/* Onboarding Modal */
.onboarding-modal {
    max-width: 600px;
    padding: 40px 30px 30px;
}

.onboarding-content {
    position: relative;
    min-height: 400px;
}

.onboarding-step {
    display: none;
    text-align: center;
    animation: fadeInSlide 0.4s ease-out;
}

.onboarding-step.active {
    display: block;
}

@keyframes fadeInSlide {
    from {
        opacity: 0;
        transform: translateX(20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.onboarding-icon {
    margin-bottom: 20px;
}

.onboarding-step h2 {
    color: white;
    font-size: 28px;
    margin-bottom: 15px;
    font-weight: 600;
}

.onboarding-step p {
    color: rgba(255, 255, 255, 0.8);
    font-size: 16px;
    line-height: 1.6;
    margin-bottom: 25px;
}

.step-visual {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    padding: 30px;
    background: rgba(0, 71, 171, 0.1);
    border-radius: 12px;
    margin-top: 20px;
}

.visual-fab {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #0047AB, #0066CC);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 32px;
    font-weight: 300;
    box-shadow: 0 4px 12px rgba(0, 71, 171, 0.4);
}

.visual-code {
    background: rgba(255, 255, 255, 0.1);
    padding: 12px 20px;
    border-radius: 8px;
    color: white;
    font-weight: 600;
    font-size: 20px;
    font-family: monospace;
}

.arrow {
    color: rgba(255, 255, 255, 0.6);
    font-size: 24px;
}

.tips-list {
    text-align: left;
    list-style: none;
    padding: 0;
    margin: 20px 0;
}

.tips-list li {
    color: rgba(255, 255, 255, 0.9);
    font-size: 15px;
    padding: 10px 15px;
    margin-bottom: 8px;
    background: rgba(0, 171, 85, 0.1);
    border-radius: 8px;
    border-left: 3px solid #00AA55;
}

.onboarding-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 30px;
    gap: 20px;
}

.onboarding-dots {
    display: flex;
    gap: 8px;
}

.dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transition: all 0.3s;
    cursor: pointer;
}

.dot.active {
    background: linear-gradient(135deg, #0047AB, #0066CC);
    width: 30px;
    border-radius: 5px;
}

.skip-tutorial {
    text-align: center;
    margin-top: 15px;
}

.skip-tutorial button {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.6);
    font-size: 14px;
    cursor: pointer;
    text-decoration: underline;
    transition: color 0.2s;
}

.skip-tutorial button:hover {
    color: rgba(255, 255, 255, 0.9);
}

/* Device Test Modal */
.device-test-modal {
    max-width: 600px;
}

.device-test-container {
    margin-top: 20px;
}

.video-preview {
    position: relative;
    width: 100%;
    height: 300px;
    background: #000;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 20px;
}

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

.test-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 18px;
}

.audio-level-indicator {
    margin-bottom: 20px;
}

.audio-level-indicator label {
    display: block;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 8px;
    font-size: 14px;
}

.audio-meter {
    width: 100%;
    height: 30px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    overflow: hidden;
    position: relative;
}

.audio-level {
    height: 100%;
    background: linear-gradient(90deg, #00AA55, #00CC66);
    border-radius: 15px;
    transition: width 0.1s ease;
    width: 0%;
}

.device-test-actions {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.device-test-actions button {
    flex: 1;
}

.device-tips {
    background: rgba(0, 71, 171, 0.1);
    padding: 15px;
    border-radius: 8px;
    border-left: 3px solid #0047AB;
}

.device-tips p {
    color: white;
    font-weight: 600;
    margin-bottom: 10px;
}

.device-tips ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.device-tips li {
    color: rgba(255, 255, 255, 0.8);
    font-size: 13px;
    padding: 5px 0;
    padding-left: 20px;
    position: relative;
}

.device-tips li::before {
    content: '•';
    position: absolute;
    left: 5px;
    color: #0066CC;
}

/* Help tooltips for call buttons */
.icon-btn[data-help="true"]:disabled::after {
    content: attr(title);
    position: absolute;
    bottom: -40px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(220, 53, 69, 0.95);
    color: white;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 12px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
    z-index: 1000;
}

.icon-btn[data-help="true"]:disabled:hover::after {
    opacity: 1;
}

/* Mobile responsiveness for new elements */
@media (max-width: 768px) {
    .connection-status-banner {
        min-width: auto;
        left: 10px;
        right: 10px;
        transform: none;
        font-size: 13px;
    }
    
    .status-text strong {
        font-size: 13px;
    }
    
    .status-text span {
        font-size: 11px;
    }
    
    .onboarding-modal {
        max-width: 95%;
        padding: 30px 20px 20px;
    }
    
    .onboarding-step h2 {
        font-size: 22px;
    }
    
    .onboarding-step p {
        font-size: 14px;
    }
    
    .visual-fab {
        width: 50px;
        height: 50px;
        font-size: 28px;
    }
    
    .visual-code {
        font-size: 16px;
        padding: 10px 15px;
    }
    
    .tips-list li {
        font-size: 13px;
        padding: 8px 12px;
    }
    
    .device-test-modal {
        max-width: 95%;
    }
    
    .video-preview {
        height: 220px;
    }
}

/* Enhanced Call Screen Styling - Dopamine UI */
#videoCallContainer, #audioCallContainer {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #0a0e27 0%, #1a0b2e 50%, #2d1b4e 100%);
    z-index: 10000;
    animation: fadeInScale 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes fadeInScale {
    0% {
        opacity: 0;
        transform: scale(0.95);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

.video-call-wrapper, .audio-call-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

/* Enhanced Remote Video */
.remote-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    background: linear-gradient(135deg, #0a0e27, #1a0b2e);
    position: absolute;
    top: 0;
    left: 0;
}

/* Enhanced Local Video - Floating with glow */
.local-video {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 150px;
    height: 200px;
    border-radius: 20px;
    object-fit: cover;
    border: 3px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 10px 40px rgba(0, 71, 171, 0.4),
                0 0 60px rgba(138, 43, 226, 0.3);
    z-index: 10;
    backdrop-filter: blur(10px);
    animation: floatGlow 3s ease-in-out infinite;
}

@keyframes floatGlow {
    0%, 100% {
        transform: translateY(0) scale(1);
        box-shadow: 0 10px 40px rgba(0, 71, 171, 0.4),
                    0 0 60px rgba(138, 43, 226, 0.3);
    }
    50% {
        transform: translateY(-10px) scale(1.02);
        box-shadow: 0 15px 50px rgba(0, 71, 171, 0.6),
                    0 0 80px rgba(138, 43, 226, 0.5);
    }
}

/* Enhanced Call Info */
.call-info {
    position: absolute;
    top: 30px;
    left: 30px;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(20px);
    padding: 12px 24px;
    border-radius: 50px;
    display: flex;
    gap: 15px;
    align-items: center;
    z-index: 10;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    animation: slideInTop 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes slideInTop {
    0% {
        opacity: 0;
        transform: translateY(-30px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

.call-info span {
    color: white;
    font-size: 14px;
    font-weight: 500;
}

#callStatus {
    color: #4ade80;
    display: flex;
    align-items: center;
    gap: 8px;
}

#callStatus::before {
    content: '';
    width: 8px;
    height: 8px;
    background: #4ade80;
    border-radius: 50%;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.5;
        transform: scale(1.2);
    }
}

/* Enhanced Video Controls - Floating dock style */
.video-controls {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 20px;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(30px);
    padding: 15px 30px;
    border-radius: 60px;
    box-shadow: 0 10px 60px rgba(0, 0, 0, 0.5),
                0 0 100px rgba(0, 71, 171, 0.3),
                inset 0 1px 1px rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.1);
    animation: slideInBottom 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
    z-index: 100;
}

@keyframes slideInBottom {
    0% {
        opacity: 0;
        transform: translateX(-50%) translateY(50px);
    }
    100% {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

.control-btn {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
    overflow: hidden;
}

.control-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.4s, height 0.4s;
}

.control-btn:hover::before {
    width: 100%;
    height: 100%;
}

.control-btn:hover {
    transform: translateY(-5px) scale(1.1);
    background: rgba(255, 255, 255, 0.25);
    box-shadow: 0 10px 30px rgba(0, 71, 171, 0.5),
                0 0 40px rgba(138, 43, 226, 0.3);
}

.control-btn:active {
    transform: translateY(-2px) scale(1.05);
}

.end-btn {
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, #ef4444, #dc2626);
    box-shadow: 0 10px 40px rgba(239, 68, 68, 0.4),
                0 0 60px rgba(220, 38, 38, 0.3);
}

.end-btn:hover {
    background: linear-gradient(135deg, #dc2626, #b91c1c);
    transform: translateY(-8px) scale(1.15);
    box-shadow: 0 15px 50px rgba(239, 68, 68, 0.6),
                0 0 80px rgba(220, 38, 38, 0.5);
}

/* Enhanced Audio Call UI */
.audio-call-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 30px;
    animation: fadeInUp 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes fadeInUp {
    0% {
        opacity: 0;
        transform: translateY(30px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

.caller-avatar {
    position: relative;
    animation: bounceIn 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes bounceIn {
    0% {
        opacity: 0;
        transform: scale(0.3);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

.avatar-circle.xlarge {
    width: 180px;
    height: 180px;
    box-shadow: 0 20px 80px rgba(0, 71, 171, 0.5),
                0 0 100px rgba(138, 43, 226, 0.4),
                inset 0 0 80px rgba(255, 255, 255, 0.1);
    border: 4px solid rgba(255, 255, 255, 0.2);
}

.sound-waves {
    position: absolute;
    bottom: -30px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    align-items: flex-end;
}

.wave {
    width: 6px;
    background: linear-gradient(180deg, #0047AB, #0066CC);
    border-radius: 10px;
    animation: waveAnimation 1.2s ease-in-out infinite;
}

.wave:nth-child(1) {
    height: 20px;
    animation-delay: 0s;
}

.wave:nth-child(2) {
    height: 35px;
    animation-delay: 0.2s;
}

.wave:nth-child(3) {
    height: 50px;
    animation-delay: 0.4s;
}

.wave:nth-child(4) {
    height: 35px;
    animation-delay: 0.6s;
}

@keyframes waveAnimation {
    0%, 100% {
        transform: scaleY(0.5);
        opacity: 0.5;
    }
    50% {
        transform: scaleY(1);
        opacity: 1;
    }
}

#audioCallUserName {
    font-size: 32px;
    font-weight: 600;
    color: white;
    margin: 0;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

#audioCallStatus {
    font-size: 18px;
    color: #4ade80;
    margin: 0;
}

/* Emoji Picker Styling */
.emoji-picker {
    position: absolute;
    bottom: 100%;
    left: 0;
    right: 0;
    background: rgba(17, 27, 33, 0.95);
    backdrop-filter: blur(20px);
    border-radius: 20px 20px 0 0;
    padding: 20px;
    box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.3),
                0 0 60px rgba(0, 71, 171, 0.2);
    border-top: 2px solid rgba(0, 71, 171, 0.3);
    animation: slideUpEmoji 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    z-index: 1000;
    max-height: 200px;
    overflow-y: auto;
}

@keyframes slideUpEmoji {
    0% {
        opacity: 0;
        transform: translateY(20px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

.emoji-grid {
    display: grid;
    grid-template-columns: repeat(10, 1fr);
    gap: 10px;
}

.emoji-item {
    font-size: 28px;
    cursor: pointer;
    text-align: center;
    padding: 8px;
    border-radius: 10px;
    transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
    background: rgba(255, 255, 255, 0.05);
}

.emoji-item:hover {
    transform: scale(1.3);
    background: rgba(0, 71, 171, 0.2);
    box-shadow: 0 5px 20px rgba(0, 71, 171, 0.4);
}

.emoji-item:active {
    transform: scale(1.1);
}

/* Enhanced Mobile Input */
.mobile-input-wrapper {
    position: relative;
    flex: 1;
}

.mobile-message-input {
    background: rgba(17, 27, 33, 0.8);
    backdrop-filter: blur(20px);
    border-top: 1px solid rgba(0, 71, 171, 0.2);
    box-shadow: 0 -5px 30px rgba(0, 0, 0, 0.3);
}

.mobile-message-input .icon-btn {
    width: 42px;
    height: 42px;
    background: rgba(0, 71, 171, 0.1);
    border-radius: 12px;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.mobile-message-input .icon-btn:hover {
    background: rgba(0, 71, 171, 0.2);
    transform: scale(1.1) rotate(5deg);
}

.mobile-message-input .icon-btn:active {
    transform: scale(0.95);
}

#mobileMessageInputField {
    background: rgba(30, 42, 50, 0.6);
    border: 1px solid rgba(0, 71, 171, 0.2);
    border-radius: 25px;
    padding: 12px 20px;
    color: white;
    font-size: 15px;
    transition: all 0.3s ease;
}

#mobileMessageInputField:focus {
    background: rgba(30, 42, 50, 0.8);
    border-color: rgba(0, 71, 171, 0.5);
    box-shadow: 0 0 20px rgba(0, 71, 171, 0.3);
}

.mobile-send-btn {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, #0047AB, #0066CC);
    border-radius: 50%;
    box-shadow: 0 5px 20px rgba(0, 71, 171, 0.4);
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.mobile-send-btn:hover {
    transform: scale(1.1) rotate(15deg);
    box-shadow: 0 8px 30px rgba(0, 71, 171, 0.6);
}

.mobile-send-btn:active {
    transform: scale(0.95) rotate(10deg);
}

/* Mobile Only - Back Camera Button */
.mobile-only {
    display: none;
}

@media (max-width: 768px) {
    .mobile-only {
        display: flex;
    }
    
    .local-video {
        width: 100px;
        height: 140px;
        top: 15px;
        right: 15px;
        border-radius: 15px;
    }
    
    .call-info {
        top: 15px;
        left: 15px;
        padding: 10px 18px;
        font-size: 12px;
    }
    
    .video-controls {
        bottom: 30px;
        padding: 12px 20px;
        gap: 15px;
    }
    
    .control-btn {
        width: 50px;
        height: 50px;
    }
    
    .end-btn {
        width: 60px;
        height: 60px;
    }
    
    #audioCallUserName {
        font-size: 28px;
    }
    
    #audioCallStatus {
        font-size: 16px;
    }
    
    .avatar-circle.xlarge {
        width: 140px;
        height: 140px;
    }
    
    .emoji-grid {
        grid-template-columns: repeat(8, 1fr);
        gap: 8px;
    }
    
    .emoji-item {
        font-size: 24px;
        padding: 6px;
    }
}

/* Smooth transitions for all interactive elements */
* {
    -webkit-tap-highlight-color: transparent;
}

button, .icon-btn, .control-btn {
    touch-action: manipulation;
    -webkit-user-select: none;
    user-select: none;
}

/* ===================================
   MODERN INCOMING CALL MODAL
   =================================== */

.incoming-call-overlay {
    background: linear-gradient(135deg, rgba(10, 14, 39, 0.98), rgba(26, 11, 46, 0.98));
    backdrop-filter: blur(30px);
    z-index: 20000;
}

.incoming-call-container {
    position: relative;
    width: 100%;
    max-width: 400px;
    padding: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 500px;
    animation: slideUpFadeIn 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes slideUpFadeIn {
    0% {
        opacity: 0;
        transform: translateY(100px) scale(0.9);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.call-bg-animation {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 50% 30%, rgba(0, 71, 171, 0.15), transparent 70%),
                radial-gradient(circle at 80% 80%, rgba(138, 43, 226, 0.1), transparent 60%);
    animation: bgPulse 4s ease-in-out infinite;
    z-index: 0;
}

@keyframes bgPulse {
    0%, 100% {
        opacity: 0.5;
        transform: scale(1);
    }
    50% {
        opacity: 0.8;
        transform: scale(1.05);
    }
}

.incoming-call-content {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 30px;
    margin-bottom: 60px;
}

/* Caller Avatar with Ripple Effect */
.caller-avatar-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ripple-effect {
    position: absolute;
    width: 180px;
    height: 180px;
    border-radius: 50%;
    border: 3px solid rgba(0, 71, 171, 0.4);
    animation: rippleAnimation 2s ease-out infinite;
}

.ripple-effect.delay-1 {
    animation-delay: 0.5s;
}

.ripple-effect.delay-2 {
    animation-delay: 1s;
}

@keyframes rippleAnimation {
    0% {
        transform: scale(0.8);
        opacity: 1;
    }
    100% {
        transform: scale(1.5);
        opacity: 0;
    }
}

.caller-avatar-modern {
    width: 140px;
    height: 140px;
    border-radius: 50%;
    background: linear-gradient(135deg, #0047AB 0%, #0066CC 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 20px 60px rgba(0, 71, 171, 0.5),
                0 0 80px rgba(138, 43, 226, 0.3),
                inset 0 0 40px rgba(255, 255, 255, 0.1);
    position: relative;
    z-index: 2;
    animation: avatarFloat 3s ease-in-out infinite;
}

@keyframes avatarFloat {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

/* Caller Info */
.caller-info-modern {
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.caller-name-modern {
    font-size: 32px;
    font-weight: 600;
    color: white;
    margin: 0;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    animation: fadeInScale 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) 0.2s backwards;
}

.call-type-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(0, 71, 171, 0.2);
    backdrop-filter: blur(10px);
    padding: 8px 20px;
    border-radius: 50px;
    color: #4ade80;
    font-size: 16px;
    font-weight: 500;
    border: 1px solid rgba(0, 71, 171, 0.3);
    margin: 0 auto;
    animation: fadeInScale 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) 0.3s backwards;
}

.incoming-call-subtitle {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.6);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 6px;
    justify-content: center;
    animation: fadeInScale 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) 0.4s backwards;
}

.incoming-call-subtitle::before {
    content: '🔒';
    font-size: 14px;
}

/* Modern Call Action Buttons */
.incoming-call-actions {
    position: relative;
    z-index: 1;
    display: flex;
    gap: 40px;
    justify-content: center;
    animation: fadeInScale 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) 0.5s backwards;
}

.modern-call-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    background: none;
    border: none;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    padding: 0;
}

.btn-icon-wrapper {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.btn-icon-wrapper::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transform: translate(-50%, -50%);
    transition: width 0.4s, height 0.4s;
}

.modern-call-btn:hover .btn-icon-wrapper::before {
    width: 100%;
    height: 100%;
}

.decline-btn .btn-icon-wrapper {
    background: linear-gradient(135deg, #ef4444, #dc2626);
}

.accept-btn .btn-icon-wrapper {
    background: linear-gradient(135deg, #10b981, #059669);
}

.modern-call-btn:hover .btn-icon-wrapper {
    transform: scale(1.15) translateY(-5px);
}

.modern-call-btn:active .btn-icon-wrapper {
    transform: scale(1.05);
}

.decline-btn:hover .btn-icon-wrapper {
    box-shadow: 0 15px 50px rgba(239, 68, 68, 0.6),
                0 0 60px rgba(220, 38, 38, 0.4);
}

.accept-btn:hover .btn-icon-wrapper {
    box-shadow: 0 15px 50px rgba(16, 185, 129, 0.6),
                0 0 60px rgba(5, 150, 105, 0.4);
}

.btn-label {
    font-size: 15px;
    font-weight: 500;
    color: white;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

/* ===================================
   WHATSAPP-STYLE INPUT CONTAINER
   =================================== */

.whatsapp-input-container {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #1e2a32;
    padding: 8px;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.2);
    z-index: 1000;
    display: none; /* Hidden by default, shown via JS */
}

/* Show on mobile when chat is active */
@media (max-width: 768px) {
    .main-chat.chat-active ~ .whatsapp-input-container {
        display: block;
    }
}

.whatsapp-input-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #2a3942;
    border-radius: 25px;
    padding: 5px 8px;
}

.whatsapp-icon-btn {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: none;
    background: transparent;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    color: #8696a0;
}

.whatsapp-icon-btn:hover {
    background: rgba(255, 255, 255, 0.05);
}

.whatsapp-icon-btn:active {
    transform: scale(0.9);
}

.emoji-btn svg path {
    fill: #8696a0;
}

.whatsapp-input-wrapper {
    flex: 1;
    display: flex;
    align-items: center;
}

.whatsapp-input {
    width: 100%;
    background: transparent;
    border: none;
    outline: none;
    color: #e9edef;
    font-size: 15px;
    padding: 10px 12px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica', 'Arial', sans-serif;
}

.whatsapp-textarea {
    resize: none;
    max-height: 120px;
    overflow-y: auto;
    line-height: 20px;
    min-height: 20px;
}

.whatsapp-textarea::-webkit-scrollbar {
    width: 6px;
}

.whatsapp-textarea::-webkit-scrollbar-track {
    background: transparent;
}

.whatsapp-textarea::-webkit-scrollbar-thumb {
    background: #667781;
    border-radius: 3px;
}

.whatsapp-input::placeholder {
    color: #667781;
}

.whatsapp-send-btn {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: none;
    background: #00a884;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 0 2px 8px rgba(0, 168, 132, 0.3);
}

.whatsapp-send-btn:hover {
    background: #06cf9c;
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(0, 168, 132, 0.5);
}

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

/* WhatsApp Emoji Picker */
.whatsapp-emoji-picker {
    position: absolute;
    bottom: 100%;
    left: 0;
    right: 0;
    background: #1e2a32;
    border-radius: 18px 18px 0 0;
    margin-bottom: 8px;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.3);
    max-height: 280px;
    overflow: hidden;
    animation: slideUpEmoji 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.emoji-picker-header {
    padding: 12px 16px;
    background: #202c33;
    border-bottom: 1px solid #2a3942;
    display: flex;
    gap: 15px;
}

.emoji-category {
    font-size: 13px;
    color: #8696a0;
    cursor: pointer;
    transition: color 0.2s;
}

.emoji-category.active {
    color: #00a884;
}

.whatsapp-emoji-grid {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    gap: 4px;
    padding: 12px;
    overflow-y: auto;
    max-height: 220px;
}

.whatsapp-emoji-item {
    font-size: 28px;
    cursor: pointer;
    text-align: center;
    padding: 8px;
    border-radius: 8px;
    transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
    background: transparent;
}

.whatsapp-emoji-item:hover {
    transform: scale(1.4);
    background: rgba(255, 255, 255, 0.05);
}

.whatsapp-emoji-item:active {
    transform: scale(1.2);
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .incoming-call-container {
        max-width: 100%;
        padding: 40px 20px;
    }
    
    .caller-avatar-modern {
        width: 120px;
        height: 120px;
    }
    
    .ripple-effect {
        width: 160px;
        height: 160px;
    }
    
    .caller-name-modern {
        font-size: 28px;
    }
    
    .call-type-badge {
        font-size: 15px;
        padding: 7px 18px;
    }
    
    .incoming-call-actions {
        gap: 30px;
    }
    
    .btn-icon-wrapper {
        width: 65px;
        height: 65px;
    }
    
    .whatsapp-emoji-grid {
        grid-template-columns: repeat(7, 1fr);
    }
    
    .whatsapp-emoji-item {
        font-size: 26px;
    }
}



