:root { 
    --bg: #050505; 
    --neon: #00ff41; 
    --dim: #008f24; 
    --danger: #ff0055; 
    --card: #0a0a0a;
    --header-height: 60px;
}

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

body { 
    background: var(--bg); 
    color: var(--neon); 
    font-family: 'Courier New', monospace; 
    min-height: 100vh;
    overflow-x: hidden;
}

/* ===== LOGIN PAGE ===== */
.login-page { 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    min-height: 100vh; 
    padding: 1rem;
}

.login-container { 
    width: 100%; 
    max-width: 400px; 
}

.app-title { 
    text-align: center; 
    text-shadow: 0 0 10px var(--neon); 
    margin-bottom: 2rem; 
    letter-spacing: 3px;
    font-size: 1.5rem;
}

.card { 
    background: var(--card); 
    border: 1px solid var(--dim); 
    padding: 1.5rem; 
    border-radius: 8px; 
    margin-bottom: 1rem;
    box-shadow: 0 0 10px rgba(0, 255, 65, 0.1);
}

.card h3 { 
    border-bottom: 1px solid var(--dim); 
    padding-bottom: 0.75rem; 
    margin-bottom: 1rem;
    text-align: center;
}

input { 
    width: 100%; 
    background: #000; 
    border: 1px solid var(--dim); 
    color: var(--neon); 
    padding: 0.75rem; 
    margin-bottom: 1rem; 
    outline: none; 
    font-family: inherit;
    font-size: 1rem;
    border-radius: 4px;
    transition: all 0.3s;
}

input:focus { 
    border-color: var(--neon);
    box-shadow: 0 0 10px rgba(0, 255, 65, 0.3);
}

input::placeholder { 
    color: var(--dim); 
}

button { 
    background: #000; 
    color: var(--neon); 
    border: 1px solid var(--neon); 
    padding: 0.75rem 1.5rem; 
    cursor: pointer; 
    font-family: inherit; 
    font-weight: bold; 
    transition: all 0.3s;
    margin: 0.25rem;
    border-radius: 4px;
    font-size: 0.9rem;
}

button:hover { 
    background: var(--neon); 
    color: #000; 
    box-shadow: 0 0 15px var(--neon);
}

button:active {
    transform: scale(0.98);
}

.btn-full { 
    width: 100%; 
    margin: 1rem 0 0.5rem;
    padding: 1rem;
    font-size: 1rem;
}

.btn-logout { 
    background: var(--danger); 
    color: #fff; 
    border: 1px solid var(--danger);
}

.btn-logout:hover { 
    box-shadow: 0 0 15px var(--danger);
}

.btn-small { 
    padding: 0.5rem 1rem; 
    font-size: 0.8rem;
}

.btn-send {
    margin: 0;
    padding: 0.75rem 1.5rem;
    font-size: 1.2rem;
}

.btn-menu, .btn-close {
    display: none;
    background: transparent;
    border: 1px solid var(--dim);
    padding: 0.5rem;
    font-size: 1.2rem;
    margin: 0;
}

.danger { 
    border-color: var(--danger); 
    color: var(--danger);
    width: 100%;
    margin-top: 1rem;
}

.danger:hover { 
    background: var(--danger); 
    color: #fff;
    box-shadow: 0 0 15px var(--danger);
}

.error-msg { 
    color: var(--danger); 
    text-align: center; 
    margin-top: 1rem;
    min-height: 1.5rem;
    font-size: 0.9rem;
}

.link { 
    text-align: center; 
    margin-top: 1rem;
    font-size: 0.9rem;
}

.link a { 
    color: var(--dim);
    text-decoration: none;
}

.link a:hover { 
    color: var(--neon);
    text-decoration: underline;
}

/* ===== LANGUAGE SWITCHER ===== */
.lang-switch {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 1rem;
}

.lang-btn {
    background: #000;
    color: var(--dim);
    border: 1px solid var(--dim);
    padding: 0.5rem 1rem;
    margin: 0;
    font-size: 0.85rem;
}

.lang-btn:hover, .lang-btn.active {
    background: var(--neon);
    color: #000;
    border-color: var(--neon);
    box-shadow: 0 0 10px var(--neon);
}

.lang-switch-fixed {
    position: fixed;
    bottom: 1rem;
    right: 1rem;
    z-index: 1000;
}

/* ===== DASHBOARD ===== */
.container { 
    max-width: 1200px; 
    margin: 0 auto; 
    padding: 1rem;
}

