* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Arial, sans-serif;
    background: white;
    color: rgb(0, 0, 0);
    height: 100vh;
    overflow: hidden;
}

/* Screen Management */
.screen {
    display: none;
    height: 100vh;
}

.screen.active {
    display: block;
}

/* Login Screen */
.login-container {
    padding: 30px 20px;
    height: 100vh;
    overflow-y: auto;
    background: linear-gradient(135deg, #ffeefc 0%, #ffd9f9 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.login-container h1 {
    font-size: 2.5em;
    margin-bottom: 10px;
    background: linear-gradient(45deg, #ffd6f8, #ffb6f3);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.subtitle {
    color: #aaa;
    margin-bottom: 30px;
    font-size: 0.9em;
}

/* INSTALL CONTAINER - VISIBLE */
.install-container {
    width: 100%;
    max-width: 400px;
    margin: 0 auto 30px;
    padding: 20px;
    background: rgba(255, 145, 255, 0.1);
    border: 2px dashed rgba(253, 183, 255, 0.5);
    border-radius: 15px;
    display: block; /* VISIBLE */
}

.install-btn {
    display: block;
    width: 100%;
    background: linear-gradient(135deg, #ffc3f5, #ffb6f3);
    color: rgb(26, 26, 26);
    border: none;
    padding: 15px 30px;
    border-radius: 50px;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    margin: 0 auto 10px;
    box-shadow: 0 4px 15px rgba(255, 168, 229, 0.4);
    transition: all 0.3s;
}

.install-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(255, 205, 248, 0.6);
}

.install-note {
    color: #aaa;
    font-size: 12px;
    margin: 0;
}

/* Login Form */
.login-form {
    width: 100%;
    max-width: 400px;
}

.login-form input {
    width: 100%;
    padding: 15px;
    margin: 10px 0;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 10px;
    color: rgb(39, 39, 39);
    font-size: 16px;
}

.login-form input:focus {
    outline: none;
    border-color: #ffd1f7;
}

.user-buttons {
    margin: 20px 0;
}

.user-btn {
    width: 100%;
    padding: 15px;
    margin: 8px 0;
    background: rgba(125, 132, 163, 0.1);
    border: 1px solid rgba(102, 126, 234, 0.3);
    border-radius: 10px;
    color: rgb(37, 37, 37);
    text-align: center;
    cursor: pointer;
    font-size: 14px;
}

.user-btn:hover {
    background: rgba(102, 126, 234, 0.2);
}

.login-btn {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, #ffc9f6, #ffc6f6);
    color: rgb(54, 54, 54);
    border: none;
    border-radius: 10px;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    margin: 20px 0;
}

.login-btn:hover {
    transform: translateY(-2px);
}

/* Chat Screen */
.chat-header {
    background: rgba(241, 241, 241, 0.95);
    padding: 15px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.back-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    padding: 8px 15px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
}

.user-info {
    text-align: center;
}

.user-info h2 {
    font-size: 18px;
    margin-bottom: 5px;
}

#current-user-email {
    color: #aaa;
    font-size: 12px;
}

.chat-main {
    height: calc(100vh - 70px);
    display: flex;
    flex-direction: column;
}

.messages-container {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    background: rgba(255, 255, 255, 0.7);
}

.message {
    margin-bottom: 15px;
    max-width: 80%;
    clear: both;
}

.my-message {
    float: right;
    background: linear-gradient(135deg, #ffd1f7, #ffd1f7);
    color: rgb(34, 34, 34);
    padding: 12px 16px;
    border-radius: 18px 18px 0 18px;
}

.other-message {
    float: left;
    background: rgba(255, 255, 255, 0.1);
    color: rgb(32, 32, 32);
    padding: 12px 16px;
    border-radius: 18px 18px 18px 0;
}

.message-img {
    max-width: 100%;
    max-height: 200px;
    border-radius: 10px;
    margin-top: 5px;
}

.message-info {
    font-size: 11px;
    opacity: 0.7;
    margin-top: 5px;
}

.message-input-area {
    background: rgba(255, 255, 255, 0.95);
    padding: 15px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.input-group {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
}

#message-input {
    flex: 1;
    padding: 12px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    color: rgb(12, 12, 12);
    font-size: 16px;
}

#send-btn {
    background: #ffccf6;
    color: rgb(34, 34, 34);
    border: none;
    padding: 0 20px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
}

.image-group {
    text-align: center;
}

.img-btn {
    background: rgba(162, 75, 150, 0.2);
    color: rgb(34, 34, 34);
    border: 1px solid rgba(162, 75, 147, 0.5);
    padding: 10px 15px;
    border-radius: 8px;
    cursor: pointer;
    width: 100%;
    font-size: 14px;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 3px;
}

/* Tambahkan di akhir file CSS Anda */

/* ===== STYLING FITUR TRANSPARANSI BARU ===== */

/* Online Status di Header */
.online-status {
    font-size: 12px;
    color: #4CAF50;
    margin-top: 5px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.online-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    background: #4CAF50;
    border-radius: 50%;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.5; }
    100% { opacity: 1; }
}

/* Typing Indicator */
.typing-indicator {
    clear: both;
    margin: 10px;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.1);
    color: #666;
    border-radius: 18px;
    display: inline-block;
    max-width: 80%;
    float: left;
}

.typing-dots {
    display: inline-block;
}

.typing-dots::after {
    content: '...';
    animation: dots 1.5s infinite;
}

@keyframes dots {
    0%, 20% { content: '.'; }
    40% { content: '..'; }
    60%, 100% { content: '...'; }
}

/* Message Status (Read Receipt) */
.message-status {
    font-size: 11px;
    opacity: 0.7;
    margin-top: 3px;
    text-align: right;
    float: right;
    clear: both;
}

.message-status.read {
    color: #4CAF50;
    font-weight: bold;
}

/* Message Text Styling */
.message-text {
    word-wrap: break-word;
    margin-bottom: 5px;
}

/* Last Seen Indicator */
.last-seen {
    font-size: 11px;
    color: #aaa;
    text-align: center;
    margin: 5px 0;
    padding: 5px;
}

/* Message Time with Status */
.message-time {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 3px;
}

/* Online Users List (optional) */
.online-users {
    position: fixed;
    top: 70px;
    right: 10px;
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 10px;
    padding: 10px;
    max-width: 200px;
    display: none;
    z-index: 100;
}

.online-users.active {
    display: block;
}

.online-user {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 5px 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.online-user:last-child {
    border-bottom: none;
}

/* Status Badge */
.status-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 10px;
    margin-left: 5px;
}

.status-online {
    background: #4CAF50;
    color: white;
}

.status-offline {
    background: #ccc;
    color: #666;
}

/* Message Status Icons */
.status-icon {
    font-size: 12px;
    margin-left: 5px;
}

/* Message Options */
.message-options {
    position: absolute;
    top: 5px;
    right: 5px;
    opacity: 0;
    transition: opacity 0.3s;
}

.message:hover .message-options {
    opacity: 1;
}

/* Responsive */
@media (max-width: 768px) {
    .online-status {
        font-size: 10px;
    }
    
    .typing-indicator {
        font-size: 14px;
    }
}