/* Reset y Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #000000;
    --secondary-color: #ffffff;
    --accent-color: #333333;
    --text-primary: #ffffff;
    --text-secondary: #cccccc;
    --border-color: rgba(255, 255, 255, 0.1);
    --background: #000000;
    --surface: rgba(255, 255, 255, 0.05);
    --surface-hover: rgba(255, 255, 255, 0.1);
    --shadow: rgba(0, 0, 0, 0.3);
    --online: #00d084;
    --offline: #666666;
    --message-sent: #1a1a1a;
    --message-received: rgba(255, 255, 255, 0.1);
    --hover: rgba(255, 255, 255, 0.1);
    --accent-blue: #00a8ff;
    --accent-blue-light: #40c4ff;
    --accent-blue-dark: #0091ea;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --error: #ff4444;
    --success: #00c851;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--background);
    color: var(--text-primary);
    line-height: 1.6;
    overflow: hidden;
    position: relative;
}

/* Animated Background */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 20% 20%, rgba(0, 168, 255, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(0, 168, 255, 0.05) 0%, transparent 50%),
        radial-gradient(circle at 40% 60%, rgba(64, 196, 255, 0.08) 0%, transparent 40%),
        radial-gradient(circle at 70% 30%, rgba(0, 145, 234, 0.06) 0%, transparent 60%);
    animation: backgroundFloat 20s ease-in-out infinite;
    z-index: -1;
}

@keyframes backgroundFloat {
    0%, 100% {
        transform: translate(0, 0) rotate(0deg);
    }
    33% {
        transform: translate(-20px, -20px) rotate(1deg);
    }
    66% {
        transform: translate(20px, -10px) rotate(-1deg);
    }
}

/* Floating Elements */
body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(circle at 15% 15%, rgba(255, 255, 255, 0.03) 1px, transparent 1px),
        radial-gradient(circle at 85% 85%, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 50px 50px, 30px 30px;
    animation: floatElements 25s linear infinite;
    z-index: -1;
}

@keyframes floatElements {
    0% {
        transform: translate(0, 0);
    }
    100% {
        transform: translate(-50px, -50px);
    }
}

/* Auth Modal */
.auth-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at center, rgba(0, 168, 255, 0.1), rgba(0, 0, 0, 0.9));
    backdrop-filter: blur(30px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    animation: modalFadeIn 0.6s ease-out;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
        backdrop-filter: blur(0px);
    }
    to {
        opacity: 1;
        backdrop-filter: blur(30px);
    }
}

.auth-container {
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.95), rgba(0, 20, 40, 0.9));
    backdrop-filter: blur(30px);
    padding: 3rem;
    border-radius: 2rem;
    box-shadow: 
        0 30px 100px rgba(0, 168, 255, 0.3),
        0 15px 40px rgba(0, 0, 0, 0.6),
        inset 0 1px 0 rgba(255, 255, 255, 0.1),
        inset 0 -1px 0 rgba(0, 168, 255, 0.2);
    width: 100%;
    max-width: 450px;
    border: 2px solid transparent;
    background-clip: padding-box;
    position: relative;
    overflow: hidden;
    animation: containerFloat 4s ease-in-out infinite;
}

@keyframes containerFloat {
    0%, 100% {
        transform: translateY(0px) rotate(0deg);
    }
    50% {
        transform: translateY(-5px) rotate(0.5deg);
    }
}

.auth-container::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, var(--accent-blue), var(--accent-blue-light), var(--accent-blue-dark), var(--accent-blue));
    border-radius: 2rem;
    z-index: -1;
    animation: borderRotate 3s linear infinite;
}

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

.auth-container::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--accent-blue-light), transparent);
    animation: shimmer 2s ease-in-out infinite;
}

@keyframes shimmer {
    0%, 100% {
        opacity: 0.3;
        transform: translateX(-100%);
    }
    50% {
        opacity: 1;
        transform: translateX(100%);
    }
}

.auth-header {
    text-align: center;
    margin-bottom: 2rem;
}

.auth-header h1 {
    font-size: 3.5rem;
    font-weight: 900;
    margin-bottom: 1rem;
    color: var(--text-primary);
    text-align: center;
    background: linear-gradient(135deg, var(--text-primary), var(--accent-blue-light), var(--accent-blue));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.02em;
    text-shadow: 0 0 30px rgba(0, 168, 255, 0.5);
    animation: titleGlow 3s ease-in-out infinite alternate;
}