header { 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    border-bottom: 1px solid var(--neon); 
    padding-bottom: 1rem; 
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

header h1 { 
    text-shadow: 0 0 10px var(--neon);
    font-size: 1.5rem;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.grid { 
    display: grid; 
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); 
    gap: 1.5rem;
}

.full { 
    grid-column: 1 / -1; 
}

.stats { 
    display: grid; 
    grid-template-columns: 1fr 1fr; 
    gap: 1rem; 
    margin: 1rem 0;
}

.stat { 
    background: #000; 
    border: 1px solid var(--dim); 
    padding: 1rem; 
    text-align: center; 
    border-radius: 4px;
}

.stat span { 
    display: block;
    font-size: 0.85rem;
    color: var(--dim);
    margin-bottom: 0.5rem;
}

.stat b { 
    display: block;
    font-size: 2rem; 
    text-shadow: 0 0 10px var(--neon);
}

.online { 
    color: var(--neon); 
    text-shadow: 0 0 5px var(--neon);
}

#log { 
    height: 200px; 
    overflow-y: auto; 
    border: 1px solid var(--dim); 
    padding: 0.5rem; 
    background: #000; 
    font-size: 0.85rem;
    border-radius: 4px;
}

#log div { 
    border-left: 2px solid var(--dim); 
    padding-left: 0.5rem; 
    margin-bottom: 0.25rem;
}

/* ===== CHAT ===== */
.chat-container { 
    display: flex; 
    height: 100vh;
    overflow: hidden;
}

.users-panel { 
    width: 300px; 
    background: var(--card); 
    border-right: 1px solid var(--dim); 
    display: flex; 
    flex-direction: column;
    transition: transform 0.3s ease;
}

.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    border-bottom: 1px solid var(--dim);
}

.panel-header h2 {
    margin: 0;
}

.btn-close {
    display: none;
    background: var(--danger);
    color: #fff;
    border: 1px solid var(--danger);
}

.my-info { 
    display: flex; 
    flex-direction: column; 
    gap: 0.75rem; 
    padding: 1rem; 
    background: #000; 
    border-bottom: 1px solid var(--dim);
}

.my-details {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.my-username {
    font-weight: bold;
    font-size: 1rem;
}

.my-id { 
    color: var(--dim); 
    font-size: 0.75rem;
}

.search-input { 
    padding: 0.75rem; 
    border: none; 
    border-bottom: 1px solid var(--dim); 
    margin: 0; 
    border-radius: 0;
    background: var(--card);
}

#users-list { 
    flex: 1; 
    overflow-y: auto; 
    padding: 0.5rem;
}

.user-item { 
    padding: 1rem; 
    border: 1px solid var(--dim); 
    margin-bottom: 0.5rem; 
    border-radius: 4px; 
    cursor: pointer;
    transition: all 0.3s;
}

.user-item:hover, .user-item.active { 
    background: var(--neon); 
    color: #000;
    border-color: var(--neon);
    transform: translateX(5px);
}

.user-name { 
    font-weight: bold;
    margin-bottom: 0.25rem;
}

.user-id { 
    font-size: 0.75rem; 
    color: var(--dim);
}

.user-item:hover .user-id, .user-item.active .user-id { 
    color: #000;
}

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

.chat-header { 
    padding: 1rem; 
    border-bottom: 1px solid var(--neon); 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    background: var(--card);
    gap: 1rem;
}

.chat-header h2 { 
    flex: 1;
    text-align: center;
    font-size: 1.1rem;
}

.messages { 
    flex: 1; 
    overflow-y: auto; 
    padding: 1rem; 
    display: flex; 
    flex-direction: column; 
    gap: 0.5rem; 
    background: #000;
}

.message { 
    max-width: 75%; 
    padding: 0.75rem 1rem; 
    border-radius: 12px;
    word-wrap: break-word;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from { 
        opacity: 0; 
        transform: translateY(10px); 
    }
    to { 
        opacity: 1; 
        transform: translateY(0); 
    }
}

.message.sent { 
    align-self: flex-end; 
    background: var(--dim); 
    color: #000;
    border-bottom-right-radius: 4px;
}

.message.received { 
    align-self: flex-start; 
    background: #1a1a1a; 
    border: 1px solid var(--dim);
    border-bottom-left-radius: 4px;
}

.message img { 
    max-width: 100%; 
    border-radius: 8px; 
    margin-top: 0.5rem;
}

.message audio { 
    width: 100%; 
    margin-top: 0.5rem;
}

.message a { 
    color: var(--neon);
    text-decoration: none;
    border-bottom: 1px solid var(--neon);
}

.empty-state { 
    text-align: center; 
    padding: 3rem 1rem; 
    color: var(--dim);
}

.chat-input { 
    padding: 1rem; 
    border-top: 1px solid var(--dim); 
    display: flex; 
    gap: 0.5rem; 
    background: var(--card);
}

