/* ===== Team Dashboard Styles ===== */

.team-dashboard-container {
  min-height: 100vh;
  background: var(--gradient-game-dark);
  padding: 2rem;
  font-family: 'Inter', system-ui, sans-serif;
}

/* ===== Access Denied ===== */
.team-access-denied {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 70vh;
}

.team-access-denied-content {
  text-align: center;
  padding: 3rem;
  background: rgba(26, 26, 46, 0.8);
  border-radius: 20px;
  border: 1px solid var(--color-game-purple-800);
  box-shadow: var(--shadow-game-purple);
  backdrop-filter: blur(10px);
}

.team-access-denied-icon {
  margin-bottom: 1.5rem;
  color: var(--color-game-purple-400);
}

.team-access-denied h2 {
  font-size: 2rem;
  font-weight: 700;
  color: var(--color-game-purple-200);
  margin-bottom: 1rem;
}

.team-access-denied p {
  color: var(--color-text-secondary);
  margin-bottom: 0.5rem;
}

/* ===== Dashboard Wrapper ===== */
.team-dashboard-wrapper {
  max-width: 1400px;
  margin: 0 auto;
}

.team-dashboard-wrapper > * + * {
  margin-top: 2rem;
}

/* ===== Dashboard Header ===== */
.team-dashboard-header {
  background: linear-gradient(135deg, rgba(26, 26, 46, 0.95), rgba(22, 33, 62, 0.95));
  border-radius: 20px;
  padding: 2rem;
  border: 1px solid var(--color-game-purple-800);
  box-shadow: var(--shadow-game-purple);
  backdrop-filter: blur(10px);
  margin-bottom: 2rem;
}

.team-header-content {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 2rem;
}

.team-header-info h1 {
  font-size: 2.5rem;
  font-weight: 800;
  background: linear-gradient(45deg, var(--color-game-purple-400), var(--color-game-neon-cyan));
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 0.5rem;
}

.team-header-info p {
  color: var(--color-text-secondary);
  font-size: 1.1rem;
  margin-bottom: 1rem;
}

.team-header-meta {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.team-role-badge {
  padding: 0.5rem 1rem;
  border-radius: 50px;
  font-size: 0.875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.team-role-admin {
  background: linear-gradient(45deg, #ef4444, #dc2626);
  color: white;
  box-shadow: 0 0 20px rgba(239, 68, 68, 0.3);
}

.team-role-gm {
  background: linear-gradient(45deg, var(--color-game-purple-500), var(--color-game-purple-700));
  color: white;
  box-shadow: 0 0 20px rgba(168, 85, 247, 0.3);
}

.team-role-moderator {
  background: linear-gradient(45deg, #3b82f6, #1d4ed8);
  color: white;
  box-shadow: 0 0 20px rgba(59, 130, 246, 0.3);
}

.team-role-support {
  background: linear-gradient(45deg, #10b981, #059669);
  color: white;
  box-shadow: 0 0 20px rgba(16, 185, 129, 0.3);
}

.team-time-display {
  background: rgba(168, 85, 247, 0.1);
  border: 1px solid var(--color-game-purple-600);
  padding: 0.5rem 1rem;
  border-radius: 10px;
  color: var(--color-game-purple-300);
  font-family: 'Courier New', monospace;
  font-weight: 600;
}

.team-header-actions {
  display: flex;
  gap: 1rem;
}

.team-refresh-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  background: linear-gradient(45deg, var(--color-game-purple-600), var(--color-game-purple-800));
  border: 1px solid var(--color-game-purple-500);
  border-radius: 12px;
  color: white;
  font-weight: 600;
  transition: all 0.3s ease;
  cursor: pointer;
}

.team-refresh-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(168, 85, 247, 0.4);
}

.team-btn-glow {
  box-shadow: 0 0 20px rgba(168, 85, 247, 0.2);
}

.team-btn-loading {
  opacity: 0.7;
  cursor: not-allowed;
}

/* ===== Stats Grid ===== */
.team-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.team-stat-card {
  background: linear-gradient(135deg, rgba(26, 26, 46, 0.95), rgba(22, 33, 62, 0.95));
  border-radius: 16px;
  padding: 1.5rem;
  border: 1px solid var(--color-game-purple-800);
  backdrop-filter: blur(10px);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.team-stat-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--color-game-purple-500), var(--color-game-neon-cyan));
  opacity: 0;
  transition: opacity 0.3s ease;
}

.team-stat-card:hover::before {
  opacity: 1;
}

.team-stat-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 30px rgba(168, 85, 247, 0.3);
}

