:root {
    --bg: #0d1117;
    --text: #e6edf3;
    --button: #1f6feb;
    --button-text: #ffffff;
    --secondary-bg: #161b22;
    --accent: #e94560;
    --success: #238636;
    --warning: #d2991d;
    --border: rgba(255,255,255,0.12);
}
* { margin: 0; padding: 0; box-sizing: border-box; }
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg); color: var(--text);
    min-height: 100vh; padding-bottom: 20px;
    max-width: 480px; margin: 0 auto;   /* ← адаптация */
    touch-action: pan-y;
}
.nav { display: flex; position: sticky; top: 0; z-index: 100; background: var(--secondary-bg); border-bottom: 1px solid var(--border); }
.nav-btn {
    flex: 1; min-width: 56px; padding: 10px 2px; background: transparent; border: none;
    border-bottom: 2px solid transparent; color: var(--text); cursor: pointer;
    font-size: 10px; font-weight: 500; opacity: 0.7;
    display: flex; flex-direction: column; align-items: center; gap: 2px;
}
.nav-btn .nav-icon { font-size: 16px; } .nav-btn .nav-label { font-size: 9px; white-space: nowrap; }
.nav-btn.active { opacity: 1; color: var(--button); border-bottom-color: var(--button); }
.card { background: var(--secondary-bg); border-radius: 16px; padding: 20px; margin: 16px; border: 1px solid var(--border); }
.card h2 { margin-bottom: 16px; font-size: 20px; font-weight: 600; }
.card h3 { margin-bottom: 10px; font-size: 15px; opacity: 0.8; }
.form-group { margin-bottom: 16px; }
.form-group label { display: block; margin-bottom: 6px; font-size: 13px; font-weight: 500; opacity: 0.8; text-transform: uppercase; }
.form-group input, .form-group select { width: 100%; padding: 12px 14px; border-radius: 10px; border: 1px solid var(--border); background: var(--bg); color: var(--text); font-size: 15px; }
.btn { display: flex; align-items: center; justify-content: center; gap: 8px; padding: 14px 20px; border-radius: 14px; border: 1.5px solid rgba(255,255,255,0.16); cursor: pointer; font-size: 15px; font-weight: 600; width: 100%; margin-top: 8px; background: rgba(255,255,255,0.04); color: var(--text); }
.btn-primary { background: var(--button); color: var(--button-text); border-color: var(--button); }
.btn-danger { background: rgba(233,69,96,0.12); color: var(--accent); border-color: rgba(233,69,96,0.35); }
.btn-outline { background: rgba(255,255,255,0.03); border: 2px solid rgba(255,255,255,0.2); }
.btn-sm { padding: 10px 14px; width: auto; font-size: 13px; margin-top: 0; }
.btn:disabled { opacity: 0.35; pointer-events: none; }
.btn-row { display: flex; gap: 8px; } .btn-row .btn { flex: 1; margin-top: 0; }
.action-buttons { display: flex; gap: 12px; margin: 0 16px 16px; }
.action-btn { flex: 1; height: 70px; border-radius: 16px; border: 2px solid transparent; cursor: pointer; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; box-shadow: 0 4px 16px rgba(0,0,0,0.4); }
.action-btn .action-icon { font-size: 26px; } .action-btn .action-label { font-size: 10px; font-weight: 700; }
.action-btn.dislike { background: rgba(31,111,235,0.15); color: #58a6ff; border-color: rgba(31,111,235,0.4); }
.action-btn.like { background: rgba(233,69,96,0.15); color: #ff7b8a; border-color: rgba(233,69,96,0.4); }
.profile-photo { width: 100%; max-height: 350px; object-fit: cover; border-radius: 14px; margin-bottom: 14px; background: var(--border); }
.profile-info { margin-bottom: 10px; } .profile-info span { opacity: 0.6; font-size: 12px; text-transform: uppercase; } .profile-info strong { font-size: 16px; }
.status { text-align: center; padding: 60px 20px; opacity: 0.6; }
.list-item { display: flex; align-items: center; gap: 12px; padding: 14px 12px; border-bottom: 1px solid var(--border); cursor: pointer; border-radius: 10px; background: rgba(255,255,255,0.02); margin-bottom: 6px; }
.list-item .list-avatar { width: 48px; height: 48px; border-radius: 14px; display: flex; align-items: center; justify-content: center; font-size: 22px; flex-shrink: 0; overflow: hidden; background: var(--border); }
.list-item .list-avatar img { width: 100%; height: 100%; object-fit: cover; }
.list-item .list-info { flex: 1; } .list-item .list-info strong { font-size: 15px; display: block; } .list-item .list-info small { font-size: 12px; opacity: 0.6; }
.list-item .list-actions { display: flex; flex-direction: column; gap: 4px; }
.game-selector { border: 1px solid var(--border); border-radius: 12px; max-height: 250px; overflow-y: auto; background: var(--bg); }
.game-item { border-bottom: 1px solid var(--border); padding: 12px 14px; cursor: pointer; }
.game-item.selected { background: rgba(31,111,235,0.1); border-left: 3px solid var(--button); }
.game-item-header { display: flex; align-items: center; gap: 12px; }
.game-item-header input[type="checkbox"] { width: 22px; height: 22px; accent-color: var(--button); }
.selected-games-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.game-tag { background: var(--button); color: var(--button-text); padding: 6px 14px; border-radius: 20px; font-size: 13px; }
.games-display { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.game-badge { background: rgba(31,111,235,0.15); color: var(--button); padding: 3px 10px; border-radius: 12px; font-size: 12px; }
.avatar-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-top: 8px; }
.avatar-item { aspect-ratio: 1; border-radius: 16px; cursor: pointer; border: 3px solid transparent; display: flex; align-items: center; justify-content: center; font-size: 36px; position: relative; }
.avatar-item.selected { border-color: var(--success); box-shadow: 0 0 16px rgba(35,134,54,0.4); }
.avatar-item .avatar-label { position: absolute; bottom: 4px; left: 4px; right: 4px; background: rgba(0,0,0,0.75); color: white; font-size: 8px; padding: 2px 4px; border-radius: 6px; text-align: center; }
.avatar-filter { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 12px; }
.avatar-filter-btn { padding: 7px 14px; border-radius: 20px; border: 1px solid var(--border); background: transparent; color: var(--text); cursor: pointer; font-size: 12px; }
.avatar-filter-btn.active { background: var(--button); color: var(--button-text); }
.avatar-preview { width: 100%; height: 200px; border-radius: 16px; margin-bottom: 14px; display: flex; align-items: center; justify-content: center; font-size: 72px; border: 1px solid var(--border); overflow: hidden; background: var(--border); }
.avatar-preview img { width: 100%; height: 100%; object-fit: cover; }
.toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); background: #333; color: #fff; padding: 14px 24px; border-radius: 14px; font-size: 14px; z-index: 200; opacity: 0; transition: opacity 0.3s; pointer-events: none; }
.toast.visible { opacity: 1; }
.tos-check { display: flex; align-items: flex-start; gap: 8px; background: rgba(255,255,255,0.03); padding: 12px; border-radius: 10px; margin-top: 8px; }
.tos-check input { width: 20px; height: 20px; margin-top: 2px; flex-shrink: 0; accent-color: var(--button); }
.tos-check label { font-size: 12px; text-transform: none; opacity: 0.8; cursor: pointer; }
.tos-check a { color: var(--button); text-decoration: underline; cursor: pointer; }
.tos-full { white-space: pre-line; font-size: 13px; line-height: 1.6; opacity: 0.9; max-height: 70vh; overflow-y: auto; padding: 12px; background: rgba(0,0,0,0.2); border-radius: 10px; }
.chip-row { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { padding: 10px 16px; border-radius: 20px; border: 1px solid var(--border); background: rgba(255,255,255,0.03); color: var(--text); cursor: pointer; font-size: 13px; }
.chip.active { background: var(--button); color: var(--button-text); border-color: var(--button); }
.chip.locked { opacity: 0.4; pointer-events: none; }
.empty-state { text-align: center; padding: 40px 20px; }
.hidden { display: none !important; }

/* Модальное окно обрезки фото */
#crop-modal {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    z-index: 999;
}
.crop-backdrop {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.8);
}
.crop-dialog {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    background: var(--secondary-bg);
    border-radius: 16px;
    padding: 20px;
    width: 90%;
    max-width: 400px;
    box-shadow: 0 16px 48px rgba(0,0,0,0.5);
}
.crop-container {
    width: 100%;
    height: 300px;
    background: #000;
    border-radius: 8px;
    overflow: hidden;
}
.crop-container img {
    max-width: 100%;
    display: block;
}
/* Модальное окно для сообщения об ошибке */
.modal-backdrop {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}
.modal-dialog {
    background: var(--secondary-bg);
    border-radius: 16px;
    padding: 20px;
    width: 90%;
    max-width: 400px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.5);
    border: 1px solid var(--border);
}
.modal-dialog h3 {
    margin-bottom: 10px;
    font-size: 18px;
}