@keyframes titleGlow {
    0% {
        filter: brightness(1) drop-shadow(0 0 20px rgba(0, 168, 255, 0.5));
    }
    100% {
        filter: brightness(1.2) drop-shadow(0 0 40px rgba(0, 168, 255, 0.8));
    }
}

.auth-header p {
    color: var(--text-secondary);
    font-size: 1rem;
    text-align: center;
    opacity: 0.9;
    font-weight: 500;
    letter-spacing: 0.05em;
    animation: textFadeIn 1s ease-out 0.3s both;
}

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

.auth-tabs {
    display: flex;
    margin-bottom: 2.5rem;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 1rem;
    padding: 0.375rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.3);
    position: relative;
    overflow: hidden;
}

.auth-tabs::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(0, 168, 255, 0.1), transparent);
    animation: tabShimmer 3s ease-in-out infinite;
}

@keyframes tabShimmer {
    0% {
        left: -100%;
    }
    100% {
        left: 100%;
    }
}

.auth-tab {
    flex: 1;
    padding: 1rem;
    background: transparent;
    border: none;
    cursor: pointer;
    font-weight: 700;
    color: var(--text-secondary);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 0.75rem;
    position: relative;
    overflow: hidden;
    font-size: 0.95rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.auth-tab::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--accent-blue), var(--accent-blue-light), var(--accent-blue-dark));
    opacity: 0;
    transition: all 0.4s ease;
    transform: scale(0.8);
}

.auth-tab::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.3), transparent);
    transition: all 0.6s ease;
    transform: translate(-50%, -50%);
}

.auth-tab.active {
    color: var(--text-primary);
    background: linear-gradient(135deg, var(--accent-blue), var(--accent-blue-light));
    box-shadow: 
        0 8px 25px rgba(0, 168, 255, 0.4),
        0 0 0 2px rgba(0, 168, 255, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    transform: translateY(-2px) scale(1.05);
    font-weight: 800;
}

.auth-tab.active::before {
    opacity: 0.1;
    transform: scale(1);
}

.auth-tab.active::after {
    width: 100%;
    height: 100%;
    opacity: 0;
}

.auth-tab:hover:not(.active) {
    background: rgba(0, 168, 255, 0.1);
    transform: translateY(-2px) scale(1.02);
    color: var(--accent-blue-light);
    box-shadow: 0 4px 15px rgba(0, 168, 255, 0.2);
}

.auth-tab:hover:not(.active)::before {
    opacity: 0.05;
    transform: scale(1);
}

.auth-tab:hover:not(.active)::after {
    width: 50px;
    height: 50px;
    opacity: 0.3;
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group label {
    font-weight: 500;
    color: var(--text-primary);
    font-size: 0.875rem;
}

.form-group {
    position: relative;
    margin-bottom: 1.5rem;
}

.form-group label {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    display: block;
    font-size: 0.9rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    opacity: 0.9;
}

.form-group input {
    padding: 1.25rem 1.5rem;
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 1rem;
    font-size: 1rem;
    background: rgba(255, 255, 255, 0.03);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    color: var(--text-primary);
    backdrop-filter: blur(20px);
    width: 100%;
    position: relative;
    overflow: hidden;
}

.form-group input::placeholder {
    color: rgba(255, 255, 255, 0.4);
    font-weight: 500;
}

.form-group input::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(0, 168, 255, 0.1), transparent);
    transition: left 0.6s ease;
}

.form-group input:focus {
    outline: none;
    border-color: var(--accent-blue);
    box-shadow: 
        0 0 0 4px rgba(0, 168, 255, 0.2),
        0 0 20px rgba(0, 168, 255, 0.3),
        0 10px 40px rgba(0, 168, 255, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.08);
    transform: translateY(-2px) scale(1.02);
    border-width: 2px;
}

.form-group input:focus::before {
    left: 100%;
}

.form-group input:hover:not(:focus) {
    border-color: rgba(0, 168, 255, 0.3);
    background: rgba(255, 255, 255, 0.05);
    transform: translateY(-1px);
}

.auth-btn {
    background: linear-gradient(135deg, var(--accent-blue), var(--accent-blue-light));
    color: var(--text-primary);
    border: 2px solid rgba(0, 168, 255, 0.3);
    padding: 1.25rem 2rem;
    border-radius: 1rem;
    font-weight: 800;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    margin-top: 1rem;
    position: relative;
    overflow: hidden;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-size: 0.9rem;
    width: 100%;
    box-shadow: 
        0 4px 15px rgba(0, 168, 255, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.auth-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.6s ease;
}

.auth-btn::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.4), transparent);
    transition: all 0.6s ease;
    transform: translate(-50%, -50%);
}