.chat-input input { 
    flex: 1; 
    margin: 0;
}

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar { 
    width: 8px; 
    height: 8px;
}

::-webkit-scrollbar-track { 
    background: #000; 
}

::-webkit-scrollbar-thumb { 
    background: var(--dim); 
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover { 
    background: var(--neon); 
}

/* ===== MOBILE RESPONSIVE ===== */
@media (max-width: 768px) {
    .app-title {
        font-size: 1.25rem;
        margin-bottom: 1.5rem;
    }
    
    .card {
        padding: 1rem;
    }
    
    header {
        flex-direction: column;
        text-align: center;
    }
    
    header h1 {
        font-size: 1.2rem;
    }
    
    .header-right {
        justify-content: center;
        width: 100%;
    }
    
    .grid { 
        grid-template-columns: 1fr; 
    }
    
    .stats { 
        grid-template-columns: 1fr; 
    }
    
    .stat b {
        font-size: 1.5rem;
    }
    
    /* Chat Mobile */
    .chat-container {
        flex-direction: column;
    }
    
    .users-panel {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        width: 100%;
        z-index: 100;
        transform: translateX(-100%);
    }
    
    .users-panel.show {
        transform: translateX(0);
    }
    
    .btn-menu, .btn-close {
        display: block;
    }
    
    .chat-header {
        padding: 0.75rem;
    }
    
    .chat-header h2 {
        font-size: 1rem;
    }
    
    .message {
        max-width: 85%;
        padding: 0.6rem 0.8rem;
        font-size: 0.9rem;
    }
    
    .chat-input {
        padding: 0.75rem;
    }
    
    .chat-input input {
        font-size: 0.9rem;
        padding: 0.6rem;
    }
    
    .btn-send {
        padding: 0.6rem 1rem;
    }
    
    .lang-switch-fixed {
        bottom: 0.5rem;
        right: 0.5rem;
    }
    
    .lang-btn {
        padding: 0.4rem 0.8rem;
        font-size: 0.75rem;
    }
}

@media (max-width: 480px) {
    .login-page {
        padding: 0.5rem;
    }
    
    .app-title {
        font-size: 1.1rem;
    }
    
    .card h3 {
        font-size: 1rem;
    }
    
    input {
        padding: 0.6rem;
        font-size: 0.9rem;
    }
    
    button {
        padding: 0.6rem 1rem;
        font-size: 0.85rem;
    }
    
    .btn-full {
        padding: 0.8rem;
    }
    
    .message {
        max-width: 90%;
        font-size: 0.85rem;
    }
    
    .my-username {
        font-size: 0.9rem;
    }
    
    .my-id {
        font-size: 0.7rem;
    }
}
/* ===== ADMIN TABS ===== */
.admin-tabs {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    border-bottom: 1px solid var(--dim);
    padding-bottom: 0.5rem;
}

.tab-btn {
    background: transparent;
    border: 1px solid var(--dim);
    padding: 0.75rem 1.5rem;
    margin: 0;
}

.tab-btn:hover, .tab-btn.active {
    background: var(--neon);
    color: #000;
    border-color: var(--neon);
    box-shadow: 0 0 10px var(--neon);
}

.tab-content {
    animation: fadeIn 0.3s ease;
}

/* ===== MESSAGES LIST ===== */
.messages-filter {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
}

.messages-list {
    max-height: 600px;
    overflow-y: auto;
    border: 1px solid var(--dim);
    border-radius: 4px;
    padding: 1rem;
    background: #000;
}

.message-log {
    background: #0a0a0a;
    border: 1px solid var(--dim);
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1rem;
    animation: slideIn 0.3s ease;
}

.message-log-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
    font-size: 0.85rem;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.message-log-time {
    color: var(--dim);
}

.message-log-from {
    color: var(--neon);
}

.message-log-from b {
    color: var(--neon);
    text-shadow: 0 0 5px var(--neon);
}

.message-log-content {
    padding: 0.75rem;
    background: #000;
    border-left: 3px solid var(--neon);
    border-radius: 4px;
    word-wrap: break-word;
}

/* ===== MOBILE ===== */
@media (max-width: 768px) {
    .admin-tabs {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .tab-btn {
        width: 100%;
        text-align: center;
    }
    
    .messages-filter {
        flex-direction: column;
    }
    
    .messages-list {
        max-height: 400px;
    }
    
    .message-log-header {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* ===== UTILITY CLASSES ===== */
.hidden { display: none !important; }
.text-center { text-align: center; }
.text-danger { color: var(--danger); }
.text-neon { color: var(--neon); }
.text-dim { color: var(--dim); }