:root {
    --bg: #0f0f10;
    --card: #1c1c1e;
    --card-light: #2c2c2e;
    --accent: #0a84ff;
    --text: #ffffff;
    --text-secondary: #8e8e93;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto;
    background: var(--bg);
    color: var(--text);
}

/* Центрирование для десктопа */
.app {
    max-width: 500px;
    margin: 0 auto;
    min-height: 100vh;
    background: var(--bg);
    position: relative;
}

/* HEADER */
.header {
    display: flex;
    align-items: center;
    padding: 16px;
    font-size: 18px;
    font-weight: 600;
    position: relative;
    z-index: 1;
}

/* КНОПКА МЕНЮ */
.menu-btn {
    font-size: 22px;
    margin-right: 10px;
    cursor: pointer;
}

/* SLIDE MENU */
.menu-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.4);
    opacity: 0;
    pointer-events: none;
    transition: 0.3s;
    z-index: 998;
}

.menu-overlay.open {
    opacity: 1;
    pointer-events: all;
}

.menu {
    position: fixed;
    top: 0;
    left: -260px;
    width: 260px;
    height: 100%;
    background: rgba(28,28,30,0.95);
    backdrop-filter: blur(20px);
    transition: 0.3s;
    padding: 20px;
    z-index: 999;
    box-shadow: 2px 0 20px rgba(0,0,0,0.4)
}

.menu.open {
    left: 0;
}

.menu a {
    display: block;
    padding: 14px;
    border-radius: 10px;
    color: white;
    text-decoration: none;
    margin-bottom: 8px;
    transition: 0.2s;
}

.menu a:hover {
    background: var(--card-light);
}

/* КАРТОЧКИ */
.card {
    background: var(--card);
    padding: 14px;
    border-radius: 14px;
    margin: 10px 16px;
    transition: 0.2s;
}

.card:hover {
    background: var(--card-light);
}

/* ЧАТ */
.chat-container {
    padding: 10px;
}

.chat-message {
    max-width: 75%;
    padding: 10px 14px;
    border-radius: 16px;
    margin: 6px 0;
    position: relative;
    animation: fadeIn 0.3s ease;
}

.chat-message.me {
    background: var(--accent);
    margin-left: auto;
}

.chat-message.them {
    background: var(--card-light);
}

.chat-time {
    font-size: 11px;
    opacity: 0.6;
    margin-top: 4px;
}

/* ИЗОБРАЖЕНИЯ */
.chat-message img {
    margin-top: 6px;
    border-radius: 12px;
    max-width: 100%;
}

/* ТАБЛИЦА */
table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
}

td, th {
    padding: 10px;
    text-align: left;
    font-size: 14px;
}

tr {
    border-bottom: 1px solid #2c2c2e;
}

/* ФОРМА */
.form {
    padding: 20px;
}

input {
    width: 100%;
    padding: 14px;
    margin-top: 10px;
    border-radius: 12px;
    border: none;
    background: var(--card);
    color: white;
}

button {
    width: 100%;
    padding: 14px;
    margin-top: 12px;
    border-radius: 12px;
    border: none;
    background: var(--accent);
    color: white;
    font-weight: 600;
    cursor: pointer;
    transition: 0.2s;
}

button:hover {
    opacity: 0.85;
}

/* АНИМАЦИИ */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(5px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}