@import url("tiers.css");

/* Additional modern styles for tier pages */
.bg-animation {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  background: linear-gradient(135deg, #0f0f23 0%, #1a1a2e 50%, #16213e 100%);
}

.floating-shapes {
  position: absolute;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.shape {
  position: absolute;
  border-radius: 50%;
  background: linear-gradient(45deg, #6366f1, #818cf8);
  opacity: 0.05;
  animation: float 20s infinite linear;
}

.shape-1 {
  width: 100px;
  height: 100px;
  top: 20%;
  left: 10%;
  animation-delay: 0s;
}

.shape-2 {
  width: 150px;
  height: 150px;
  top: 60%;
  right: 15%;
  animation-delay: -8s;
}

.shape-3 {
  width: 80px;
  height: 80px;
  top: 80%;
  left: 60%;
  animation-delay: -15s;
}

@keyframes float {
  0% { transform: translateY(0px) rotate(0deg); }
  33% { transform: translateY(-30px) rotate(120deg); }
  66% { transform: translateY(30px) rotate(240deg); }
  100% { transform: translateY(0px) rotate(360deg); }
}

/* Search Bar Styles */
.search-container {
  max-width: 1200px;
  margin: 0 auto 30px;
  padding: 0 20px;
}

.search-wrapper {
  display: flex;
  gap: 10px;
  background: rgba(30, 30, 45, 0.8);
  backdrop-filter: blur(10px);
  border-radius: 12px;
  padding: 15px;
  border: 1px solid rgba(99, 102, 241, 0.2);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.search-input {
  flex: 1;
  background: rgba(20, 20, 35, 0.6);
  border: 1px solid rgba(99, 102, 241, 0.3);
  border-radius: 8px;
  padding: 12px 20px;
  color: #fff;
  font-size: 15px;
  font-family: 'Space Grotesk', sans-serif;
  outline: none;
  transition: all 0.3s ease;
}

.search-input:focus {
  border-color: #6366f1;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.search-input::placeholder {
  color: rgba(255, 255, 255, 0.4);
}

.search-btn, .clear-btn {
  background: linear-gradient(135deg, #6366f1, #818cf8);
  border: none;
  border-radius: 8px;
  padding: 12px 30px;
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  font-family: 'Space Grotesk', sans-serif;
  cursor: pointer;
  transition: all 0.3s ease;
  white-space: nowrap;
}

.search-btn:hover, .clear-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(99, 102, 241, 0.4);
}

.clear-btn {
  background: rgba(239, 68, 68, 0.8);
  padding: 12px 20px;
  font-size: 18px;
}

.clear-btn:hover {
  background: rgba(239, 68, 68, 1);
  box-shadow: 0 8px 20px rgba(239, 68, 68, 0.4);
}

/* Tier Collapse/Expand Styles */
.tier-header {
  cursor: pointer;
  transition: opacity 0.3s ease, background 0.3s ease;
  user-select: none;
  position: relative;
}

.tier-header:hover {
  background: rgba(255, 255, 255, 0.05);
}

.tier-header::after {
  content: '▼';
  position: absolute;
  right: 15px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 12px;
  opacity: 0.6;
  transition: transform 0.3s ease;
}

.tier-column.collapsed .tier-header::after {
  transform: translateY(-50%) rotate(-90deg);
}

.tier-column.collapsed .tier-list {
  display: none;
}

/* No Results Message */
.tier-list .no-results {
  list-style: none;
  text-align: center;
  padding: 40px 20px;
  color: rgba(255, 255, 255, 0.4);
  font-size: 14px;
  font-style: italic;
}

/* Mobile Responsive */
@media (max-width: 768px) {
  .search-wrapper {
    flex-direction: column;
  }
  
  .search-btn, .clear-btn {
    width: 100%;
  }
}

/* Player Popup Modal */
.player-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  animation: fadeIn 0.2s ease;
}

.player-modal-content {
  background: linear-gradient(135deg, rgba(26, 26, 46, 0.95), rgba(22, 33, 62, 0.95));
  border: 2px solid rgba(99, 102, 241, 0.3);
  border-radius: 20px;
  width: 90%;
  max-width: 500px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  position: relative;
  animation: slideUp 0.3s ease;
  overflow: hidden;
}

.player-modal-close {
  position: absolute;
  top: 15px;
  right: 15px;
  background: rgba(239, 68, 68, 0.2);
  border: 1px solid rgba(239, 68, 68, 0.5);
  color: #fff;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  font-size: 24px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  z-index: 10;
}

.player-modal-close:hover {
  background: rgba(239, 68, 68, 0.4);
  transform: rotate(90deg);
}

.player-modal-header {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.2), rgba(129, 140, 248, 0.1));
  padding: 40px 30px 30px;
  display: flex;
  align-items: center;
  gap: 20px;
  border-bottom: 1px solid rgba(99, 102, 241, 0.2);
}

.player-modal-avatar {
  width: 80px;
  height: 80px;
  border-radius: 15px;
  border: 3px solid rgba(99, 102, 241, 0.5);
  box-shadow: 0 8px 20px rgba(99, 102, 241, 0.3);
}

.player-modal-info h2 {
  margin: 0 0 10px 0;
  font-size: 24px;
  font-weight: 700;
  color: #fff;
}

.player-modal-badge {
  display: inline-block;
  padding: 6px 16px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
  background: linear-gradient(135deg, #6366f1, #818cf8);
  color: #fff;
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.4);
}

.player-modal-body {
  padding: 30px;
}

.player-stat {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.player-stat:last-child {
  border-bottom: none;
}

.stat-label {
  color: rgba(255, 255, 255, 0.6);
  font-size: 14px;
  font-weight: 500;
}

.stat-value {
  color: #fff;
  font-size: 15px;
  font-weight: 600;
}

.player-modal-footer {
  padding: 20px 30px 30px;
  text-align: center;
}

.player-modal-btn {
  display: inline-block;
  padding: 12px 30px;
  background: linear-gradient(135deg, #6366f1, #818cf8);
  color: #fff;
  text-decoration: none;
  border-radius: 10px;
  font-weight: 600;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
}

.player-modal-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(99, 102, 241, 0.5);
}

/* Tier List View Modal */
.tier-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  animation: fadeIn 0.2s ease;
  padding: 20px;
}

.tier-modal-content {
  background: linear-gradient(135deg, rgba(26, 26, 46, 0.98), rgba(22, 33, 62, 0.98));
  border: 2px solid rgba(99, 102, 241, 0.3);
  border-radius: 20px;
  width: 100%;
  max-width: 900px;
  max-height: 90vh;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  display: flex;
  flex-direction: column;
  animation: slideUp 0.3s ease;
  overflow: hidden;
}

.tier-modal-header {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.2), rgba(129, 140, 248, 0.1));
  padding: 25px 30px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 2px solid rgba(99, 102, 241, 0.3);
  flex-shrink: 0;
}

