/* ==========================================================================
   Estilos del Perfil del Jugador y Galería de Evolución por Niveles 🌱📸
   ========================================================================== */

.profile-container {
    max-width: 960px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 24px;
    padding-bottom: 40px;
}

/* Tarjeta Principal de Cabecera: Avatar e Información */
.profile-header-card {
    background: white;
    border-radius: var(--radius-lg);
    padding: 28px;
    box-shadow: var(--shadow-card);
    border: 3px solid #e2ece9;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 28px;
    position: relative;
    overflow: hidden;
}

.profile-header-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 8px;
    background: linear-gradient(90deg, #52b788, #ffb703, #ff758f);
}

.profile-avatar-wrap {
    position: relative;
    width: 110px;
    height: 110px;
    flex-shrink: 0;
}

.profile-avatar-circle {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: linear-gradient(135deg, #d8f3dc, #b7e4c7);
    border: 4px solid #52b788;
    box-shadow: 0 6px 18px rgba(45, 106, 79, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3.5rem;
    overflow: hidden;
    position: relative;
}

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

.avatar-edit-btn {
    position: absolute;
    bottom: 0;
    right: 0;
    background: #2d6a4f;
    color: white;
    border: 2px solid white;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.1rem;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
    transition: transform 0.2s ease, background 0.2s ease;
}

.avatar-edit-btn:hover {
    transform: scale(1.15);
    background: #1b4332;
}

.profile-user-info {
    flex: 1;
    min-width: 0;
}

.profile-name-row {
    margin-bottom: 16px;
}

.profile-input {
    padding: 10px 16px;
    border: 2px solid #b7e4c7;
    border-radius: var(--radius-sm);
    font-family: var(--font-body);
    font-size: 1rem;
    font-weight: 600;
    color: var(--dark-text);
    outline: none;
    transition: border-color 0.2s;
    width: 100%;
    max-width: 320px;
}

.profile-input:focus {
    border-color: var(--primary-green);
    box-shadow: 0 0 0 3px rgba(82, 183, 136, 0.25);
}

.profile-btn-sm {
    background: linear-gradient(135deg, #52b788, #2d6a4f);
    color: white;
    border: none;
    border-radius: var(--radius-sm);
    padding: 10px 20px;
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(45, 106, 79, 0.25);
    transition: transform 0.2s, box-shadow 0.2s;
    white-space: nowrap;
}

.profile-btn-sm:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(45, 106, 79, 0.35);
}

.profile-stats-row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.profile-stat-badge {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    color: #166534;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

/* Tarjeta: Nombre cariñoso de tu Plantita */
.profile-plant-custom-card {
    background: white;
    border-radius: var(--radius-lg);
    padding: 24px 28px;
    box-shadow: var(--shadow-card);
    border: 2px solid #b7e4c7;
}

.card-icon-title {
    display: flex;
    align-items: center;
    gap: 14px;
}

/* Tarjeta: Galería de Fotos Reales por Niveles */
.profile-evolution-card {
    background: white;
    border-radius: var(--radius-lg);
    padding: 28px;
    box-shadow: var(--shadow-card);
    border: 3px solid #e2ece9;
}

.evolution-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 24px;
}

.levels-gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 20px;
}

.level-card-item {
    background: #f8fafc;
    border: 2px solid #e2e8f0;
    border-radius: var(--radius-md);
    padding: 18px;
    display: flex;
    flex-direction: column;
    transition: all 0.25s ease;
    position: relative;
    overflow: hidden;
}

.level-card-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.06);
    border-color: #52b788;
}

.level-card-item.has-photo {
    border-color: #52b788;
    background: #f0fdf4;
}

.level-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.level-number-badge {
    background: #2d6a4f;
    color: white;
    font-weight: 700;
    font-family: var(--font-heading);
    font-size: 0.85rem;
    padding: 4px 10px;
    border-radius: 12px;
}

.level-status-pill {
    font-size: 0.75rem;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 10px;
}

.level-status-pill.verified {
    background: #dcfce7;
    color: #15803d;
}

.level-status-pill.pending {
    background: #fef9c3;
    color: #854d0e;
}

.level-photo-box {
    width: 100%;
    height: 190px;
    border-radius: var(--radius-sm);
    background: #f1f5f9;
    border: 2px dashed #cbd5e1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    margin-bottom: 12px;
    position: relative;
    cursor: pointer;
    transition: border-color 0.2s;
}

.level-card-item.has-photo .level-photo-box {
    border: 2px solid #52b788;
}

.level-photo-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.level-photo-box:hover img {
    transform: scale(1.04);
}

.level-upload-prompt {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    color: #64748b;
    font-size: 0.85rem;
    font-weight: 600;
    text-align: center;
    padding: 12px;
}

.level-upload-prompt span.icon {
    font-size: 2.2rem;
}

.level-info-title {
    font-family: var(--font-heading);
    font-size: 1.05rem;
    color: var(--primary-green);
    margin-bottom: 4px;
}

.level-info-desc {
    font-size: 0.82rem;
    color: #64748b;
    margin-bottom: 12px;
    flex: 1;
}

.level-date-stamp {
    font-size: 0.78rem;
    color: #047857;
    font-weight: 600;
    margin-bottom: 8px;
}

.level-upload-action-btn {
    background: #0288d1;
    color: white;
    border: none;
    border-radius: 8px;
    padding: 8px 14px;
    font-weight: 700;
    font-size: 0.85rem;
    cursor: pointer;
    width: 100%;
    transition: background 0.2s;
}

.level-upload-action-btn:hover {
    background: #0277bd;
}

.profile-level-note {
    margin: 8px 0 0;
    font-size: 0.86rem;
    color: #3f6212;
    line-height: 1.35;
}

.profile-social-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}

.profile-social-btn {
    border: none;
    border-radius: 14px;
    padding: 10px 14px;
    font-family: var(--font-heading);
    font-weight: 700;
    cursor: pointer;
    background: #166534;
    color: white;
}

.profile-social-btn-gold {
    background: #b45309;
}

#players-modal {
    z-index: 1400;
}

#players-modal .modal-card {
    animation: none;
    opacity: 1;
}

.players-modal-card {
    text-align: left;
    max-width: 640px;
}

.players-modal-note {
    color: #475569;
    font-size: 0.92rem;
    margin: 0 0 12px;
}

.players-add-box {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    margin-bottom: 12px;
}

.players-add-box[hidden] {
    display: none;
}

.friend-add-msg {
    width: 100%;
    margin: 0;
    font-weight: 700;
    color: #166534;
}

.players-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.players-empty {
    margin: 8px 0;
    color: #64748b;
}

.player-card {
    display: flex;
    gap: 10px;
    align-items: center;
    background: #f8fafc;
    border: 2px solid #e2e8f0;
    border-radius: 16px;
    padding: 10px 12px;
}

.player-card.is-me {
    border-color: #86efac;
    background: #f0fdf4;
}

.player-card.is-top {
    border-color: #facc15;
    background: #fffbeb;
}

.player-rank {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #166534;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    flex-shrink: 0;
}

.player-card.is-top .player-rank {
    background: #b45309;
}

.player-main {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
    flex: 1;
    font-size: 0.86rem;
    color: #334155;
}

.player-level {
    text-align: right;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
    color: #166534;
}

.player-level b {
    font-size: 1.05rem;
}

.friend-remove-btn {
    border: none;
    background: #fee2e2;
    color: #b91c1c;
    border-radius: 10px;
    padding: 4px 8px;
    font-weight: 700;
    cursor: pointer;
}

/* Header Avatar Miniatura */
.header-avatar-thumb {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid #10b981;
}
