/* CSS for Enhanced Chat UI - Modern & Sleek */

/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    background: linear-gradient(135deg, #0a0a0a 0%, #111111 25%, #0d0d0d 50%, #111111 75%, #0a0a0a 100%);
    color: #ffffff;
    display: flex;
    height: 100vh;
    overflow: hidden;
    user-select: none;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.03);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 10px;
    transition: background 0.3s ease;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.25);
}

/* Glassmorphism Effects */
.glass {
    background: rgba(255, 255, 255, 0.06);
    backdrop-filter: blur(25px) saturate(180%);
    -webkit-backdrop-filter: blur(25px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
}

.glass-dark {
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(25px) saturate(200%);
    -webkit-backdrop-filter: blur(25px) saturate(200%);
    border: 1px solid rgba(255, 255, 255, 0.06);
}

/* Sidebar Styling */
/* Sidebar Styling */
#sidebar {
    width: 320px;
    background: rgba(16, 16, 16, 0.9);
    backdrop-filter: blur(25px) saturate(200%);
    -webkit-backdrop-filter: blur(25px) saturate(200%);
    border-right: 1px solid rgba(255, 255, 255, 0.06);
    display: flex;
    flex-direction: column;
    padding: 25px 20px;
    gap: 20px;
    z-index: 10;
    box-shadow: 8px 0 40px rgba(0, 0, 0, 0.6);
    position: relative;
}

#sidebar::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 50%, #667eea 100%);
    background-size: 200% 100%;
    animation: gradientShift 3s ease infinite;
}

@keyframes gradientShift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

/* User Profile Section */
#user-info {
    padding: 20px;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
    border-radius: 18px;
    border: 1px solid rgba(102, 126, 234, 0.15);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

#user-info::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(102, 126, 234, 0.5), transparent);
}

#user-info:hover {
    transform: translateY(-2px);
    border-color: rgba(102, 126, 234, 0.3);
    box-shadow: 0 12px 40px rgba(102, 126, 234, 0.15);
}

#user-info h3 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 4px;
    background: linear-gradient(135deg, #fff 0%, #d1d5db 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

#user-info div {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.6);
    letter-spacing: 0.3px;
}

/* Add Friend Section */
#add-friend-section {
    padding: 20px;
    background: rgba(255, 255, 255, 0.04);
    border-radius: 18px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    transition: all 0.3s ease;
}

#add-friend-section:hover {
    border-color: rgba(255, 255, 255, 0.12);
    transform: translateY(-1px);
}

#add-friend-section input {
    width: 100%;
    padding: 14px 18px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 14px;
    color: #fff;
    margin-bottom: 12px;
    font-size: 14px;
    font-weight: 400;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

#add-friend-section input:focus {
    outline: none;
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(138, 180, 248, 0.6);
    box-shadow: 0 0 0 3px rgba(138, 180, 248, 0.1), 0 4px 20px rgba(138, 180, 248, 0.2);
}

#add-friend-section input::placeholder {
    color: rgba(255, 255, 255, 0.35);
    font-weight: 400;
}

#add-friend-section button {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    border-radius: 14px;
    color: white;
    cursor: pointer;
    font-weight: 600;
    font-size: 14px;
    letter-spacing: 0.3px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

#add-friend-section button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: 0.5s;
}

#add-friend-section button:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 30px rgba(102, 126, 234, 0.4);
}

#add-friend-section button:hover::before {
    left: 100%;
}

#add-friend-section button:active {
    transform: translateY(0);
}

/* Section Titles */
.section-title {
    padding: 10px 15px;
    font-size: 11px;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.4);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.section-title::after {
    content: '';
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.1), transparent);
}

/* Friend Requests & List */
#friend-requests, #friends-list {
    overflow-y: auto;
    max-height: 280px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding-right: 5px;
}

.request-item, .friend-item {
    padding: 14px 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    position: relative;
    animation: fadeIn 0.3s ease-out;
}

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

.request-item:hover, .friend-item:hover {
    background: rgba(255, 255, 255, 0.07);
    border-color: rgba(255, 255, 255, 0.1);
    transform: translateX(8px) translateY(-1px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.friend-item.active {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.2) 0%, rgba(118, 75, 162, 0.2) 100%);
    border-color: rgba(102, 126, 234, 0.3);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.25);
}

.friend-item.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 60%;
    background: linear-gradient(to bottom, #667eea, #764ba2);
    border-radius: 0 4px 4px 0;
}

.request-name, .friend-name {
    color: #fff;
    font-size: 14px;
    font-weight: 500;
    flex: 1;
    display: flex;
    align-items: center;
    gap: 8px;
}

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

/* Button Styles */
.accept-btn, .reject-btn, .remove-btn {
    padding: 8px 14px;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
}

.accept-btn {
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(56, 239, 125, 0.3);
}

