/* Shared styles: variables.css, common.css */

/* ===== ПРОФИЛЬ ПОЛЬЗОВАТЕЛЯ ===== */


/* ===== КОНТЕЙНЕР ===== */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem;
    width: 100%;
}

/* ===== ПРОФИЛЬ ХЕДЕР ===== */
.profile-header {
    display: flex;
    align-items: center;
    gap: 3rem;
    margin-bottom: 3rem;
    background: var(--glass-bg);
    backdrop-filter: var(--blur);
    border: 2px solid var(--border);
    border-radius: 24px;
    padding: 2.5rem;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
}

.profile-header:hover {
    border-color: var(--orange);
    box-shadow: var(--shadow-lg), var(--shadow-orange);
}

/* ===== АВАТАР ===== */
.avatar-wrapper {
    flex-shrink: 0;
    position: relative;
}

.profile-avatar {
    width: 180px;
    height: 180px;
    border: 4px solid var(--orange);
    border-radius: 50%;
    object-fit: cover;
    display: block;
    box-shadow: var(--shadow-orange);
    transition: var(--transition);
}

.profile-avatar:hover {
    transform: scale(1.02);
    box-shadow: 0 12px 30px var(--orange-glow);
}

.avatar-placeholder {
    width: 180px;
    height: 180px;
    border: 4px solid var(--orange);
    border-radius: 50%;
    background: var(--orange-gradient);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4rem;
    font-weight: 700;
    box-shadow: var(--shadow-orange);
    transition: var(--transition);
}

.avatar-placeholder:hover {
    transform: scale(1.02);
    box-shadow: 0 12px 30px var(--orange-glow);
}

/* ===== ИНФОРМАЦИЯ В ХЕДЕРЕ ===== */
.profile-header-info {
    flex: 1;
}

.username {
    background: var(--orange-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-size: 2.8rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
    letter-spacing: -1px;
    line-height: 1.2;
}

.fullname {
    color: var(--text-muted);
    font-size: 1.4rem;
    font-weight: 400;
    margin-bottom: 1.5rem;
}

/* ===== КНОПКИ ===== */
.profile-actions {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
}

.btn-edit {
    background: var(--orange-gradient);
    color: white;
    border: none;
    padding: 0.8rem 2rem;
    border-radius: 40px;
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    transition: var(--transition);
    box-shadow: var(--shadow-orange);
    cursor: pointer;
    font-size: 1rem;
    position: relative;
    overflow: hidden;
}

.btn-edit::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.btn-edit:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 30px var(--orange-glow);
}

.btn-edit:hover::before {
    left: 100%;
}

.btn-secondary {
    background: var(--glass-bg);
    backdrop-filter: var(--blur);
    border: 2px solid var(--border);
    color: var(--text);
    padding: 0.8rem 2rem;
    border-radius: 40px;
    font-weight: 500;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    transition: var(--transition);
    cursor: pointer;
    font-size: 1rem;
}

.btn-secondary:hover {
    border-color: var(--orange);
    color: var(--orange);
    background: var(--orange-light);
    transform: translateY(-2px);
    box-shadow: var(--shadow-orange);
}

/* ===== ГРИД КОНТЕНТА ===== */
.profile-grid {
    display: grid;
    grid-template-columns: 1fr;  /* вместо repeat(2, 1fr) или repeat(3, 1fr) */
    max-width: none;              /* убрать ограничение */
    gap: 2rem;
    margin-bottom: 2.5rem;
}


/* ===== ИНФОРМАЦИОННАЯ КАРТОЧКА ===== */
.info-card {
    background: var(--glass-bg);
    backdrop-filter: var(--blur);
    border: 2px solid var(--border);
    border-radius: 24px;
    padding: 2rem;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
    height: fit-content;
}

.info-card:hover {
    border-color: var(--orange);
    box-shadow: var(--shadow-lg), var(--shadow-orange);
}

.info-card h3 {
    background: var(--orange-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--border);
}

.info-card h3 i {
    color: var(--orange);
    font-size: 1.8rem;
    -webkit-text-fill-color: initial;
}

.info-item {
    margin-bottom: 1.2rem;
    padding-bottom: 1.2rem;
    border-bottom: 2px solid var(--border-light);
    transition: var(--transition);
}

.info-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.info-item:hover {
    border-bottom-color: var(--orange);
}

