/* Profile Page Styles */
.profile-container {
  width: 100%;
  padding: 20px;
  background-color: rgba(20, 20, 20, 0.95);
  background-image: 
    linear-gradient(rgba(40, 40, 40, 0.2) 1px, transparent 1px),
    linear-gradient(90deg, rgba(40, 40, 40, 0.2) 1px, transparent 1px);
  background-size: 20px 20px;
  box-shadow: 0 0 15px rgba(0, 0, 0, 0.7);
  border-radius: 4px;
  border: 1px solid rgba(30, 30, 30, 0.5);
  border-top: 2px solid #3498db;
  color: #ffffff;
  overflow-y: auto;
  position: relative;
}

.profile-container::before {
  display: none;
}


/* Profile Header */
.profile-header {
  display: flex;
  align-items: center;
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(50, 50, 50, 0.5);
  position: relative;
  flex-wrap: nowrap;
}

.profile-header::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  width: 40px;
  height: 1px;
  background-color: #e74c3c;
}

.profile-avatar-container {
  width: 50px;
  height: 50px;
  flex-shrink: 0;
  margin-right: 15px;
  background-color: rgba(0, 0, 0, 0.5);
  border-radius: 4px;
  overflow: hidden;
  border: 1px solid rgba(70, 70, 70, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.profile-avatar-container::before {
  display: none;
}

.profile-avatar-placeholder {
  font-size: 24px;
  color: rgba(255, 255, 255, 0.8);
  text-align: center;
  line-height: 50px;
}

.profile-user-info {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
}

.profile-display-name {
  font-size: 20px;
  font-weight: 700;
  margin: 0 0 5px 0;
  color: #e74c3c;
  letter-spacing: 1px;
  text-transform: uppercase;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.profile-username {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.6);
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Wallet Button */
.wallet-button-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-left: 15px;
  flex: 0 0 auto;
}

.wallet-connect-button {
  background-color: rgba(0, 0, 0, 0.6);
  color: rgba(255, 255, 255, 0.8);
  border: 1px solid rgba(52, 152, 219, 0.6);
  border-radius: 2px;
  padding: 8px 15px;
  font-size: 14px;
  font-weight: 600;
  cursor: not-allowed;
  transition: all 0.2s ease;
  text-transform: uppercase;
  letter-spacing: 1px;
  position: relative;
  white-space: nowrap;
}

.wallet-connect-button:hover {
  background-color: rgba(52, 152, 219, 0.2);
}

.wallet-connect-button::before {
  content: "⚡";
  margin-right: 5px;
  opacity: 0.8;
}

.wallet-coming-soon {
  font-size: 11px;
  color: rgba(150, 150, 150, 0.7);
  margin-top: 4px;
  font-style: italic;
}

/* Section Titles */
.section-title {
  font-size: 16px;
  font-weight: 600;
  color: #e74c3c;
  margin: 20px 0 15px 0;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(50, 50, 50, 0.5);
  text-transform: uppercase;
  letter-spacing: 2px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Section title text wrapper that includes the star */
.section-title-text {
  display: flex;
  align-items: center;
}

/* Star icon before the text */
.section-title-text::before {
  content: "★";
  margin-right: 10px;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.4);
}

/* Remove the original ::before since we moved it to .section-title-text */
.section-title::before {
  content: none;
}

/* Line that extends across the space */
.section-title::after {
  content: "";
  position: absolute;
  bottom: -1px;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(to right, rgba(50, 50, 50, 0.5), transparent);
  z-index: 0;
}

.section-title-spacer {
  flex-grow: 1;
  margin: 0 10px;
}

/* Stats Grid - Simplified to just show wins and K/D */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 15px;
  margin-bottom: 20px;
}

.stat-card {
  background-color: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(50, 50, 50, 0.5);
  border-radius: 2px;
  padding: 15px;
  text-align: center;
  transition: transform 0.2s;
  position: relative;
}

.stat-card::before {
  display: none;
}

.stat-card:hover {
  transform: translateY(-2px);
  border-color: rgba(231, 76, 60, 0.4);
}

.stat-value {
  font-size: 28px;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 8px;
  font-family: 'Orbitron', sans-serif;
}

.stat-label {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.7);
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* Tournament Info */
.profile-tournament-info {
  background-color: rgba(20, 20, 20, 0.6);
  border: 1px solid rgba(231, 76, 60, 0.4);
  border-radius: 2px;
  padding: 15px;
  margin-bottom: 25px;
  position: relative;
  display: flex;
  align-items: center;
}

.profile-tournament-info::before {
  display: none;
}

.tournament-icon {
  font-size: 24px;
  margin-right: 15px;
  color: #e74c3c;
}

@keyframes glow {
  from {
    opacity: 0.8;
  }
  to {
    opacity: 1;
  }
}

.tournament-message {
  font-size: 14px;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.8);
  margin: 0;
}

