* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'SF Mono', 'Fira Code', 'Courier New', monospace;
    background: #0a0a0f;
    color: #e0e0e0;
    height: 100vh;
    overflow: hidden;
    position: relative;
}

/* Animated Background */
.background-grid {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        linear-gradient(rgba(0, 255, 136, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 255, 136, 0.03) 1px, transparent 1px);
    background-size: 50px 50px;
    pointer-events: none;
    z-index: 0;
    animation: gridMove 20s linear infinite;
}

@keyframes gridMove {
    0% { background-position: 0 0; }
    100% { background-position: 50px 50px; }
}

.particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 0;
}

.particle {
    position: absolute;
    width: 2px;
    height: 2px;
    background: #00ff88;
    border-radius: 50%;
    animation: float 15s infinite;
    opacity: 0.6;
}

@keyframes float {
    0%, 100% {
        transform: translateY(100vh) rotate(0deg);
        opacity: 0;
    }
    10% { opacity: 0.6; }
    90% { opacity: 0.6; }
    100% {
        transform: translateY(-100vh) rotate(720deg);
        opacity: 0;
    }
}

#app {
    width: 100%;
    height: 100%;
    position: relative;
    z-index: 1;
}

.screen {
    width: 100%;
    height: 100%;
}

.screen.entering {
    animation: screenIn 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes screenIn {
    0% { opacity: 0; transform: translateY(10px); }
    100% { opacity: 1; transform: translateY(0); }
}

.hidden {
    display: none !important;
}

.boot-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle at 50% 30%, rgba(0, 255, 136, 0.08), rgba(10, 10, 15, 0.96) 55%, rgba(10, 10, 15, 0.99) 100%);
    opacity: 1;
    transition: opacity 0.35s ease, transform 0.35s ease;
}

.boot-overlay.done {
    opacity: 0;
    transform: translateY(-6px);
    pointer-events: none;
}

.boot-box {
    width: min(760px, 92vw);
    border-radius: 18px;
    border: 1px solid rgba(0, 255, 136, 0.14);
    background: rgba(1, 4, 9, 0.92);
    box-shadow: 0 30px 90px rgba(0, 0, 0, 0.75);
    overflow: hidden;
}

.boot-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px;
    background: rgba(13, 17, 23, 0.9);
    border-bottom: 1px solid rgba(0, 255, 136, 0.12);
}

.boot-badge {
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: #00ff88;
}

.boot-state {
    font-size: 11px;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: rgba(201, 209, 217, 0.75);
}

.boot-lines {
    padding: 18px 18px 20px;
    min-height: 220px;
    font-size: 13px;
    line-height: 1.55;
    color: rgba(201, 209, 217, 0.88);
    white-space: pre-wrap;
}

.boot-lines .ok {
    color: #00ff88;
}

.boot-lines .warn {
    color: #ffbd2e;
}

.boot-lines .err {
    color: #ff5f56;
}

/* Auth Screen */
#auth-screen {
    display: flex;
    align-items: center;
    justify-content: center;
}

