/* team.css - Team page specific styles */

/* Main Container */
.team-page-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

/* Team Hero Section */
.team-hero {
  position: relative;
  overflow: hidden;
}

.team-hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(59,130,246,.12), rgba(124,58,237,.12));
  border-radius: inherit;
  z-index: 0;
  animation: none !important;
}

.team-hero-content {
  position: relative;
  z-index: 1;
}

.team-subtitle {
  font-size: 1.1rem;
  color: #cbd5e1;
  margin: 0.5rem 0 0 0;
}

.team-description {
  font-size: 1rem;
  color: #94a3b8;
  margin: 1rem 0 0 0;
  font-style: italic;
}

/* Team Info Card */
.team-info-card {
  background: linear-gradient(135deg, rgba(255,255,255,.06), rgba(255,255,255,.02));
  border: 1px solid rgba(59,130,246,.2);
  box-shadow: 0 8px 32px rgba(0,0,0,.1);
}

.team-info-header {
  flex-wrap: wrap;
  gap: 1rem;
}

.team-logo-section {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.team-logo-large {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid rgba(59,130,246,.3);
  box-shadow: 0 4px 16px rgba(59,130,246,.2);
}

.team-logo-placeholder {
  background: linear-gradient(135deg, #60a5fa, #7c3aed);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 800;
  font-size: 1.8rem;
  letter-spacing: 1px;
}

.team-info-details {
  flex: 1;
  min-width: 0;
}

.team-card-title {
  margin: 0 0 0.5rem 0;
  font-size: 1.3rem;
}

.team-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.team-type-badge {
  background: linear-gradient(135deg, #10b981, #059669);
  color: white;
  font-size: 0.75rem;
}

.team-date-badge {
  background: rgba(59,130,246,.15);
  color: #93c5fd;
  border: 1px solid rgba(59,130,246,.3);
  font-size: 0.75rem;
}

.team-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  align-items: flex-start;
}

/* Apply Button */
.btn-apply {
  background: linear-gradient(135deg, #10b981, #059669);
  color: white !important;
  border: 1px solid rgba(16,185,129,.5);
  box-shadow: 0 6px 20px rgba(16,185,129,.3);
  padding: 0.75rem 1.5rem;
  font-size: 0.95rem;
  font-weight: 700;
  border-radius: 12px;
  transition: all 0.3s ease;
  text-transform: none;
  letter-spacing: 0.3px;
}

.btn-apply:hover {
  background: linear-gradient(135deg, #059669, #047857);
  box-shadow: 0 8px 25px rgba(16,185,129,.4);
  transform: translateY(-2px);
  border-color: rgba(16,185,129,.7);
}

.btn-apply:active {
  transform: translateY(0);
  box-shadow: 0 4px 15px rgba(16,185,129,.3);
}

.btn-apply i {
  margin-right: 0.5rem;
  font-size: 1rem;
}

.btn-apply span {
  font-weight: 600;
}

/* Team Stats Container */
.team-stats-container {
  margin: 1.5rem auto;
  max-width: 1000px;
}

.team-stats {
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}

.team-stat-card {
  position: relative;
  padding: 1.5rem 1rem;
  background: linear-gradient(135deg, rgba(59,130,246,.08), rgba(124,58,237,.08));
  border: 1px solid rgba(59,130,246,.25);
  box-shadow: 0 4px 16px rgba(0,0,0,.1);
  transition: all 0.3s ease;
}

.team-stat-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(59,130,246,.2);
  border-color: rgba(59,130,246,.4);
}

.stat-icon {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  color: rgba(148,163,184,.5);
  font-size: 1.2rem;
}

.stat-icon-win { color: rgba(16,185,129,.7); }
.stat-icon-loss { color: rgba(239,68,68,.7); }
.stat-icon-rate { color: rgba(124,58,237,.7); }

/* Team Members */
.team-members-card {
  background: linear-gradient(135deg, rgba(255,255,255,.06), rgba(255,255,255,.02));
}

.team-count-badge {
  background: rgba(59,130,246,.15);
  color: #93c5fd;
  border: 1px solid rgba(59,130,246,.3);
}

.team-members-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1rem;
}

.team-member-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  background: linear-gradient(135deg, rgba(255,255,255,.04), rgba(255,255,255,.01));
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 12px;
  transition: all 0.3s ease;
  position: relative;
}

.team-member-card:hover {
  transform: translateY(-2px);
  background: linear-gradient(135deg, rgba(59,130,246,.08), rgba(124,58,237,.08));
  border-color: rgba(59,130,246,.2);
  box-shadow: 0 4px 16px rgba(59,130,246,.1);
}

.captain-card {
  background: linear-gradient(135deg, rgba(251,191,36,.08), rgba(245,158,11,.08));
  border-color: rgba(251,191,36,.3);
}

.captain-card:hover {
  background: linear-gradient(135deg, rgba(251,191,36,.12), rgba(245,158,11,.12));
  border-color: rgba(251,191,36,.4);
}

.member-avatar-section {
  position: relative;
}

.member-avatar {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(59,130,246,.3);
  transition: all 0.3s ease;
}

.member-avatar-link {
  text-decoration: none;
  display: block;
}

.member-avatar-link:hover .member-avatar {
  border-color: rgba(59,130,246,.6);
  box-shadow: 0 4px 16px rgba(59,130,246,.3);
  transform: scale(1.05);
}

.member-name-link {
  text-decoration: none;
  color: inherit;
}

.member-name-link:hover {
  text-decoration: none;
}

.member-name-link:hover .member-name {
  color: #60a5fa;
  transition: color 0.3s ease;
}

.captain-crown {
  position: absolute;
  top: -5px;
  right: -5px;
  background: linear-gradient(135deg, #fbbf24, #f59e0b);
  color: #000;
  border-radius: 50%;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  border: 2px solid rgba(0,0,0,.2);
}

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

.member-name-section {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.member-name {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 700;
  color: #fff;
}

.captain-badge {
  background: linear-gradient(135deg, #fbbf24, #f59e0b);
  color: #000;
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 0.7rem;
  font-weight: 700;
}

.member-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.member-stat {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  color: #94a3b8;
  font-size: 0.875rem;
}

.member-stat i {
  color: #60a5fa;
  font-size: 0.75rem;
}

.win-stat i {
  color: #10b981;
}

.member-actions {
  display: flex;
  gap: 0.5rem;
}

.transfer-captain-btn {
  padding: 0.25rem 0.5rem;
  font-size: 0.875rem;
}

/* Applications */
.applications-card {
  background: linear-gradient(135deg, rgba(239,68,68,.06), rgba(220,38,38,.06));
  border-color: rgba(239,68,68,.2);
}

.applications-title i {
  color: #fbbf24;
}

.pulse {
  animation: none !important;
}

.applications-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.application-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem;
  background: rgba(255,255,255,.03);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 10px;
  transition: all 0.3s ease;
}

.application-card:hover {
  background: rgba(239,68,68,.05);
  border-color: rgba(239,68,68,.2);
}

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

.applicant-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(239,68,68,.3);
  transition: all 0.3s ease;
}

.applicant-avatar-link {
  text-decoration: none;
  display: block;
}

.applicant-avatar-link:hover .applicant-avatar {
  border-color: rgba(239,68,68,.6);
  box-shadow: 0 4px 16px rgba(239,68,68,.3);
  transform: scale(1.05);
}

.applicant-name-link {
  text-decoration: none;
  color: inherit;
}

.applicant-name-link:hover {
  text-decoration: none;
}

.applicant-name-link:hover .applicant-name {
  color: #fbbf24;
  transition: color 0.3s ease;
}

.applicant-name {
  margin: 0 0 0.25rem 0;
  font-size: 1rem;
  font-weight: 600;
  color: #fff;
}

.application-date {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  color: #94a3b8;
  font-size: 0.875rem;
}

.application-form {
  display: flex;
  gap: 0.5rem;
}

.btn-success {
  background: linear-gradient(135deg, #10b981, #059669);
  color: white;
  border: 1px solid rgba(16,185,129,.5);
}

.btn-success:hover {
  background: linear-gradient(135deg, #059669, #047857);
  border-color: rgba(16,185,129,.7);
}

.btn-danger {
  background: linear-gradient(135deg, #ef4444, #dc2626);
  color: white;
  border: 1px solid rgba(239,68,68,.5);
}

.btn-danger:hover {
  background: linear-gradient(135deg, #dc2626, #b91c1c);
  border-color: rgba(239,68,68,.7);
}

.btn-success span,
.btn-danger span {
  margin-left: 0.25rem;
}

/* Match History */
.match-history-card {
  background: linear-gradient(135deg, rgba(255,255,255,.06), rgba(255,255,255,.02));
}

.match-history-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.match-history-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  background: rgba(255,255,255,.03);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 12px;
  transition: all 0.3s ease;
  text-decoration: none;
  color: inherit;
}

.match-history-item:hover {
  transform: translateY(-2px);
  background: rgba(59,130,246,.05);
  border-color: rgba(59,130,246,.2);
  color: inherit;
  text-decoration: none;
}

.match-win {
  border-left: 4px solid #10b981;
}

.match-loss {
  border-left: 4px solid #ef4444;
}

.match-result-indicator {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255,255,255,.05);
}

.win-icon {
  color: #10b981;
  font-size: 1.2rem;
}

.loss-icon {
  color: #ef4444;
  font-size: 1.2rem;
}

.pending-icon {
  color: #60a5fa;
  font-size: 1rem;
}

.match-teams-section {
  flex: 1;
  min-width: 0;
}

.match-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.team {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-width: 0;
}

.home-team {
  justify-content: flex-start;
}

.away-team {
  justify-content: flex-end;
}

.team-name {
  font-weight: 600;
  color: #fff;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 150px;
}

.team-score {
  font-family: 'Orbitron', monospace;
  font-weight: 700;
  font-size: 1.1rem;
  padding: 0.25rem 0.5rem;
  border-radius: 6px;
  background: rgba(255,255,255,.05);
  border: 1px solid rgba(255,255,255,.1);
}

.winning-score {
  color: #10b981;
  background: rgba(16,185,129,.1);
  border-color: rgba(16,185,129,.3);
}

.losing-score {
  color: #ef4444;
  background: rgba(239,68,68,.1);
  border-color: rgba(239,68,68,.3);
}

.vs-divider {
  background: linear-gradient(135deg, #60a5fa, #7c3aed);
  color: white;
  font-weight: 800;
  font-size: 0.8rem;
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  box-shadow: 0 2px 8px rgba(99,102,241,.3);
}

.match-details {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.5rem;
}

.match-info {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.25rem;
  font-size: 0.875rem;
  color: #94a3b8;
}

.tournament-info,
.match-date {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.tournament-info i {
  color: #fbbf24;
}

.match-date i {
  color: #60a5fa;
}

.status-badge {
  padding: 0.25rem 0.75rem;
  border-radius: 12px;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.status-win {
  background: linear-gradient(135deg, #10b981, #059669);
  color: white;
  box-shadow: 0 2px 8px rgba(16,185,129,.3);
}

.status-loss {
  background: linear-gradient(135deg, #ef4444, #dc2626);
  color: white;
  box-shadow: 0 2px 8px rgba(239,68,68,.3);
}

.status-pending {
  background: linear-gradient(135deg, #60a5fa, #3b82f6);
  color: white;
  box-shadow: 0 2px 8px rgba(59,130,246,.3);
}

/* Empty States */
.empty-state {
  text-align: center;
  padding: 3rem 2rem;
  color: #94a3b8;
}

.empty-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
  color: #475569;
}

.empty-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: #cbd5e1;
  margin: 0 0 0.5rem 0;
}

.empty-text {
  font-size: 1rem;
  margin: 0;
  line-height: 1.5;
}

/* Navigation */
.team-navigation {
  text-align: center;
  margin-top: 2rem;
}

.back-button {
  font-size: 1rem;
  padding: 0.75rem 1.5rem;
}

.no-matches-message {
  margin-top: 2rem;
}

/* Responsive Design */
@media (max-width: 1024px) {
  .team-page-container {
    padding: 0 1.5rem;
  }
  
  .team-stats {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
  }
  
  .team-members-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .team-page-container {
    padding: 0 1rem;
  }
  
  .team-hero {
    margin: 1rem auto 1.5rem;
    padding: 1.5rem 1rem;
  }
  
  .team-hero .title {
    font-size: 1.75rem;
  }
  
  .team-info-header {
    flex-direction: column;
    align-items: flex-start;
  }
  
  .team-logo-section {
    width: 100%;
  }
  
  .team-actions {
    width: 100%;
    justify-content: center;
  }
  
  .team-stats {
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
  }
  
  .team-stat-card {
    padding: 1rem 0.75rem;
  }
  
  .stat-icon {
    font-size: 1rem;
  }
  
  .match-history-item {
    flex-direction: column;
    gap: 0.75rem;
    align-items: stretch;
  }
  
  .match-details {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }
  
  .match-info {
    align-items: flex-start;
  }
  
  .team-name {
    max-width: 120px;
  }
  
  .application-card {
    flex-direction: column;
    gap: 0.75rem;
    align-items: stretch;
  }
  
  .applicant-info {
    justify-content: center;
  }
  
  .application-form {
    justify-content: center;
  }
}

@media (max-width: 576px) {
  .team-page-container {
    padding: 0 0.75rem;
  }
  
  .team-stats {
    grid-template-columns: 1fr;
    gap: 0.5rem;
  }
  
  .team-member-card {
    flex-direction: column;
    text-align: center;
    gap: 0.75rem;
  }
  
  .member-name-section {
    justify-content: center;
  }
  
  .member-stats {
    justify-content: center;
  }
  
  .match-row {
    flex-direction: column;
    gap: 0.5rem;
  }
  
  .vs-divider {
    order: 2;
  }
  
  .home-team {
    order: 1;
    justify-content: center;
  }
  
  .away-team {
    order: 3;
    justify-content: center;
  }
  
  .team-name {
    max-width: none;
  }
}