.auth-btn:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 
        0 12px 35px rgba(0, 168, 255, 0.5),
        0 0 0 3px rgba(0, 168, 255, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    border-color: var(--accent-blue-light);
    background: linear-gradient(135deg, var(--accent-blue-light), var(--accent-blue));
}

.auth-btn:hover::before {
    left: 100%;
}

.auth-btn:hover::after {
    width: 300px;
    height: 300px;
    opacity: 0;
}

.auth-btn:active {
    transform: translateY(-1px) scale(0.98);
    box-shadow: 
        0 6px 20px rgba(0, 168, 255, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.auth-error {
    background: rgba(220, 53, 69, 0.1);
    color: var(--error);
    padding: 0.75rem;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    margin-top: 1rem;
    border: 1px solid rgba(220, 53, 69, 0.2);
}

/* Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(20px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
}

.modal-content {
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(20px);
    padding: 2rem;
    border-radius: 1.5rem;
    width: 100%;
    max-width: 420px;
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.05);
    overflow: hidden;
}

.modal-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--accent-blue), transparent);
    animation: shimmer 3s ease-in-out infinite;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.modal-header h3 {
    font-size: 1.25rem;
    font-weight: 600;
}

.modal-close {
    background: transparent;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-secondary);
    padding: 0.25rem;
    line-height: 1;
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent-blue), var(--accent-blue-light));
    color: var(--text-primary);
    border: 1px solid rgba(0, 168, 255, 0.3);
    padding: 1rem 1.5rem;
    border-radius: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    width: 100%;
    position: relative;
    overflow: hidden;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-size: 0.875rem;
}

.btn-primary::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: left 0.5s;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 168, 255, 0.4), 0 0 0 1px rgba(0, 168, 255, 0.2);
    border-color: var(--accent-blue-light);
}

.btn-primary:hover::before {
    left: 100%;
}

.btn-primary:active {
    transform: translateY(-1px);
}

.error-message {
    background: rgba(220, 53, 69, 0.1);
    color: var(--error);
    padding: 0.75rem;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    margin-top: 1rem;
    border: 1px solid rgba(220, 53, 69, 0.2);
}

/* User Info */
.user-info {
    padding: 1rem 0;
    border-top: 1px solid var(--border-color);
    margin-top: 1rem;
}

.user-info p {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.user-info strong {
    color: var(--text-primary);
}

/* App Layout */
#app {
    display: flex;
    flex-direction: column;
    height: 100vh;
    width: 100vw;
}

/* Header */
.header {
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.9), rgba(0, 20, 40, 0.8));
    backdrop-filter: blur(30px);
    border-bottom: 2px solid transparent;
    background-clip: padding-box;
    padding: 0;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    box-shadow: 
        0 8px 32px rgba(0, 168, 255, 0.2),
        0 4px 20px rgba(0, 0, 0, 0.4);
    animation: headerGlow 4s ease-in-out infinite alternate;
}

@keyframes headerGlow {
    0% {
        box-shadow: 
            0 8px 32px rgba(0, 168, 255, 0.2),
            0 4px 20px rgba(0, 0, 0, 0.4);
    }
    100% {
        box-shadow: 
            0 8px 40px rgba(0, 168, 255, 0.3),
            0 4px 25px rgba(0, 0, 0, 0.5);
    }
}

.header::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--accent-blue-light), transparent);
    animation: headerShimmer 3s linear infinite;
}

@keyframes headerShimmer {
    0% {
        transform: translateX(-100%);
    }
    100% {
        transform: translateX(100%);
    }
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    max-width: 100%;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.logo h1 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.025em;
}

.status-indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--online);
    animation: pulse 2s infinite;
}

.status-indicator.offline {
    background: var(--offline);
    animation: none;
}

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

.header-actions {
    display: flex;
    gap: 0.5rem;
}

.icon-btn {
    background: rgba(255, 255, 255, 0.03);
    border: 2px solid rgba(255, 255, 255, 0.1);
    padding: 0.75rem;
    border-radius: 1rem;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    backdrop-filter: blur(20px);
    position: relative;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.icon-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--accent-blue), var(--accent-blue-light), var(--accent-blue-dark));
    opacity: 0;
    transition: all 0.4s ease;
    transform: scale(0.8);
}