/* Games Table */
.games-table-container {
  width: 100%;
  height: 300px;
  overflow-y: auto;
  background-color: rgba(20, 20, 20, 0.7);
  border-radius: 2px;
  border: 1px solid rgba(50, 50, 50, 0.5);
  margin-bottom: 20px;
  position: relative;
}

.games-table-container::-webkit-scrollbar {
  width: 6px;
}

.games-table-container::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.2);
}

.games-table-container::-webkit-scrollbar-thumb {
  background: rgba(80, 80, 80, 0.5);
}

.games-table-container::-webkit-scrollbar-thumb:hover {
  background: rgba(100, 100, 100, 0.7);
}

.games-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

.games-table th {
  padding: 12px 15px;
  background-color: rgba(0, 0, 0, 0.6);
  font-weight: 600;
  color: #3498db;
  position: sticky;
  top: 0;
  z-index: 10;
  border-bottom: 1px solid rgba(50, 50, 50, 0.5);
  text-transform: uppercase;
  letter-spacing: 1px;
  font-size: 13px;
}

.games-table td {
  padding: 10px 15px;
  border-bottom: 1px solid rgba(50, 50, 50, 0.3);
  color: rgba(255, 255, 255, 0.8);
}

.games-table tr {
  transition: background-color 0.2s;
}

.games-table tr:last-child td {
  border-bottom: none;
}

.games-table tr:hover {
  background-color: rgba(40, 40, 40, 0.5);
}

.game-result.win {
  color: #2ecc71;
  font-weight: 600;
}

.game-result.loss {
  color: #e74c3c;
}

.game-team {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 2px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.team-blue {
  background-color: rgba(52, 152, 219, 0.2);
  color: #3498db;
  border: 1px solid rgba(52, 152, 219, 0.4);
}

.team-red {
  background-color: rgba(231, 76, 60, 0.2);
  color: #e74c3c;
  border: 1px solid rgba(231, 76, 60, 0.4);
}

.games-loading, .games-empty {
  padding: 20px;
  text-align: center;
  color: rgba(255, 255, 255, 0.6);
  font-style: italic;
}

/* Profile error message */
.profile-error {
  padding: 15px;
  text-align: center;
  color: #e74c3c;
  background-color: rgba(20, 20, 20, 0.7);
  border: 1px solid rgba(231, 76, 60, 0.4);
  border-radius: 2px;
  margin: 20px auto;
  max-width: 90%;
}

/* Fix for bottom tab menu overflow */
.bottom-tab-content {
  height: calc(100vh - 70px);
  overflow-y: auto;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .games-table th, .games-table td {
    padding: 8px 6px;
    font-size: 13px;
  }

  .profile-container {
    padding: 15px;
  }
  
  .profile-header {
    flex-wrap: nowrap;
  }
  
  .wallet-button-container {
    margin-left: 10px;
  }
  
  .wallet-connect-button {
    padding: 6px 10px;
    font-size: 12px;
  }
  
  .profile-display-name {
    font-size: 18px;
  }
  
  .profile-username {
    font-size: 12px;
  }
}

@media (max-width: 480px) {
  .profile-display-name {
    font-size: 16px;
    max-width: 150px;
  }
  
  .wallet-connect-button {
    padding: 5px 8px;
    font-size: 11px;
  }
  
  .wallet-connect-button::before {
    margin-right: 3px;
  }
  
  .profile-avatar-container {
    width: 40px;
    height: 40px;
    margin-right: 10px;
  }
}

/* Error Logs Button Styles */
.error-logs-button {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background-color: #393939;
  color: #fff;
  font-weight: bold;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  position: relative;
  transition: background-color 0.2s ease;
  z-index: 1;
  opacity: 0.3;
}

.error-logs-button:hover {
  background-color: #999;
}

.error-logs-button.has-errors {
  background-color: #e74c3c;
  animation: pulse 2s infinite;
}

/* Pulsing animation for button when errors exist */
@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(231, 76, 60, 0.7);
  }
  70% {
    box-shadow: 0 0 0 6px rgba(231, 76, 60, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(231, 76, 60, 0);
  }
}