/* General Styling */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #12121a;
    margin: 0;
    padding: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100dvh;
    overflow: hidden; 
}

/* Login Page Styling */
.login-body {
    background: linear-gradient(135deg, #1e1e2f, #2a2a40);
}
.login-box {
    background: #2b2b40;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    text-align: center;
    color: white;
    width: 90%;
    max-width: 380px;
    box-sizing: border-box;
}
.login-box h2 {
    margin-top: 0;
    margin-bottom: 25px;
    color: #00e676;
}
input {
    width: 100%;
    padding: 12px;
    margin: 10px 0;
    border: none;
    border-radius: 8px;
    background: #3e3e5c;
    color: white;
    outline: none;
    box-sizing: border-box;
}
input::placeholder { color: #aaa; }
.login-box button {
    width: 100%;
    margin-top: 15px;
    padding: 12px;
    background: #00e676;
    color: #1e1e2f;
    font-weight: bold;
    font-size: 16px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
}

/* Chat Page Styling (FULL SCREEN) */
.chat-container {
    width: 100%;
    height: 100dvh;
    max-width: 100%;
    background: #12121a;
    display: flex;
    flex-direction: column;
    margin: 0;
}

/* Header */
.header {
    background: #202030;
    color: white;
    padding: 15px 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #333;
    padding-top: env(safe-area-inset-top, 15px);
}
.user-info { display: flex; align-items: center; gap: 10px; }
.avatar { font-size: 20px; background: #3e3e5c; border-radius: 50%; padding: 5px 8px; }
.header h3 { margin: 0; font-size: 18px; color: #00e676; }
.header-actions { display: flex; align-items: center; gap: 8px; }

/* Header Buttons */
.clear-btn {
    background: #ffb74d;
    color: #12121a;
    border: none;
    padding: 6px 10px;
    border-radius: 6px;
    font-weight: bold;
    cursor: pointer;
    font-size: 12px;
}
.logout-btn {
    color: #ff5252;
    text-decoration: none;
    font-weight: bold;
    font-size: 12px;
    padding: 5px 10px;
    border: 1px solid #ff5252;
    border-radius: 6px;
}

/* Chat Box Area */
#chat-box {
    flex: 1;
    padding: 15px;
    overflow-y: auto;
    background: url('https://www.transparenttextures.com/patterns/cubes.png') #1e1e2f;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
#chat-box::-webkit-scrollbar { width: 5px; }
#chat-box::-webkit-scrollbar-thumb { background: #3e3e5c; border-radius: 10px; }

/* Message Bubbles */
.message {
    padding: 8px 12px;
    border-radius: 15px;
    max-width: 80%;
    word-wrap: break-word;
    font-size: 14px;
    line-height: 1.4;
    position: relative;
    color: white;
}
.my-message {
    background: #00e676;
    color: #0a2e18;
    align-self: flex-end;
    border-bottom-right-radius: 4px;
}
.other-message {
    background: #3e3e5c;
    align-self: flex-start;
    border-bottom-left-radius: 4px;
}
.sender-name { font-size: 11px; font-weight: bold; color: #00e676; margin-bottom: 4px; text-transform: capitalize; }

/* Media & Audio Player */
.chat-media { max-width: 100%; border-radius: 10px; margin-top: 5px; }
.audio-player { width: 220px; height: 40px; outline: none; }

/* Delete Button (Red Design) */
.delete-msg-btn {
    background: rgba(255, 82, 82, 0.15); 
    border: 1px solid rgba(255, 82, 82, 0.3); 
    color: #ff5252; 
    cursor: pointer;
    font-size: 12px;
    margin-left: 10px;
    float: right;
    padding: 4px 6px;
    border-radius: 6px;
    transition: 0.3s;
}
.delete-msg-btn:hover, .delete-msg-btn:active {
    background: #ff5252;
    color: white;
}

/* Mobile Input Area */
.input-area {
    display: flex;
    align-items: center;
    padding: 10px 12px;
    background: #202030;
    gap: 8px;
    padding-bottom: env(safe-area-inset-bottom, 12px);
}
.input-area input[type="text"] {
    flex: 1;
    margin: 0;
    padding: 10px 15px;
    border: none;
    border-radius: 20px;
    background: #3e3e5c;
    color: white;
    font-size: 14px;
    outline: none;
}
.attachment-btn { font-size: 20px; cursor: pointer; color: #aaa; padding: 5px; }

/* Mic Button with Animation */
.mic-btn {
    background: transparent;
    border: none;
    font-size: 20px;
    cursor: pointer;
    color: #aaa;
    transition: 0.3s;
    padding: 5px;
}
.mic-btn.recording {
    color: #ff5252;
    animation: pulse-red 1s infinite;
}
@keyframes pulse-red {
    0% { transform: scale(1); }
    50% { transform: scale(1.3); }
    100% { transform: scale(1); }
}

.send-btn {
    background: #00e676;
    color: #12121a;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    font-size: 16px;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
}/* General Styling */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #12121a;
    margin: 0;
    padding: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100dvh;
    overflow: hidden; 
}

/* Login Page Styling */
.login-body {
    background: linear-gradient(135deg, #1e1e2f, #2a2a40);
}
.login-box {
    background: #2b2b40;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    text-align: center;
    color: white;
    width: 90%;
    max-width: 380px;
    box-sizing: border-box;
}
.login-box h2 {
    margin-top: 0;
    margin-bottom: 25px;
    color: #00e676;
}
input {
    width: 100%;
    padding: 12px;
    margin: 10px 0;
    border: none;
    border-radius: 8px;
    background: #3e3e5c;
    color: white;
    outline: none;
    box-sizing: border-box;
}
input::placeholder { color: #aaa; }
.login-box button {
    width: 100%;
    margin-top: 15px;
    padding: 12px;
    background: #00e676;
    color: #1e1e2f;
    font-weight: bold;
    font-size: 16px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
}

/* Chat Page Styling (FULL SCREEN) */
.chat-container {
    width: 100%;
    height: 100dvh;
    max-width: 100%;
    background: #12121a;
    display: flex;
    flex-direction: column;
    margin: 0;
}

/* Header */
.header {
    background: #202030;
    color: white;
    padding: 15px 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #333;
    padding-top: env(safe-area-inset-top, 15px);
}
.user-info { display: flex; align-items: center; gap: 10px; }
.avatar { font-size: 20px; background: #3e3e5c; border-radius: 50%; padding: 5px 8px; }
.header h3 { margin: 0; font-size: 18px; color: #00e676; }
.header-actions { display: flex; align-items: center; gap: 8px; }

/* Header Buttons */
.clear-btn {
    background: #ffb74d;
    color: #12121a;
    border: none;
    padding: 6px 10px;
    border-radius: 6px;
    font-weight: bold;
    cursor: pointer;
    font-size: 12px;
}
.logout-btn {
    color: #ff5252;
    text-decoration: none;
    font-weight: bold;
    font-size: 12px;
    padding: 5px 10px;
    border: 1px solid #ff5252;
    border-radius: 6px;
}

/* Chat Box Area */
#chat-box {
    flex: 1;
    padding: 15px;
    overflow-y: auto;
    background: url('https://www.transparenttextures.com/patterns/cubes.png') #1e1e2f;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
#chat-box::-webkit-scrollbar { width: 5px; }
#chat-box::-webkit-scrollbar-thumb { background: #3e3e5c; border-radius: 10px; }

/* Message Bubbles */
.message {
    padding: 8px 12px;
    border-radius: 15px;
    max-width: 80%;
    word-wrap: break-word;
    font-size: 14px;
    line-height: 1.4;
    position: relative;
    color: white;
}
.my-message {
    background: #00e676;
    color: #0a2e18;
    align-self: flex-end;
    border-bottom-right-radius: 4px;
}
.other-message {
    background: #3e3e5c;
    align-self: flex-start;
    border-bottom-left-radius: 4px;
}
.sender-name { font-size: 11px; font-weight: bold; color: #00e676; margin-bottom: 4px; text-transform: capitalize; }

/* Media & Audio Player */
.chat-media { max-width: 100%; border-radius: 10px; margin-top: 5px; }
.audio-player { width: 220px; height: 40px; outline: none; }

/* Delete Button (Red Design) */
.delete-msg-btn {
    background: rgba(255, 82, 82, 0.15); 
    border: 1px solid rgba(255, 82, 82, 0.3); 
    color: #ff5252; 
    cursor: pointer;
    font-size: 12px;
    margin-left: 10px;
    float: right;
    padding: 4px 6px;
    border-radius: 6px;
    transition: 0.3s;
}
.delete-msg-btn:hover, .delete-msg-btn:active {
    background: #ff5252;
    color: white;
}

/* Mobile Input Area */
.input-area {
    display: flex;
    align-items: center;
    padding: 10px 12px;
    background: #202030;
    gap: 8px;
    padding-bottom: env(safe-area-inset-bottom, 12px);
}
.input-area input[type="text"] {
    flex: 1;
    margin: 0;
    padding: 10px 15px;
    border: none;
    border-radius: 20px;
    background: #3e3e5c;
    color: white;
    font-size: 14px;
    outline: none;
}
.attachment-btn { font-size: 20px; cursor: pointer; color: #aaa; padding: 5px; }

/* Mic Button with Animation */
.mic-btn {
    background: transparent;
    border: none;
    font-size: 20px;
    cursor: pointer;
    color: #aaa;
    transition: 0.3s;
    padding: 5px;
}
.mic-btn.recording {
    color: #ff5252;
    animation: pulse-red 1s infinite;
}
@keyframes pulse-red {
    0% { transform: scale(1); }
    50% { transform: scale(1.3); }
    100% { transform: scale(1); }
}

.send-btn {
    background: #00e676;
    color: #12121a;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    font-size: 16px;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
}/* General Styling */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #12121a;
    margin: 0;
    padding: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100dvh;
    overflow: hidden; 
}

/* Login Page Styling */
.login-body {
    background: linear-gradient(135deg, #1e1e2f, #2a2a40);
}
.login-box {
    background: #2b2b40;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    text-align: center;
    color: white;
    width: 90%;
    max-width: 380px;
    box-sizing: border-box;
}
.login-box h2 {
    margin-top: 0;
    margin-bottom: 25px;
    color: #00e676;
}
input {
    width: 100%;
    padding: 12px;
    margin: 10px 0;
    border: none;
    border-radius: 8px;
    background: #3e3e5c;
    color: white;
    outline: none;
    box-sizing: border-box;
}
input::placeholder { color: #aaa; }
.login-box button {
    width: 100%;
    margin-top: 15px;
    padding: 12px;
    background: #00e676;
    color: #1e1e2f;
    font-weight: bold;
    font-size: 16px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
}

/* Chat Page Styling (FULL SCREEN) */
.chat-container {
    width: 100%;
    height: 100dvh;
    max-width: 100%;
    background: #12121a;
    display: flex;
    flex-direction: column;
    margin: 0;
}

/* Header */
.header {
    background: #202030;
    color: white;
    padding: 15px 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #333;
    padding-top: env(safe-area-inset-top, 15px);
}
.user-info { display: flex; align-items: center; gap: 10px; }
.avatar { font-size: 20px; background: #3e3e5c; border-radius: 50%; padding: 5px 8px; }
.header h3 { margin: 0; font-size: 18px; color: #00e676; }
.header-actions { display: flex; align-items: center; gap: 8px; }

/* Header Buttons */
.clear-btn {
    background: #ffb74d;
    color: #12121a;
    border: none;
    padding: 6px 10px;
    border-radius: 6px;
    font-weight: bold;
    cursor: pointer;
    font-size: 12px;
}
.logout-btn {
    color: #ff5252;
    text-decoration: none;
    font-weight: bold;
    font-size: 12px;
    padding: 5px 10px;
    border: 1px solid #ff5252;
    border-radius: 6px;
}

/* Chat Box Area */
#chat-box {
    flex: 1;
    padding: 15px;
    overflow-y: auto;
    background: url('https://www.transparenttextures.com/patterns/cubes.png') #1e1e2f;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
#chat-box::-webkit-scrollbar { width: 5px; }
#chat-box::-webkit-scrollbar-thumb { background: #3e3e5c; border-radius: 10px; }

/* Message Bubbles */
.message {
    padding: 8px 12px;
    border-radius: 15px;
    max-width: 80%;
    word-wrap: break-word;
    font-size: 14px;
    line-height: 1.4;
    position: relative;
    color: white;
}
.my-message {
    background: #00e676;
    color: #0a2e18;
    align-self: flex-end;
    border-bottom-right-radius: 4px;
}
.other-message {
    background: #3e3e5c;
    align-self: flex-start;
    border-bottom-left-radius: 4px;
}
.sender-name { font-size: 11px; font-weight: bold; color: #00e676; margin-bottom: 4px; text-transform: capitalize; }

/* Media & Audio Player */
.chat-media { max-width: 100%; border-radius: 10px; margin-top: 5px; }
.audio-player { width: 220px; height: 40px; outline: none; }

/* Delete Button (Red Design) */
.delete-msg-btn {
    background: rgba(255, 82, 82, 0.15); 
    border: 1px solid rgba(255, 82, 82, 0.3); 
    color: #ff5252; 
    cursor: pointer;
    font-size: 12px;
    margin-left: 10px;
    float: right;
    padding: 4px 6px;
    border-radius: 6px;
    transition: 0.3s;
}
.delete-msg-btn:hover, .delete-msg-btn:active {
    background: #ff5252;
    color: white;
}

/* Mobile Input Area */
.input-area {
    display: flex;
    align-items: center;
    padding: 10px 12px;
    background: #202030;
    gap: 8px;
    padding-bottom: env(safe-area-inset-bottom, 12px);
}
.input-area input[type="text"] {
    flex: 1;
    margin: 0;
    padding: 10px 15px;
    border: none;
    border-radius: 20px;
    background: #3e3e5c;
    color: white;
    font-size: 14px;
    outline: none;
}
.attachment-btn { font-size: 20px; cursor: pointer; color: #aaa; padding: 5px; }

/* Mic Button with Animation */
.mic-btn {
    background: transparent;
    border: none;
    font-size: 20px;
    cursor: pointer;
    color: #aaa;
    transition: 0.3s;
    padding: 5px;
}
.mic-btn.recording {
    color: #ff5252;
    animation: pulse-red 1s infinite;
}
@keyframes pulse-red {
    0% { transform: scale(1); }
    50% { transform: scale(1.3); }
    100% { transform: scale(1); }
}

.send-btn {
    background: #00e676;
    color: #12121a;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    font-size: 16px;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
}