.icon-btn::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: radial-gradient(circle, rgba(0, 168, 255, 0.4), transparent);
    transition: all 0.6s ease;
    transform: translate(-50%, -50%);
}

.icon-btn:hover {
    background: rgba(0, 168, 255, 0.15);
    color: var(--accent-blue-light);
    transform: translateY(-3px) scale(1.1);
    box-shadow: 
        0 8px 25px rgba(0, 168, 255, 0.4),
        0 0 0 2px rgba(0, 168, 255, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    border-color: var(--accent-blue-light);
    border-width: 2px;
}

.icon-btn:hover::before {
    opacity: 0.15;
    transform: scale(1);
}

.icon-btn:hover::after {
    width: 60px;
    height: 60px;
    opacity: 0.3;
}

.icon-btn:active {
    transform: translateY(-1px) scale(1.05);
    box-shadow: 
        0 4px 15px rgba(0, 168, 255, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

/* Search Bar */
.search-bar {
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--border-color);
    background: var(--surface);
    transition: var(--transition);
}

.search-bar.hidden {
    display: none;
}

.search-bar input {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 0.75rem;
    font-size: 0.875rem;
    background: var(--secondary-color);
    transition: var(--transition);
}

.search-bar input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.1);
}

/* Main Content */
.main-content {
    display: flex;
    flex: 1;
    margin-top: 73px;
    height: calc(100vh - 73px);
}

/* Conversations List */
.conversations-list {
    width: 320px;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(20px);
    border-right: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.conversations-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.conversations-header h2 {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-primary);
}

.new-chat-btn {
    background: linear-gradient(135deg, var(--accent-blue), var(--accent-blue-light));
    color: var(--text-primary);
    border: 1px solid rgba(0, 168, 255, 0.3);
    padding: 0.625rem;
    border-radius: 0.75rem;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.new-chat-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
    left: -100%;
}

.new-chat-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(0, 168, 255, 0.4);
    border-color: var(--accent-blue-light);
}

.new-chat-btn:hover::before {
    left: 100%;
}

.conversations {
    flex: 1;
    overflow-y: auto;
    padding: 0.5rem;
}

.conversation-item {
    display: flex;
    align-items: center;
    padding: 1.25rem;
    border-radius: 1.25rem;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    margin-bottom: 0.75rem;
    border: 2px solid rgba(255, 255, 255, 0.05);
    background: rgba(255, 255, 255, 0.02);
    position: relative;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.conversation-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--accent-blue), var(--accent-blue-light), var(--accent-blue-dark));
    opacity: 0;
    transition: all 0.4s ease;
    transform: scale(0.8);
}

.conversation-item::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(0, 168, 255, 0.1), transparent);
    transition: left 0.6s ease;
}

.conversation-item:hover {
    background: rgba(0, 168, 255, 0.1);
    transform: translateX(6px) scale(1.02);
    border-color: rgba(0, 168, 255, 0.4);
    box-shadow: 
        0 8px 25px rgba(0, 168, 255, 0.3),
        0 0 0 1px rgba(0, 168, 255, 0.1);
}

.conversation-item:hover::before {
    opacity: 0.1;
    transform: scale(1);
}

.conversation-item:hover::after {
    left: 100%;
}

.conversation-item.active {
    background: linear-gradient(135deg, var(--accent-blue), var(--accent-blue-light));
    color: var(--text-primary);
    border-color: var(--accent-blue-light);
    box-shadow: 
        0 10px 30px rgba(0, 168, 255, 0.5),
        0 0 0 2px rgba(0, 168, 255, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    transform: translateX(6px) scale(1.03);
    animation: conversationPulse 2s ease-in-out infinite;
}

@keyframes conversationPulse {
    0%, 100% {
        box-shadow: 
            0 10px 30px rgba(0, 168, 255, 0.5),
            0 0 0 2px rgba(0, 168, 255, 0.2),
            inset 0 1px 0 rgba(255, 255, 255, 0.2);
    }
    50% {
        box-shadow: 
            0 10px 40px rgba(0, 168, 255, 0.7),
            0 0 0 3px rgba(0, 168, 255, 0.3),
            inset 0 1px 0 rgba(255, 255, 255, 0.3);
    }
}

.conversation-item.active::before {
    opacity: 0.15;
    transform: scale(1);
}

.conversation-item.active::after {
    left: 100%;
    opacity: 0.5;
}

.conversation-item.active .conversation-meta,
.conversation-item.active .conversation-time {
    color: rgba(255, 255, 255, 0.8);
}

.conversation-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--surface);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    margin-right: 0.875rem;
    position: relative;
    flex-shrink: 0;
}

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

