/* ========================
   СТИЛИ ПРОФИЛЯ
======================== */

.profile-container {
    max-width: 1000px;
    margin: 2rem auto;
    padding: 0 1rem;
}

/* Шапка профиля */
.profile-header {
    display: flex;
    align-items: center;
    gap: 2rem;
    padding: 2rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 16px;
    color: white;
    margin-bottom: 2rem;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.avatar-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    flex-shrink: 0;
}

.avatar-wrapper {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    overflow: hidden;
    border: 4px solid rgba(255, 255, 255, 0.8);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    background: white;
}

.avatar-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.avatar-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
    font-size: 2.5rem;
    font-weight: bold;
}

.user-type-badge {
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    white-space: nowrap;
}

.user-info-header {
    flex: 1;
}

.user-info-header h1 {
    margin: 0;
    font-size: 2rem;
    font-weight: 700;
}

.user-info-header .nickname {
    color: rgba(255, 255, 255, 0.8);
    font-size: 1.1rem;
    margin: 0.25rem 0;
}

.user-info-header .member-since {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
    margin: 0.5rem 0 0;
}

.user-info-header .user-status {
    color: rgba(255, 255, 255, 0.9);
    font-style: italic;
    margin: 0.75rem 0 0;
    font-size: 1rem;
    padding-top: 0.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.3);
}

/* Контент профиля - одна колонка */
.profile-content {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    /*padding: 0 0.5rem;*/
}

.profile-main {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    width: 100%;
}

.info-card {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    width: 100%;
    margin: 0 auto;
}

.info-card h3 {
    margin: 0 0 1rem;
    font-size: 1.1rem;
    color: #333;
    border-bottom: 2px solid #667eea;
    padding-bottom: 0.5rem;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1rem;
    width: 100%;
}


.info-item {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.info-item .label {
    font-size: 0.85rem;
    color: #888;
    font-weight: 500;
}

.info-item .value {
    font-size: 1rem;
    color: #333;
    font-weight: 500;
}

/* Боковая панель - тоже в одну колонку */
.profile-sidebar {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    width: 100%;
}

.sidebar-card {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    width: 100%;
}

.sidebar-card h3 {
    margin: 0 0 1rem;
    font-size: 1rem;
    color: #555;
}

.actions-card .btn-block {
    display: block;
    width: 100%;
    text-align: center;
    margin-bottom: 0.5rem;
    padding: 0.75rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s;
}

.btn-primary {
    background: #667eea;
    color: white;
    border: none;
}

.btn-primary:hover {
    background: #5a6fd6;
    transform: translateY(-1px);
}

.btn-secondary {
    background: #6c757d;
    color: white;
    border: none;
}

.btn-secondary:hover {
    background: #5a6268;
    transform: translateY(-1px);
}

.btn-danger {
    background: #dc3545;
    color: white;
    border: none;
}

.btn-danger:hover {
    background: #c82333;
}

.stats-card .stat-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
    border-bottom: 1px solid #eee;
}

.stats-card .stat-item:last-child {
    border-bottom: none;
}

.stat-value {
    font-size: 1.2rem;
    font-weight: 700;
    color: #667eea;
}

.stat-label {
    color: #888;
    font-size: 0.9rem;
}

/* ========================
   РЕДАКТИРОВАНИЕ
======================== */

.edit-mode {
    max-width: 800px;
}

.edit-mode h1 {
    margin-bottom: 2rem;
    color: #333;
    font-size: 1.8rem;
}

.form-section {
    background: white;
    border-radius: 12px;
    padding-top: 65px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    width: 100%;
}

