
body{
    margin: 0;
    padding: 0;
    font-family: 'Poppins', sans-serif;
    background: linear-gradient(135deg, #1a1a1a 0%, #0a0a0a 100%);
    min-height: 100vh;
    color: #e0e0e0;
}

#chat-container {
    max-width: 1200px;
    margin: 2rem auto;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 25px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3); 
    backdrop-filter: blur(10px);
    height: calc(100vh - 4rem);
    display: flex;
    flex-direction: column;
}

#messages {
    flex: 1;
    padding: 2rem;
    overflow-y: auto;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.message {
    margin: 1rem 0;
    padding: 1.2rem;
    border-radius: 15px;
    max-width: 70%;
    position: relative;
    transition: transform 0.2s ease;
}

.message:hover {
    transform: translateY(-2px);
}

.message.sent {
    background: linear-gradient(135deg, #6366f1 0%, #a855f7 100%);
    margin-left: auto;
    color: white;
}

.message.received {
    background: rgba(255, 255, 255, 0.05);
    margin-right: auto;
    color: #e0e0e0;
}

.message.received::before {
    content: '';
    position: absolute;
    left: -15px;
    top: 10px;
    width: 10px;
    height: 10px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
}

.message-meta {
    font-size: 0.8rem;
    opacity: 0.7;
    margin-top: 0.5rem;
}

#input-container {
    display: flex;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 0 0 25px 25px;
}

#message-input {
    flex: 1;
    padding: 1.2rem 1.5rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    color: #e0e0e0;
    margin-right: 1rem;
    font-size: 1rem;
    transition: all 0.2s ease;
}

#message-input:focus {
    outline: none;
    border-color: #6366f1;
    background: rgba(255, 255, 255, 0.1);
}

#button {
    padding: 0.8rem 2rem;
    background: linear-gradient(135deg, #6366f1 0%, #a855f7 100%);
    border: none;
    border-radius: 20px;
    color: white;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.2s ease;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

#button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(99, 102, 241, 0.4);
}

/* three-dot menu */

.message-options {
    position: absolute;
    top: 10px;
    right: 10px;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.2s ease;
}

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

.options-menu {
    position: absolute;
    top: 30px;
    right: 0;
    background: #1e293b;
    border-radius: 12px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
    display: none;
    flex-direction: column;
    min-width: 180px;
    z-index: 100;
    overflow: hidden;
}
.options-menu.show {
    display: flex;
}

.option-item {
    padding: 0.6rem 1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    transition: all 0.2s ease;
    white-space: nowrap;
}
.option-item:hover {
    background: #334155;
}
.option-item:hover {
    background: #334155;
}

.option-item i {
    font-size: 1.1rem;
}

.option-item.danger {
    color: #dc2626;
}

.option-item.success {
    color: #a35ce2;
}
.message-content > .option-item.success{
    background: linear-gradient(135deg, #223cc5 0%, #a31676 100%);
            color: white;
            border: none;
            padding: 8px 20px;
            border-radius: 20px;
            cursor: pointer;
            font-weight: 500;
            transition: all 0.3s ease;
            box-shadow: 0 2px 6px rgba(34, 197, 94, 0.3);
            margin-top: 10px;
}

.edit-input {
    background: rgba(33 25 42 / 48%);
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 0.5rem;
    border-radius: 8px;
    margin-top: 0.5rem;
    color: #ffffff;
    width: 100%;
}


/* Responsive styles */
@media (max-width: 768px) {
    #chat-container {
        margin: 1rem;
        height: calc(100vh - 2rem);
        border-radius: 15px;
    }
    
    #message-input {
        padding: 1rem;
    }

    #home-body > form{
        display: flex;
        flex-direction: column;
        gap: 10px;
        height: 100vh;
        align-items: center;
        justify-content: center;
    }
}



/* home.ejs */

#home-body > form{
    display: flex;
    height: 100vh;
    align-items: center;
    justify-content: center;
}



#home-form > input{
    padding: 1.2rem 1.5rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    color: #e0e0e0;
    margin-right: 1rem;
    font-size: 1rem;
    transition: all 0.2s ease;
}

#home-form > input:focus {
    outline: none;
    border-color: #6366f1;
    background: rgba(255, 255, 255, 0.1);
}