.conversation-name {
    font-weight: 500;
    font-size: 0.875rem;
    margin-bottom: 0.125rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.conversation-message {
    font-size: 0.75rem;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.conversation-meta {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.25rem;
}

.conversation-time {
    font-size: 0.625rem;
    color: var(--text-secondary);
}

.unread-badge {
    background: var(--primary-color);
    color: var(--secondary-color);
    border-radius: 50%;
    width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.625rem;
    font-weight: 600;
}

.conversation-item.active .unread-badge {
    background: var(--secondary-color);
    color: var(--primary-color);
}

/* Chat Area */
.chat-area {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: rgba(0, 0, 0, 0.3);
}

.chat-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.chat-info {
    display: flex;
    align-items: center;
    gap: 0.875rem;
}

.chat-header .avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--surface);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.125rem;
}

.chat-details h3 {
    font-size: 1rem;
    font-weight: 500;
    margin-bottom: 0.125rem;
}

.chat-details span {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.chat-actions {
    display: flex;
    gap: 0.5rem;
}

/* Messages Container */
.messages-container {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.welcome-message {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    text-align: center;
    color: var(--text-secondary);
    position: relative;
    animation: welcomeFadeIn 1s ease-out;
}

@keyframes welcomeFadeIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.welcome-icon {
    font-size: 6rem;
    margin-bottom: 2rem;
    opacity: 0.9;
    background: linear-gradient(135deg, var(--accent-blue), var(--accent-blue-light), var(--text-primary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: welcomeFloat 4s ease-in-out infinite;
    filter: drop-shadow(0 0 30px rgba(0, 168, 255, 0.5));
}

@keyframes welcomeFloat {
    0%, 100% {
        transform: translateY(0px) rotate(0deg) scale(1);
    }
    25% {
        transform: translateY(-15px) rotate(2deg) scale(1.05);
    }
    50% {
        transform: translateY(-8px) rotate(-1deg) scale(1.02);
    }
    75% {
        transform: translateY(-12px) rotate(1deg) scale(1.03);
    }
}

.welcome-message h2 {
    font-size: 2.5rem;
    font-weight: 900;
    margin-bottom: 1rem;
    color: var(--text-primary);
    background: linear-gradient(135deg, var(--text-primary), var(--accent-blue-light), var(--accent-blue));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 0 40px rgba(0, 168, 255, 0.5);
    animation: titleGlow 3s ease-in-out infinite alternate;
    letter-spacing: -0.02em;
}

@keyframes titleGlow {
    0% {
        filter: brightness(1) drop-shadow(0 0 30px rgba(0, 168, 255, 0.5));
    }
    100% {
        filter: brightness(1.3) drop-shadow(0 0 50px rgba(0, 168, 255, 0.8));
    }
}

.welcome-message p {
    margin-bottom: 3rem;
    font-size: 1.1rem;
    opacity: 0.9;
    max-width: 350px;
    font-weight: 500;
    letter-spacing: 0.02em;
    animation: textSlideUp 1s ease-out 0.3s both;
}

@keyframes textSlideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 0.9;
        transform: translateY(0);
    }
}

.start-chat-btn {
    background: linear-gradient(135deg, var(--accent-blue), var(--accent-blue-light));
    color: var(--text-primary);
    border: 2px solid rgba(0, 168, 255, 0.3);
    padding: 1.25rem 2.5rem;
    border-radius: 1.5rem;
    font-weight: 800;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-size: 0.9rem;
    box-shadow: 
        0 6px 20px rgba(0, 168, 255, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    animation: buttonPulse 2s ease-in-out infinite;
}

@keyframes buttonPulse {
    0%, 100% {
        box-shadow: 
            0 6px 20px rgba(0, 168, 255, 0.3),
            inset 0 1px 0 rgba(255, 255, 255, 0.2);
    }
    50% {
        box-shadow: 
            0 8px 30px rgba(0, 168, 255, 0.5),
            inset 0 1px 0 rgba(255, 255, 255, 0.3);
    }
}

.start-chat-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    transition: left 0.8s ease;
}

.start-chat-btn::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.6), transparent);
    transition: all 0.8s ease;
    transform: translate(-50%, -50%);
}

