        :root {
            --bg-dark: #050505;
            --ink: #FFFFFF;
            --ink-muted: #A0A0A0;
            --border: rgba(255, 255, 255, 0.2);
            --neon-green: #4bff4b;
            --radius: 4px;
        }

        * { box-sizing: border-box; margin: 0; padding: 0; }
        
        html, body { height: 100%; font-family: 'Poppins', sans-serif; background-color: var(--bg-dark); color: var(--ink); overflow: hidden; }

        .noselect { -webkit-touch-callout: none; -webkit-user-select: none; -khtml-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; }

        /* --- LOGIN STYLES --- */
        #login-view { position: absolute; inset: 0; z-index: 2000; display: flex; justify-content: center; align-items: center; background: var(--bg-dark); }
        .bg-wrap { position: absolute; inset: 0; z-index: -1; background: linear-gradient(rgba(0, 0, 0, 0.9), rgba(0, 0, 0, 0.9)), repeating-linear-gradient(0deg, rgba(255,255,255,0.03) 0, rgba(255,255,255,0.03) 1px, transparent 1px, transparent 50px), repeating-linear-gradient(90deg, rgba(255,255,255,0.03) 0, rgba(255,255,255,0.03) 1px, transparent 1px, transparent 50px); background-size: 50px 50px; animation: bg-zoom 20s infinite alternate linear; }
        @keyframes bg-zoom { from { background-position: 0 0; } to { background-position: 50px 50px; } }
        .login-container { width: 100%; max-width: 420px; padding: 20px; position: relative; z-index: 2; }
        .main-title { font-family: 'Orbitron', sans-serif; font-size: clamp(2rem, 6vw, 3rem); font-weight: 900; text-align: center; margin-bottom: 2rem; animation: title-pulse 2s infinite alternate; letter-spacing: 0.1em; text-shadow: 0 0 15px rgba(255,255,255,0.1); }
        @keyframes title-pulse { from { opacity: 0.8; transform: scale(1); } to { opacity: 1; transform: scale(1.02); } }
        .form-card { background: rgba(20, 20, 20, 0.95); border: 1px solid var(--border); padding: 30px; border-radius: var(--radius); box-shadow: 0 0 40px rgba(0,0,0,0.8); backdrop-filter: blur(10px); }
        .auth-tabs { display: flex; margin-bottom: 25px; border-bottom: 1px dashed var(--ink-muted); }
        .auth-tab { flex: 1; padding: 12px; background: transparent; border: none; color: var(--ink-muted); font-family: 'Orbitron'; font-weight: 700; text-transform: uppercase; cursor: pointer; transition: all 0.3s; border-bottom: 2px solid transparent; margin-bottom: -1px; }
        .auth-tab.active, .auth-tab:hover { color: var(--ink); border-bottom-color: var(--ink); }
        .auth-form { display: none; }
        .auth-form.active { display: block; animation: fadeIn 0.4s ease; }
        @keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
        .form-group { margin-bottom: 18px; }
        .form-group label { display: block; color: var(--ink-muted); font-size: 0.8rem; margin-bottom: 6px; }
        .form-group input { width: 100%; padding: 12px 14px; background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.1); border-radius: var(--radius); color: #fff; font-family: 'Poppins'; transition: 0.3s; }
        .form-group input:focus { outline: none; border-color: var(--ink); background: rgba(255,255,255,0.1); }
        .checkbox-group { display: flex; align-items: center; gap: 10px; margin: 18px 0; cursor: pointer; }
        .checkbox-group input { width: 16px; height: 16px; cursor: pointer; accent-color: var(--ink); }
        .checkbox-group label { color: var(--ink-muted); font-size: 0.8rem; cursor: pointer; }
        .submit-btn { width: 100%; padding: 14px; background: var(--ink); color: #000; border: none; border-radius: var(--radius); font-family: 'Orbitron'; font-weight: 900; text-transform: uppercase; cursor: pointer; transition: 0.3s; }
        .submit-btn:hover { background: #ddd; transform: translateY(-2px); }
        .submit-btn:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }
        .forgot-link { display: block; text-align: center; margin-top: 15px; color: var(--ink-muted); font-size: 0.8rem; text-decoration: none; }
        .forgot-link:hover { color: #fff; }
        .message { padding: 10px; margin-bottom: 15px; border-radius: var(--radius); font-size: 0.85rem; font-weight: 600; display: none; text-align: center; }
        .message.error { display: block; background: rgba(255, 68, 68, 0.2); border: 1px solid #ff4444; color: #ff4444; }
        .message.success { display: block; background: rgba(75, 255, 75, 0.2); border: 1px solid #4bff4b; color: #4bff4b; }

        /* --- APP VIEW STYLES --- */
        #app-view { display: none; flex-direction: column; width: 100%; height: 100%; position: relative; z-index: 10; }
        .main-header { height: 60px; padding: 0 15px; border-bottom: 1px solid var(--border); display: flex; justify-content: space-between; align-items: center; background: rgba(0,0,0,0.9); backdrop-filter: blur(10px); z-index: 100; flex-shrink: 0; }
        .user-profile-side { display: flex; align-items: center; gap: 10px; }
        .profile-icon { width: 28px; height: 28px; background: #fff; color: #000; display: flex; align-items: center; justify-content: center; border-radius: 5px; font-weight: bold; font-family: 'Orbitron'; font-size: 0.7rem; }
        .container { height: calc(100% - 60px); display: flex; position: relative; width: 100%; overflow: hidden; }
        .social-wrapper { display: flex; width: 100%; height: 100%; position: relative; }
        .social-sidebar { width: 350px; background: #0a0a0a; border-right: 1px solid var(--border); padding: 15px; display: flex; flex-direction: column; overflow-y: auto; flex-shrink: 0; transition: all 0.3s ease; }
        .chat-container { flex-grow: 1; background: #000; display: flex; flex-direction: column; position: relative; height: 100%; }
        .section-title { font-family: 'Orbitron'; font-size: 0.6rem; color: #555; margin: 20px 0 10px; text-transform: uppercase; letter-spacing: 1.5px; }
        
        .search-input { width: 100%; background: rgba(255,255,255,0.05); border: 1px solid var(--border); padding: 10px; color: #fff; font-family: 'Orbitron'; margin-bottom: 15px; outline: none; font-size: 0.75rem; border-radius: 4px; }
        
        .user-card { display: flex; justify-content: space-between; align-items: center; padding: 12px; background: rgba(255,255,255,0.02); margin-bottom: 5px; border-radius: 4px; transition: 0.2s; }
        .user-card:hover { background: rgba(255,255,255,0.08); }
        .user-info-click { flex-grow: 1; cursor: pointer; display:flex; align-items:center; justify-content: space-between; }
        
        .btn-action { background: none; border: 1px solid #444; color: #fff; padding: 4px 8px; font-family: 'Orbitron'; font-size: 0.55rem; cursor: pointer; border-radius: 2px; }
        
        .btn-icon-logout { background: transparent; border: none; color: #fff; font-size: 1.2rem; cursor: pointer; padding: 8px; transition: 0.3s; display: flex; align-items: center; justify-content: center; }
        .btn-icon-logout:hover { color: #ff4444; transform: scale(1.1); }

        /* Notification Enable Button */
        .btn-notif { background: transparent; border: 1px solid #4bff4b; color: #4bff4b; font-size: 1rem; cursor: pointer; padding: 8px 12px; margin-right: 10px; border-radius: 4px; transition: 0.3s; display: flex; align-items: center; gap: 6px; }
        .btn-notif:hover { background: rgba(75, 255, 75, 0.1); }
        .btn-notif.enabled { border-color: #4bff4b; color: #4bff4b; }
        .btn-notif.denied { border-color: #ff4444; color: #ff4444; }
        .btn-notif.unsupported { border-color: #666; color: #666; }
        .btn-notif i { font-size: 0.9rem; }

        /* --- CHAT HEADER --- */
        #chat-target-name { height: 50px; display: flex; justify-content: space-between; align-items: center; padding: 0 15px; background: rgba(255,255,255,0.03); font-family: 'Orbitron'; font-size: 0.75rem; border-bottom: 1px solid var(--border); flex-shrink: 0; }
        .chat-header-title { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-right: 10px; }
        .chat-header-actions { display: none; flex-shrink: 0; gap: 5px; }
        .btn-header-icon { background: transparent; border: 1px solid transparent; color: #fff; font-size: 0.9rem; cursor: pointer; padding: 6px; border-radius: 4px; transition: 0.3s; }
        .btn-header-icon:hover { background: rgba(255,255,255,0.1); }

        #chat-messages { flex-grow: 1; overflow-y: auto; padding: 15px; display: flex; flex-direction: column; gap: 10px; }
        
        .message-wrapper { display: flex; align-items: center; gap: 8px; max-width: 80%; }
        .message-wrapper.sent { align-self: flex-end; flex-direction: row-reverse; }
        .message-wrapper.received { align-self: flex-start; }

        .message-bubble { padding: 10px 14px; font-size: 0.85rem; border-radius: 4px; line-height: 1.4; word-wrap: break-word; word-break: break-word; overflow-wrap: break-word; max-width: 100%; position: relative; cursor: pointer; transition: transform 0.1s; }
        .message-bubble:active { transform: scale(0.98); }
        .message-bubble.sent { background: #fff; color: #000; }
        .message-bubble.received { background: rgba(255,255,255,0.1); border: 1px solid var(--border); color: #fff; }

        .msg-options-pc { display: flex; gap: 5px; opacity: 0; transition: opacity 0.2s; }
        .message-wrapper:hover .msg-options-pc { opacity: 1; }
        .btn-msg-icon { color: #555; cursor: pointer; font-size: 0.8rem; padding: 4px; transition: 0.2s; }
        .btn-msg-icon:hover { color: #fff; transform: scale(1.1); }
        .btn-msg-icon.delete:hover { color: #ff4444; }

        .chat-input-wrapper { padding: 10px; background: #0a0a0a; border-top: 1px solid var(--border); display: flex; gap: 10px; }
        #msg-input { flex-grow: 1; background: rgba(255,255,255,0.05); border: 1px solid var(--border); color: #fff; padding: 12px; border-radius: 4px; outline: none; }
        .btn-send { background: #fff; border: none; padding: 0 20px; font-family: 'Orbitron'; font-weight: 900; font-size: 0.7rem; cursor: pointer; border-radius: 4px; }
        .mobile-back { display: none; background: none; border: none; color: #fff; font-size: 1.2rem; cursor: pointer; padding-right: 15px; }
        
        #toast-container { position: fixed; top: 70px; left: 50%; transform: translateX(-50%); z-index: 9999; width: 90%; max-width: 300px; }
        .toast { background: #fff; color: #000; padding: 10px 20px; border-radius: 4px; font-family: 'Orbitron'; font-size: 0.65rem; font-weight: 900; margin-bottom: 5px; text-align: center; box-shadow: 0 5px 15px rgba(0,0,0,0.5); }

        .unread-badge { width: 8px; height: 8px; background: #fff; border-radius: 50%; display: inline-block; margin-right: 10px; box-shadow: 0 0 5px rgba(255,255,255,0.8); animation: pulse 2s infinite; }
        @keyframes pulse { 0% { opacity: 0.7; transform: scale(1); } 50% { opacity: 1; transform: scale(1.2); } 100% { opacity: 0.7; transform: scale(1); } }

        .modal-overlay { position: fixed; inset: 0; z-index: 10000; background: rgba(0,0,0,0.8); backdrop-filter: blur(5px); display: flex; justify-content: center; align-items: center; opacity: 0; pointer-events: none; transition: 0.3s; }
        .modal-overlay.open { opacity: 1; pointer-events: all; }
        .modal-box { background: #111; border: 1px solid #333; padding: 25px; border-radius: 12px; width: 90%; max-width: 320px; text-align: center; box-shadow: 0 10px 30px rgba(0,0,0,0.5); transform: scale(0.9); transition: 0.3s; }
        .modal-overlay.open .modal-box { transform: scale(1); }
        .modal-text { font-size: 0.9rem; margin-bottom: 20px; color: #ddd; line-height: 1.5; }
        .modal-input { width: 100%; padding: 10px; background: #222; border: 1px solid #444; color: #fff; margin-bottom: 20px; border-radius: 4px; outline: none; }
        .modal-buttons { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
        .btn-modal { padding: 8px 20px; border-radius: 4px; border: none; font-family: 'Orbitron'; font-size: 0.7rem; cursor: pointer; flex: 1; }
        .btn-modal-cancel { background: transparent; border: 1px solid #555; color: #aaa; }
        .btn-modal-confirm { background: #fff; color: #000; font-weight: bold; }
        .btn-modal-delete { background: #330000; color: #ff4444; border: 1px solid #ff4444; }
        .btn-modal-copy { background: #003300; color: #4bff4b; border: 1px solid #4bff4b; }

        @media (max-width: 768px) {
            .social-sidebar { width: 100%; position: absolute; left: 0; top: 0; height: 100%; z-index: 10; }
            .chat-container { width: 100%; position: absolute; left: 100%; top: 0; height: 100%; z-index: 20; transition: left 0.3s ease; }
            body.chat-open .chat-container { left: 0; }
            body.chat-open .mobile-back { display: block; }
            .msg-options-pc { display: none; } 
            .btn-notif span { display: none; }
        }
        ::-webkit-scrollbar { width: 4px; }
        ::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.2); }