/* =============================================================================
   Profile View Styles - Fullscreen Page Design
   ============================================================================= */

/* Profile Page Overlay - Fullscreen */
.profile-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: linear-gradient(135deg, #0a0a1a 0%, #12122a 50%, #1a1a3e 100%);
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  overflow-y: auto;
}

/* Add ambient glow effect */
.profile-modal::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background:
    radial-gradient(ellipse at 20% 20%, rgba(99, 102, 241, 0.15) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 80%, rgba(168, 85, 247, 0.1) 0%, transparent 50%);
  pointer-events: none;
  z-index: 0;
}

.profile-modal.visible {
  opacity: 1;
  visibility: visible;
}

/* Profile Container */
.profile-container {
  position: relative;
  z-index: 1;
  width: 100%;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Profile Page Header - matches main header */
.profile-page-header {
  position: sticky !important;
  top: 0;
  z-index: 100;
}

.profile-page-header .header-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.header-left-section {
  display: flex;
  align-items: center;
  gap: 20px;
}

.header-back-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  color: white;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.header-back-btn:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: translateX(-3px);
}

.header-back-btn i {
  font-size: 1rem;
}

.page-title-section {
  display: flex;
  align-items: center;
  gap: 16px;
}

.profile-avatar {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: linear-gradient(135deg, #6366f1, #a855f7);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  box-shadow: 0 4px 20px rgba(99, 102, 241, 0.3);
}

.profile-info h2 {
  font-size: 1.4rem;
  font-weight: 700;
  margin: 0;
  color: white;
}

.profile-stats {
  display: flex;
  gap: 16px;
  font-size: 0.85rem;
  margin-top: 2px;
}

.profile-stat {
  display: flex;
  align-items: center;
  gap: 6px;
  color: rgba(255, 255, 255, 0.7);
}

/* Profile Tabs */
.profile-tabs {
  display: flex;
  gap: 8px;
  padding: 20px 40px;
  background: transparent;
}

.profile-tab {
  flex: 0 0 auto;
  padding: 14px 28px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  color: rgba(255, 255, 255, 0.6);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 10px;
}

.profile-tab:hover {
  color: white;
  background: rgba(255, 255, 255, 0.1);
}

.profile-tab.active {
  color: white;
  background: #6366f1;
  border-color: #6366f1;
  box-shadow: 0 4px 20px rgba(99, 102, 241, 0.4);
}

.profile-tab-count {
  background: rgba(255, 255, 255, 0.2);
  padding: 4px 10px;
  border-radius: 10px;
  font-size: 0.85rem;
  font-weight: 700;
}

.profile-tab.active .profile-tab-count {
  background: rgba(255, 255, 255, 0.3);
}

/* Profile Content */
.profile-content {
  flex: 1;
  padding: 0 40px 40px;
}

.profile-tab-panel {
  display: none;
  animation: fadeInUp 0.4s ease;
}

.profile-tab-panel.active {
  display: block;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Empty State */
.profile-empty {
  text-align: center;
  padding: 100px 20px;
  color: rgba(255, 255, 255, 0.5);
}

.profile-empty-icon {
  font-size: 5rem;
  margin-bottom: 24px;
  opacity: 0.4;
}

.profile-empty h3 {
  font-size: 1.6rem;
  margin-bottom: 12px;
  color: white;
  font-weight: 700;
}

.profile-empty p {
  font-size: 1.1rem;
  margin-bottom: 30px;
  max-width: 400px;
  margin-left: auto;
  margin-right: auto;
}

.profile-empty-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 16px 32px;
  background: #6366f1;
  border: none;
  border-radius: 16px;
  color: white;
  font-size: 1.1rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
}

.profile-empty-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 30px rgba(99, 102, 241, 0.4);
}

/* Profile Pokemon Grid */
.profile-pokemon-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 24px;
}

/* Favorite remove button */
.favorite-remove-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: rgba(239, 68, 68, 0.8);
  border: none;
  color: white;
  font-size: 14px;
  cursor: pointer;
  opacity: 0;
  transition: all 0.2s;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: center;
}