.team-stat-card {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
}

.team-stat-icon {
  padding: 1rem;
  border-radius: 12px;
  color: white;
  flex-shrink: 0;
}

.team-stat-players {
  background: linear-gradient(45deg, #3b82f6, #1d4ed8);
}

.team-stat-online {
  background: linear-gradient(45deg, #10b981, #059669);
}

.team-stat-uptime {
  background: linear-gradient(45deg, #f59e0b, #d97706);
}

.team-stat-events {
  background: linear-gradient(45deg, var(--color-game-purple-500), var(--color-game-purple-700));
}

.team-stat-content h3 {
  color: var(--color-text-secondary);
  font-size: 0.875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.5rem;
}

.team-stat-number {
  font-size: 2rem;
  font-weight: 800;
  color: var(--color-game-purple-200);
  margin-bottom: 0.25rem;
}

.team-stat-change {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.25rem 0.5rem;
  border-radius: 6px;
}

.team-stat-positive {
  background: rgba(16, 185, 129, 0.2);
  color: #10b981;
}

.team-stat-neutral {
  background: rgba(168, 85, 247, 0.2);
  color: var(--color-game-purple-400);
}

/* ===== Content Grid ===== */
.team-content-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  margin-bottom: 2rem;
}

.team-content-card {
  background: linear-gradient(135deg, rgba(26, 26, 46, 0.95), rgba(22, 33, 62, 0.95));
  border-radius: 16px;
  border: 1px solid var(--color-game-purple-800);
  backdrop-filter: blur(10px);
  overflow: hidden;
}

.team-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem;
  border-bottom: 1px solid var(--color-game-purple-800);
}

.team-card-header h3 {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--color-game-purple-200);
}

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

.team-card-action {
  padding: 0.5rem;
  background: rgba(168, 85, 247, 0.1);
  border: 1px solid var(--color-game-purple-600);
  border-radius: 8px;
  color: var(--color-game-purple-400);
  cursor: pointer;
  transition: all 0.3s ease;
}

.team-card-action:hover {
  background: rgba(168, 85, 247, 0.2);
  transform: scale(1.05);
}

.team-members-count {
  font-size: 0.875rem;
  color: var(--color-text-secondary);
  background: rgba(168, 85, 247, 0.1);
  padding: 0.25rem 0.75rem;
  border-radius: 12px;
}

/* ===== Activities List ===== */
.team-activities-list {
  padding: 1.5rem;
  max-height: 400px;
  overflow-y: auto;
}

.team-activity-item {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1rem 0;
  border-bottom: 1px solid rgba(168, 85, 247, 0.1);
  position: relative;
}

.team-activity-item:last-child {
  border-bottom: none;
}

.team-activity-dot {
  width: 8px;
  height: 8px;
  background: var(--color-game-purple-500);
  border-radius: 50%;
  flex-shrink: 0;
  margin-top: 0.5rem;
  position: relative;
}

.team-activity-dot::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 16px;
  height: 16px;
  background: var(--color-game-purple-500);
  border-radius: 50%;
  opacity: 0.3;
  animation: team-pulse 2s infinite;
}

.team-activity-content {
  flex: 1;
}

.team-activity-action {
  color: var(--color-game-purple-200);
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.team-activity-meta {
  display: flex;
  gap: 1rem;
  color: var(--color-text-secondary);
  font-size: 0.875rem;
}

.team-activity-user {
  color: var(--color-game-purple-400);
  font-weight: 500;
}

/* ===== Team Members List ===== */
.team-members-list {
  padding: 1.5rem;
}

.team-members-list > * + * {
  margin-top: 1rem;
}

.team-member-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  background: rgba(168, 85, 247, 0.05);
  border-radius: 12px;
  border: 1px solid rgba(168, 85, 247, 0.1);
  transition: all 0.3s ease;
}

