/* Same styling as your index.php portfolio */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #0a0a0a 0%, #1a1a2e 100%);
    color: #fff;
    overflow-x: hidden;
    min-height: 100vh;
}

/* Glassmorphism Navbar (Same as index.php) */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(10, 10, 10, 0.8);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    z-index: 1000;
    padding: 1rem 0;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: bold;
    background: linear-gradient(135deg, #00d4ff, #00ff88);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.nav-links {
    display: flex;
    gap: 2rem;
    list-style: none;
}

.nav-links a {
    color: #fff;
    text-decoration: none;
    transition: all 0.3s ease;
    font-weight: 500;
    cursor: pointer;
}

.nav-links a:hover {
    color: #00d4ff;
    transform: translateY(-2px);
}

/* Hero Section for Chat */
.chat-hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 6rem 2rem 4rem;
    background: radial-gradient(circle at 30% 50%, rgba(0, 212, 255, 0.1) 0%, transparent 50%);
}

.chat-container {
    width: 100%;
    max-width: 1300px;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 80vh;
}

/* Auth Container */
.auth-container {
    width: 100%;
    max-width: 400px;
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 2rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
}

.auth-container h2 {
    font-size: 2rem;
    margin-bottom: 2rem;
    background: linear-gradient(135deg, #fff, #00d4ff);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.auth-container input {
    width: 100%;
    padding: 1rem;
    margin: 0.5rem 0;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    color: white;
    font-size: 1rem;
}

.auth-container input:focus {
    outline: none;
    border-color: #00d4ff;
}

.auth-container button {
    width: 100%;
    padding: 1rem;
    margin-top: 1rem;
    background: linear-gradient(135deg, #00d4ff, #00ff88);
    color: #0a0a0a;
    border: none;
    border-radius: 50px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
}

.auth-container button:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(0, 212, 255, 0.3);
}

.switch-auth {
    margin-top: 1.5rem;
    color: #ccc;
}

.switch-auth span {
    color: #00d4ff;
    cursor: pointer;
}

/* Chat Layout */
.chat-layout {
    display: flex;
    height: 100%;
    width: 100%;
}

/* Sidebar */
.sidebar {
    width: 300px;
    background: rgba(0, 0, 0, 0.3);
    border-right: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    flex-direction: column;
}

.user-profile {
    padding: 1.5rem;
    text-align: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.user-avatar {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #00d4ff, #00ff88);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: bold;
    margin: 0 auto 0.5rem;
}

.user-name {
    font-size: 1.1rem;
    font-weight: bold;
}

.user-email {
    font-size: 0.8rem;
    color: #ccc;
}

.logout-btn {
    margin-top: 1rem;
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50px;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
}

.logout-btn:hover {
    background: rgba(239, 68, 68, 0.8);
}

.users-list {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
}

.user-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem;
    margin-bottom: 0.5rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.user-item:hover {
    background: rgba(0, 212, 255, 0.2);
    transform: translateX(5px);
}

.user-item.active {
    background: rgba(0, 212, 255, 0.3);
    border: 1px solid rgba(0, 212, 255, 0.5);
}

.user-avatar-small {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #00d4ff, #00ff88);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

.user-info {
    flex: 1;
}

.user-name-small {
    font-weight: 500;
}

.user-status {
    font-size: 0.7rem;
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.status-online {
    color: #00ff88;
}

.status-offline {
    color: #888;
}

/* Chat Area */
.chat-area {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.chat-header {
    padding: 1rem;
    background: rgba(0, 0, 0, 0.3);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.message {
    max-width: 70%;
    animation: fadeInUp 0.3s ease;
}

.message-sent {
    align-self: flex-end;
}

.message-sent .bubble {
    background: linear-gradient(135deg, #00d4ff, #00ff88);
    color: #0a0a0a;
    padding: 0.75rem 1rem;
    border-radius: 20px;
    border-bottom-right-radius: 5px;
}

.message-received {
    align-self: flex-start;
}

.message-received .bubble {
    background: rgba(255, 255, 255, 0.1);
    padding: 0.75rem 1rem;
    border-radius: 20px;
    border-bottom-left-radius: 5px;
}

.message-time {
    font-size: 0.7rem;
    opacity: 0.7;
    margin-top: 0.25rem;
}

.no-chat {
    text-align: center;
    color: #ccc;
    padding: 2rem;
}

/* Chat Input Area */
.chat-input-area {
    padding: 1rem;
    background: rgba(0, 0, 0, 0.3);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    gap: 0.5rem;
}

.chat-input-area input {
    flex: 1;
    padding: 0.75rem 1rem;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 25px;
    color: white;
}

.chat-input-area input:focus {
    outline: none;
    border-color: #00d4ff;
}

.chat-input-area button {
    padding: 0.75rem 1.5rem;
    background: linear-gradient(135deg, #00d4ff, #00ff88);
    border: none;
    border-radius: 25px;
    color: #0a0a0a;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
}

.chat-input-area button:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 212, 255, 0.3);
}

.attach-btn {
    padding: 0.75rem 1rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
}

.typing-indicator {
    padding: 0.5rem 1rem;
    font-size: 0.8rem;
    color: #00d4ff;
    font-style: italic;
}

/* File message */
.file-message {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(0, 0, 0, 0.3);
    padding: 0.5rem;
    border-radius: 10px;
    margin-top: 0.5rem;
}

.file-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.file-actions button {
    padding: 0.25rem 0.75rem;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    border-radius: 15px;
    color: white;
    cursor: pointer;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Footer */
footer {
    background: rgba(0, 0, 0, 0.5);
    text-align: center;
    padding: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* Responsive */
@media (max-width: 768px) {
    .sidebar {
        width: 80px;
    }
    .user-info, .user-name-small, .user-status span {
        display: none;
    }
    .chat-area {
        margin-left: 0;
    }
    .message {
        max-width: 85%;
    }
}

@media (max-width: 480px) {
    .chat-container {
        height: 90vh;
    }
    .message {
        max-width: 90%;
    }
}