.tier-modal-header h2 {
  margin: 0;
  font-size: 24px;
  font-weight: 700;
  color: #fff;
}

.tier-modal-close {
  background: rgba(239, 68, 68, 0.2);
  border: 1px solid rgba(239, 68, 68, 0.5);
  color: #fff;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  font-size: 24px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

.tier-modal-close:hover {
  background: rgba(239, 68, 68, 0.4);
  transform: rotate(90deg);
}

.tier-modal-body {
  padding: 20px 30px 30px;
  overflow-y: auto;
  flex: 1;
}

.tier-modal-stats {
  display: flex;
  gap: 30px;
  padding: 20px;
  background: rgba(99, 102, 241, 0.1);
  border-radius: 12px;
  margin-bottom: 20px;
  color: rgba(255, 255, 255, 0.7);
  font-size: 14px;
}

.tier-modal-stats strong {
  color: #fff;
  font-size: 16px;
}

.tier-modal-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.tier-modal-player {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 15px 20px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(99, 102, 241, 0.2);
  border-radius: 12px;
  transition: all 0.3s ease;
  cursor: pointer;
}

.tier-modal-player:hover {
  background: rgba(99, 102, 241, 0.1);
  border-color: rgba(99, 102, 241, 0.4);
  transform: translateX(5px);
  box-shadow: 0 4px 15px rgba(99, 102, 241, 0.2);
}

.tier-modal-rank {
  font-size: 16px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.4);
  min-width: 40px;
}

.tier-modal-player-avatar {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  border: 2px solid rgba(99, 102, 241, 0.3);
}

.tier-modal-player-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.tier-modal-player-name {
  font-size: 16px;
  font-weight: 600;
  color: #fff;
}

.tier-modal-player-region {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.5);
}

.tier-modal-player-badge {
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  background: linear-gradient(135deg, #6366f1, #818cf8);
  color: #fff;
  box-shadow: 0 2px 8px rgba(99, 102, 241, 0.3);
}

/* Animations */
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

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

/* Mobile responsive for modals */
@media (max-width: 768px) {
  .player-modal-content,
  .tier-modal-content {
    width: 95%;
    max-width: 95%;
  }
  
  .player-modal-header {
    flex-direction: column;
    text-align: center;
    padding: 30px 20px 20px;
  }
  
  .tier-modal-stats {
    flex-direction: column;
    gap: 10px;
  }
  
  .tier-modal-player {
    padding: 12px 15px;
  }
  
  .tier-modal-rank {
    min-width: 30px;
    font-size: 14px;
  }
}
