:root {
    --bg-1: #0b1020;
    --bg-2: #121933;
    --panel: rgba(255,255,255,0.08);
    --panel-strong: rgba(255,255,255,0.14);
    --line: rgba(255,255,255,0.12);
    --text: #eef2ff;
    --muted: #b8c0e0;
    --accent: #67e8f9;
    --accent-2: #8b5cf6;
    --success: #22c55e;
    --danger: #ef4444;
    --shadow: 0 20px 60px rgba(0,0,0,.35);
    --radius: 24px;
}
* { box-sizing: border-box; }
body {
    margin: 0;
    font-family: Arial, Helvetica, sans-serif;
    color: var(--text);
    background: linear-gradient(135deg, var(--bg-1), var(--bg-2));
}
a { color: inherit; text-decoration: none; }
.landing-body, .auth-body, .dashboard-body { min-height: 100vh; }
.landing-wrap {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    position: relative;
    z-index: 2;
}
.landing-overlay {
    position: fixed;
    inset: 0;
    background:
        radial-gradient(circle at top left, rgba(103,232,249,.18), transparent 28%),
        radial-gradient(circle at bottom right, rgba(139,92,246,.18), transparent 25%);
}
.welcome-card, .auth-card, .card {
    background: var(--panel);
    border: 1px solid var(--line);
    backdrop-filter: blur(18px);
    box-shadow: var(--shadow);
    border-radius: var(--radius);
}
.welcome-card {
    width: min(860px, 100%);
    padding: 42px;
    text-align: center;
}
.logo-circle, .logo-small, .avatar-circle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    color: #06111a;
    font-weight: 800;
}
.logo-circle { width: 92px; height: 92px; font-size: 34px; margin-bottom: 16px; }
.logo-small { width: 56px; height: 56px; font-size: 20px; }
.avatar-circle { width: 86px; height: 86px; font-size: 30px; }
.welcome-card h1, .topbar h1 { margin: 0 0 8px; }
.subtitle, .sidebar-head p, .topbar p, .user-nick, .friend-nick { color: var(--muted); }
.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 14px;
    margin: 28px 0;
}
.feature-item {
    padding: 16px;
    border-radius: 18px;
    background: rgba(255,255,255,.06);
    border: 1px solid var(--line);
}
.action-row { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.btn {
    border: 0;
    cursor: pointer;
    padding: 12px 18px;
    border-radius: 14px;
    font-size: 15px;
    font-weight: 700;
    transition: .2s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary {
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    color: #06111a;
}
.btn-secondary {
    background: rgba(255,255,255,.08);
    color: var(--text);
    border: 1px solid var(--line);
}
.btn-small { padding: 9px 14px; background: rgba(255,255,255,.1); color: var(--text); }
.full-width { width: 100%; }
.auth-body {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 24px;
}
.auth-card {
    width: min(480px, 100%);
    padding: 32px;
}
.auth-card.wide { width: min(760px, 100%); }
.auth-card h2 { margin-top: 0; }
label {
    display: block;
    margin: 12px 0 8px;
    font-size: 14px;
    color: var(--muted);
}
input {
    width: 100%;
    padding: 13px 14px;
    border-radius: 14px;
    border: 1px solid var(--line);
    background: rgba(255,255,255,.08);
    color: var(--text);
    outline: none;
}
input::placeholder { color: #93a0c4; }
.grid-form {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}
.full-span { grid-column: 1 / -1; }
.auth-links {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    margin-top: 18px;
    color: var(--muted);
}
.alert {
    padding: 12px 14px;
    border-radius: 14px;
    margin: 0 0 16px;
    font-size: 14px;
}
.alert-error { background: rgba(239,68,68,.16); border: 1px solid rgba(239,68,68,.4); }
.alert-success { background: rgba(34,197,94,.16); border: 1px solid rgba(34,197,94,.4); }
.app-layout {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 360px 1fr;
}
.sidebar {
    padding: 22px;
    border-right: 1px solid var(--line);
    background: rgba(0,0,0,.18);
}
.sidebar-head, .topbar, .section-head, .user-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}
.sidebar-head { margin-bottom: 18px; }
.sidebar-head h2, .section-head h3 { margin: 0; }
.search-form {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 10px;
    margin-bottom: 18px;
}
.user-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-height: calc(100vh - 180px);
    overflow: auto;
    padding-right: 4px;
}
.user-row, .friend-card {
    padding: 14px;
    border-radius: 18px;
    background: rgba(255,255,255,.06);
    border: 1px solid var(--line);
}
.user-name, .friend-title { font-weight: 700; }
.badge, .counter, .friend-status {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 7px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
}
.badge-friend, .counter, .friend-status.online { background: rgba(34,197,94,.18); color: #b9f7c9; }
.friend-status.offline { background: rgba(255,255,255,.12); color: var(--muted); }
.content { padding: 24px; }
.topbar { margin-bottom: 18px; }
.card { padding: 22px; margin-bottom: 18px; }
.profile-card {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 18px;
    align-items: center;
}
.profile-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-top: 10px;
}
.profile-grid span { color: var(--muted); }
.status-online { color: #b9f7c9; }
.friends-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 14px;
}
.empty-box, .mini-empty {
    padding: 18px;
    border-radius: 18px;
    background: rgba(255,255,255,.05);
    border: 1px dashed var(--line);
    color: var(--muted);
}
@media (max-width: 960px) {
    .app-layout { grid-template-columns: 1fr; }
    .sidebar { border-right: 0; border-bottom: 1px solid var(--line); }
    .user-list { max-height: none; }
}
@media (max-width: 720px) {
    .welcome-card, .auth-card, .card { padding: 22px; }
    .grid-form, .profile-grid, .search-form, .profile-card { grid-template-columns: 1fr; }
    .auth-links, .topbar, .sidebar-head, .section-head, .user-row { align-items: flex-start; }
}