.info-label {
    color: var(--text-muted);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.3rem;
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.info-label i {
    color: var(--orange);
    font-size: 0.9rem;
}

.info-value {
    color: var(--text-soft);
    font-size: 1.1rem;
    font-weight: 500;
    line-height: 1.5;
}

/* ===== СТАТИСТИКА ===== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

.stat-card {
    background: var(--glass-bg);
    backdrop-filter: var(--blur);
    border: 2px solid var(--border);
    border-radius: 20px;
    padding: 2rem 1.5rem;
    text-align: center;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--orange-gradient);
    transform: scaleX(0);
    transition: transform 0.4s ease;
    transform-origin: left;
}

.stat-card:hover {
    border-color: var(--orange);
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg), var(--shadow-orange);
}

.stat-card:hover::before {
    transform: scaleX(1);
}

.stat-number {
    font-size: 2.8rem;
    font-weight: 800;
    background: var(--orange-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.5rem;
    line-height: 1;
}

.stat-label {
    color: var(--text-muted);
    font-size: 1rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ===== БИО ===== */
.bio-text {
    color: var(--text-soft);
    font-size: 1.1rem;
    line-height: 1.8;
    white-space: pre-line;
}

/* ===== ДЕЙСТВИЯ ===== */
.actions-section {
    margin-top: 2.5rem;
    display: flex;
    justify-content: flex-end;
}

/* ===== АНИМАЦИИ ===== */


@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Применяем анимации */
.profile-header {
    animation: slideInLeft 0.5s ease;
}

.info-card:first-child {
    animation: slideInLeft 0.5s ease 0.1s both;
}

.info-card:last-child {
    animation: slideInRight 0.5s ease 0.1s both;
}

.stat-card:nth-child(1) { animation: fadeIn 0.5s ease 0.2s both; }
.stat-card:nth-child(2) { animation: fadeIn 0.5s ease 0.3s both; }
.stat-card:nth-child(3) { animation: fadeIn 0.5s ease 0.4s both; }

/* ===== АДАПТИВНОСТЬ ===== */
@media (max-width: 1200px) {
    .container {
        padding: 1.5rem;
    }

    .profile-header {
        padding: 2rem;
        gap: 2rem;
    }

    .username {
        font-size: 2.4rem;
    }

    .fullname {
        font-size: 1.2rem;
    }
}

@media (max-width: 992px) {
    .profile-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .stats-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .profile-avatar,
    .avatar-placeholder {
        width: 150px;
        height: 150px;
        font-size: 3rem;
    }

    .username {
        font-size: 2rem;
    }
}

@media (max-width: 768px) {
    .profile-header {
        flex-direction: column;
        text-align: center;
        gap: 1.5rem;
        padding: 1.5rem;
    }

    .profile-actions {
        justify-content: center;
    }

    .stats-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .info-card {
        padding: 1.5rem;
    }

    .info-card h3 {
        font-size: 1.3rem;
    }

    .info-value {
        font-size: 1rem;
    }

    .stat-number {
        font-size: 2.2rem;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 1rem;
    }

    .profile-avatar,
    .avatar-placeholder {
        width: 120px;
        height: 120px;
        font-size: 2.5rem;
    }

    .username {
        font-size: 1.6rem;
    }

    .fullname {
        font-size: 1rem;
    }

    .profile-actions {
        flex-direction: column;
        width: 100%;
    }

    .btn-edit,
    .btn-secondary {
        width: 100%;
        justify-content: center;
    }

    .info-card {
        padding: 1rem;
    }

    .info-card h3 {
        font-size: 1.2rem;
    }

    .stat-card {
        padding: 1.5rem;
    }

    .stat-number {
        font-size: 2rem;
    }
}

/* Исправления для корректной работы */
.upload-area {
    cursor: pointer;
    user-select: none;
}

.upload-area * {
    pointer-events: none;
}

.btn-clear {
    pointer-events: auto;
    cursor: pointer;
}

.preview-block {
    position: relative;
    z-index: 10;
}

/* Улучшение для текущего аватара */
.current-avatar-block img,
.current-avatar-block .avatar-placeholder {
    transition: var(--transition);
}

/* Фикс для кнопок */
.btn-reset, .btn-save, .btn-back {
    cursor: pointer;
    user-select: none;
}

/* Улучшение для чекбоксов */
.delete-option {
    cursor: pointer;
}

.delete-option * {
    cursor: pointer;
}

.delete-option input[type="checkbox"] {
    flex-shrink: 0;
}