.form-section h3 {
    margin: 0 0 1.5rem;
    font-size: 1.1rem;
    color: #333;
    border-bottom: 2px solid #667eea;
    padding-bottom: 0.5rem;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
    width: 100%;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.form-group.required label::after {
    content: ' *';
    color: #dc3545;
}

.form-group label {
    font-weight: 500;
    color: #555;
    font-size: 0.9rem;
}

.form-group input {
    padding: 0.75rem;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s;
    background: #6cc717;
}

.form-group input:focus {
    outline: none;
    border-color: #667eea;
    background: #3432de;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-group input.error {
    border-color: #dc3545;
    background: #fff5f5;
}

.form-hint {
    font-size: 0.8rem;
    color: #888;
    margin: 0.5rem 0 0;
}

/* Загрузка аватара */
.avatar-upload {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.current-avatar {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid #e0e0e0;
    flex-shrink: 0;
}

.current-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.avatar-wrapper img {
    border-radius: 50%;
    width: 128px;
    height: 128px;
    object-fit: cover;
}

.avatar-placeholder.large {
    font-size: 2rem;
}

.avatar-controls {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.avatar-controls .btn {
    padding: 0.6rem 1.2rem;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.3s;
}

/* Кнопки формы */
.form-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 2px solid #eee;
}

.btn-lg {
    padding: 0.8rem 2rem;
    font-size: 1rem;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

/* Адаптивность */
@media (max-width: 768px) {
    .profile-header {
        flex-direction: column;
        text-align: center;
        padding: 1.5rem;
    }
    
    .profile-content {
        gap: 1rem;
    }
    
    .avatar-upload {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    
    .form-grid {
        grid-template-columns: 1fr;
    }
    
    .form-actions {
        flex-direction: column;
    }
    
    .form-actions .btn-lg {
        width: 100%;
        justify-content: center;
    }
}

/* ========================
   УВЕДОМЛЕНИЯ
======================== */

.notification-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: 400px;
}

.notification {
    padding: 15px 20px;
    border-radius: 10px;
    color: white;
    font-size: 14px;
    line-height: 1.4;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    transform: translateX(120%);
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
}

.notification.show {
    transform: translateX(0);
    opacity: 1;
}

.notification-success {
    background: linear-gradient(135deg, #28a745, #20c997);
}

.notification-error {
    background: linear-gradient(135deg, #dc3545, #e74c3c);
}

.notification-warning {
    background: linear-gradient(135deg, #ffc107, #fd7e14);
    color: #333;
}

.notification-info {
    background: linear-gradient(135deg, #17a2b8, #0dcaf0);
}

/* ========================
   МОДАЛЬНОЕ ОКНО ПОДТВЕРЖДЕНИЯ
======================== */

.confirm-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.confirm-overlay.active {
    opacity: 1;
}

.confirm-modal {
    background: white;
    border-radius: 16px;
    padding: 2rem;
    max-width: 400px;
    width: 90%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.confirm-overlay.active .confirm-modal {
    transform: scale(1);
}

.confirm-modal h3 {
    margin: 0 0 1rem;
    color: #333;
    font-size: 1.3rem;
}

.confirm-modal p {
    color: #666;
    margin: 0 0 1.5rem;
    line-height: 1.5;
}

.confirm-modal .btn {
    padding: 0.6rem 1.5rem;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.95rem;
    transition: all 0.3s;
}

.confirm-modal .btn-secondary {
    background: #6c757d;
    color: white;
}

.confirm-modal .btn-secondary:hover {
    background: #5a6268;
}

.confirm-modal .btn-danger {
    background: #dc3545;
    color: white;
}

.confirm-modal .btn-danger:hover {
    background: #c82333;
}

/* ========================
   ОШИБКИ ВАЛИДАЦИИ
======================== */

.field-error {
    display: block;
    color: #dc3545;
    font-size: 0.8rem;
    margin-top: 0.25rem;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-5px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.form-group input.error {
    border-color: #dc3545 !important;
    background: #fff5f5 !important;
    animation: shake 0.3s ease;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

/* ========================
   СОСТОЯНИЕ ЗАГРУЗКИ
======================== */

.btn.loading {
    position: relative;
    color: transparent !important;
    pointer-events: none;
}

.btn.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}


/* ========================================
   ✅ СУПЕРЛАЙКИ КАРТОЧКА
   ======================================== */
.superlikes-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
}

.superlikes-card h3 {
    margin-bottom: 16px;
    font-size: 18px;
    border-bottom: 2px solid rgba(255,255,255,0.3);
    padding-bottom: 8px;
}

.superlikes-card .stat-value {
    color: white;
}

.superlikes-card .stat-value.highlight {
    font-size: 32px;
    font-weight: bold;
    text-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.superlikes-card .stat-label {
    color: rgba(255,255,255,0.9);
    font-size: 13px;
}

/* ========================================
   ✅ УРОВЕНЬ ПОЛЬЗОВАТЕЛЯ
   ======================================== */
.user-level-badge {
    display: inline-block;
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    margin: 10px 0;
    cursor: help;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(240, 147, 251, 0.4);
}

.user-level-badge:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(240, 147, 251, 0.6);
}

/* Анимация при наведении */
@keyframes levelPulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.user-level-badge:hover {
    animation: levelPulse 0.5s ease infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ========================
   АНИМАЦИИ ДЛЯ КАРТОЧЕК
======================== */

.info-card,
.sidebar-card,
.form-section {
    animation: slideUp 0.5s ease;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.info-card:nth-child(2) { animation-delay: 0.1s; }
.info-card:nth-child(3) { animation-delay: 0.2s; }
.info-card:nth-child(4) { animation-delay: 0.3s; }