:root {
    --bg-deep: #0a0a0a;
    --bg-card: rgba(22, 22, 22, 0.9);
    --accent-red: #ff3b3b;
    --text-main: #ffffff;
    --text-dim: #a0a0a0;
    --sidebar-width: 100px;
}

body {
    font-family: 'Inter', Arial, sans-serif;
    background-image: url('tlo.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    color: var(--text-main);
    margin: 0;
    height: 100vh;
    overflow: hidden;
}

.app-container {
    display: flex;
    flex-direction: row;
    height: 100vh;
    background: rgba(0, 0, 0, 0.5);
}

.sidebar {
    width: var(--sidebar-width);
    background-color: rgba(0, 0, 0, 0.85);
    border-right: 1px solid #222;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-top: 30px;
    flex-shrink: 0;
}

.sidebar-logo img {
    width: 50px;
    height: auto;
}

.content-area {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 30px;
    overflow-y: auto;
}

.side-nav {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-top: 40px;
    width: 100%;
}

.nav-item {
    background: none;
    border: none;
    color: var(--text-dim);
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    transition: 0.3s;
    font-size: 10px;
    text-transform: uppercase;
    gap: 8px;
    width: 100%;
}

.nav-item i {
    font-size: 20px;
    padding: 12px;
    border-radius: 12px;
    background: #111;
    transition: 0.3s;
}

.nav-item:hover i, .nav-item.active i {
    background: var(--accent-red);
    color: white;
    box-shadow: 0 0 15px rgba(255, 59, 59, 0.4);
}

.nav-item.active {
    color: var(--accent-red);
}

.card {
    background: var(--bg-card);
    border-radius: 20px;
    padding: 20px;
    margin-bottom: 20px;
    border: 1px solid #222;
}

.section-title {
    font-size: 24px;
    margin-top: 0;
    margin-bottom: 20px;
    border-left: 5px solid var(--accent-red);
    padding-left: 15px;
}

.app-header {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 20px;
}

.login-screen {
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    background: rgba(0, 0, 0, 0.7);
}

.login-box {
    background: rgba(22, 22, 22, 0.95);
    padding: 40px;
    border-radius: 30px;
    text-align: center;
    width: 320px;
    border: 1px solid var(--accent-red);
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

.login-logo {
    width: 100px;
    height: auto;
    margin-bottom: 15px;
}

.malinka-icon {
    width: 24px;
    height: 24px;
    margin: 2px;
}

.malinka-row {
    display: flex;
    flex-wrap: wrap;
    min-height: 40px;
    background: #000;
    padding: 10px;
    border-radius: 15px;
    margin: 15px 0;
    align-items: center;
}

input, select, textarea {
    background: #000;
    border: 1px solid #333;
    color: white;
    padding: 10px;
    border-radius: 10px;
    outline: none;
}

button {
    background: var(--accent-red);
    border: none;
    color: white;
    padding: 10px 15px;
    border-radius: 10px;
    cursor: pointer;
    font-weight: bold;
    transition: 0.2s;
}

button:hover {
    opacity: 0.9;
}

.btn-logout { background: #333; }
.tab-content { display: none; }
.tab-content.active { display: block; animation: fadeIn 0.4s; }

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

.points-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
}

.chat-container {
    height: 100%;
    overflow-y: auto;
    background: #111;
    padding: 12px;
    border-radius: 12px;
    border: 1px solid #333;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.chat-bubble {
    padding: 8px 12px;
    border-radius: 10px;
    max-width: 80%;
    font-size: 13px;
    word-break: break-word;
    background: #222;
    border: 1px solid #444;
}

.chat-bubble.mine {
    background: #1b365d;
    border-color: #2196f3;
    align-self: flex-end;
}

.chat-author {
    font-size: 11px;
    color: #4fc3f7;
    margin-bottom: 2px;
    font-weight: bold;
}

@media (max-width: 768px) {
    body {
        overflow: auto;
        height: auto;
    }
    .app-container {
        flex-direction: column;
        height: auto;
        min-height: 100vh;
    }
    .sidebar {
        width: 100%;
        height: 60px;
        flex-direction: row;
        justify-content: space-around;
        padding: 0;
        position: fixed;
        bottom: 0;
        left: 0;
        z-index: 1000;
        border-right: none;
        border-top: 1px solid #333;
        background-color: rgba(0, 0, 0, 0.95);
    }
    .sidebar-logo {
        display: none;
    }
    .side-nav {
        flex-direction: row;
        margin: 0;
        justify-content: space-around;
        width: 100%;
    }
    .nav-item {
        font-size: 8px;
        gap: 2px;
    }
    .nav-item i {
        font-size: 16px;
        padding: 6px;
        border-radius: 8px;
    }
    .content-area {
        padding: 12px;
        padding-bottom: 80px;
    }
    .card {
        padding: 12px;
        margin-bottom: 12px;
        border-radius: 12px;
    }
    .chat-container {
        height: 100px;
    }
    .login-box {
        width: 85%;
        padding: 20px;
    }
}