.start-chat-btn:hover {
    transform: translateY(-5px) scale(1.05);
    box-shadow: 
        0 12px 40px rgba(0, 168, 255, 0.6),
        0 0 0 3px rgba(0, 168, 255, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
    border-color: var(--accent-blue-light);
    background: linear-gradient(135deg, var(--accent-blue-light), var(--accent-blue));
}

.start-chat-btn:hover::before {
    left: 100%;
}

.start-chat-btn:hover::after {
    width: 200px;
    height: 200px;
    opacity: 0;
}

.start-chat-btn:active {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 
        0 8px 25px rgba(0, 168, 255, 0.5),
        inset 0 1px 0 rgba(255, 255, 255, 0.4);
}

.message {
    display: flex;
    gap: 0.5rem;
    max-width: 70%;
    animation: messageSlide 0.3s ease-out;
}

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

.message.sent {
    align-self: flex-end;
    flex-direction: row-reverse;
}

.message-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--surface);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.875rem;
    flex-shrink: 0;
}

.message-content {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    padding: 0.875rem 1.125rem;
    border-radius: 1rem;
    border-top-left-radius: 0.25rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
    overflow: hidden;
}

.message-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(0, 168, 255, 0.1), transparent);
    opacity: 0;
    transition: var(--transition);
}

.message.sent .message-content {
    background: linear-gradient(135deg, var(--accent-blue), var(--accent-blue-light));
    color: var(--text-primary);
    border-top-left-radius: 1rem;
    border-top-right-radius: 0.25rem;
    border-color: rgba(0, 168, 255, 0.3);
    box-shadow: 0 4px 15px rgba(0, 168, 255, 0.3);
}

.message.sent .message-content::before {
    opacity: 0.1;
}

.message-text {
    font-size: 0.875rem;
    line-height: 1.4;
    word-wrap: break-word;
}

.message-time {
    font-size: 0.625rem;
    color: var(--text-secondary);
    margin-top: 0.25rem;
}

.message.sent .message-time {
    color: rgba(255, 255, 255, 0.7);
}

/* Message Input */
.message-input-container {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.5rem 2rem;
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.8), rgba(0, 20, 40, 0.7));
    backdrop-filter: blur(30px);
    border-top: 2px solid transparent;
    background-clip: padding-box;
    box-shadow: 
        0 -8px 32px rgba(0, 168, 255, 0.2),
        0 -4px 20px rgba(0, 0, 0, 0.4);
    position: relative;
    overflow: hidden;
}

.message-input-container::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--accent-blue-light), transparent);
    animation: inputShimmer 3s linear infinite;
}

@keyframes inputShimmer {
    0% {
        transform: translateX(-100%);
    }
    100% {
        transform: translateX(100%);
    }
}

.input-actions {
    display: flex;
    gap: 0.75rem;
}

#messageInput {
    flex: 1;
    padding: 1.25rem 1.5rem;
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 2rem;
    font-size: 1rem;
    background: rgba(255, 255, 255, 0.03);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    outline: none;
    color: var(--text-primary);
    backdrop-filter: blur(20px);
    position: relative;
    overflow: hidden;
}

#messageInput::placeholder {
    color: rgba(255, 255, 255, 0.4);
    font-weight: 500;
}

#messageInput::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(0, 168, 255, 0.1), transparent);
    transition: left 0.6s ease;
}

#messageInput:focus {
    border-color: var(--accent-blue);
    box-shadow: 
        0 0 0 4px rgba(0, 168, 255, 0.2),
        0 0 20px rgba(0, 168, 255, 0.3),
        0 0 40px rgba(0, 168, 255, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.08);
    transform: translateY(-2px) scale(1.01);
    border-width: 2px;
}

#messageInput:focus::before {
    left: 100%;
}

#messageInput:hover:not(:focus) {
    border-color: rgba(0, 168, 255, 0.3);
    background: rgba(255, 255, 255, 0.05);
    transform: translateY(-1px);
}

.send-btn {
    background: linear-gradient(135deg, var(--accent-blue), var(--accent-blue-light));
    color: var(--text-primary);
    border: 2px solid rgba(0, 168, 255, 0.3);
    padding: 1rem;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    position: relative;
    overflow: hidden;
    box-shadow: 
        0 4px 15px rgba(0, 168, 255, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.send-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    transition: left 0.6s ease;
    left: -100%;
}

.send-btn::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.5), transparent);
    transition: all 0.6s ease;
    transform: translate(-50%, -50%);
}

