:root {
    /* Цветовая палитра */
    --bg-body: #000000;
    --bg-sidebar: #111111;
    --bg-card: #1e1e1e;
    --bg-input: #2a2a2a;
    --border: #333333;
    
    --text-main: #e0e0e0;
    --text-muted: #888888;
    
    --accent: #339af0;
    --accent-hover: #228be6;
    --danger: #fa5252;

    --sidebar-width: 260px;
    --header-height: 60px;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-body);
    color: var(--text-main);
    height: 100vh;
    overflow: hidden;
}

/* --- Layout --- */
.app-container {
    display: flex;
    height: 100vh;
    width: 100%;
}

/* --- Guest Mode (Скрытие меню для логина/регистрации) --- */
body.guest-mode .sidebar,
body.guest-mode .bottom-nav {
    display: none !important;
}

body.guest-mode .main-content {
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle at center, #1a1a1a 0%, #000000 100%);
}

/* --- Sidebar --- */
.sidebar {
    width: var(--sidebar-width);
    background-color: var(--bg-sidebar);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
}

.sidebar-header {
    height: var(--header-height);
    display: flex;
    align-items: center;
    padding: 0 20px;
    border-bottom: 1px solid var(--border);
}

.sidebar-header h2 {
    font-size: 18px;
    font-weight: 700;
    margin: 0;
    color: #fff;
    letter-spacing: 1px;
    font-family: monospace; /* Стиль кода для названия */
}

.nav-list { list-style: none; padding: 20px 10px; margin: 0; }

.nav-item a {
    display: flex;
    align-items: center;
    padding: 10px 12px;
    color: var(--text-muted);
    text-decoration: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    transition: 0.2s;
    margin-bottom: 4px;
}

.nav-item a:hover { background-color: rgba(255, 255, 255, 0.05); color: var(--text-main); }
.nav-item a.active { background-color: rgba(51, 154, 240, 0.15); color: var(--accent); }
.nav-item i { margin-right: 12px; font-size: 20px; }

.sidebar-user {
    margin-top: auto;
    padding: 15px 20px;
    border-top: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.user-avatar {
    width: 32px; height: 32px; background-color: var(--accent); 
    border-radius: 50%; display: flex; align-items: center; justify-content: center; 
    font-weight: bold; color: white; font-size: 14px;
}

/* --- Main Content --- */
.main-content {
    flex: 1;
    overflow-y: auto;
    padding: 40px;
    position: relative;
}

.content-wrapper {
    width: 100%;
    max-width: 400px;
}

h2 {
    font-size: 24px; font-weight: 600; margin-bottom: 24px; color: #fff; text-align: center;
}

/* --- Forms --- */
.form-card {
    background-color: var(--bg-card);
    padding: 32px;
    border-radius: 12px;
    border: 1px solid var(--border);
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

.form-group { margin-bottom: 20px; }
label { display: block; font-size: 12px; font-weight: 600; color: var(--text-muted); margin-bottom: 8px; text-transform: uppercase; }

input {
    width: 100%; padding: 12px; background-color: var(--bg-input);
    border: 1px solid transparent; border-radius: 6px; color: white; font-size: 14px;
}
input:focus { outline: none; border-color: var(--accent); }

.btn {
    width: 100%; padding: 12px; background-color: var(--accent);
    color: white; border: none; border-radius: 6px;
    font-size: 14px; font-weight: 600; cursor: pointer;
}
.btn:hover { background-color: var(--accent-hover); }

.alert {
    padding: 12px; border-radius: 6px; font-size: 13px; margin-bottom: 20px; text-align: center;
}
.alert-error { background-color: rgba(250, 82, 82, 0.15); color: var(--danger); border: 1px solid rgba(250, 82, 82, 0.3); }

/* --- Bottom Nav --- */
.bottom-nav {
    display: none; position: fixed; bottom: 0; left: 0; width: 100%; height: 60px;
    background-color: var(--bg-sidebar); border-top: 1px solid var(--border);
    justify-content: space-around; align-items: center; z-index: 1000;
}
.nav-mobile-item {
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    color: var(--text-muted); text-decoration: none; width: 100%; height: 100%;
}
.nav-mobile-item.active { color: var(--accent); }
.nav-mobile-item i { font-size: 24px; margin-bottom: 4px; }

@media (max-width: 768px) {
    .sidebar { display: none; }
    .bottom-nav { display: flex; }
    .main-content { padding: 20px; padding-bottom: 80px; }
}