.accept-btn:hover {
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 8px 25px rgba(56, 239, 125, 0.5);
}

.reject-btn, .remove-btn {
    background: linear-gradient(135deg, #ed4245 0%, #c03537 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(237, 66, 69, 0.3);
}

.reject-btn:hover, .remove-btn:hover {
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 8px 25px rgba(237, 66, 69, 0.5);
}

.remove-btn {
    opacity: 0;
    transform: scale(0.8);
    pointer-events: none;
    transition: opacity 0.3s, transform 0.3s;
}

.friend-item:hover .remove-btn {
    opacity: 1;
    transform: scale(1);
    pointer-events: auto;
}

.friend-item.active .remove-btn {
    opacity: 1;
    transform: scale(1);
    pointer-events: auto;
}

/* Chat Area */
#chat-area {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: rgba(13, 13, 13, 0.7);
    backdrop-filter: blur(25px) saturate(200%);
    -webkit-backdrop-filter: blur(25px) saturate(200%);
    margin: 20px;
    margin-left: 0;
    border-radius: 28px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.06);
    box-shadow: 0 10px 50px rgba(0, 0, 0, 0.6);
}

/* Chat Header */
#chat-header {
    padding: 22px 32px;
    background: rgba(255, 255, 255, 0.04);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    font-size: 19px;
    font-weight: 600;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 12px;
}

#chat-header::before {
    content: '';
    width: 8px;
    height: 8px;
    background: #38ef7d;
    border-radius: 50%;
    box-shadow: 0 0 10px #38ef7d;
    animation: pulse 2s infinite;
}

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

/* Messages Container */
#messages {
    flex: 1;
    padding: 32px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 16px;
    background: radial-gradient(circle at 20% 80%, rgba(102, 126, 234, 0.05) 0%, transparent 50%),
                radial-gradient(circle at 80% 20%, rgba(118, 75, 162, 0.05) 0%, transparent 50%);
}

/* Message Styling */
.message {
    padding: 16px 20px;
    border-radius: 20px;
    max-width: 70%;
    word-wrap: break-word;
    backdrop-filter: blur(25px) saturate(180%);
    -webkit-backdrop-filter: blur(25px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 6px 25px rgba(0, 0, 0, 0.4);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    cursor: context-menu;
    animation: messageSlide 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

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

.message:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 35px rgba(0, 0, 0, 0.5);
}

.message.mine {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.25) 0%, rgba(118, 75, 162, 0.25) 100%);
    border-color: rgba(102, 126, 234, 0.2);
    color: white;
    align-self: flex-end;
}

.message.other {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.1);
    color: #fff;
    align-self: flex-start;
}

.message-sender {
    font-weight: 600;
    font-size: 13px;
    margin-bottom: 6px;
    opacity: 0.9;
    letter-spacing: 0.2px;
}

.message-text {
    font-size: 14.5px;
    line-height: 1.5;
    letter-spacing: 0.1px;
}

/* Message Header with Menu */
.message-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
}

.message-menu {
    opacity: 0;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 8px;
    transition: all 0.3s ease;
    font-size: 18px;
    font-weight: bold;
    color: rgba(255, 255, 255, 0.4);
    line-height: 1;
}

.message:hover .message-menu {
    opacity: 1;
}

.message-menu:hover {
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
    transform: scale(1.1);
}

/* Input Area */
#message-input-area {
    padding: 22px 32px;
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    display: flex;
    gap: 14px;
    align-items: flex-end;
}

#msgInput {
    flex: 1;
    padding: 16px 20px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 18px;
    color: #fff;
    font-size: 14.5px;
    resize: none;
    min-height: 52px;
    max-height: 120px;
    font-family: inherit;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    line-height: 1.5;
}

#msgInput:focus {
    outline: none;
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(138, 180, 248, 0.6);
    box-shadow: 0 0 0 3px rgba(138, 180, 248, 0.1), 0 8px 30px rgba(138, 180, 248, 0.25);
}

#msgInput::placeholder {
    color: rgba(255, 255, 255, 0.35);
}

#send-btn {
    padding: 16px 32px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    border-radius: 18px;
    color: white;
    cursor: pointer;
    font-weight: 600;
    font-size: 14.5px;
    letter-spacing: 0.3px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 6px 25px rgba(102, 126, 234, 0.35);
    display: flex;
    align-items: center;
    gap: 8px;
}

#send-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 35px rgba(102, 126, 234, 0.5);
}

#send-btn:active {
    transform: translateY(0);
}

#send-btn::after {
    content: '→';
    font-size: 18px;
    transition: transform 0.3s ease;
}

#send-btn:hover::after {
    transform: translateX(3px);
}

