/*
 * Página de Perfil de Usuario
 */

.profile-container {
  max-width: 1000px;
  margin: 0 auto;
}

/* Encabezado del Perfil */
.profile-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  background-color: var(--bg-card);
  border-radius: var(--border-radius);
  padding: 2rem;
  border: 1px solid rgba(0, 240, 255, 0.15);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
  margin-bottom: 2rem;
  position: relative;
  overflow: hidden;
}

/* Fondo decorativo */
.profile-header::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100px;
  background: linear-gradient(90deg, rgba(0,240,255,0.1), rgba(180,0,255,0.1));
  z-index: 0;
}

@media (min-width: 768px) {
  .profile-header {
    flex-direction: row;
    align-items: flex-start;
    gap: 2rem;
  }
}

.profile-avatar-container {
  position: relative;
  z-index: 1;
  margin-bottom: 1.5rem;
}

@media (min-width: 768px) {
  .profile-avatar-container {
    margin-bottom: 0;
    margin-top: 20px;
  }
}

.profile-avatar-container .avatar {
  background-color: var(--bg-card-solid);
}

.profile-avatar-edit {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background-color: var(--neon-cyan);
  color: var(--bg-primary);
  border: 2px solid var(--bg-card);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.profile-avatar-edit:hover {
  transform: scale(1.1);
  box-shadow: var(--glow-cyan);
}

.profile-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  z-index: 1;
  text-align: center;
}

@media (min-width: 768px) {
  .profile-info {
    align-items: flex-start;
    text-align: left;
    margin-top: 40px;
  }
}

.profile-name {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.25rem;
}

.profile-email {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-bottom: 0.75rem;
}

.profile-role {
  margin-bottom: 1rem;
}

/* Estadísticas del Perfil */
.profile-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  width: 100%;
  margin-top: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 1.5rem;
}

.stat-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background-color: rgba(255, 255, 255, 0.02);
  border-radius: var(--border-radius-sm);
  padding: 1rem;
}

.stat-value {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--neon-cyan);
  text-shadow: 0 0 5px rgba(0, 240, 255, 0.5);
}

.stat-label {
  font-size: 0.75rem;
  color: var(--text-secondary);
  text-transform: uppercase;
  margin-top: 0.25rem;
  text-align: center;
}

/* Pestañas (Tabs) */
.profile-tabs {
  display: flex;
  gap: 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  margin-bottom: 1.5rem;
  overflow-x: auto;
  scrollbar-width: none; /* Firefox */
}

.profile-tabs::-webkit-scrollbar {
  display: none; /* Chrome */
}

.profile-tab {
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 1rem;
  font-family: var(--font-primary);
  padding: 0.75rem 1rem;
  cursor: pointer;
  white-space: nowrap;
  position: relative;
  transition: color var(--transition-fast);
}

.profile-tab:hover {
  color: var(--neon-cyan);
}

.profile-tab.active {
  color: var(--neon-cyan);
  font-weight: 600;
}

.profile-tab.active::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  width: 100%;
  height: 2px;
  background-color: var(--neon-cyan);
  box-shadow: var(--glow-cyan);
}

.profile-tab-content {
  display: none;
}

.profile-tab-content.active {
  display: block;
  animation: fadeIn 0.3s ease;
}

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

/* Formulario de Perfil */
.profile-form {
  max-width: 600px;
}

/* Insignias Obtenidas (Badges) */
.profile-badges {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 1rem;
}

.badge-card {
  background-color: var(--bg-card);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--border-radius-sm);
  padding: 1.5rem 1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  transition: transform var(--transition-fast);
}

.badge-card:hover {
  transform: translateY(-5px);
  border-color: rgba(180, 0, 255, 0.3);
  box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}

.badge-icon {
  font-size: 2.5rem;
  color: var(--neon-magenta);
  margin-bottom: 1rem;
  filter: drop-shadow(0 0 5px rgba(180, 0, 255, 0.5));
}

.badge-name {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.25rem;
}

.badge-date {
  font-size: 0.75rem;
  color: var(--text-secondary);
}

/* Historial */
.profile-history-list {
  list-style: none;
}

.history-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem;
  background-color: var(--bg-card);
  border-radius: var(--border-radius-sm);
  margin-bottom: 0.5rem;
  border-left: 3px solid transparent;
  transition: background-color var(--transition-fast);
}

.history-item:hover {
  background-color: rgba(255, 255, 255, 0.05);
  border-left-color: var(--neon-cyan);
}

.history-info {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.history-icon {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  background-color: rgba(0, 240, 255, 0.1);
  color: var(--neon-cyan);
  display: flex;
  align-items: center;
  justify-content: center;
}

.history-title {
  font-weight: 500;
  color: var(--text-primary);
}

.history-meta {
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.history-date {
  font-size: 0.8rem;
  color: var(--text-secondary);
}