.send-btn:hover {
    transform: scale(1.15) rotate(5deg);
    box-shadow: 
        0 8px 30px rgba(0, 168, 255, 0.5),
        0 0 0 3px rgba(0, 168, 255, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    border-color: var(--accent-blue-light);
    background: linear-gradient(135deg, var(--accent-blue-light), var(--accent-blue));
}

.send-btn:hover::before {
    left: 100%;
}

.send-btn:hover::after {
    width: 100px;
    height: 100px;
    opacity: 0;
}

.send-btn:active {
    transform: scale(1.1) rotate(-2deg);
    box-shadow: 
        0 4px 20px rgba(0, 168, 255, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

/* Settings Panel */
.settings-panel {
    position: fixed;
    top: 0;
    right: -400px;
    width: 400px;
    height: 100vh;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(20px);
    border-left: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: -8px 0 30px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.05);
    transition: var(--transition);
    z-index: 2000;
    overflow-y: auto;
}

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

.settings-panel::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 1px;
    height: 100%;
    background: linear-gradient(180deg, transparent, var(--accent-blue), transparent);
    animation: shimmer 3s ease-in-out infinite;
}

.settings-content {
    padding: 2rem;
}

.settings-content h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
}

.setting-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
    border-bottom: 1px solid var(--border-color);
}

.setting-item label {
    font-weight: 500;
    color: var(--text-primary);
}

.setting-item input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
}

.close-settings-btn {
    background: linear-gradient(135deg, var(--accent-blue), var(--accent-blue-light));
    color: var(--text-primary);
    border: 1px solid rgba(0, 168, 255, 0.3);
    padding: 1rem 1.5rem;
    border-radius: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    margin-top: 2rem;
    width: 100%;
    position: relative;
    overflow: hidden;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-size: 0.875rem;
}

.close-settings-btn::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: left 0.5s;
}

.close-settings-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 168, 255, 0.4), 0 0 0 1px rgba(0, 168, 255, 0.2);
    border-color: var(--accent-blue-light);
}

.close-settings-btn:hover::before {
    left: 100%;
}

.close-settings-btn:active {
    transform: translateY(-1px);
}

/* Utility Classes */
.hidden {
    display: none !important;
}

.fade-in {
    animation: fadeIn 0.3s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.slide-up {
    animation: slideUp 0.3s ease-out;
}

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

/* Responsive Design */
@media (max-width: 768px) {
    .conversations-list {
        width: 100%;
        position: fixed;
        left: -100%;
        z-index: 999;
        transition: var(--transition);
    }
    
    .conversations-list.active {
        left: 0;
    }
    
    .chat-area {
        width: 100%;
    }
    
    .message {
        max-width: 85%;
    }
    
    .settings-panel {
        width: 100%;
        right: -100%;
    }
    
    .header-content {
        padding: 1rem;
    }
    
    .message-input-container {
        padding: 1rem;
    }
    
    .auth-container {
        margin: 1rem;
        padding: 2rem;
    }
    
    .modal-content {
        margin: 1rem;
        padding: 1.5rem;
    }
    
    .auth-header h1 {
        font-size: 2rem;
    }
    
    .logo h1 {
        font-size: 1.25rem;
    }
    
    .conversation-item {
        padding: 0.875rem;
    }
    
    .message-content {
        padding: 0.75rem 1rem;
    }
}

@media (max-width: 480px) {
    .logo h1 {
        font-size: 1.125rem;
    }
    
    .conversations-header {
        padding: 0.75rem 1rem;
    }
    
    .chat-header {
        padding: 0.75rem 1rem;
    }
    
    .message {
        max-width: 90%;
    }
    
    .conversation-avatar {
        width: 40px;
        height: 40px;
    }
    
    .auth-container {
        margin: 0.5rem;
        padding: 1.5rem;
    }
    
    .modal-content {
        margin: 0.5rem;
        padding: 1.25rem;
    }
    
    .auth-header h1 {
        font-size: 1.75rem;
    }
    
    .message-input-container {
        padding: 0.75rem;
        gap: 0.5rem;
    }
    
    .icon-btn {
        padding: 0.5rem;
    }
    
    .send-btn {
        width: 44px;
        height: 44px;
        padding: 0.75rem;
    }
    
    #messageInput {
        padding: 0.875rem 1rem;
        font-size: 0.875rem;
    }
}