/* Notifications */
.notification {
    position: fixed;
    top: 30px;
    right: 30px;
    background: rgba(20, 20, 20, 0.98);
    backdrop-filter: blur(25px) saturate(200%);
    -webkit-backdrop-filter: blur(25px) saturate(200%);
    padding: 18px 26px;
    border-radius: 18px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6);
    animation: slideIn 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    z-index: 1000;
    color: #fff;
    font-weight: 500;
    max-width: 350px;
    border-left: 4px solid #667eea;
}

@keyframes slideIn {
    from {
        transform: translateX(400px) scale(0.9);
        opacity: 0;
    }
    to {
        transform: translateX(0) scale(1);
        opacity: 1;
    }
}

/* Badges */
.badge {
    background: linear-gradient(135deg, #ed4245 0%, #c03537 100%);
    color: white;
    border-radius: 12px;
    padding: 4px 10px;
    font-size: 11px;
    font-weight: 700;
    margin-left: 8px;
    box-shadow: 0 4px 15px rgba(237, 66, 69, 0.4);
    animation: bounce 2s infinite;
}

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

.unread-badge {
    background: linear-gradient(135deg, #ed4245 0%, #c03537 100%);
    color: white;
    border-radius: 12px;
    padding: 4px 10px;
    font-size: 10px;
    font-weight: 800;
    margin-left: 8px;
    display: inline-block;
    min-width: 22px;
    text-align: center;
    box-shadow: 0 4px 15px rgba(237, 66, 69, 0.4);
}

/* Empty State */
.empty-state {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 16px;
    color: rgba(255, 255, 255, 0.3);
    font-size: 15px;
    text-align: center;
    padding: 40px;
}

.empty-state::before {
    content: '💬';
    font-size: 48px;
    opacity: 0.3;
}

/* Loading */
.loading {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 40px;
    color: rgba(255, 255, 255, 0.5);
    font-size: 15px;
    gap: 12px;
}

.loading:after {
    content: "";
    width: 22px;
    height: 22px;
    border: 3px solid rgba(255, 255, 255, 0.1);
    border-top: 3px solid rgba(102, 126, 234, 0.8);
    border-radius: 50%;
    animation: spin 1.2s cubic-bezier(0.68, -0.55, 0.265, 1.55) infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Registration & OTP Overlays */
#registration-overlay, #otp-overlay, #login-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 20% 50%, rgba(10, 10, 10, 0.9) 0%, rgba(0, 0, 0, 0.95) 100%);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    animation: fadeIn 0.5s ease-out;
}

#registration-popup, #otp-popup, #login-popup {
    background: rgba(18, 18, 18, 0.98);
    backdrop-filter: blur(30px) saturate(200%);
    -webkit-backdrop-filter: blur(30px) saturate(200%);
    padding: 45px;
    border-radius: 28px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.7);
    width: 90%;
    max-width: 420px;
    color: #fff;
    animation: popupSlide 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

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

#registration-popup h3, #otp-popup h3, #login-popup h3 {
    margin-bottom: 30px;
    color: white;
    text-align: center;
    font-size: 26px;
    font-weight: 700;
    background: linear-gradient(135deg, #fff 0%, #d1d5db 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

#registration-popup input, #otp-popup input, #login-popup input {
    width: 100%;
    padding: 16px 20px;
    margin-bottom: 16px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 14px;
    color: #fff;
    font-size: 15px;
    transition: all 0.3s ease;
}

#registration-popup input:focus, #otp-popup input:focus, #login-popup input:focus {
    outline: none;
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(138, 180, 248, 0.6);
    box-shadow: 0 0 0 3px rgba(138, 180, 248, 0.1), 0 6px 25px rgba(138, 180, 248, 0.25);
}

#registration-popup button, #otp-popup button, #login-popup button {
    width: 100%;
    padding: 16px;
    margin-top: 10px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    border-radius: 14px;
    color: white;
    cursor: pointer;
    font-weight: 600;
    font-size: 15px;
    letter-spacing: 0.3px;
    transition: all 0.3s ease;
}

#registration-popup button:hover, #otp-popup button:hover, #login-popup button:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.4);
}

#reg-message, #otp-message, #login-message {
    min-height: 24px;
    text-align: center;
    font-size: 14px;
    margin-top: 12px;
    padding: 8px;
    border-radius: 8px;
}

/* Context Menu */
.context-menu {
    position: fixed;
    background: rgba(20, 20, 20, 0.98);
    backdrop-filter: blur(25px) saturate(200%);
    -webkit-backdrop-filter: blur(25px) saturate(200%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 14px;
    padding: 10px;
    z-index: 1500;
    min-width: 180px;
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.7);
    animation: contextMenuPop 0.2s ease-out;
}