.pokemon-card:hover .favorite-remove-btn {
  opacity: 1;
}

.favorite-remove-btn:hover {
  background: rgba(239, 68, 68, 1);
  transform: scale(1.1);
}

/* Favorite shiny badge */
.favorite-shiny-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  font-size: 20px;
  z-index: 20;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

/* Team Section */
.team-section {
  margin-bottom: 40px;
}

.team-section-title {
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  color: white;
}

.team-slots {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 20px;
}

.team-slot {
  aspect-ratio: 1;
  background: rgba(255, 255, 255, 0.05);
  border: 2px dashed rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
}

.team-slot:hover {
  background: rgba(99, 102, 241, 0.1);
  border-color: #6366f1;
  transform: translateY(-4px);
}

.team-slot.filled {
  border-style: solid;
  border-color: rgba(255, 255, 255, 0.1);
}

.team-slot.filled:hover {
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.team-slot-add {
  font-size: 3rem;
  color: rgba(255, 255, 255, 0.2);
  transition: color 0.2s;
}

.team-slot:hover .team-slot-add {
  color: #6366f1;
}

.team-slot img {
  width: 70%;
  height: 70%;
  object-fit: contain;
  filter: drop-shadow(0 5px 15px rgba(0, 0, 0, 0.3));
}

.team-slot-name {
  font-size: 0.9rem;
  font-weight: 600;
  text-align: center;
  margin-top: 8px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 90%;
  color: white;
}

.team-slot-remove {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: rgba(255, 0, 0, 0.4);
  border: none;
  color: white;
  font-size: 14px;
  cursor: pointer;
  opacity: 0;
  transition: all 0.2s;
}

.team-slot:hover .team-slot-remove {
  opacity: 1;
}

.team-slot-remove:hover {
  background: rgba(255, 0, 0, 0.7);
}

/* Team Actions (Share, Export) */
.team-actions {
  display: flex;
  gap: 12px;
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.team-action-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 12px;
  color: white;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.team-action-btn:hover {
  background: #6366f1;
  border-color: #6366f1;
  transform: translateY(-2px);
  box-shadow: 0 4px 20px rgba(99, 102, 241, 0.3);
}

.team-action-btn i {
  font-size: 1rem;
}

/* Team Analysis */
.team-analysis {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
}

.analysis-card {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  padding: 24px;
}

.analysis-card h4 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  color: white;
}

.analysis-types {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.analysis-type {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  background: rgba(0, 0, 0, 0.3);
  border-radius: 12px;
  font-size: 0.95rem;
  font-weight: 600;
}

.analysis-type img {
  width: 22px;
  height: 22px;
}

.analysis-weak {
  color: #f87171;
  background: rgba(248, 113, 113, 0.1);
}

.analysis-strong {
  color: #4ade80;
  background: rgba(74, 222, 128, 0.1);
}

/* Suggestions */
.suggestions-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 16px;
}

.suggestion-card {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  padding: 16px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
}

.suggestion-card:hover {
  background: rgba(99, 102, 241, 0.15);
  border-color: #6366f1;
  transform: translateY(-4px) scale(1.02);
}

.suggestion-card img {
  width: 80px;
  height: 80px;
  object-fit: contain;
  filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.3));
}

.suggestion-card-name {
  font-size: 0.9rem;
  font-weight: 600;
  margin-top: 10px;
  color: white;
}

/* Mobile Responsive */
@media (max-width: 768px) {
  .profile-page-header .header-content {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }

  .header-left-section {
    width: 100%;
    justify-content: space-between;
  }

  .header-back-btn span {
    display: none;
  }

  .profile-tabs {
    padding: 16px 20px;
    gap: 8px;
    overflow-x: auto;
  }

  .profile-tab {
    padding: 12px 20px;
    font-size: 0.9rem;
    white-space: nowrap;
  }

  .profile-content {
    padding: 0 20px 20px;
  }

  .team-slots {
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
  }

  .team-analysis {
    grid-template-columns: 1fr;
  }

  .profile-pokemon-grid {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 16px;
  }
}