/* Dark Mode - Already dark by default */
body.light-mode {
    --primary-color: #ffffff;
    --secondary-color: #1a1a1a;
    --accent-color: #333333;
    --text-primary: #000000;
    --text-secondary: #666666;
    --border-color: #e0e0e0;
    --background: #ffffff;
    --surface: #f8f8f8;
    --shadow: rgba(0, 0, 0, 0.1);
    --message-sent: #000000;
    --message-received: #f5f5f5;
    --hover: #f0f0f0;
}

body.light-mode .header {
    background: rgba(255, 255, 255, 0.95);
}

body.light-mode .conversations-list {
    background: rgba(255, 255, 255, 0.9);
}

body.light-mode .chat-area {
    background: rgba(248, 248, 248, 0.9);
}

body.light-mode .chat-header {
    background: rgba(255, 255, 255, 0.95);
}

body.light-mode .message-input-container {
    background: rgba(255, 255, 255, 0.95);
}

body.light-mode .settings-panel {
    background: rgba(255, 255, 255, 0.95);
}

body.light-mode .auth-container,
body.light-mode .modal-content {
    background: rgba(255, 255, 255, 0.95);
}

body.light-mode .icon-btn {
    background: rgba(0, 0, 0, 0.05);
    color: var(--text-secondary);
}

body.light-mode .icon-btn:hover {
    background: rgba(0, 168, 255, 0.1);
    color: var(--accent-blue);
}

body.light-mode .conversation-item {
    background: rgba(0, 0, 0, 0.02);
    border-color: rgba(0, 0, 0, 0.05);
}

body.light-mode .conversation-item:hover {
    background: rgba(0, 168, 255, 0.05);
}

body.light-mode .message-content {
    background: rgba(0, 0, 0, 0.05);
    border-color: rgba(0, 0, 0, 0.1);
}

body.light-mode #messageInput {
    background: rgba(0, 0, 0, 0.05);
    color: var(--text-primary);
}

body.light-mode .conversation-avatar,
body.light-mode .message-avatar,
body.light-mode .chat-header .avatar {
    background: rgba(0, 0, 0, 0.05);
}

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

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

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, var(--accent-blue), var(--accent-blue-light));
    border-radius: 4px;
    border: 1px solid rgba(0, 168, 255, 0.2);
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, var(--accent-blue-light), var(--accent-blue));
    box-shadow: 0 0 10px rgba(0, 168, 255, 0.3);
}

/* Enhanced scrollbar for mobile */
@media (max-width: 768px) {
    ::-webkit-scrollbar {
        width: 4px;
    }
    
    ::-webkit-scrollbar-thumb {
        border: none;
    }
}

/* Button with Link */
.message-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: linear-gradient(135deg, var(--accent-blue), var(--accent-blue-light));
    color: var(--text-primary);
    padding: 0.625rem 1rem;
    border-radius: 0.75rem;
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 600;
    transition: var(--transition);
    margin-top: 0.5rem;
    border: 1px solid rgba(0, 168, 255, 0.3);
    position: relative;
    overflow: hidden;
}

.message-link::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: left 0.5s;
}

.message-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 168, 255, 0.4);
    border-color: var(--accent-blue-light);
}

.message-link:hover::before {
    left: 100%;
}

.message.sent .message-link {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0.7));
    color: var(--primary-color);
    border-color: rgba(255, 255, 255, 0.3);
}

/* Image in Message */
.message-image {
    max-width: 200px;
    border-radius: 1rem;
    margin-top: 0.5rem;
    cursor: pointer;
    transition: var(--transition);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.message-image:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 25px rgba(0, 168, 255, 0.3);
    border-color: var(--accent-blue);
}

/* Typing Indicator */
.typing-indicator {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.875rem 1.125rem;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 1rem;
    border-top-left-radius: 0.25rem;
    max-width: 70%;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.typing-dots {
    display: flex;
    gap: 0.375rem;
}

.typing-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--accent-blue);
    animation: typing 1.4s infinite ease-in-out;
    box-shadow: 0 0 10px rgba(0, 168, 255, 0.5);
}

.typing-dot:nth-child(1) { animation-delay: -0.32s; }
.typing-dot:nth-child(2) { animation-delay: -0.16s; }

@keyframes typing {
    0%, 80%, 100% {
        transform: scale(0.8);
        opacity: 0.5;
        box-shadow: 0 0 5px rgba(0, 168, 255, 0.3);
    }
    40% {
        transform: scale(1.2);
        opacity: 1;
        box-shadow: 0 0 15px rgba(0, 168, 255, 0.8);
    }
}/* Force cache refresh */