@keyframes contextMenuPop {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.context-menu-item {
    padding: 12px 16px;
    cursor: pointer;
    font-size: 14.5px;
    color: #fff;
    transition: all 0.3s ease;
    border-radius: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.context-menu-item:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateX(5px);
}

.context-menu-item.delete {
    color: #ff6b6b;
}

.context-menu-item.delete:hover {
    background: rgba(237, 66, 69, 0.2);
    color: #fff;
}

/* Reply Message Styling */
.message-reply {
    background: rgba(255, 255, 255, 0.08);
    border-left: 4px solid rgba(102, 126, 234, 0.7);
    padding: 8px 12px;
    margin-bottom: 8px;
    border-radius: 10px;
    font-size: 13px;
    opacity: 0.9;
    transition: all 0.3s ease;
}

.message-reply:hover {
    background: rgba(255, 255, 255, 0.12);
}

.reply-author {
    font-weight: 700;
    color: rgba(138, 180, 248, 1);
}

.reply-text {
    color: rgba(255, 255, 255, 0.85);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Reply Indicator */
.reply-indicator {
    background: rgba(255, 255, 255, 0.06);
    padding: 12px 18px;
    border-left: 4px solid rgba(102, 126, 234, 0.7);
    margin-bottom: 16px;
    border-radius: 14px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    animation: slideDown 0.3s ease-out;
}

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

.reply-indicator-text {
    font-size: 13px;
    color: #fff;
    font-weight: 500;
}

.reply-indicator-cancel {
    background: none;
    border: none;
    color: #ed4245;
    cursor: pointer;
    font-size: 20px;
    padding: 4px 8px;
    transition: all 0.3s ease;
    border-radius: 8px;
}

.reply-indicator-cancel:hover {
    background: rgba(237, 66, 69, 0.1);
    transform: scale(1.1);
}

/* Message Timestamp */
.message-timestamp {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.3);
    text-align: right;
    margin-top: 6px;
    font-weight: 500;
}

/* Responsive Design */
@media (max-width: 1024px) {
    #sidebar {
        width: 280px;
    }
    
    .message {
        max-width: 80%;
    }
}

@media (max-width: 768px) {
    body {
        flex-direction: column;
    }
    
    #sidebar {
        width: 100%;
        height: 300px;
        border-right: none;
        border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    }
    
    #chat-area {
        margin: 0;
        border-radius: 0;
        border: none;
    }
    
    #messages {
        padding: 20px;
    }
    
    .message {
        max-width: 85%;
    }
}

@media (max-width: 480px) {
    #registration-popup, #otp-popup, #login-popup {
        padding: 30px;
        margin: 20px;
    }
    
    .message {
        max-width: 90%;
        padding: 14px 16px;
    }
    
    #send-btn {
        padding: 14px 20px;
    }
}

/* Hover Effects Enhancement */
.hover-lift {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hover-lift:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4);
}

/* Gradient Text */
.gradient-text {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Shimmer Effect */
.shimmer {
    position: relative;
    overflow: hidden;
}

.shimmer::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        to right,
        transparent 0%,
        rgba(255, 255, 255, 0.1) 50%,
        transparent 100%
    );
    transform: rotate(30deg);
    animation: shimmer 3s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%) rotate(30deg); }
    100% { transform: translateX(100%) rotate(30deg); }
}

/* Focus Styles */
*:focus {
    outline: 2px solid rgba(138, 180, 248, 0.5);
    outline-offset: 2px;
}

*:focus:not(.focus-visible) {
    outline: none;
}

/* Selection Color */
::selection {
    background: rgba(102, 126, 234, 0.3);
    color: white;
}

::-moz-selection {
    background: rgba(102, 126, 234, 0.3);
    color: white;
}

/* Smooth Transitions */
button, input, .friend-item, .message, .request-item {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

/* FIX: Remove scrollbar from friend username input */
#friendUsername::-webkit-scrollbar {
    width: 0 !important;
    height: 0 !important;
    display: none !important;
}

#friendUsername {
    -ms-overflow-style: none !important;
    scrollbar-width: none !important;
    overflow: -moz-scrollbars-none !important;
}

/* FIX: Remove scrollbar from friend requests and friends list */
#friend-requests::-webkit-scrollbar,
#friends-list::-webkit-scrollbar {
    width: 0 !important;
    height: 0 !important;
    display: none !important;
}

#friend-requests,
#friends-list {
    -ms-overflow-style: none !important;
    scrollbar-width: none !important;
    overflow: -moz-scrollbars-none !important;
}

/* FIX: Remove scrollbar from message textarea */
#msgInput::-webkit-scrollbar {
    width: 0 !important;
    height: 0 !important;
    display: none !important;
}

#msgInput {
    -ms-overflow-style: none !important;
    scrollbar-width: none !important;
    overflow: -moz-scrollbars-none !important;
}

/* FIX: Keep only custom scrollbar for messages container */
#messages::-webkit-scrollbar {
    width: 8px;
}

#messages::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.03);
    border-radius: 10px;
}

#messages::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 10px;
}

#messages::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.25);
}