.terminal-card {
    background: linear-gradient(180deg, #0d1117 0%, #010409 100%);
    border: 1px solid rgba(0, 255, 136, 0.1);
    border-radius: 20px;
    padding: 0;
    max-width: 480px;
    width: 90%;
    box-shadow: 
        0 20px 60px rgba(0, 0, 0, 0.8),
        0 0 0 1px rgba(0, 255, 136, 0.05);
    overflow: hidden;
    animation: terminalSlide 0.8s ease-out;
    position: relative;
}

.card-header-glow {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #00ff88, #00cc6a, #00ff88);
    animation: glowLine 3s ease-in-out infinite;
}

@keyframes glowLine {
    0%, 100% { opacity: 0.8; }
    50% { opacity: 1; }
}

@keyframes terminalSlide {
    from {
        opacity: 0;
        transform: translateY(40px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.terminal-body {
    padding: 40px 32px 32px;
}

.logo-section {
    margin-bottom: 36px;
    text-align: center;
}

.glitch-logo {
    font-size: 56px;
    font-weight: 900;
    letter-spacing: -3px;
    position: relative;
    color: #00ff88;
    text-shadow: 
        0 0 10px rgba(0, 255, 136, 0.5),
        0 0 20px rgba(0, 255, 136, 0.3);
    animation: glitch 3s infinite;
}

@keyframes glitch {
    0%, 90%, 100% {
        transform: translate(0);
        text-shadow: 
            0 0 10px rgba(0, 255, 136, 0.5),
            0 0 20px rgba(0, 255, 136, 0.3);
    }
    92% {
        transform: translate(-2px, 2px);
        text-shadow: 
            2px 0 #ff00aa,
            -2px -2px #00ffff;
    }
    94% {
        transform: translate(2px, -2px);
        text-shadow: 
            -2px 0 #ff00aa,
            2px 2px #00ffff;
    }
    96% {
        transform: translate(-2px, -2px);
        text-shadow: 
            2px 0 #ff00aa,
            -2px 2px #00ffff;
    }
}

.subtitle {
    color: #8b949e;
    font-size: 13px;
    margin-top: 8px;
    letter-spacing: 2px;
}

.prompt-line {
    color: #00ff88;
    font-size: 13px;
    margin-bottom: 24px;
    text-align: center;
    letter-spacing: 1px;
    opacity: 0.8;
}

.form-section {
    width: 100%;
}

.input-container {
    margin-bottom: 20px;
    position: relative;
}

.input-container::before {
    content: '$ ';
    position: absolute;
    left: 18px;
    top: 50%;
    transform: translateY(-50%);
    color: #00ff88;
    font-size: 14px;
}

.input-container input {
    width: 100%;
    padding: 16px 18px 16px 40px;
    font-size: 14px;
    font-family: 'SF Mono', 'Fira Code', 'Courier New', monospace;
    background: #0d1117;
    border: 1px solid rgba(0, 255, 136, 0.2);
    border-radius: 10px;
    color: #c9d1d9;
    outline: none;
    transition: all 0.3s;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.input-container input::placeholder {
    color: #484f58;
    text-transform: uppercase;
}

.input-container input:focus {
    border-color: #00ff88;
    background: #010409;
    box-shadow: 0 0 30px rgba(0, 255, 136, 0.15);
}

.main-btn {
    width: 100%;
    padding: 18px 32px;
    font-size: 14px;
    font-weight: 700;
    font-family: 'SF Mono', 'Fira Code', 'Courier New', monospace;
    background: linear-gradient(135deg, #00ff88 0%, #00cc6a 100%);
    color: #0a0a0f;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-top: 12px;
    position: relative;
    overflow: hidden;
}

.main-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 32px rgba(0, 255, 136, 0.4);
}

.main-btn:active {
    transform: translateY(-1px);
}

.btn-glow {
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    animation: btnShine 2s infinite;
}

@keyframes btnShine {
    0% { left: -100%; }
    100% { left: 100%; }
}

.error-text {
    color: #ff5f56;
    margin-top: 20px;
    font-size: 13px;
    text-align: center;
}

/* Messenger Screen */
#messenger-screen {
    display: flex;
    background: transparent;
}

.messenger-container {
    display: flex;
    width: 100%;
    height: 100%;
    max-width: 1800px;
    margin: 0 auto;
    background: rgba(13, 17, 23, 0.95);
    backdrop-filter: blur(10px);
    position: relative;
}

.messenger-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, transparent 50%, rgba(0, 255, 136, 0.02) 50%);
    background-size: 100% 4px;
    pointer-events: none;
    z-index: 1000;
    animation: scanlines 0.6s linear infinite;
}

@keyframes scanlines {
    0% { background-position: 0 0; }
    100% { background-position: 0 4px; }
}

.sidebar {
    width: 360px;
    background: #0d1117;
    border-right: 1px solid rgba(0, 255, 136, 0.1);
    display: flex;
    flex-direction: column;
}

.sidebar-header-top {
    padding: 16px 24px;
    background: #161b22;
    border-bottom: 1px solid rgba(0, 255, 136, 0.1);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo-mini {
    font-size: 20px;
    font-weight: 900;
    color: #00ff88;
    text-shadow: 0 0 10px rgba(0, 255, 136, 0.4);
}

.status-indicator {
    display: flex;
    align-items: center;
    gap: 8px;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #00ff88;
    animation: statusPulse 2s ease-in-out infinite;
}

@keyframes statusPulse {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(0, 255, 136, 0.7);
    }
    50% {
        box-shadow: 0 0 0 8px rgba(0, 255, 136, 0);
    }
}

.status-text {
    font-size: 11px;
    font-weight: 700;
    color: #00ff88;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.sidebar-header {
    padding: 20px 24px;
    border-bottom: 1px solid rgba(0, 255, 136, 0.1);
    background: #0d1117;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 14px;
    flex: 1;
}

.avatar {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: linear-gradient(135deg, #00ff88 0%, #00cc6a 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: -0.5px;
    word-break: break-all;
    padding: 4px;
    color: #0a0a0f;
    box-shadow: 0 4px 12px rgba(0, 255, 136, 0.2);
    position: relative;
    animation: avatarGlow 3s ease-in-out infinite;
}

@keyframes avatarGlow {
    0%, 100% {
        box-shadow: 0 4px 12px rgba(0, 255, 136, 0.2);
    }
    50% {
        box-shadow: 0 0 24px rgba(0, 255, 136, 0.4);
    }
}

.user-details {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.user-name {
    font-size: 15px;
    font-weight: 700;
    color: #c9d1d9;
}

.user-status {
    font-size: 12px;
    color: #00ff88;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.user-status::before {
    content: '● ';
    font-size: 10px;
}

.logout-btn {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: rgba(255, 95, 86, 0.1);
    color: #ff5f56;
    border: 1px solid rgba(255, 95, 86, 0.2);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    flex-shrink: 0;
}

.logout-btn:hover {
    background: rgba(255, 95, 86, 0.2);
    border-color: #ff5f56;
    transform: scale(1.05);
}

.search-container {
    padding: 16px;
    border-bottom: 1px solid rgba(0, 255, 136, 0.1);
    background: #0d1117;
}

.search-box {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #010409;
    border: 1px solid rgba(0, 255, 136, 0.2);
    border-radius: 10px;
    padding: 12px 14px;
    transition: all 0.3s;
}

.search-box:focus-within {
    border-color: #00ff88;
    box-shadow: 0 0 30px rgba(0, 255, 136, 0.15);
}

.search-box input {
    flex: 1;
    background: transparent;
    border: none;
    color: #c9d1d9;
    font-size: 14px;
    font-family: 'SF Mono', 'Fira Code', 'Courier New', monospace;
    outline: none;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.search-box input::placeholder {
    color: #484f58;
    text-transform: uppercase;
}

.search-btn {
    background: linear-gradient(135deg, #00ff88 0%, #00cc6a 100%);
    color: #0a0a0f;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
    font-family: 'SF Mono', 'Fira Code', 'Courier New', monospace;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.search-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(0, 255, 136, 0.3);
}

.chat-list-container {
    flex: 1;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.list-header {
    padding: 18px 24px 14px;
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: #00ff88;
    display: flex;
    align-items: center;
    gap: 8px;
}

.list-header::before {
    content: '>';
    color: #00ff88;
    font-size: 14px;
}

.chat-list {
    flex: 1;
    overflow-y: auto;
}

.chat-list::-webkit-scrollbar {
    width: 6px;
}

.chat-list::-webkit-scrollbar-track {
    background: transparent;
}

.chat-list::-webkit-scrollbar-thumb {
    background: rgba(0, 255, 136, 0.3);
    border-radius: 3px;
}

.chat-item {
    padding: 16px 24px;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 14px;
    border-left: 3px solid transparent;
    position: relative;
    opacity: 0;
    transform: translateX(-10px);
    animation: chatItemAppear 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55) forwards;
}

@keyframes chatItemAppear {
    0% {
        opacity: 0;
        transform: translateX(-10px);
    }
    100% {
        opacity: 1;
        transform: translateX(0);
    }
}

.chat-item::before {
    content: '>';
    position: absolute;
    left: 8px;
    color: #00ff88;
    opacity: 0;
    transition: all 0.2s;
}

.chat-item:hover {
    background: #161b22;
    box-shadow: 0 0 20px rgba(0, 255, 136, 0.1);
}

.chat-item:hover::before {
    opacity: 1;
}

.chat-item.active {
    background: rgba(0, 255, 136, 0.08);
    border-left-color: #00ff88;
    box-shadow: 0 0 30px rgba(0, 255, 136, 0.15);
    animation: activeGlow 2s ease-in-out infinite;
}

@keyframes activeGlow {
    0%, 100% {
        box-shadow: 0 0 30px rgba(0, 255, 136, 0.15);
    }
    50% {
        box-shadow: 0 0 50px rgba(0, 255, 136, 0.25);
    }
}

.chat-item.active::before {
    opacity: 1;
}

.chat-item.new-message {
    animation: newMessagePulse 0.6s ease-out;
}

@keyframes newMessagePulse {
    0% {
        background: rgba(0, 255, 136, 0.15);
        transform: scale(1.02);
    }
    100% {
        background: transparent;
        transform: scale(1);
    }
}

.chat-avatar {
    width: 46px;
    height: 46px;
    border-radius: 10px;
    background: linear-gradient(135deg, #ff00aa 0%, #aa00ff 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: -0.5px;
    word-break: break-all;
    padding: 4px;
    color: #0a0a0f;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(255, 0, 170, 0.2);
}

.chat-item-name {
    font-weight: 600;
    font-size: 14px;
    color: #c9d1d9;
}

.delete-chat-btn {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: transparent;
    color: #484f58;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    flex-shrink: 0;
    opacity: 0;
}

.chat-item:hover .delete-chat-btn {
    opacity: 1;
}

.delete-chat-btn:hover {
    background: rgba(255, 95, 86, 0.1);
    color: #ff5f56;
}

.chat-area {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: #010409;
}

.chat-area-header-top {
    padding: 14px 28px;
    background: #0d1117;
    border-bottom: 1px solid rgba(0, 255, 136, 0.1);
}

.chat-glow-line {
    height: 4px;
    border-radius: 2px;
    background: linear-gradient(90deg, #00ff88, #00cc6a, #00ff88);
    animation: glowLine 3s ease-in-out infinite;
}

.chat-area-header {
    padding: 18px 28px;
    border-bottom: 1px solid rgba(0, 255, 136, 0.1);
    min-height: 72px;
    background: #0d1117;
    display: flex;
    align-items: center;
}

.empty-chat {
    width: 100%;
    text-align: center;
    padding: 40px 20px;
}

.empty-chat svg {
    opacity: 0.3;
}

.empty-chat p {
    color: #484f58;
    font-size: 13px;
    margin-top: 16px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.chat-header-content {
    display: flex;
    align-items: center;
    gap: 14px;
}

.chat-header-avatar {
    width: 42px;
    height: 42px;
    border-radius: 10px;
    background: linear-gradient(135deg, #00ff88 0%, #00cc6a 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 9px;
    font-weight: 800;
    letter-spacing: -0.5px;
    word-break: break-all;
    padding: 4px;
    color: #0a0a0f;
}

.chat-header-name {
    font-weight: 700;
    font-size: 15px;
    color: #c9d1d9;
}

.chat-header-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.chat-header-meta {
    display: flex;
    align-items: center;
    gap: 10px;
}

.crypto-status {
    font-size: 11px;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: #8b949e;
}

.crypto-status.on {
    color: #00ff88;
}

.crypto-btn {
    margin-left: auto;
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: rgba(0, 255, 136, 0.08);
    color: #00ff88;
    border: 1px solid rgba(0, 255, 136, 0.18);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    flex-shrink: 0;
}

.crypto-btn:hover {
    background: rgba(0, 255, 136, 0.14);
    border-color: rgba(0, 255, 136, 0.5);
    box-shadow: 0 0 22px rgba(0, 255, 136, 0.16);
    transform: scale(1.05);
}

.messages-container {
    flex: 1;
    padding: 24px 28px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    background-image: 
        radial-gradient(circle at 50% 50%, rgba(0, 255, 136, 0.02) 0%, transparent 50%);
}

.messages-container::-webkit-scrollbar {
    width: 6px;
}

.messages-container::-webkit-scrollbar-track {
    background: transparent;
}

.messages-container::-webkit-scrollbar-thumb {
    background: rgba(0, 255, 136, 0.3);
    border-radius: 3px;
}

.message {
    max-width: 52%;
    padding: 12px 16px;
    margin-bottom: 12px;
    font-size: 14px;
    line-height: 1.6;
    word-wrap: break-word;
    border-radius: 12px;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    position: relative;
    opacity: 0;
    transform: translateY(12px) scale(0.95);
    will-change: transform, opacity;
    animation: messageAppear 0.28s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.message.silent {
    opacity: 1;
    transform: none;
    animation: none;
}

.message-text {
    position: relative;
    z-index: 2;
    display: block;
}

@keyframes messageAppear {
    0% {
        opacity: 0;
        transform: translateY(12px) scale(0.95);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.message::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 12px;
    padding: 1px;
    background: linear-gradient(135deg, rgba(0, 255, 136, 0.6), transparent);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
    opacity: 0.55;
    z-index: 0;
}

.message.sent.tx::after {
    content: '010011 101001 001101 110010 010101 011010 001011 101001 110010 010101 011010';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 12px;
    padding: 12px 16px;
    font-family: 'SF Mono', 'Fira Code', 'Courier New', monospace;
    font-size: 11px;
    letter-spacing: 2px;
    line-height: 1.35;
    color: rgba(0, 255, 136, 0.92);
    background:
        radial-gradient(circle at 30% 20%, rgba(255, 255, 255, 0.16), transparent 55%),
        linear-gradient(90deg, transparent, rgba(0, 0, 0, 0.10), transparent),
        repeating-linear-gradient(90deg, rgba(0, 255, 136, 0) 0 9px, rgba(0, 255, 136, 0.08) 9px 10px);
    mix-blend-mode: screen;
    filter: blur(0.35px) drop-shadow(0 0 18px rgba(0, 255, 136, 0.20));
    opacity: 0;
    animation: txDigits 0.78s cubic-bezier(0.22, 1, 0.36, 1);
    pointer-events: none;
    z-index: 1;
}

@keyframes txDigits {
    0% {
        opacity: 0;
        transform: translateX(-18%) translateY(8%) scale(0.98);
    }
    18% {
        opacity: 0.9;
    }
    100% {
        opacity: 0;
        transform: translateX(22%) translateY(-10%) scale(1.05);
    }
}

.message.received.rx::after {
    content: 'v   v     v    v   v      v';
    position: absolute;
    inset: 0;
    border-radius: 12px;
    background:
        linear-gradient(180deg, transparent, rgba(0, 255, 136, 0.10), transparent),
        repeating-linear-gradient(180deg, rgba(0, 255, 136, 0) 0 9px, rgba(0, 255, 136, 0.06) 9px 10px);
    font-family: 'SF Mono', 'Fira Code', 'Courier New', monospace;
    font-size: 12px;
    letter-spacing: 10px;
    color: rgba(0, 255, 136, 0.55);
    padding: 10px 14px;
    mix-blend-mode: screen;
    filter: blur(0.2px) drop-shadow(0 0 16px rgba(0, 255, 136, 0.18));
    opacity: 0;
    transform: translateY(18px) scale(0.98);
    animation: rxQuantum 0.82s cubic-bezier(0.22, 1, 0.36, 1);
    pointer-events: none;
    z-index: 1;
}

@keyframes rxQuantum {
    0% { opacity: 0; transform: translateY(18px) scale(0.98); }
    22% { opacity: 0.8; }
    100% { opacity: 0; transform: translateY(-24px) scale(1.03); }
}

.message.sent {
    background: linear-gradient(135deg, #00ff88 0%, #00cc6a 100%);
    color: #0a0a0f;
    margin-left: auto;
    border-bottom-right-radius: 3px;
    box-shadow: 0 4px 12px rgba(0, 255, 136, 0.2);
}

.message.sent.tx {
    will-change: transform, opacity, filter;
    animation: sentQuantumIn 0.46s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

@keyframes sentQuantumIn {
    0% { opacity: 0; transform: translateY(18px) translateX(14px) scale(0.86) rotate(0.7deg); filter: blur(7px); }
    55% { opacity: 1; filter: blur(0.6px); }
    100% { opacity: 1; transform: translateY(0) translateX(0) scale(1) rotate(0deg); filter: blur(0px); }
}

.message.received {
    background: #161b22;
    color: #c9d1d9;
    margin-right: auto;
    border-bottom-left-radius: 3px;
    border: 1px solid rgba(0, 255, 136, 0.2);
}

.message.received.rx {
    will-change: transform, opacity, filter;
    animation: recvQuantumIn 0.52s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

@keyframes recvQuantumIn {
    0% { opacity: 0; transform: translateY(14px) scale(0.90); filter: blur(8px); }
    55% { opacity: 1; filter: blur(0.8px); }
    100% { opacity: 1; transform: translateY(0) scale(1); filter: blur(0px); }
}

.input-area {
    padding: 16px 28px 24px;
    background: #0d1117;
    border-top: 1px solid rgba(0, 255, 136, 0.1);
}

.message-input-wrapper {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #010409;
    border: 1px solid rgba(0, 255, 136, 0.2);
    border-radius: 24px;
    padding: 8px 8px 8px 20px;
    position: relative;
    transition: all 0.3s;
}

.message-input-wrapper.tx::after {
    content: '';
    position: absolute;
    left: 16px;
    right: 16px;
    top: 50%;
    height: 2px;
    transform: translateY(-50%);
    background: linear-gradient(90deg, transparent, rgba(0, 255, 136, 0.9), transparent);
    filter: drop-shadow(0 0 12px rgba(0, 255, 136, 0.35));
    animation: inputTx 0.42s cubic-bezier(0.22, 1, 0.36, 1);
    pointer-events: none;
}

.message-input-wrapper.tx::before {
    content: '0100110010 1010 0011 0111 0001 1100 0101 1010 0011 0111';
    position: absolute;
    left: 22px;
    top: 50%;
    transform: translateY(-50%);
    font-family: 'SF Mono', 'Fira Code', 'Courier New', monospace;
    font-size: 11px;
    letter-spacing: 2px;
    color: rgba(0, 255, 136, 0.85);
    text-shadow: 0 0 12px rgba(0, 255, 136, 0.22);
    opacity: 0;
    pointer-events: none;
    animation: inputDigits 0.62s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes inputDigits {
    0% { opacity: 0; transform: translateY(-50%) translateX(-18px) scale(0.98); filter: blur(0.7px); }
    28% { opacity: 0.9; filter: blur(0.1px); }
    100% { opacity: 0; transform: translateY(-50%) translateX(140px) translateY(-18px) scale(1.05); filter: blur(1.2px); }
}

@keyframes inputTx {
    0% { opacity: 0; transform: translateY(-50%) translateX(-30%); }
    30% { opacity: 1; }
    100% { opacity: 0; transform: translateY(-50%) translateX(30%); }
}

.message-input-wrapper:focus-within {
    border-color: #00ff88;
    box-shadow: 0 0 30px rgba(0, 255, 136, 0.15);
}

.message-input-wrapper input {
    flex: 1;
    background: transparent;
    border: none;
    color: #c9d1d9;
    font-size: 14px;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    outline: none;
    padding: 10px 0;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.message-input-wrapper input::placeholder {
    color: #484f58;
    text-transform: uppercase;
}

.send-message-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: linear-gradient(135deg, #00ff88 0%, #00cc6a 100%);
    color: #0a0a0f;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    flex-shrink: 0;
}

.send-message-btn:hover:not(:disabled) {
    transform: scale(1.1);
    box-shadow: 0 4px 16px rgba(0, 255, 136, 0.4);
}

.send-message-btn:active:not(:disabled) {
    transform: scale(0.95);
}

.send-message-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    box-shadow: none;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .sidebar {
        width: 100%;
        position: absolute;
        top: 0;
        left: 0;
        bottom: 0;
        z-index: 10;
        transition: transform 0.3s ease;
    }
    
    .sidebar.hidden-mobile {
        transform: translateX(-100%);
    }
    
    .chat-area {
        width: 100%;
    }
    
    .sidebar-header-top {
        padding: 12px 16px;
    }
    
    .logo-mini {
        font-size: 18px;
    }
    
    .status-text {
        font-size: 10px;
    }
    
    .sidebar-header {
        padding: 14px 16px;
    }
    
    .avatar {
        width: 44px;
        height: 44px;
        font-size: 10px;
    }
    
    .user-name {
        font-size: 14px;
    }
    
    .user-status {
        font-size: 11px;
    }
    
    .search-container {
        padding: 12px;
    }
    
    .search-box {
        padding: 10px 12px;
    }
    
    .search-box input {
        font-size: 13px;
    }
    
    .search-btn {
        padding: 7px 12px;
        font-size: 11px;
    }
    
    .list-header {
        padding: 14px 16px 10px;
        font-size: 10px;
    }
    
    .chat-item {
        padding: 14px 16px;
    }
    
    .chat-avatar {
        width: 42px;
        height: 42px;
        font-size: 9px;
    }
    
    .chat-item-name {
        font-size: 13px;
    }
    
    .delete-chat-btn {
        width: 32px;
        height: 32px;
    }
    
    .chat-area-header-top {
        padding: 10px 16px;
    }
    
    .chat-glow-line {
        height: 3px;
    }
    
    .chat-area-header {
        padding: 14px 16px;
        min-height: 64px;
    }
    
    .chat-header-avatar {
        width: 38px;
        height: 38px;
        font-size: 8px;
    }
    
    .chat-header-name {
        font-size: 14px;
    }
    
    .messages-container {
        padding: 16px;
    }
    
    .message {
        max-width: 75%;
        padding: 10px 14px;
        font-size: 13px;
    }
    
    .input-area {
        padding: 12px 16px 16px;
    }
    
    .message-input-wrapper {
        padding: 6px 6px 6px 16px;
        gap: 8px;
    }
    
    .message-input-wrapper input {
        font-size: 13px;
        padding: 8px 0;
    }
    
    .send-message-btn {
        width: 40px;
        height: 40px;
    }
    
    .terminal-card {
        max-width: 95%;
        margin: 20px;
    }
    
    .terminal-body {
        padding: 32px 24px 24px;
    }
    
    .glitch-logo {
        font-size: 44px;
    }
    
    .subtitle {
        font-size: 12px;
    }
    
    .input-container input {
        padding: 14px 16px 14px 36px;
        font-size: 13px;
    }
    
    .main-btn {
        padding: 16px 28px;
        font-size: 13px;
    }
    
    /* Mobile Menu Toggle */
    .mobile-menu-btn {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 40px;
        height: 40px;
        border-radius: 10px;
        background: rgba(0, 255, 136, 0.1);
        color: #00ff88;
        border: 1px solid rgba(0, 255, 136, 0.2);
        cursor: pointer;
        position: absolute;
        top: 14px;
        right: 16px;
        z-index: 11;
        transition: all 0.2s;
    }
    
    .mobile-menu-btn:hover {
        background: rgba(0, 255, 136, 0.15);
        border-color: #00ff88;
    }
    
    .chat-area .mobile-menu-btn {
        left: 16px;
        right: auto;
        top: 12px;
    }
}

@media (min-width: 769px) {
    .mobile-menu-btn {
        display: none !important;
    }
}

@media (prefers-reduced-motion: reduce) {
    * {
        animation: none !important;
        transition: none !important;
        scroll-behavior: auto !important;
    }
}