.team-member-item:hover {
  background: rgba(168, 85, 247, 0.1);
  transform: translateX(5px);
}

.team-member-avatar {
  position: relative;
  padding: 0.75rem;
  background: var(--color-game-purple-600);
  border-radius: 12px;
  color: white;
}

.team-member-status {
  position: absolute;
  top: -2px;
  right: -2px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 2px solid var(--color-game-dark-surface);
}

.team-status-online {
  background: #10b981;
  animation: team-pulse 2s infinite;
}

.team-status-offline {
  background: #6b7280;
}

.team-member-info {
  flex: 1;
}

.team-member-name {
  font-weight: 600;
  color: var(--color-game-purple-200);
  margin-bottom: 0.25rem;
}

.team-member-role {
  color: var(--color-text-secondary);
  font-size: 0.875rem;
  text-transform: capitalize;
}

.team-level-badge {
  background: linear-gradient(45deg, var(--color-game-purple-500), var(--color-game-purple-700));
  color: white;
  padding: 0.25rem 0.75rem;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 600;
}

/* ===== Quick Actions ===== */
.team-quick-actions {
  background: linear-gradient(135deg, rgba(26, 26, 46, 0.95), rgba(22, 33, 62, 0.95));
  border-radius: 16px;
  padding: 2rem;
  border: 1px solid var(--color-game-purple-800);
  backdrop-filter: blur(10px);
}

.team-quick-actions h3 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--color-game-purple-200);
  margin-bottom: 1.5rem;
}

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

.team-action-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  padding: 1.5rem;
  background: rgba(168, 85, 247, 0.1);
  border: 1px solid var(--color-game-purple-600);
  border-radius: 12px;
  color: var(--color-game-purple-300);
  cursor: pointer;
  transition: all 0.3s ease;
  text-align: center;
}

.team-action-btn:hover {
  background: rgba(168, 85, 247, 0.2);
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(168, 85, 247, 0.3);
}

.team-action-btn span {
  font-weight: 600;
  font-size: 0.875rem;
}

/* ===== Animations ===== */
@keyframes team-pulse {
  0%, 100% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }
  50% {
    opacity: 0.5;
    transform: translate(-50%, -50%) scale(1.2);
  }
}

@keyframes team-spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

.team-spin {
  animation: team-spin 1s linear infinite;
}

/* ===== Transition Classes ===== */
.team-fade-in {
  opacity: 1;
  transform: translateY(0);
}

.team-fade-out {
  opacity: 0;
  transform: translateY(20px);
}

.team-slide-up {
  opacity: 1;
  transform: translateY(0);
}

.team-slide-down {
  opacity: 0;
  transform: translateY(30px);
}

.team-slide-left {
  opacity: 1;
  transform: translateX(0);
}

.team-slide-right {
  opacity: 0;
  transform: translateX(30px);
}

.team-scale-in {
  opacity: 1;
  transform: scale(1);
}

.team-scale-out {
  opacity: 0;
  transform: scale(0.95);
}

/* ===== Responsive Design ===== */
@media (max-width: 1024px) {
  .team-content-grid {
    grid-template-columns: 1fr;
  }

  .team-stats-grid {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  }
}

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

  .team-dashboard-header {
    padding: 1.5rem;
  }

  .team-header-content {
    flex-direction: column;
    gap: 1rem;
  }

  .team-header-info h1 {
    font-size: 2rem;
  }

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

  .team-actions-grid {
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  }
}

@media (max-width: 480px) {
  .team-header-meta {
    flex-direction: column;
    align-items: flex-start;
  }

  .team-member-item {
    flex-direction: column;
    text-align: center;
  }

  .team-activity-item {
    flex-direction: column;
    gap: 0.5rem;
  }
}
