/* Стили для профилей */
.profile-page {
    max-width: 1000px;
    margin: 0 auto;
}

.profile-header {
    display: flex;
    gap: 20px;
    margin-bottom: 30px;
    padding: 20px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.profile-avatar {
    flex-shrink: 0;
}

.profile-avatar img,
.profile-avatar .default-avatar {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
}

.profile-avatar .default-avatar {
    background-color: #4a6fa5;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
    font-weight: bold;
}

.profile-info {
    flex-grow: 1;
}

.profile-info h1 {
    margin-top: 0;
    margin-bottom: 10px;
}

.profile-role {
    margin: 10px 0;
}

.role-badge {
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 0.9em;
    font-weight: bold;
}

.role-reader { background-color: #e3f2fd; color: #0d47a1; }
.role-creator { background-color: #e8f5e9; color: #1b5e20; }
.role-admin { background-color: #fff3e0; color: #e65100; }
.role-owner { background-color: #fce4ec; color: #880e4f; }

.profile-date {
    color: #666;
    font-size: 0.9em;
}

.profile-tabs {
    display: flex;
    border-bottom: 1px solid #ddd;
    margin-bottom: 20px;
}

.tab-btn {
    background: none;
    border: none;
    padding: 10px 20px;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    font-weight: bold;
    transition: all 0.3s;
}

.tab-btn:hover {
    background-color: #f5f5f5;
}

.tab-btn.active {
    border-bottom-color: #4a6fa5;
    color: #4a6fa5;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

.user-articles li {
    margin-bottom: 10px;
    padding: 10px;
    background: #f9f9f9;
    border-radius: 5px;
}

.user-articles a {
    font-weight: bold;
}

.article-date {
    display: block;
    color: #666;
    font-size: 0.9em;
    margin-top: 5px;
}

.user-videos {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
}

.user-comments .comment {
    margin-bottom: 15px;
    padding: 15px;
    background: #f9f9f9;
    border-radius: 5px;
}

.comment-meta {
    display: flex;
    justify-content: space-between;
    margin-top: 10px;
}

.comment-meta small {
    color: #666;
}

/* Стили для редактирования профиля */
.profile-edit-page {
    max-width: 800px;
    margin: 0 auto;
}

.edit-forms {
    display: grid;
    gap: 30px;
}

.form-section {
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
}

.form-group input {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.avatar-section {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    align-items: center;
}

.current-avatar img,
.current-avatar .default-avatar {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
}

.current-avatar .default-avatar {
    background-color: #4a6fa5;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 40px;
    font-weight: bold;
}

.avatar-form {
    flex-grow: 1;
}

.back-link {
    margin-top: 20px;
}

.btn {
    display: inline-block;
    padding: 8px 16px;
    background-color: #4a6fa5;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    text-decoration: none;
    font-weight: bold;
    transition: background-color 0.3s;
}

.btn:hover {
    background-color: #3a5a85;
}

.btn-danger {
    background-color: #d32f2f;
}

.btn-danger:hover {
    background-color: #b71c1c;
}

/* Стили для меню пользователя в шапке */
.user-menu {
    display: flex;
    align-items: center;
    position: relative;
}

.user-avatar-link {
    margin-right: 10px;
}

.header-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
}

.header-avatar.default-avatar {
    background-color: #4a6fa5;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: bold;
}

.user-dropdown {
    position: relative;
}

.user-dropdown span {
    font-weight: bold;
    cursor: pointer;
}

.dropdown-content {
    display: none;
    position: absolute;
    right: 0;
    background-color: white;
    min-width: 160px;
    box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
    z-index: 1;
    border-radius: 4px;
    overflow: hidden;
}

.user-dropdown:hover .dropdown-content {
    display: block;
}

.dropdown-content a {
    color: #333;
    padding: 12px 16px;
    text-decoration: none;
    display: block;
}

.dropdown-content a:hover {
    background-color: #f1f1f1;
}

/* Сообщения об успехе */
.success-message {
    background-color: #e8f5e9;
    color: #2e7d32;
    padding: 10px;
    border-radius: 4px;
    margin-bottom: 20px;
}