* { 
    box-sizing: border-box; 
}

body { 
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; 
    background: #f0f2f5; 
    margin: 0; 
    padding: 20px; 
    color: #1c1e21; 
}

.container { 
    max-width: 680px; 
    margin: 0 auto; 
}

.card { 
    background: #fff; 
    border-radius: 10px; 
    padding: 20px; 
    margin-bottom: 20px; 
    box-shadow: 0 1px 3px rgba(0,0,0,0.1); 
}

.form-group { 
    margin-bottom: 15px; 
}

.form-group label { 
    display: block; 
    margin-bottom: 6px; 
    font-weight: 600; 
    font-size: 0.9em; 
}

.form-group input, 
.form-group textarea, 
.form-group select { 
    width: 100%; 
    padding: 10px; 
    border: 1px solid #ddd; 
    border-radius: 6px; 
    font-size: 14px; 
}

.form-group textarea { 
    resize: vertical; 
    min-height: 80px; 
}

.checkbox-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

.checkbox-group input {
    width: auto;
}

.checkbox-group label {
    margin: 0;
}

.btn-group { 
    display: flex; 
    gap: 10px; 
}

button { 
    flex: 1; 
    padding: 10px 16px; 
    border: none; 
    border-radius: 6px; 
    cursor: pointer; 
    font-weight: 600; 
    color: white; 
    background: #0066cc; 
    transition: background 0.2s; 
}

button:hover { 
    background: #0052a3; 
}

button.secondary { 
    background: #e4e6eb; 
    color: #050505; 
}

button.secondary:hover { 
    background: #d8dadf; 
}

button.danger { 
    background: #dc3545; 
}

button.danger:hover { 
    background: #bd2130; 
}

/* Элементы профиля */
.user-profile { 
    display: flex; 
    align-items: center; 
    gap: 12px; 
}

.user-info {
    flex-grow: 1;
}

.user-name {
    font-weight: bold;
}

.user-details {
    font-size: 0.85em; 
    color: #65676b;
}

.user-actions {
    display: flex; 
    gap: 8px;
}

.user-actions button {
    flex: none;
}

.avatar { 
    width: 44px; 
    height: 44px; 
    border-radius: 50%; 
    object-fit: cover; 
    background: #eee; 
}

/* Кликабельный автор */
.post-author-link { 
    display: flex; 
    align-items: center; 
    gap: 12px; 
    cursor: pointer; 
    text-decoration: none; 
    color: inherit; 
    width: fit-content; 
}

.post-author-link:hover .post-author { 
    text-decoration: underline; 
    color: #0066cc; 
}

.post-header { 
    display: flex; 
    align-items: center; 
    justify-content: space-between; 
    margin-bottom: 12px; 
}

.post-author { 
    font-weight: 600; 
}

.post-date { 
    font-size: 0.8em; 
    color: #65676b; 
}

.post-badge { 
    display: inline-block; 
    font-size: 0.75em; 
    padding: 2px 8px; 
    border-radius: 12px; 
    background: #e4e6eb; 
    color: #65676b; 
    margin-left: 6px; 
}

.post-pinned { 
    background: #fff3cd; 
    color: #856404; 
    font-weight: bold; 
    padding: 2px 6px; 
    border-radius: 4px; 
    font-size: 0.8em; 
}

.post-title { 
    font-size: 1.25em; 
    margin: 10px 0 6px 0; 
    font-weight: 700; 
}

.post-content { 
    line-height: 1.5; 
    color: #1c1e21; 
    white-space: pre-wrap; 
    margin-bottom: 12px; 
}

.post-gallery { 
    display: grid; 
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); 
    gap: 8px; 
    margin-top: 12px; 
    border-radius: 8px; 
    overflow: hidden; 
}

.post-gallery img { 
    width: 100%; 
    height: 160px; 
    object-fit: cover; 
    border-radius: 6px; 
    cursor: pointer; 
    transition: transform 0.2s; 
}

.post-gallery img:hover { 
    transform: scale(1.02); 
}

.post-actions { 
    display: flex; 
    justify-content: flex-end; 
    margin-top: 10px; 
}

/* Модальные окна */
.modal-overlay { 
    display: none; 
    position: fixed; 
    top: 0; 
    left: 0; 
    width: 100%; 
    height: 100%; 
    background: rgba(0,0,0,0.5); 
    justify-content: center; 
    align-items: center; 
    z-index: 1000; 
}

.modal-card { 
    background: #fff; 
    width: 90%; 
    max-width: 420px; 
    border-radius: 12px; 
    padding: 24px; 
    position: relative; 
    box-shadow: 0 4px 20px rgba(0,0,0,0.15); 
    animation: modalFade 0.2s ease-out; 
}

@keyframes modalFade { 
    from { opacity: 0; transform: translateY(-10px); } 
    to { opacity: 1; transform: translateY(0); } 
}

.modal-close { 
    position: absolute; 
    top: 15px; 
    right: 15px; 
    background: none; 
    border: none; 
    font-size: 1.4em; 
    cursor: pointer; 
    color: #888; 
    padding: 0; 
    width: auto; 
}

.modal-header { 
    text-align: center; 
    margin-bottom: 20px; 
}

.modal-avatar { 
    width: 80px; 
    height: 80px; 
    border-radius: 50%; 
    object-fit: cover; 
    margin-bottom: 10px; 
    border: 3px solid #0066cc; 
}

.modal-name { 
    font-size: 1.3em; 
    font-weight: bold; 
    margin-bottom: 2px; 
}

.modal-position { 
    font-size: 0.9em; 
    color: #0066cc; 
    font-weight: 600; 
}

.profile-info-list { 
    display: flex; 
    flex-direction: column; 
    gap: 10px; 
    background: #f8f9fa; 
    padding: 15px; 
    border-radius: 8px; 
    font-size: 0.9em; 
}

.profile-info-item { 
    display: flex; 
    justify-content: space-between; 
    border-bottom: 1px dashed #e0e0e0; 
    padding-bottom: 6px; 
}

.profile-info-item:last-child { 
    border-bottom: none; 
    padding-bottom: 0; 
}

.profile-info-label { 
    color: #666; 
}

.profile-info-value { 
    font-weight: 600; 
    color: #222; 
}