/* ========== Base Dark Theme ========== */
body.dark-mode {
  background-color: #111;
  color: white;
  margin: 0;
  font-family: sans-serif;
  text-align: left;
  overflow-x: hidden;
  overflow-y: auto;
}

header, footer {
  padding: 20px;
  text-align: center;
}

/* ========== Top Tabs ========== */
#tabs {
  width: 100vw;
  min-width: 100vw;
  left: 0;
  margin: 0;
  padding: 0;
  background: #181818;
  display: flex;
  justify-content: center;
  align-items: center;
  position: fixed;
  top: 0;
  z-index: 1500;
  border-bottom: 2px solid #222;
  height: 56px;
}

.tab-button {
  margin-right: 10px;
  padding: 10px 18px;
  cursor: pointer;
  background-color: #2c2c2c;
  border: none;
  color: #ccc;
  font-weight: bold;
  border-radius: 4px 4px 0 0;
  transition: background 0.3s;
}

.tab-button.active {
  background-color: #8a2be2;
  color: white;
}



/* ========== Tab Content Area ========== */
.tab-content {
  margin-left: 270px;
  margin-right: 250px;
  padding: 30px 40px;
  display: block;
}

.tab-content.hidden {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
}

/* ========== Home Page Content ========== */
#home {
  text-align: center;
  padding: 0;
  max-width: 100%;
  margin: 0 auto;
  width: 100%;
  box-sizing: border-box;
}

/* New Hero Section */
.home-hero-new {
  background: linear-gradient(135deg, rgba(138, 43, 226, 0.1) 0%, rgba(153, 50, 204, 0.05) 100%);
  border-bottom: 1px solid rgba(138, 43, 226, 0.2);
  padding: 60px 40px;
  margin-bottom: 0;
}

.hero-content {
  max-width: 800px;
  margin: 0 auto;
  width: 100%;
  padding: 0 20px;
  box-sizing: border-box;
}

.hero-title-new {
  font-size: 48px;
  font-weight: 800;
  color: #fff;
  margin: 30px 0 20px;
  background: linear-gradient(135deg, #8a2be2 0%, #9932cc 50%, #ba55d3 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1.2;
}

.hero-subtitle-new {
  font-size: 20px;
  color: #bbb;
  margin: 0 0 40px 0;
  line-height: 1.6;
}

.hero-actions {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

.hero-btn {
  padding: 14px 32px;
  font-size: 16px;
  font-weight: 600;
  border-radius: 12px;
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 8px;
}

.hero-btn.primary {
  background: linear-gradient(135deg, #8a2be2 0%, #9932cc 100%);
  color: white;
  box-shadow: 0 4px 15px rgba(138, 43, 226, 0.3);
}

.hero-btn.primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(138, 43, 226, 0.4);
}

.hero-btn.secondary {
  background: rgba(255, 255, 255, 0.1);
  border: 2px solid rgba(138, 43, 226, 0.3);
  color: #8a2be2;
}

.hero-btn.secondary:hover {
  background: rgba(138, 43, 226, 0.1);
  border-color: #8a2be2;
}

.hero-btn span {
  font-size: 20px;
}

/* Main Features */
.home-main-features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
  max-width: 1200px;
  margin: 60px auto;
  padding: 0 20px;
}

.main-feature-card {
  background: linear-gradient(135deg, #1a1a1a 0%, #252525 100%);
  border: 1px solid #333;
  border-radius: 16px;
  padding: 40px 30px;
  text-align: center;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.main-feature-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #8a2be2, #9932cc);
  transform: scaleX(0);
  transition: transform 0.3s ease;
}

.main-feature-card:hover::before {
  transform: scaleX(1);
}

.main-feature-card:hover {
  border-color: #8a2be2;
  transform: translateY(-5px);
  box-shadow: 0 12px 35px rgba(138, 43, 226, 0.2);
}

.main-feature-icon {
  font-size: 56px;
  margin-bottom: 20px;
  filter: drop-shadow(0 0 15px rgba(138, 43, 226, 0.4));
}

.main-feature-card h3 {
  color: #8a2be2;
  font-size: 24px;
  margin: 0 0 16px 0;
  font-weight: 700;
}

.main-feature-card p {
  color: #bbb;
  font-size: 16px;
  line-height: 1.6;
  margin: 0 0 24px 0;
}

.feature-link-btn {
  background: transparent;
  border: 2px solid #8a2be2;
  color: #8a2be2;
  padding: 10px 24px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.feature-link-btn:hover {
  background: #8a2be2;
  color: white;
  transform: translateX(5px);
}

/* Quick Guide */
.home-quick-guide {
  background: linear-gradient(135deg, rgba(138, 43, 226, 0.08) 0%, rgba(153, 50, 204, 0.04) 100%);
  border-top: 1px solid rgba(138, 43, 226, 0.2);
  border-bottom: 1px solid rgba(138, 43, 226, 0.2);
  padding: 60px 20px;
  margin: 0;
}

.guide-title {
  font-size: 32px;
  font-weight: 700;
  color: #8a2be2;
  text-align: center;
  margin: 0 0 50px 0;
}

.guide-steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 40px;
  max-width: 900px;
  margin: 0 auto;
}

.guide-step {
  text-align: center;
}

.guide-step-number {
  width: 60px;
  height: 60px;
  background: linear-gradient(135deg, #8a2be2 0%, #9932cc 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  font-weight: 800;
  color: #fff;
  margin: 0 auto 20px;
  box-shadow: 0 4px 20px rgba(138, 43, 226, 0.4);
}

.guide-step h4 {
  color: #fff;
  font-size: 20px;
  margin: 0 0 10px 0;
  font-weight: 600;
}

.guide-step p {
  color: #aaa;
  font-size: 15px;
  margin: 0;
  line-height: 1.5;
}

/* Responsive Design for Home Page */
@media (max-width: 768px) {
  .home-hero-title {
    font-size: 32px;
  }

  .home-hero-subtitle {
    font-size: 18px;
  }

  .section-title {
    font-size: 26px;
  }

  .features-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .step-card {
    flex-direction: column;
    text-align: center;
    padding: 25px;
  }

  .step-number {
    margin: 0 auto;
  }

  .tips-container {
    grid-template-columns: 1fr;
  }

  .home-cta {
    padding: 40px 20px;
  }

  .home-cta h2 {
    font-size: 28px;
  }

  .cta-buttons {
    flex-direction: column;
  }

  .cta-button-large {
    width: 100%;
  }
}

/* ========== Auth Profile ========== */
#profilePic {
  position: fixed;
  top: 15px;
  right: 80px;
  width: 36px;
  height: 36px;
  background: #444;
  border-radius: 50%;
  color: white;
  font-weight: bold;
  text-align: center;
  line-height: 36px;
  z-index: 2000;
}

#profilePic.logged-in {
  background: #8a2be2;
}

#profilePic.empty {
  background: #444;
}

#authActionBtn {
  position: fixed;
  top: 15px;
  right: 10px;
  padding: 6px 10px;
  border: none;
  background: #2c2c2c;
  color: white;
  border-radius: 6px;
  cursor: pointer;
  z-index: 2000;
}

/* ========== Auth Popup ========== */
.popup {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
  padding: 0;
  border: none;
  border-radius: 20px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(255, 255, 255, 0.1);
  z-index: 1500;
  max-width: 400px;
  width: 90%;
  overflow: hidden;
  backdrop-filter: blur(10px);
  animation: popupSlideIn 0.3s ease-out;
}

@keyframes popupSlideIn {
  from {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.9);
  }
  to {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }
}

.popup.hidden {
  display: none;
}

/* Background overlay */
.popup::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(5px);
  z-index: -1;
}

.popup input {
  width: 100%;
  padding: 16px 20px;
  border: 2px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.05);
  color: white;
  border-radius: 12px;
  font-size: 16px;
  transition: all 0.3s ease;
  box-sizing: border-box;
  margin-bottom: 16px;
}

.popup input:focus {
  outline: none;
  border-color: #8a2be2;
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 0 0 0 3px rgba(138, 43, 226, 0.2);
}

.popup input::placeholder {
  color: rgba(255, 255, 255, 0.6);
  font-weight: 400;
}

.button-group {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 8px;
}

.button-group button {
  width: 100%;
  padding: 16px 24px;
  border: none;
  background: linear-gradient(135deg, #8a2be2 0%, #9932cc 100%);
  color: white;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  text-transform: none;
  letter-spacing: 0.5px;
}

.button-group button:hover {
  background: linear-gradient(135deg, #9932cc 0%, #8a2be2 100%);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(138, 43, 226, 0.4);
}

.button-group button:active {
  transform: translateY(0);
}

.button-group button.secondary {
  background: rgba(255, 255, 255, 0.1);
  border: 2px solid rgba(255, 255, 255, 0.2);
}

.button-group button.secondary:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.3);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(255, 255, 255, 0.1);
}

/* Form containers */
#login-form, #signup-form {
  padding: 40px 30px;
  position: relative;
}

/* Close button styling for auth forms only */
#login-form .close-btn, #signup-form .close-btn {
  position: absolute;
  top: 15px;
  right: 15px;
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: rgba(255, 255, 255, 0.7);
  font-size: 20px;
  cursor: pointer;
  width: 35px;
  height: 35px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  z-index: 10;
}

#login-form .close-btn:hover, #signup-form .close-btn:hover {
  background: rgba(255, 255, 255, 0.2);
  color: white;
  transform: scale(1.1);
}

/* Form title */
.form-title {
  text-align: center;
  color: white;
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 30px;
  background: linear-gradient(135deg, #8a2be2, #9932cc);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Remember Me Checkbox */
.remember-me-container {
  margin: 16px 0;
  display: flex;
  justify-content: flex-start;
}

.remember-me-label {
  display: flex;
  align-items: center;
  cursor: pointer;
  color: rgba(255, 255, 255, 0.8);
  font-size: 14px;
  user-select: none;
}

.remember-me-checkbox {
  display: none;
}

.checkmark {
  width: 20px;
  height: 20px;
  background: rgba(255, 255, 255, 0.1);
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 4px;
  margin-right: 10px;
  position: relative;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.checkmark::after {
  content: '';
  width: 6px;
  height: 10px;
  border: solid white;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.remember-me-checkbox:checked + .checkmark {
  background: linear-gradient(135deg, #8a2be2, #9932cc);
  border-color: #8a2be2;
}

.remember-me-checkbox:checked + .checkmark::after {
  opacity: 1;
}

.remember-me-label:hover .checkmark {
  border-color: rgba(255, 255, 255, 0.5);
  background: rgba(255, 255, 255, 0.15);
}

/* ========== Matchmaking Page Content ========== */
#matchmaking {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 60vh;
  padding: 40px 20px;
  margin-left: 0 !important;
  width: 100% !important;
  max-width: 100vw !important;
  box-sizing: border-box;
}

.matchmaking-welcome {
  max-width: 800px;
  width: 100%;
}

#matchmaking h2 {
  margin-bottom: 20px;
  color: #8a2be2;
  font-size: 32px;
  font-weight: 700;
}

.matchmaking-description {
  font-size: 18px;
  color: #ccc;
  line-height: 1.6;
  margin-bottom: 40px;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.matchmaking-features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 30px;
  margin-bottom: 40px;
}

.feature-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 20px;
  background: #2a2a2a;
  border-radius: 12px;
  border: 1px solid #444;
  transition: all 0.3s ease;
}

.feature-item:hover {
  border-color: #8a2be2;
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(138, 43, 226, 0.2);
}

.feature-icon {
  font-size: 32px;
  margin-bottom: 15px;
}

.feature-text h4 {
  color: #8a2be2;
  margin: 0 0 8px 0;
  font-size: 18px;
}

.feature-text p {
  color: #ccc;
  margin: 0;
  font-size: 14px;
}

.matchmaking-launch-btn {
  padding: 16px 40px;
  font-size: 18px;
  font-weight: 600;
  border-radius: 12px;
  background: linear-gradient(135deg, #8a2be2 0%, #9932cc 100%);
  box-shadow: 0 4px 15px rgba(138, 43, 226, 0.3);
  transition: all 0.3s ease;
}

.matchmaking-launch-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(138, 43, 226, 0.4);
}

/* ========== MOBILE-ONLY MATCHMAKING LAYOUT ========== */
@media (max-width: 768px) {
  #matchmaking {
    /* COMPLETELY DIFFERENT MOBILE LAYOUT */
    display: block !important;
    text-align: left !important;
    padding: 15px !important;
    margin: 0 !important;
    min-height: auto !important;
    height: auto !important;
    overflow: visible !important;
    -webkit-overflow-scrolling: auto !important;
    overscroll-behavior: auto !important;
  }
  
  .matchmaking-welcome {
    max-width: 100% !important;
    width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
  }
  
  #matchmaking h2 {
    font-size: 24px !important;
    text-align: center !important;
    margin-bottom: 15px !important;
  }
  
  .matchmaking-description {
    font-size: 16px !important;
    text-align: center !important;
    margin-bottom: 20px !important;
    padding: 0 10px !important;
  }
  
  .matchmaking-features {
    display: block !important;
    margin-bottom: 20px !important;
  }
  
  .feature-item {
    display: flex !important;
    align-items: center !important;
    margin-bottom: 15px !important;
    padding: 10px !important;
    background: #2a2a2a !important;
    border-radius: 8px !important;
  }
  
  .feature-icon {
    font-size: 24px !important;
    margin-right: 15px !important;
    flex-shrink: 0 !important;
  }
  
  .feature-text {
    text-align: left !important;
  }
  
  .feature-text h4 {
    margin: 0 0 5px 0 !important;
    font-size: 16px !important;
  }
  
  .feature-text p {
    margin: 0 !important;
    font-size: 14px !important;
    color: #aaa !important;
  }
  
  .matchmaking-launch-btn {
    width: 100% !important;
    padding: 16px !important;
    font-size: 16px !important;
    margin-top: 20px !important;
  }
  
  /* Mobile ticker styles */
  .live-feed-ticker {
    margin-bottom: 15px !important;
  }
  
  .ticker-content {
    padding: 10px 12px !important;
  }
  
  .ticker-item {
    font-size: 12px !important;
    margin-right: 30px !important;
    padding: 3px 6px !important;
  }
}

/* ========== Live Feed Ticker Styles ========== */
.live-feed-ticker {
  background: linear-gradient(135deg, #1a1a2e, #16213e);
  border: 1px solid rgba(138, 43, 226, 0.3);
  border-radius: 8px;
  margin-bottom: 20px;
  overflow: hidden;
  position: relative;
}

.ticker-content {
  display: flex;
  align-items: center;
  padding: 12px 16px;
  background: linear-gradient(90deg, rgba(138, 43, 226, 0.1), transparent);
}

.ticker-scroll {
  display: flex;
  animation: scroll-right 30s linear infinite;
  white-space: nowrap;
  overflow: hidden;
  flex: 1;
}

@keyframes scroll-right {
  0% { transform: translateX(100%); }
  100% { transform: translateX(-100%); }
}

.ticker-item {
  color: #fff;
  font-size: 14px;
  margin-right: 50px;
  flex-shrink: 0;
  padding: 4px 8px;
  background: rgba(138, 43, 226, 0.2);
  border-radius: 4px;
  border: 1px solid rgba(138, 43, 226, 0.3);
}

.ticker-item:hover {
  background: rgba(138, 43, 226, 0.4);
  transform: scale(1.05);
  transition: all 0.3s ease;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(138, 43, 226, 0.3);
}

/* ========== Match Chat Window Styles ========== */
.match-chat-window {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 400px;
  height: 500px;
  background: linear-gradient(135deg, #1a1a2e, #16213e);
  border: 2px solid rgba(138, 43, 226, 0.5);
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
  z-index: 10000;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.match-chat-header {
  background: linear-gradient(135deg, #8a2be2, #6a1b9a);
  padding: 15px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid rgba(138, 43, 226, 0.3);
}

.match-chat-header h3 {
  margin: 0;
  color: white;
  font-size: 18px;
  font-weight: 600;
}

.match-chat-messages {
  flex: 1;
  padding: 15px;
  overflow-y: auto;
  background: rgba(0, 0, 0, 0.2);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.match-chat-message {
  background: rgba(138, 43, 226, 0.2);
  padding: 10px 15px;
  border-radius: 8px;
  border-left: 3px solid #8a2be2;
  max-width: 80%;
  word-wrap: break-word;
}

.match-chat-message.own {
  background: rgba(138, 43, 226, 0.4);
  align-self: flex-end;
  border-left: none;
  border-right: 3px solid #8a2be2;
}

.match-chat-message .sender {
  font-weight: bold;
  color: #8a2be2;
  font-size: 12px;
  margin-bottom: 5px;
}

.match-chat-message .text {
  color: white;
  font-size: 14px;
}

.match-chat-input-container {
  padding: 15px;
  background: rgba(0, 0, 0, 0.3);
  display: flex;
  gap: 10px;
  border-top: 1px solid rgba(138, 43, 226, 0.3);
}

.match-chat-input {
  flex: 1;
  padding: 12px 15px;
  background: rgba(20, 20, 40, 0.8);
  border: 1px solid rgba(138, 43, 226, 0.3);
  border-radius: 8px;
  color: white;
  font-size: 14px;
}

.match-chat-input:focus {
  outline: none;
  border-color: #8a2be2;
  box-shadow: 0 0 0 2px rgba(138, 43, 226, 0.2);
}

.match-chat-send-btn {
  padding: 12px 20px;
  background: linear-gradient(135deg, #8a2be2, #6a1b9a);
  border: none;
  border-radius: 8px;
  color: white;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.match-chat-send-btn:hover {
  background: linear-gradient(135deg, #9c3be3, #7a2baa);
  transform: translateY(-1px);
}

/* Mobile responsive */
@media (max-width: 768px) {
  .match-chat-window {
    width: 90vw;
    height: 70vh;
    max-width: 400px;
  }
  
  .match-chat-header {
    padding: 12px 15px;
  }
  
  .match-chat-header h3 {
    font-size: 16px;
  }
  
  .match-chat-messages {
    padding: 12px;
  }
  
  .match-chat-input-container {
    padding: 12px;
  }
  
  .match-chat-input {
    font-size: 16px; /* Prevent zoom on iOS */
  }
}

/* ========== Friend Request Popup Styles ========== */
.friend-request-popup {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 10001;
}

.friend-request-content {
  background: linear-gradient(135deg, #1a1a2e, #16213e);
  border: 2px solid rgba(138, 43, 226, 0.5);
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
  width: 90%;
  max-width: 400px;
  overflow: hidden;
}

.friend-request-header {
  background: linear-gradient(135deg, #8a2be2, #6a1b9a);
  padding: 15px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid rgba(138, 43, 226, 0.3);
}

.friend-request-header h3 {
  margin: 0;
  color: white;
  font-size: 18px;
  font-weight: 600;
}

.friend-request-body {
  padding: 20px;
  text-align: center;
}

.friend-request-body p {
  color: white;
  font-size: 16px;
  margin-bottom: 20px;
  line-height: 1.5;
}

.friend-request-actions {
  display: flex;
  gap: 15px;
  justify-content: center;
  flex-wrap: wrap;
}

.friend-request-actions .cta-button {
  padding: 12px 24px;
  font-size: 14px;
  min-width: 140px;
}

.friend-request-actions .secondary-button {
  padding: 12px 24px;
  font-size: 14px;
  min-width: 140px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: white;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.friend-request-actions .secondary-button:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.5);
}

/* Mobile responsive */
@media (max-width: 768px) {
  .friend-request-content {
    width: 95%;
    margin: 20px;
  }
  
  .friend-request-header {
    padding: 12px 15px;
  }
  
  .friend-request-header h3 {
    font-size: 16px;
  }
  
  .friend-request-body {
    padding: 15px;
  }
  
  .friend-request-body p {
    font-size: 14px;
  }
  
  .friend-request-actions {
    flex-direction: column;
    gap: 10px;
  }
  
  .friend-request-actions .cta-button,
  .friend-request-actions .secondary-button {
    width: 100%;
    min-width: auto;
  }
}

/* ========== Profile Rating Styles ========== */
.profile-rating {
  margin: 15px 0;
  padding: 10px;
  background: rgba(138, 43, 226, 0.1);
  border-radius: 8px;
  border: 1px solid rgba(138, 43, 226, 0.2);
}

.rating-display {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.rating-label {
  color: #8a2be2;
  font-weight: 600;
  font-size: 14px;
}

.stars {
  display: flex;
  gap: 2px;
}

.star {
  color: #ffd700;
  font-size: 18px;
  text-shadow: 0 0 4px rgba(255, 215, 0, 0.5);
}

.rating-value {
  color: white;
  font-weight: bold;
  font-size: 16px;
}

.rating-count {
  color: #aaa;
  font-size: 12px;
}

.profile-join-date {
  margin: 10px 0;
  padding: 8px;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 6px;
}

.join-date-label {
  color: #8a2be2;
  font-weight: 600;
  font-size: 14px;
  margin-right: 8px;
}

.join-date-value {
  color: white;
  font-size: 14px;
}

/* ========== Rating Popup Styles ========== */
.rating-popup {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 10002;
}

.rating-content {
  background: linear-gradient(135deg, #1a1a2e, #16213e);
  border: 2px solid rgba(138, 43, 226, 0.5);
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
  width: 90%;
  max-width: 400px;
  overflow: hidden;
}

.rating-header {
  background: linear-gradient(135deg, #8a2be2, #6a1b9a);
  padding: 15px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid rgba(138, 43, 226, 0.3);
}

.rating-header h3 {
  margin: 0;
  color: white;
  font-size: 18px;
  font-weight: 600;
}

.rating-body {
  padding: 20px;
  text-align: center;
}

.rating-body p {
  color: white;
  font-size: 16px;
  margin-bottom: 20px;
  line-height: 1.5;
}

.rating-stars-container {
  margin: 20px 0;
}

.rating-stars {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-bottom: 15px;
}

.rating-star {
  font-size: 32px;
  color: #444;
  cursor: pointer;
  transition: all 0.3s ease;
  user-select: none;
}

.rating-star:hover,
.rating-star.active {
  color: #ffd700;
  text-shadow: 0 0 8px rgba(255, 215, 0, 0.6);
  transform: scale(1.1);
}

.rating-description {
  color: #aaa;
  font-size: 14px;
  margin: 0;
  min-height: 20px;
}

.rating-actions {
  display: flex;
  gap: 15px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 20px;
}

.rating-actions .cta-button {
  padding: 12px 24px;
  font-size: 14px;
  min-width: 140px;
}

.rating-actions .cta-button:disabled {
  background: #555;
  cursor: not-allowed;
  opacity: 0.6;
}

.rating-actions .secondary-button {
  padding: 12px 24px;
  font-size: 14px;
  min-width: 140px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: white;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.rating-actions .secondary-button:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.5);
}

/* Onboarding Popup Styles */
.onboarding-content {
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
  width: 90%;
  max-width: 500px;
  margin: 20px auto;
  border: 1px solid rgba(138, 43, 226, 0.3);
  max-height: 90vh;
  overflow-y: auto;
}

.onboarding-header {
  background: linear-gradient(135deg, #8a2be2, #6a1b9a);
  padding: 20px;
  border-radius: 12px 12px 0 0;
  text-align: center;
  border-bottom: 2px solid rgba(138, 43, 226, 0.5);
}

.onboarding-header h3 {
  margin: 0 0 8px 0;
  color: white;
  font-size: 24px;
  font-weight: bold;
}

.onboarding-header p {
  margin: 0;
  color: rgba(255, 255, 255, 0.9);
  font-size: 14px;
}

.onboarding-body {
  padding: 25px;
}

.onboarding-field {
  margin-bottom: 20px;
}

.onboarding-field label {
  display: block;
  color: #8a2be2;
  font-weight: bold;
  margin-bottom: 8px;
  font-size: 14px;
}

.onboarding-field input,
.onboarding-field select {
  width: 100%;
  padding: 12px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(138, 43, 226, 0.3);
  border-radius: 6px;
  color: white;
  font-size: 14px;
  transition: all 0.3s ease;
  box-sizing: border-box;
}

.onboarding-field input:focus,
.onboarding-field select:focus {
  outline: none;
  border-color: #8a2be2;
  background: rgba(138, 43, 226, 0.1);
  box-shadow: 0 0 8px rgba(138, 43, 226, 0.3);
}

.onboarding-field select[multiple] {
  padding: 8px;
}

.onboarding-field select[multiple] option {
  padding: 8px;
  margin: 2px 0;
  border-radius: 4px;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.1);
  color: white;
}

.onboarding-field select[multiple] option:hover {
  background: rgba(138, 43, 226, 0.5);
}

.onboarding-field select[multiple] option:checked {
  background: linear-gradient(135deg, #8a2be2, #6a1b9a);
  color: white;
}

.onboarding-field select option {
  background: #1a1a2e;
  color: white;
  padding: 8px;
}

.onboarding-field small {
  display: block;
  color: rgba(255, 255, 255, 0.6);
  font-size: 12px;
  margin-top: 5px;
  font-style: italic;
}

.time-range-container {
  display: flex;
  align-items: center;
  gap: 10px;
}

.time-select {
  flex: 1;
  padding: 12px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(138, 43, 226, 0.3);
  border-radius: 6px;
  color: white;
  font-size: 14px;
  transition: all 0.3s ease;
}

.time-select:focus {
  outline: none;
  border-color: #8a2be2;
  background: rgba(138, 43, 226, 0.1);
  box-shadow: 0 0 8px rgba(138, 43, 226, 0.3);
}

.time-separator {
  color: #8a2be2;
  font-weight: bold;
  font-size: 14px;
}

.onboarding-actions {
  margin-top: 30px;
  display: flex;
  justify-content: center;
}

.onboarding-actions .cta-button {
  padding: 12px 40px;
  font-size: 16px;
  min-width: 200px;
}

/* Shake animation for onboarding popup */
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
  20%, 40%, 60%, 80% { transform: translateX(5px); }
}

/* Mobile responsive for onboarding */
@media (max-width: 768px) {
  .onboarding-content {
    width: 95%;
    max-height: 85vh;
  }
  
  .onboarding-header h3 {
    font-size: 20px;
  }
  
  .onboarding-body {
    padding: 20px 15px;
  }
  
  .onboarding-field input,
  .onboarding-field select {
    font-size: 16px; /* Prevents zoom on mobile */
  }
  
  .onboarding-actions .cta-button {
    width: 100%;
    min-width: auto;
  }
  
  /* Mobile responsive for search filters */
  .filter-row {
    flex-direction: column;
    gap: 15px;
  }
  
  .filter-group {
    min-width: auto;
  }
  
  .search-actions {
    flex-direction: column;
    gap: 10px;
  }
  
  .search-actions .cta-button,
  .search-actions .secondary-button {
    width: 100%;
    min-width: auto;
  }
}

/* Mobile responsive */
@media (max-width: 768px) {
  .rating-content {
    width: 95%;
    margin: 20px;
  }
  
  .rating-header {
    padding: 12px 15px;
  }
  
  .rating-header h3 {
    font-size: 16px;
  }
  
  .rating-body {
    padding: 15px;
  }
  
  .rating-body p {
    font-size: 14px;
  }
  
  .rating-stars {
    gap: 6px;
  }
  
  .rating-star {
    font-size: 28px;
  }
  
  .rating-actions {
    flex-direction: column;
    gap: 10px;
  }
  
  .rating-actions .cta-button,
  .rating-actions .secondary-button {
    width: 100%;
    min-width: auto;
  }
  
  .rating-display {
    flex-direction: column;
    align-items: flex-start;
    gap: 5px;
  }
}

/* ========== Matchmaking Modal Styles ========== */
.matchmaking-modal {
  max-width: 600px;
  width: 90%;
  max-height: none;
  overflow: visible;
  position: relative;
}

.matchmaking-content {
  text-align: center;
}

.game-selection {
  margin-bottom: 30px;
}

.game-selection label {
  display: block;
  color: #8a2be2;
  font-weight: 600;
  margin-bottom: 10px;
  font-size: 16px;
}

.game-select {
  width: 100%;
  padding: 12px 16px;
  background: #1a1a1a;
  color: white;
  border: 2px solid #555;
  border-radius: 8px;
  font-size: 16px;
  transition: border-color 0.3s ease;
}

.game-select:focus {
  outline: none;
  border-color: #8a2be2;
}

.matchmaking-actions {
  margin-top: 40px;
  margin-bottom: 30px;
}

/* Game Search Styles */
.game-search-container {
  position: relative;
  margin-bottom: 20px;
}

.game-search-input {
  width: 60%;
  padding: 12px 16px;
  background: rgba(20, 20, 40, 0.8);
  border: 1px solid rgba(138, 43, 226, 0.3);
  border-radius: 8px;
  color: #fff;
  font-size: 16px;
  margin-bottom: 10px;
  transition: all 0.3s ease;
}

.game-search-input:focus {
  outline: none;
  border-color: #8a2be2;
  box-shadow: 0 0 0 3px rgba(138, 43, 226, 0.1);
}

.game-search-input::placeholder {
  color: #888;
}

.game-select {
  width: 100%;
  padding: 8px 12px;
  background: rgba(20, 20, 40, 0.98);
  border: 1px solid rgba(138, 43, 226, 0.5);
  border-radius: 8px;
  color: #fff;
  font-size: 16px;
  transition: border-color 0.3s ease;
  max-height: 150px;
  overflow-y: auto;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  z-index: 9999;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.5);
  margin-top: 5px;
}

.game-select[size] {
  height: auto;
  min-height: 120px;
}

.matchmaking-btn {
  width: 100%;
  padding: 16px 24px;
  font-size: 16px;
  font-weight: 600;
  border-radius: 8px;
  position: relative;
  overflow: hidden;
}

.matchmaking-btn .btn-loading {
  display: none;
}

.matchmaking-btn.searching .btn-text {
  display: none;
}

.matchmaking-btn.searching .btn-loading {
  display: inline;
}

/* ========== Improved Matchmaking Modal Styles ========== */
.matchmaking-modal-improved {
  max-width: 500px;
  width: 90%;
  background: linear-gradient(135deg, #1a1a1a 0%, #2a2a2a 100%);
  border: 2px solid #8a2be2;
  border-radius: 20px;
  box-shadow: 0 20px 60px rgba(138, 43, 226, 0.4);
  overflow: hidden;
}

.modal-header-improved {
  background: linear-gradient(135deg, #8a2be2 0%, #6a1b9a 100%);
  padding: 24px 28px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 2px solid rgba(138, 43, 226, 0.3);
}

.header-content {
  display: flex;
  align-items: center;
  gap: 12px;
}

.header-icon {
  font-size: 28px;
  filter: drop-shadow(0 0 8px rgba(255, 255, 255, 0.3));
}

.modal-header-improved h3 {
  margin: 0;
  color: #fff;
  font-size: 24px;
  font-weight: 700;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.close-btn-improved {
  background: rgba(255, 255, 255, 0.15);
  border: none;
  color: #fff;
  font-size: 24px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  backdrop-filter: blur(10px);
}

.close-btn-improved:hover {
  background: rgba(255, 255, 255, 0.25);
  transform: rotate(90deg);
}

.modal-body-improved {
  padding: 32px;
}

.matchmaking-state {
  animation: fadeIn 0.3s ease-out;
}

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

/* Game Selection */
.game-selection-improved {
  margin-bottom: 32px;
}

.selection-label {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #8a2be2;
  font-weight: 600;
  font-size: 16px;
  margin-bottom: 12px;
}

.label-icon {
  font-size: 20px;
}

.game-search-container-improved {
  position: relative;
}

.game-search-input-improved {
  width: 100%;
  padding: 14px 18px;
  background: rgba(255, 255, 255, 0.05);
  border: 2px solid rgba(138, 43, 226, 0.3);
  border-radius: 12px;
  color: #fff;
  font-size: 16px;
  transition: all 0.3s;
  box-sizing: border-box;
}

.game-search-input-improved:focus {
  outline: none;
  border-color: #8a2be2;
  background: rgba(138, 43, 226, 0.1);
  box-shadow: 0 0 0 4px rgba(138, 43, 226, 0.2);
}

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

.game-select-improved {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  z-index: 1000;
  background: #1a1a1a;
  border: 2px solid #8a2be2;
  border-top: none;
  border-radius: 0 0 12px 12px;
  max-height: 200px;
  overflow-y: auto;
  margin-top: 2px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
}

.game-select-improved option {
  padding: 12px 18px;
  color: #fff;
  background: #1a1a1a;
  cursor: pointer;
  transition: background 0.2s;
}

.game-select-improved option:hover {
  background: rgba(138, 43, 226, 0.2);
}

.game-select-improved option:checked {
  background: #8a2be2;
  color: #fff;
}

/* Matchmaking Actions */
.matchmaking-actions-improved {
  display: flex;
  justify-content: center;
}

.matchmaking-btn-improved {
  width: 100%;
  padding: 16px 32px;
  font-size: 18px;
  font-weight: 600;
  border-radius: 12px;
  background: linear-gradient(135deg, #8a2be2 0%, #9932cc 100%);
  color: white;
  border: none;
  cursor: pointer;
  transition: all 0.3s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  box-shadow: 0 4px 15px rgba(138, 43, 226, 0.3);
}

.matchmaking-btn-improved:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(138, 43, 226, 0.4);
}

.matchmaking-btn-improved:active {
  transform: translateY(0);
}

.btn-icon {
  font-size: 20px;
}

/* Searching State */
.searching-container {
  text-align: center;
  padding: 20px 0;
}

.search-animation-large {
  margin-bottom: 32px;
  display: flex;
  justify-content: center;
}

.search-icon-wrapper {
  position: relative;
  width: 120px;
  height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.search-icon-circle {
  width: 80px;
  height: 80px;
  border: 4px solid rgba(138, 43, 226, 0.3);
  border-top-color: #8a2be2;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  position: absolute;
}

.search-icon-pulse {
  width: 100px;
  height: 100px;
  border: 3px solid #8a2be2;
  border-radius: 50%;
  position: absolute;
  animation: pulse-ring 2s ease-out infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

@keyframes pulse-ring {
  0% {
    transform: scale(0.8);
    opacity: 1;
  }
  100% {
    transform: scale(1.3);
    opacity: 0;
  }
}

.searching-content {
  margin-bottom: 24px;
}

.searching-title {
  color: #8a2be2;
  font-size: 24px;
  font-weight: 700;
  margin: 0 0 12px 0;
}

.searching-subtitle {
  color: #ccc;
  font-size: 16px;
  margin: 0 0 24px 0;
}

.game-name-highlight {
  color: #8a2be2;
  font-weight: 600;
  background: rgba(138, 43, 226, 0.1);
  padding: 2px 8px;
  border-radius: 6px;
}

.search-progress {
  margin-top: 24px;
}

.progress-bar {
  width: 100%;
  height: 6px;
  background: rgba(138, 43, 226, 0.2);
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 16px;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #8a2be2, #9932cc);
  border-radius: 10px;
  animation: progress-animation 2s ease-in-out infinite;
  width: 60%;
}

@keyframes progress-animation {
  0%, 100% {
    transform: translateX(-100%);
  }
  50% {
    transform: translateX(200%);
  }
}

.search-dots-improved {
  display: flex;
  justify-content: center;
  gap: 8px;
}

.search-dots-improved span {
  width: 10px;
  height: 10px;
  background: #8a2be2;
  border-radius: 50%;
  animation: searchDots 1.4s infinite ease-in-out both;
}

.search-dots-improved span:nth-child(1) {
  animation-delay: -0.32s;
}

.search-dots-improved span:nth-child(2) {
  animation-delay: -0.16s;
}

.cancel-btn-improved {
  padding: 12px 24px;
  background: rgba(255, 255, 255, 0.1);
  border: 2px solid rgba(255, 255, 255, 0.2);
  border-radius: 10px;
  color: #ccc;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s;
  margin-top: 16px;
}

.cancel-btn-improved:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.3);
  color: #fff;
}

/* Match Found State */
.match-found-container {
  text-align: center;
  padding: 20px 0;
}

.success-animation {
  position: relative;
  width: 120px;
  height: 120px;
  margin: 0 auto 32px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.success-checkmark {
  width: 80px;
  height: 80px;
  background: linear-gradient(135deg, #4caf50, #45a049);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 48px;
  font-weight: bold;
  position: relative;
  z-index: 2;
  animation: checkmark-pop 0.5s ease-out;
  box-shadow: 0 4px 20px rgba(76, 175, 80, 0.4);
}

.success-ripple {
  position: absolute;
  width: 80px;
  height: 80px;
  border: 3px solid #4caf50;
  border-radius: 50%;
  animation: ripple 1.5s ease-out infinite;
}

@keyframes checkmark-pop {
  0% {
    transform: scale(0);
  }
  50% {
    transform: scale(1.1);
  }
  100% {
    transform: scale(1);
  }
}

@keyframes ripple {
  0% {
    transform: scale(1);
    opacity: 1;
  }
  100% {
    transform: scale(1.5);
    opacity: 0;
  }
}

.match-found-title {
  color: #4caf50;
  font-size: 28px;
  font-weight: 700;
  margin: 0 0 12px 0;
}

.match-found-subtitle {
  color: #ccc;
  font-size: 16px;
  margin: 0 0 32px 0;
}

.match-actions-improved {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.cta-button-large {
  padding: 16px 32px;
  font-size: 18px;
  font-weight: 600;
  border-radius: 12px;
  border: none;
  cursor: pointer;
  transition: all 0.3s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.accept-btn {
  background: linear-gradient(135deg, #4caf50 0%, #45a049 100%);
  color: white;
  box-shadow: 0 4px 15px rgba(76, 175, 80, 0.3);
}

.accept-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(76, 175, 80, 0.4);
}

.secondary-button-large {
  padding: 14px 32px;
  font-size: 16px;
  font-weight: 500;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.1);
  border: 2px solid rgba(255, 255, 255, 0.2);
  color: #ccc;
  cursor: pointer;
  transition: all 0.3s;
}

.secondary-button-large:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.3);
  color: #fff;
}

.decline-btn {
  background: rgba(255, 77, 77, 0.1);
  border-color: rgba(255, 77, 77, 0.3);
  color: #ff6b6b;
}

.decline-btn:hover {
  background: rgba(255, 77, 77, 0.2);
  border-color: rgba(255, 77, 77, 0.5);
  color: #ff4444;
}

/* Legacy styles for backward compatibility */
.match-status {
  background: #2a2a2a;
  border: 1px solid #444;
  border-radius: 12px;
  padding: 30px;
  margin-bottom: 20px;
}

.status-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.status-icon {
  font-size: 48px;
  margin-bottom: 20px;
  animation: pulse 2s infinite;
}

.status-text h4 {
  color: #8a2be2;
  margin: 0 0 10px 0;
  font-size: 20px;
}

.status-text p {
  color: #ccc;
  margin: 0 0 20px 0;
  font-size: 16px;
}

.search-animation {
  margin-top: 20px;
}

.search-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
}

.search-dots span {
  width: 12px;
  height: 12px;
  background: #8a2be2;
  border-radius: 50%;
  animation: searchDots 1.4s infinite ease-in-out both;
}

.search-dots span:nth-child(1) {
  animation-delay: -0.32s;
}

.search-dots span:nth-child(2) {
  animation-delay: -0.16s;
}

@keyframes searchDots {
  0%, 80%, 100% {
    transform: scale(0);
    opacity: 0.5;
  }
  40% {
    transform: scale(1);
    opacity: 1;
  }
}

@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}

.match-found {
  background: #1a2e1a;
  border: 1px solid #4caf50;
  border-radius: 12px;
  padding: 30px;
  margin-bottom: 20px;
}

.match-found-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.success-icon {
  font-size: 48px;
  margin-bottom: 20px;
  animation: bounce 0.6s ease-in-out;
}

.match-found-content h4 {
  color: #4caf50;
  margin: 0 0 10px 0;
  font-size: 20px;
}

.match-found-content p {
  color: #ccc;
  margin: 0 0 20px 0;
  font-size: 16px;
}

.match-actions {
  display: flex;
  gap: 15px;
  justify-content: center;
}

.match-actions button {
  padding: 12px 24px;
  font-size: 14px;
  font-weight: 600;
  border-radius: 8px;
  min-width: 120px;
}

@keyframes bounce {
  0%, 20%, 50%, 80%, 100% {
    transform: translateY(0);
  }
  40% {
    transform: translateY(-10px);
  }
  60% {
    transform: translateY(-5px);
  }
}

/* ========== Teams Page Content ========== */
#teams {
  text-align: center;
}

#teams h2 {
  margin-bottom: 30px;
  color: #8a2be2;
}

.teams-container {
  margin: 0 auto;
  max-width: 1200px;
  width: 100%;
  padding: 0 20px;
}

/* Teams Hero Section */
.teams-hero {
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
  border-radius: 16px;
  padding: 30px;
  margin-bottom: 30px;
  border: 1px solid rgba(138, 43, 226, 0.3);
  text-align: center;
}

.teams-hero h2 {
  margin: 0 0 20px 0;
  font-size: 32px;
  color: white;
}

.teams-stats {
  display: flex;
  justify-content: center;
  gap: 40px;
  margin-bottom: 25px;
  flex-wrap: wrap;
}

.stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
}

.stat-number {
  font-size: 36px;
  font-weight: bold;
  color: #8a2be2;
  text-shadow: 0 0 10px rgba(138, 43, 226, 0.5);
}

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

.hero-cta {
  padding: 15px 40px;
  font-size: 18px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: linear-gradient(135deg, #8a2be2, #6a1b9a);
  border: none;
  transition: all 0.3s ease;
}

.hero-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(138, 43, 226, 0.4);
}

.button-icon {
  font-size: 20px;
}

/* Teams Tabs */
.teams-tabs {
  display: flex;
  gap: 10px;
  margin-bottom: 30px;
  border-bottom: 2px solid rgba(138, 43, 226, 0.2);
  overflow-x: auto;
  padding-bottom: 5px;
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none; /* IE/Edge */
}

.teams-tabs::-webkit-scrollbar {
  display: none; /* Chrome/Safari */
}

.team-tab {
  background: transparent;
  border: none;
  color: rgba(255, 255, 255, 0.6);
  padding: 15px 25px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 16px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 8px;
  position: relative;
  border-radius: 8px 8px 0 0;
}

.team-tab:hover {
  color: white;
  background: rgba(138, 43, 226, 0.1);
}

.team-tab.active {
  color: #8a2be2;
  background: rgba(138, 43, 226, 0.15);
}

.team-tab.active::after {
  content: '';
  position: absolute;
  bottom: -7px;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #8a2be2, #6a1b9a);
  border-radius: 3px 3px 0 0;
}

.tab-icon {
  font-size: 18px;
}

/* Team Tab Content */
.team-tab-content {
  display: none;
  animation: fadeIn 0.3s ease-in;
}

.team-tab-content.active {
  display: block;
}

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

/* Teams Grid Layout */
.teams-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
  margin-bottom: 20px;
}

/* Teams Tab Card (shared with teams.html) */
.team-card {
  background: #161616;
  border: 1px solid #2a2a2a;
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  position: relative;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}
.team-card:hover { transform: translateY(-2px); border-color: #3a3a3a; box-shadow: 0 6px 22px rgba(0,0,0,0.38); }
.card-banner { height: 72px; background: linear-gradient(90deg, rgba(138,43,226,0.18), rgba(138,43,226,0.06)); border-bottom: 1px solid #232323; position: relative; display: flex; align-items: center; justify-content: center; }
.card-banner .banner-title { font-weight: 700; font-size: 16px; color: #eee; text-align: center; padding: 0 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card-ribbon { position: absolute; top: 8px; left: 0; background: #8a2be2; color: #fff; padding: 4px 10px 4px 12px; border-top-right-radius: 8px; border-bottom-right-radius: 8px; font-size: 12px; font-weight: 600; box-shadow: 0 2px 8px rgba(0,0,0,0.25); }
.status-badge { position: absolute; top: 10px; right: 10px; padding: 4px 10px; font-size: 12px; border-radius: 999px; border: 1px solid #2a2a2a; background: #141414; color: #cfcfcf; }
.status-badge.recruiting { color: #8be0a0; border-color: #2f3f34; background: #142016; }
.status-badge.closed { color: #f2b8b5; border-color: #3f2f2f; background: #201414; }
.card-content { padding: 16px; display: flex; gap: 12px; }
.avatar { width: 56px; height: 56px; border-radius: 12px; background: #1e1e1e; border: 1px solid #2f2f2f; display: flex; align-items: center; justify-content: center; overflow: hidden; flex-shrink: 0; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.info { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.team-name { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.meta { color: #a9a9a9; font-size: 12px; }
.tags { margin-top: 6px; display: flex; gap: 6px; flex-wrap: wrap; }
.tag { padding: 4px 8px; background: #1a1a1a; border: 1px solid #2a2a2a; border-radius: 999px; font-size: 12px; color: #cfcfcf; }
.tag.game { background: #17121f; border-color: #3b2d55; color: #d9caff; }
.tag.status { color: #8be0a0; border-color: #2f3f34; background: #142016; }
.tag.alert { color: #f2b8b5; border-color: #3f2f2f; background: #201414; }
.capacity { margin: 8px 16px 0 16px; height: 6px; background: #1a1a1a; border: 1px solid #2a2a2a; border-radius: 999px; overflow: hidden; }
.capacity-fill { height: 100%; background: linear-gradient(90deg, #6d3dd1, #9b6bff); width: 0%; transition: width 0.3s ease; }
.card-footer { margin-top: auto; padding: 12px 16px; display: flex; justify-content: space-between; align-items: center; border-top: 1px solid #242424; gap: 12px; }
.footer-meta { color: #9a9a9a; font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.actions { display: flex; gap: 8px; }
.team-card .cta-button, .team-card .secondary-button { padding: 8px 12px; font-size: 14px; }

/* Empty State */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  background: rgba(255, 255, 255, 0.02);
  border-radius: 12px;
  border: 2px dashed rgba(138, 43, 226, 0.3);
  margin: 20px 0;
}

.empty-state.hidden {
  display: none;
}

.empty-icon {
  font-size: 64px;
  margin-bottom: 20px;
  opacity: 0.5;
}

.empty-state h3 {
  color: white;
  margin-bottom: 10px;
  font-size: 24px;
}

.empty-state p {
  color: rgba(255, 255, 255, 0.6);
  margin-bottom: 25px;
  font-size: 16px;
}

.empty-state .cta-button {
  margin-top: 10px;
}

/* Advanced Search Filters */
.search-controls {
  background: rgba(255, 255, 255, 0.02);
  border-radius: 12px;
  padding: 25px;
  margin-bottom: 25px;
  border: 1px solid rgba(138, 43, 226, 0.2);
}

.filter-row {
  display: flex;
  gap: 20px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.filter-group {
  flex: 1;
  min-width: 200px;
}

.filter-group label {
  display: block;
  color: #8a2be2;
  font-weight: bold;
  margin-bottom: 8px;
  font-size: 14px;
}

.filter-group .game-select,
.filter-group .time-select {
  width: 100%;
  padding: 12px;
  background: #1a1a2e;
  border: 1px solid rgba(138, 43, 226, 0.3);
  border-radius: 6px;
  color: white;
  font-size: 14px;
  transition: all 0.3s ease;
}

.filter-group .game-select option,
.filter-group .time-select option {
  background: #1a1a2e;
  color: white;
  padding: 8px;
}

.filter-group .game-select:focus,
.filter-group .time-select:focus {
  outline: none;
  border-color: #8a2be2;
  background: rgba(138, 43, 226, 0.1);
  box-shadow: 0 0 8px rgba(138, 43, 226, 0.3);
}

.search-actions {
  display: flex;
  gap: 15px;
  justify-content: center;
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid rgba(138, 43, 226, 0.2);
}

.search-actions .cta-button,
.search-actions .secondary-button {
  padding: 12px 30px;
  font-size: 16px;
  min-width: 150px;
}

/* Admin Games Management */
.games-list-container {
  margin-top: 20px;
}

.games-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
  gap: 20px;
  margin-top: 15px;
}

.admin-game-card {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(138, 43, 226, 0.3);
  border-radius: 12px;
  padding: 20px;
  transition: all 0.3s ease;
}

.admin-game-card:hover {
  border-color: #8a2be2;
  box-shadow: 0 5px 20px rgba(138, 43, 226, 0.3);
  transform: translateY(-2px);
}

.game-card-header {
  display: flex;
  gap: 15px;
  margin-bottom: 15px;
}

.game-card-info {
  flex: 1;
}

.game-card-info h4 {
  color: #8a2be2;
  margin: 0 0 10px 0;
  font-size: 18px;
}

.game-meta {
  color: rgba(255, 255, 255, 0.7);
  font-size: 14px;
  margin: 5px 0;
}

.game-genre {
  color: #8a2be2;
  font-weight: bold;
}

.game-date {
  color: rgba(255, 255, 255, 0.6);
}

.game-platforms {
  color: rgba(255, 255, 255, 0.8);
  font-size: 14px;
  margin: 5px 0;
}

.game-description {
  color: rgba(255, 255, 255, 0.6);
  font-size: 13px;
  margin: 10px 0 0 0;
  line-height: 1.5;
}

.game-card-image {
  width: 100px;
  height: 100px;
  object-fit: cover;
  border-radius: 8px;
  border: 2px solid rgba(138, 43, 226, 0.3);
}

.game-card-actions {
  display: flex;
  gap: 10px;
  padding-top: 15px;
  border-top: 1px solid rgba(138, 43, 226, 0.2);
}

.game-card-actions .admin-btn {
  flex: 1;
  padding: 8px 15px;
  font-size: 14px;
}

.game-card-actions .delete-btn {
  background: rgba(255, 59, 48, 0.1);
  border-color: rgba(255, 59, 48, 0.3);
}

.game-card-actions .delete-btn:hover {
  background: rgba(255, 59, 48, 0.2);
  border-color: rgba(255, 59, 48, 0.5);
}

#game-description {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(138, 43, 226, 0.3);
  border-radius: 6px;
  color: white;
  padding: 12px;
  font-size: 14px;
  font-family: inherit;
  resize: vertical;
  width: 100%;
}

#game-description:focus {
  outline: none;
  border-color: #8a2be2;
  background: rgba(138, 43, 226, 0.1);
}

/* Sidebar Upcoming Games */
/* Sidebar Upcoming Games Carousel Styles */
.sidebar-upcoming-game {
  margin-bottom: 20px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(138, 43, 226, 0.3) !important;
  border-left: 1px solid rgba(138, 43, 226, 0.3) !important;
  border-radius: 12px;
  overflow: hidden;
  position: relative;
}

.game-image-container {
  position: relative;
  width: 100%;
  height: 140px;
  overflow: hidden;
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
  display: flex;
  align-items: center;
  justify-content: center;
}

.sidebar-game-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transition: transform 0.3s ease;
}

.game-image-container:hover .sidebar-game-image {
  transform: scale(1.1);
}

.sidebar-game-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 50px;
  font-weight: bold;
  color: rgba(138, 43, 226, 0.3);
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
}

.game-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(138, 43, 226, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.game-image-container:hover .game-overlay {
  opacity: 1;
}

.game-overlay span {
  color: white;
  font-size: 14px;
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.game-title-bar {
  background: rgba(138, 43, 226, 0.2);
  padding: 4px;
  text-align: center;
  border-bottom: 1px solid rgba(138, 43, 226, 0.3);
  border-top-left-radius: 12px;
  border-top-right-radius: 12px;
  margin-bottom: 4px;
}

.game-title-bar strong {
  color: white;
  font-size: 20px;
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 1px;
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.game-release-info {
  display: none;
}

.release-date {
  color: rgba(255, 255, 255, 0.8);
  font-size: 14px;
  margin-bottom: 0;
  text-align: center;
  padding: 2px 0;
}

.release-countdown {
  display: none !important;
  height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  line-height: 0 !important;
}

.game-platforms {
  padding: 3px 6px;
  text-align: center;
  color: rgba(255, 255, 255, 0.6);
  font-size: 14px;
  border-top: 1px solid rgba(138, 43, 226, 0.1);
}

.sidebar-find-team-btn {
  width: 100%;
  padding: 6px;
  background: linear-gradient(135deg, #8a2be2 0%, #6a1b9a 100%);
  color: white;
  border: none;
  border-top: 1px solid rgba(138, 43, 226, 0.3);
  cursor: pointer;
  font-size: 13px;
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  transition: all 0.3s ease;
}

.sidebar-find-team-btn:hover {
  background: linear-gradient(135deg, #9d4edd 0%, #7b2cbf 100%);
  transform: translateY(-1px);
}

.sidebar-create-team-btn {
  width: 100%;
  padding: 6px;
  background: linear-gradient(135deg, #4CAF50 0%, #45a049 100%);
  color: white;
  border: none;
  border-top: 1px solid rgba(76, 175, 80, 0.3);
  cursor: pointer;
  font-size: 13px;
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  transition: all 0.3s ease;
}

.sidebar-create-team-btn:hover {
  background: linear-gradient(135deg, #45a049 0%, #4CAF50 100%);
  transform: translateY(-1px);
}

.delete-game-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  background: rgba(255, 59, 48, 0.9);
  border: none;
  border-radius: 50%;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 16px;
  z-index: 10;
}

.delete-game-btn:hover {
  background: #ff3b30;
  transform: scale(1.1);
}

.carousel-indicator {
  text-align: center;
  padding: 4px;
  color: rgba(255, 255, 255, 0.4);
  font-size: 10px;
  border-top: 1px solid rgba(138, 43, 226, 0.1);
  display: none;
}

/* Tournament Carousel Styles (Smaller than Upcoming Games) */
.sidebar-tournament-item {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(138, 43, 226, 0.3) !important;
  border-left: 1px solid rgba(138, 43, 226, 0.3) !important;
  border-radius: 10px;
  overflow: hidden;
  position: relative;
}

.tournament-image-container {
  position: relative;
  width: 100%;
  height: 120px;
  overflow: hidden;
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
  display: flex;
  align-items: center;
  justify-content: center;
}

.sidebar-tournament-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transition: transform 0.3s ease;
}

.tournament-image-container:hover .sidebar-tournament-image {
  transform: scale(1.1);
}

.sidebar-tournament-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 40px;
  font-weight: bold;
  color: rgba(138, 43, 226, 0.3);
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
}

.tournament-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(138, 43, 226, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.tournament-image-container:hover .tournament-overlay {
  opacity: 1;
}

.tournament-overlay span {
  color: white;
  font-size: 12px;
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.tournament-title-bar {
  background: rgba(138, 43, 226, 0.2);
  padding: 3px;
  text-align: center;
  border-bottom: 1px solid rgba(138, 43, 226, 0.3);
  border-top-left-radius: 10px;
  border-top-right-radius: 10px;
  margin-bottom: 4px;
}

.tournament-title-bar strong {
  color: white !important;
  font-size: 20px;
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 1px;
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: center;
  -webkit-text-fill-color: white !important;
  background: none !important;
  -webkit-background-clip: unset !important;
  background-clip: unset !important;
}

.sidebar-tournament-item .tournament-title-bar strong {
  color: white !important;
  -webkit-text-fill-color: white !important;
}

.tournament-name {
  color: rgba(255, 255, 255, 0.8);
  font-size: 12px;
  text-align: center;
  padding: 2px 0;
  margin-bottom: 4px;
}

.tournament-info {
  display: none;
}

.tournament-date {
  color: rgba(255, 255, 255, 0.8);
  font-size: 14px;
  margin-bottom: 0;
  text-align: center;
  padding: 2px 0;
}

.tournament-countdown {
  display: none !important;
  height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  line-height: 0 !important;
}

.tournament-game {
  padding: 3px 6px;
  text-align: center;
  color: rgba(255, 255, 255, 0.8);
  font-size: 14px;
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 1px;
  border-top: 1px solid rgba(138, 43, 226, 0.1);
  text-align: center;
}

.delete-tournament-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  background: rgba(255, 59, 48, 0.9);
  border: none;
  border-radius: 50%;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 14px;
  z-index: 10;
}

.delete-tournament-btn:hover {
  background: #ff3b30;
  transform: scale(1.1);
}

.sidebar-game-genre {
  color: rgba(255, 255, 255, 0.6);
  font-size: 11px;
  text-transform: uppercase;
  margin: 0;
}

.sidebar-game-date {
  color: rgba(255, 255, 255, 0.8);
  font-size: 12px;
  margin-top: 4px;
  display: flex;
  align-items: center;
  gap: 5px;
}

.sidebar-game-date::before {
  content: '📅';
}

.sidebar-game-platforms {
  color: rgba(255, 255, 255, 0.5);
  font-size: 11px;
  margin-top: 4px;
}

.sidebar-loading, .sidebar-error, .sidebar-empty {
  color: rgba(255, 255, 255, 0.5);
  font-size: 13px;
  text-align: center;
  padding: 15px;
}

.sidebar-error {
  color: rgba(255, 59, 48, 0.8);
}

/* Scrollbar for sidebar games */
.sidebar-games-list::-webkit-scrollbar {
  width: 6px;
}

.sidebar-games-list::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 3px;
}

.sidebar-games-list::-webkit-scrollbar-thumb {
  background: rgba(138, 43, 226, 0.5);
  border-radius: 3px;
}

.sidebar-games-list::-webkit-scrollbar-thumb:hover {
  background: rgba(138, 43, 226, 0.8);
}

#team-search-section,
#myTeams,
#availableTeams {
  width: 100%;
  margin: 0 auto 24px auto;
  box-sizing: border-box;
}

#myTeams, #availableTeams {
  margin-top: 0;
}

#myTeams h3, #availableTeams h3 {
  text-align: center;
}

#team-search-section {
  margin-bottom: 0;
}

#myTeams, #availableTeams, #team-search-section {
  min-width: 0;
  max-width: 100%;
}

.team-item {
  background: linear-gradient(135deg, #1a1a1a 0%, #252525 100%);
  border-radius: 12px;
  padding: 20px;
  border: 1px solid rgba(138, 43, 226, 0.2);
  transition: all 0.3s ease;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.team-item::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #8a2be2, #6a1b9a);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.team-item:hover {
  border-color: #8a2be2;
  transform: translateY(-4px);
  box-shadow: 0 8px 20px rgba(138, 43, 226, 0.3);
}

.team-item:hover::before {
  opacity: 1;
}

.team-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.team-name {
  font-weight: bold;
  color: #8a2be2;
  font-size: 16px;
}

.team-game {
  color: #4caf50;
  font-size: 12px;
  text-transform: uppercase;
  font-weight: bold;
}

.team-members {
  color: #ccc;
  font-size: 14px;
  margin-bottom: 10px;
}

.team-actions {
  display: flex;
  gap: 10px;
}

.team-actions button {
  padding: 5px 10px;
  font-size: 12px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: background 0.3s;
}

.join-team-btn {
  background: #4caf50;
  color: white;
}

.join-team-btn:hover {
  background: #45a049;
}

.leave-team-btn {
  background: #ff4444;
  color: white;
}

.leave-team-btn:hover {
  background: #cc0000;
}

.disband-team-btn {
  background: #d32f2f;
  color: white;
  border: 2px solid #b71c1c;
}

.disband-team-btn:hover {
  background: #b71c1c;
  border-color: #8e0000;
}

.view-team-btn {
  background: #2196f3;
  color: white;
}

.view-team-btn:hover {
  background: #1976d2;
}

.apply-team-btn {
  background: #ff9800;
  color: white;
}

.apply-team-btn:hover {
  background: #f57c00;
}

.empty-teams {
  text-align: center;
  color: #999;
  font-style: italic;
  padding: 20px;
}

/* ========== Recruiting Feature Styles ========== */
.recruiting-badge {
  display: inline-block;
  background: linear-gradient(135deg, #4CAF50, #45a049);
  color: white;
  padding: 4px 8px;
  border-radius: 12px;
  font-size: 0.75em;
  font-weight: 600;
  margin-top: 4px;
  box-shadow: 0 2px 4px rgba(76, 175, 80, 0.3);
  animation: recruitingPulse 2s infinite;
}

@keyframes recruitingPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.8; }
}

.recruiting-toggle-btn {
  background-color: #4CAF50;
  color: white;
  border: none;
  padding: 6px 12px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.8em;
  font-weight: 600;
  transition: all 0.3s ease;
  margin-left: 8px;
}

.recruiting-toggle-btn:hover {
  background-color: #45a049;
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(76, 175, 80, 0.4);
}

.recruiting-toggle-btn.recruiting-active {
  background-color: #f44336;
}

.recruiting-toggle-btn.recruiting-active:hover {
  background-color: #d32f2f;
  box-shadow: 0 2px 8px rgba(244, 67, 54, 0.4);
}

.recruiting-section-header {
  background: linear-gradient(135deg, #4CAF50, #45a049);
  color: white;
  padding: 12px 16px;
  border-radius: 8px;
  margin-bottom: 16px;
  box-shadow: 0 2px 8px rgba(76, 175, 80, 0.3);
}

.recruiting-section-header h4 {
  margin: 0;
  font-size: 1.1em;
  font-weight: 600;
  text-align: center;
}

.teams-section-separator {
  height: 2px;
  background: linear-gradient(90deg, transparent, #444, transparent);
  margin: 20px 0;
  border-radius: 1px;
}

.regular-section-header {
  background: linear-gradient(135deg, #666, #555);
  color: white;
  padding: 12px 16px;
  border-radius: 8px;
  margin-bottom: 16px;
  box-shadow: 0 2px 8px rgba(102, 102, 102, 0.3);
}

.regular-section-header h4 {
  margin: 0;
  font-size: 1.1em;
  font-weight: 600;
  text-align: center;
}

@media (max-width: 768px) {
  .recruiting-badge {
    font-size: 0.7em;
    padding: 3px 6px;
  }
  
  .recruiting-toggle-btn {
    font-size: 0.75em;
    padding: 5px 10px;
    margin-left: 6px;
  }
  
  .recruiting-section-header {
    padding: 10px 12px;
    margin-bottom: 12px;
  }
  
  .recruiting-section-header h4 {
    font-size: 1em;
  }
  
  .teams-section-separator {
    margin: 16px 0;
  }
  
  .regular-section-header {
    padding: 10px 12px;
    margin-bottom: 12px;
  }
  
  .regular-section-header h4 {
    font-size: 1em;
  }
}

/* ========== Messaging Layout ========== */
#chat {
  display: flex;
  height: 80vh;
  border: 1px solid #333;
  border-radius: 8px;
  overflow: hidden;
}

#chat-list {
  width: 200px;
  background-color: #1a1a1a;
  border-right: 1px solid #333;
  overflow-y: auto;
  padding: 10px;
}

#chat-list-content .recent-chat-item {
  padding: 8px 10px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid #333;
  transition: background 0.2s;
}

#chat-list-content .recent-chat-item:hover {
  background: #2a2a2a;
}

.chat-item-content {
  display: flex;
  align-items: center;
  flex: 1;
  cursor: pointer;
}

.delete-chat-btn {
  background: #ff4444;
  color: white;
  border: none;
  border-radius: 50%;
  width: 24px;
  height: 24px;
  cursor: pointer;
  font-size: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-left: 10px;
  transition: background 0.2s, opacity 0.2s;
  opacity: 0;
  pointer-events: none;
}

.recent-chat-item:hover .delete-chat-btn {
  opacity: 1;
  pointer-events: auto;
}

.avatar-circle {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #8a2be2;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 11px;
  margin-right: 8px;
  object-fit: cover;
  flex-shrink: 0;
}

.avatar-circle.team-chat {
  background: #ff9800;
  font-size: 10px;
  font-weight: normal;
  object-fit: cover;
}

.chat-user-name {
  font-weight: bold;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 120px;
}

/* Chat Unread Badge Styles */


/* Chat Panel */
#chat-box {
  flex: 1;
  display: flex;
  flex-direction: column;
  background: #191919;
  padding: 10px;
  margin-right: 10px;
}

#chat-header {
  font-weight: bold;
  margin-bottom: 5px;
  border-bottom: 1px solid #333;
  padding-bottom: 5px;
}

.view-profile-btn {
  padding: 4px 12px;
  font-size: 12px;
  background: #8a2be2;
  color: white;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}

.view-profile-btn:hover {
  background: #7a1bd2;
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(138, 43, 226, 0.3);
}

#chat-messages {
  flex: 1;
  overflow-y: auto;
  padding-right: 15px;
  margin-right: 5px;
}

#chat-input-area {
  display: flex;
  margin-top: 10px;
  gap: 10px;
}

#chat-input {
  flex: 1;
  padding: 10px;
  border: 1px solid #444;
  border-radius: 4px;
  background: #1a1a1a;
  color: white;
}

#send-btn {
  padding: 10px 15px;
  border: none;
  background: #8a2be2;
  color: white;
  border-radius: 4px;
  cursor: pointer;
  white-space: nowrap;
  min-width: 60px;
}

/* Messages */
.msg {
  margin-bottom: 10px;
  text-align: left;
}

.msg.mine {
  text-align: left;
}

.msg.theirs {
  text-align: left;
}

.sender {
  font-weight: bold;
  margin-bottom: 2px;
}

.text {
  background-color: #2c2c2c;
  display: inline-block;
  padding: 6px 12px;
  border-radius: 10px;
  max-width: 70%;
  word-wrap: break-word;
}

.time {
  font-size: 0.8em;
  color: #aaa;
  margin-top: 2px;
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Message Status Indicators */
.message-status {
  font-size: 0.75em;
  opacity: 0.7;
  transition: opacity 0.2s;
}

.message-status.sending {
  color: #ffa500;
  animation: pulse 1.5s infinite;
}

.message-status.sent {
  color: #4caf50;
}

/* Loading Spinner */
.loading-spinner-small {
  display: inline-block;
  width: 12px;
  height: 12px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
  vertical-align: middle;
  margin-right: 4px;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

@keyframes pulse {
  0%, 100% { opacity: 0.7; }
  50% { opacity: 1; }
}

/* Typing Indicator */
.typing-indicator {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  margin: 8px 0;
  color: #888;
  font-size: 0.85em;
  font-style: italic;
}

.typing-dots {
  display: flex;
  gap: 4px;
  align-items: center;
}

.typing-dots span {
  width: 6px;
  height: 6px;
  background: #8a2be2;
  border-radius: 50%;
  animation: typingDot 1.4s infinite ease-in-out;
}

.typing-dots span:nth-child(1) {
  animation-delay: -0.32s;
}

.typing-dots span:nth-child(2) {
  animation-delay: -0.16s;
}

@keyframes typingDot {
  0%, 80%, 100% {
    transform: scale(0.8);
    opacity: 0.5;
  }
  40% {
    transform: scale(1);
    opacity: 1;
  }
}

.typing-text {
  color: #aaa;
  font-size: 0.9em;
}

/* ========== Tournament Sidebar ========== */
#tournament-banner {
  position: fixed;
  left: 0;
  top: 56px;
  width: 250px;
  height: calc(100vh - 56px);
  background-color: #1a1a1a;
  border-right: 1px solid #333;
  padding: 25px;
  overflow-y: auto;
  z-index: 1000;
  transition: left 0.3s cubic-bezier(.4,2,.6,1), opacity 0.3s;
}

#tournament-banner h2 {
  margin-top: 0;
  margin-bottom: 20px;
  color: #8a2be2;
  border-bottom: 2px solid #8a2be2;
  padding-bottom: 12px;
}

#tournament-feed {
  margin-top: 20px;
}

#tournament-feed div {
  background: #2c2c2c;
  padding: 15px;
  margin-bottom: 15px;
  border-radius: 8px;
}

#tournament-feed strong {
  color: #8a2be2;
}

#tournament-feed .countdown {
  color: #ff6b6b;
  font-weight: bold;
}

#admin-controls {
  border-top: 1px solid #333;
  padding-top: 15px;
}

#admin-controls h3 {
  color: #8a2be2;
  margin-top: 0;
}

#admin-controls input {
  width: 100%;
  padding: 8px;
  margin-bottom: 10px;
  border: 1px solid #555;
  background: #1a1a1a;
  color: white;
  border-radius: 4px;
  box-sizing: border-box;
}

#admin-controls button {
  width: 100%;
  padding: 8px;
  background: #8a2be2;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}

#admin-controls button:hover {
  background: #7a1be2;
}

#admin-controls select {
  width: 100%;
  padding: 8px;
  margin-bottom: 10px;
  border: 1px solid #555;
  background: #1a1a1a;
  color: white;
  border-radius: 4px;
  box-sizing: border-box;
}

.tournament-game {
  color: white;
  font-weight: bold;
  font-size: 12px;
  text-transform: uppercase;
  margin-bottom: 5px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.game-icon {
  width: 20px;
  height: 20px;
  object-fit: contain;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.1);
  padding: 2px;
}

.upcoming-game {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 10px;
}

.upcoming-game-info {
  flex: 1;
}

.tournament-link {
  display: inline-block;
  color: #4fc3f7;
  text-decoration: none;
  font-size: 12px;
  margin-top: 5px;
}

.tournament-link:hover {
  text-decoration: underline;
}

.past-tournament {
  color: rgba(255, 255, 255, 0.4) !important;
  text-decoration: line-through;
}

/* ========== CTA Button ========== */
.cta-button {
  padding: 10px 18px;
  background: #8a2be2;
  color: white;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-weight: bold;
  transition: background 0.3s;
  margin-bottom: 12px;
}

.cta-button:hover {
  background: #7a1be2;
}

/* ========== Find Team Button ========== */
.find-team-btn {
  background: #4caf50;
  color: white;
  border: none;
  padding: 5px 10px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 12px;
  margin: 5px 0;
  transition: background 0.3s;
}

.find-team-btn:hover {
  background: #45a049;
}

/* ========== Team Finding Modal ========== */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 4000; /* ensure overlay sits above other fixed UI */
}

/* ========== Team Profile Modal (Teams tab) ========== */
.team-profile-modal {
  background: #121212;
  border: 1px solid #2a2a2a;
  border-radius: 12px;
  width: min(860px, 94%);
  max-height: 90vh;
  overflow: auto;
  padding-bottom: 12px;
}
.team-profile-banner {
  height: 140px;
  background: linear-gradient(90deg, rgba(138,43,226,0.25), rgba(138,43,226,0.08));
  border-bottom: 1px solid #232323;
  position: relative;
}
.team-profile-header {
  display: flex;
  gap: 14px;
  align-items: center;
  padding: 0 20px;
  transform: translateY(-28px);
}
.team-profile-avatar {
  width: 72px;
  height: 72px;
  border-radius: 16px;
  background: #1e1e1e;
  border: 1px solid #2f2f2f;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: #9c7be9;
}
.team-profile-title h2 { margin: 0; }
.team-profile-sub { color: #a9a9a9; font-size: 13px; }
.team-profile-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 6px; }
.team-profile-tags { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 6px; }
.team-profile-tag { padding: 6px 10px; background: #1a1a1a; border: 1px solid #2a2a2a; border-radius: 999px; font-size: 12px; color: #cfcfcf; }
.team-profile-body { padding: 0 20px 20px 20px; display: grid; grid-template-columns: 1fr; gap: 16px; }
.team-profile-grid { display: grid; grid-template-columns: 1.3fr 0.7fr; gap: 16px; }
.panel { background: #161616; border: 1px solid #2a2a2a; border-radius: 12px; }
.panel h3 { margin: 0; padding: 14px 16px; border-bottom: 1px solid #242424; }
.panel .panel-content { padding: 14px 16px; color: #cfcfcf; }
.roster-list { display: grid; grid-template-columns: 1fr; gap: 10px; }
.roster-item { display: flex; align-items: center; gap: 10px; padding: 10px; background: #141414; border: 1px solid #252525; border-radius: 10px; }
.roster-avatar { width: 36px; height: 36px; border-radius: 8px; background: #202020; display: inline-flex; align-items: center; justify-content: center; font-weight: 600; color: #9c7be9; }
@media (max-width: 960px) {
  .team-profile-grid { grid-template-columns: 1fr; }
}

.modal-content {
  background: #1a1a1a;
  border: 1px solid #333;
  border-radius: 8px;
  width: 90%;
  max-width: 500px;
  max-height: none;
  overflow: visible;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 20px;
  border-bottom: 1px solid #333;
}

.modal-header h3 {
  margin: 0;
  color: #8a2be2;
}

.close-btn {
  background: none;
  border: none;
  color: #ccc;
  font-size: 18px;
  cursor: pointer;
  padding: 0;
  width: 30px;
  height: 30px;
}

.close-btn:hover {
  color: white;
}

.modal-body {
  padding: 20px;
  overflow: visible;
}

.team-actions {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
}

.secondary-button {
  padding: 8px 16px;
  background: #666;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-weight: bold;
  transition: background 0.3s;
}

.secondary-button:hover {
  background: #555;
}

#team-search-results h4 {
  color: #8a2be2;
  margin-bottom: 15px;
}

.team-player {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px;
  background: #2c2c2c;
  border-radius: 4px;
  margin-bottom: 10px;
  border-left: 3px solid #4caf50;
}

.player-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.player-name {
  font-weight: bold;
  color: white;
}

.player-game {
  color: #8a2be2;
  font-size: 12px;
}

.player-time {
  color: #999;
  font-size: 11px;
}

.contact-btn {
  background: #2196f3;
  color: white;
  border: none;
  padding: 5px 10px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 12px;
  transition: background 0.3s;
}

.contact-btn:hover {
  background: #1976d2;
}

.sidebar-title {
  font-size: 1.2em !important;
  color: #8a2be2 !important;
  border-bottom: 1px solid #8a2be2 !important;
  padding-bottom: 8px;
  margin-top: 0;
  margin-bottom: 12px;
  letter-spacing: 1px;
  font-weight: 600;
  text-transform: uppercase;
  text-shadow: 0 0 5px rgba(138, 43, 226, 0.3) !important;
  text-align: center;
  font-family: Arial, sans-serif;
  background: none !important;
  -webkit-background-clip: unset !important;
  -webkit-text-fill-color: #8a2be2 !important;
  background-clip: unset !important;
}

.upcoming-title {
  font-size: 1.2em !important;
  color: #8a2be2 !important;
  border-bottom: 1px solid #8a2be2 !important;
  padding-bottom: 8px;
  padding-top: 25px;
  margin-top: 0;
  margin-bottom: 12px;
  letter-spacing: 1px;
  font-weight: 600;
  text-transform: uppercase;
  text-shadow: 0 0 5px rgba(138, 43, 226, 0.3) !important;
  text-align: center;
  font-family: Arial, sans-serif;
  background: none !important;
  -webkit-background-clip: unset !important;
  -webkit-text-fill-color: #8a2be2 !important;
  background-clip: unset !important;
}

#upcoming-games-feed {
  margin-top: 12px;
  margin-bottom: 12px;
  min-height: 40px;
  color: #b6aaff;
  font-size: 0.98em;
}

/* Team Search Section */
#team-search-section {
  background: #2c2c2c;
  border-radius: 8px;
  padding: 20px;
  margin-bottom: 20px;
  border-left: 3px solid #4caf50;
}

/* Hide timezone filter if it exists */
#team-search-section #timezone-filter,
#team-search-section label[for="timezone-filter"],
#team-search-section .filter-group:has(#timezone-filter) {
  display: none !important;
}

.search-controls {
  display: flex;
  flex-direction: column;
  gap: 15px;
  margin-bottom: 20px;
}

.search-controls .filter-row {
  display: flex;
  gap: 15px;
  flex-wrap: wrap;
}

.search-controls .filter-group {
  flex: 1;
  min-width: 200px;
  max-width: 300px;
}

.game-select {
  padding: 10px 15px;
  border: 1px solid #444;
  border-radius: 6px;
  background: #1a1a1a;
  color: #fff;
  font-size: 14px;
  min-width: 150px;
  width: 100%;
  box-sizing: border-box;
  cursor: pointer;
}

.game-select option[disabled] {
  color: #888;
  font-style: italic;
}

.game-select:focus {
  outline: none;
  border-color: #4caf50;
}

#search-results h3 {
  color: #4caf50;
  margin-top: 0;
  margin-bottom: 15px;
  text-align: center;
}

#search-results-list {
  min-height: 50px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.secondary-button {
  padding: 10px 20px;
  background: #666;
  color: white;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  transition: background 0.3s;
}

.secondary-button:hover {
  background: #555;
}

/* ========== Contact Page Styles ========== */
#contact {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
}

#contact h2 {
  text-align: center;
  color: #8a2be2;
  margin-bottom: 30px;
}

/* Contact page specific positioning to avoid sidebar overlap */
#contact {
  margin-left: 400px;
  padding-right: 20px;
}

.contact-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  margin-top: 20px;
}

.contact-info, .contact-form {
  background: #2c2c2c;
  border-radius: 8px;
  padding: 30px;
  border-left: 3px solid #8a2be2;
}

.contact-info h3, .contact-form h3 {
  color: #8a2be2;
  margin-top: 0;
  margin-bottom: 20px;
  text-align: center;
}

.contact-info p {
  color: #ccc;
  text-align: center;
  margin-bottom: 30px;
  line-height: 1.6;
}

.contact-methods {
  display: flex;
  flex-direction: column;
  gap: 25px;
}

.contact-method {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 15px;
  background: #1a1a1a;
  border-radius: 6px;
  border: 1px solid #444;
  transition: border-color 0.3s;
}

.contact-method:hover {
  border-color: #8a2be2;
}

.contact-icon {
  font-size: 24px;
  min-width: 40px;
  text-align: center;
}

.contact-details h4 {
  color: #8a2be2;
  margin: 0 0 5px 0;
  font-size: 16px;
}

.contact-details p {
  color: #ccc;
  margin: 0 0 8px 0;
  font-size: 14px;
}

.discord-link {
  color: #7289da;
  text-decoration: none;
  font-weight: bold;
  font-size: 14px;
}

.discord-link:hover {
  text-decoration: underline;
}

/* Contact Form Styles */
.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  color: #8a2be2;
  margin-bottom: 8px;
  font-weight: bold;
  font-size: 14px;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 12px;
  border: 1px solid #444;
  border-radius: 6px;
  background: #1a1a1a;
  color: #fff;
  font-size: 14px;
  transition: border-color 0.3s;
  box-sizing: border-box;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: #8a2be2;
}

.form-group textarea {
  resize: vertical;
  min-height: 100px;
}

#contactForm .cta-button {
  width: 100%;
  margin-top: 10px;
}

/* Responsive Design */
@media (max-width: 768px) {
  #contact {
    margin-left: 20px;
    padding-right: 20px;
  }
  
  .contact-container {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  
  .contact-info, .contact-form {
    padding: 20px;
  }
  
  .contact-method {
    flex-direction: column;
    text-align: center;
    gap: 10px;
  }
  
  .contact-icon {
    min-width: auto;
  }
}

/* ========== TeamItUp Logo Styles ========== */
.logo-container {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 30px;
  padding: 20px 0;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.teamitup-logo {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 16px 24px;
  background: linear-gradient(135deg, #1a1a1a 0%, #2c2c2c 50%, #1a1a1a 100%);
  border: 2px solid #8a2be2;
  border-radius: 12px;
  box-shadow: 
    0 0 20px rgba(138, 43, 226, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;
  max-width: 100%;
  box-sizing: border-box;
}

.teamitup-logo::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(138, 43, 226, 0.2), transparent);
  transition: left 0.5s ease;
}

.teamitup-logo:hover::before {
  left: 100%;
}

.teamitup-logo:hover {
  transform: translateY(-2px);
  box-shadow: 
    0 5px 25px rgba(138, 43, 226, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.logo-icon {
  font-size: 36px;
  filter: drop-shadow(0 0 10px rgba(138, 43, 226, 0.5));
  animation: logoGlow 2s ease-in-out infinite alternate;
  flex-shrink: 0;
}

@keyframes logoGlow {
  0% {
    filter: drop-shadow(0 0 10px rgba(138, 43, 226, 0.5));
  }
  100% {
    filter: drop-shadow(0 0 20px rgba(138, 43, 226, 0.8));
  }
}

.logo-text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  line-height: 1;
}

.logo-title {
  font-size: 24px;
  font-weight: 900;
  color: #8a2be2;
  text-shadow: 0 0 10px rgba(138, 43, 226, 0.5);
  letter-spacing: 2px;
  margin-bottom: 2px;
  white-space: nowrap;
}

.logo-subtitle {
  font-size: 18px;
  font-weight: 700;
  color: #4caf50;
  text-shadow: 0 0 8px rgba(76, 175, 80, 0.5);
  letter-spacing: 2px;
}

/* Responsive logo design */
@media (max-width: 768px) {
  .teamitup-logo {
    padding: 15px 20px;
    gap: 12px;
  }
  
  .logo-icon {
    font-size: 36px;
  }
  
  .logo-title {
    font-size: 24px;
    letter-spacing: 2px;
  }
  
  .logo-subtitle {
    font-size: 14px;
    letter-spacing: 1px;
  }
}

@media (max-width: 480px) {
  .teamitup-logo {
    padding: 12px 15px;
    gap: 10px;
  }
  
  .logo-icon {
    font-size: 28px;
  }
  
  .logo-title {
    font-size: 20px;
    letter-spacing: 1px;
  }
  
  .logo-subtitle {
    font-size: 12px;
    letter-spacing: 0.5px;
  }
}

/* ========== Top Left Logo ========== */
.top-left-logo {
  position: fixed;
  top: 4px;
  left: 12px;
  z-index: 2001;
  cursor: pointer;
  transition: transform 0.3s ease;
  background: rgba(30, 8, 60, 0.92);
  border-radius: 50%;
  box-shadow: 0 4px 16px rgba(138, 43, 226, 0.25), 0 1.5px 6px rgba(0,0,0,0.18);
  padding: 10px 12px 8px 12px;
  margin: 0;
  width: 54px;
  height: 54px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border: 2px solid #8a2be2;
}

.top-left-logo:hover {
  transform: scale(1.05);
}

.top-left-logo span {
  background: transparent !important;
  box-shadow: none !important;
  border: none !important;
}

body {
  padding-top: 56px;
}

#right-sidebar {
  position: fixed;
  right: 0;
  top: 56px;
  width: 250px;
  height: calc(100vh - 56px);
  background: #1a1a1a;
  border-left: 1px solid #333;
  padding: 25px;
  overflow-y: auto;
  z-index: 1000;
}

#right-sidebar .sidebar-title {
  color: white !important;
  border-bottom: 2px solid white !important;
  padding-bottom: 12px;
  margin-top: 20px;
  margin-bottom: 20px;
  text-align: center;
  background: none !important;
  -webkit-background-clip: unset !important;
  -webkit-text-fill-color: white !important;
  background-clip: unset !important;
}

#online-friends-list {
  list-style: none;
  padding: 0;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 15px;
  align-items: center;
}

.online-friend {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  background: #222;
  border-radius: 8px;
  padding: 8px 12px;
  width: 100%;
  max-width: 200px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.08);
  position: relative;
}

.online-friend .avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #8a2be2;
}

.online-friend .friend-name {
  color: #fff;
  font-weight: 500;
  font-size: 15px;
}

.online-friend .friend-name.clickable {
  cursor: pointer;
  color: #8a2be2;
  transition: color 0.2s ease;
}

.online-friend .friend-name.clickable:hover {
  color: #a855f7;
  text-decoration: underline;
}

.online-friend .friend-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
}

.online-friend .message-icon {
  cursor: pointer;
  font-size: 16px;
  padding: 4px;
  border-radius: 4px;
  transition: all 0.2s ease;
  opacity: 0.8;
}

.online-friend .message-icon:hover {
  opacity: 1;
  background: rgba(138, 43, 226, 0.2);
  transform: scale(1.1);
}



/* Delete Friend Popup Styles */
.delete-friend-popup {
  background: #181818;
  border: 1px solid #444;
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.8);
  padding: 0;
  min-width: 200px;
  animation: popupFadeIn 0.2s ease-out;
}

.delete-friend-content {
  padding: 16px;
}

.delete-friend-text {
  color: #fff;
  font-size: 14px;
  margin-bottom: 12px;
  text-align: center;
}

.delete-friend-buttons {
  display: flex;
  gap: 8px;
  justify-content: center;
}

.delete-friend-cancel,
.delete-friend-confirm {
  padding: 8px 16px;
  border: none;
  border-radius: 4px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.delete-friend-cancel {
  background: #444;
  color: #ccc;
}

.delete-friend-cancel:hover {
  background: #555;
  color: #fff;
}

.delete-friend-confirm {
  background: #dc3545;
  color: #fff;
}

.delete-friend-confirm:hover {
  background: #c82333;
}

/* Success Message Styles */
.success-message {
  position: fixed;
  top: 20px;
  right: 20px;
  background: #28a745;
  color: #fff;
  padding: 12px 20px;
  border-radius: 6px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  z-index: 4000;
  animation: slideInRight 0.3s ease-out;
  font-size: 14px;
  font-weight: 500;
}

@keyframes popupFadeIn {
  from {
    opacity: 0;
    transform: scale(0.9) translateY(-10px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(100%);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.online-friend .status {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #4caf50;
  margin-left: auto;
  box-shadow: 0 0 6px #4caf50;
}

#main-content-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 0 auto;
  width: calc(100vw - 520px);
  max-width: 1100px;
  min-height: calc(100vh - 56px);
  padding: 30px 16px;
  box-sizing: border-box;
  transition: margin 0.3s cubic-bezier(.4,2,.6,1);
  border-left: none !important;
}

#main-content-wrapper > * {
  padding-left: 0 !important;
}

.page.tab-content {
  width: 100%;
  max-width: 1100px;
  margin-left: auto !important;
  margin-right: auto !important;
}

/* Center the tab bar with page width */
#tabs {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
}

.chat-container { margin-left: 0 !important; }

/* Special handling for teams page to center content */
#teams.page.tab-content:not(.hidden) {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-left: 0 !important;
  padding-left: 0 !important;
}

/* Center Messages and Upcoming Games pages */
#messages.page.tab-content:not(.hidden),
#upcoming.page.tab-content:not(.hidden) {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-left: 0 !important;
  padding-left: 0 !important;
}

/* Constrain chat width and center it */
#messages #chat {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
}

/* Special handling for matchmaking page to center content */
#matchmaking.page.tab-content:not(.hidden) {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin-left: 0 !important;
  padding-left: 0 !important;
  width: 100% !important;
  max-width: 100vw !important;
}

/* Ensure matchmaking content is hidden when it should be */
#matchmaking.page.tab-content.hidden {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
}

/* Override main content wrapper for teams page */
body.teams-active #main-content-wrapper {
  margin: 0 auto !important;
  width: calc(100vw - 520px) !important;
  max-width: 1100px !important;
  padding-left: 16px !important;
  padding-right: 16px !important;
}

/* Override main content wrapper for matchmaking page */
body.matchmaking-active #main-content-wrapper {
  margin: 0 auto !important;
  width: calc(100vw - 520px) !important;
  max-width: 1100px !important;
  padding-left: 16px !important;
  padding-right: 16px !important;
}

#tournament-banner.hidden ~ #main-content-wrapper {
  margin-left: 0;
}
#right-sidebar.hidden ~ #main-content-wrapper {
  margin-right: 0;
}
#tournament-banner.hidden ~ #right-sidebar.hidden ~ #main-content-wrapper {
  margin-left: 0;
  margin-right: 0;
}

#right-sidebar {
  transition: right 0.3s cubic-bezier(.4,2,.6,1), opacity 0.3s;
}
#right-sidebar.hidden {
  right: -270px;
  opacity: 0.1;
  pointer-events: none;
}

#toggle-right-sidebar {
  margin-bottom: 10px;
}

@media (max-width: 1100px) {
  #main-content-wrapper {
    margin-left: 0;
    margin-right: 0;
    max-width: 100vw;
    padding: 20px 5px;
  }
  #right-sidebar, #tournament-banner {
    display: none;
  }
}

#tournament-feed, #upcoming-games-feed {
  min-height: 40px;
  color: #fff;
  display: block;
  overflow-y: auto;
  padding-bottom: 15px;
  margin-top: 20px;
}
#tournament-feed div, #upcoming-games-feed div {
  color: #fff;
  background: #222;
  margin-bottom: 10px;
  border-radius: 6px;
  padding: 0;
}

#tournament-banner.hidden {
  left: -270px !important;
  opacity: 0.1;
  pointer-events: none;
  transition: left 0.3s cubic-bezier(.4,2,.6,1), opacity 0.3s;
}

/* Add Friend Modal Styles */
#add-friend-modal.modal-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.7);
  z-index: 3000;
  display: flex;
  align-items: center;
  justify-content: center;
}
#add-friend-modal .modal-content {
  background: #181818;
  border-radius: 10px;
  padding: 20px 16px 16px 16px;
  box-shadow: 0 4px 32px #000a;
  min-width: 280px;
  max-width: 400px;
  width: 90%;
}
#add-friend-modal .modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}
#add-friend-modal .modal-header h3 {
  color: #8a2be2;
  margin: 0;
  font-size: 1.2em;
}
#add-friend-modal .close-btn {
  background: none;
  border: none;
  color: #fff;
  font-size: 1.2em;
  cursor: pointer;
  padding: 0 6px;
  border-radius: 3px;
  transition: background 0.2s;
}
#add-friend-modal .close-btn:hover {
  background: #333;
}
#add-friend-modal input[type="text"] {
  background: #222;
  color: #fff;
  border: 1px solid #444;
  border-radius: 5px;
  padding: 6px 8px;
  font-size: 0.95em;
  width: 100%;
  box-sizing: border-box;
}
#add-friend-modal .cta-button {
  background: #8a2be2;
  color: #fff;
  border: none;
  border-radius: 5px;
  padding: 8px 0;
  font-size: 0.95em;
  font-weight: bold;
  cursor: pointer;
  margin-top: 8px;
  transition: background 0.2s;
  width: 100%;
}
#add-friend-modal .cta-button:hover {
  background: #a96cff;
}
#addFriendSearchResult {
  color: #b6aaff;
  min-height: 24px;
  text-align: center;
}

/* Friend Requests Modal Styles */
#friend-requests-modal.modal-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.7);
  z-index: 3000;
  display: flex;
  align-items: center;
  justify-content: center;
}
#friend-requests-modal .modal-content {
  background: #181818;
  border-radius: 10px;
  padding: 28px 24px 20px 24px;
  box-shadow: 0 4px 32px #000a;
  min-width: 320px;
  max-width: 95vw;
}
#friend-requests-modal .modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}
#friend-requests-modal .modal-header h3 {
  color: #8a2be2;
  margin: 0;
  font-size: 1.2em;
}
#friend-requests-modal .close-btn {
  background: none;
  border: none;
  color: #fff;
  font-size: 1.2em;
  cursor: pointer;
  padding: 0 6px;
  border-radius: 3px;
  transition: background 0.2s;
}
#friend-requests-modal .close-btn:hover {
  background: #333;
}
#friendRequestsList {
  color: #b6aaff;
  min-height: 24px;
  text-align: left;
}
.friend-request-item {
  background: #222;
  border-radius: 6px;
  padding: 10px 12px;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.friend-request-username {
  font-weight: bold;
  color: #8a2be2;
}
.friend-request-actions button {
  margin-left: 8px;
  padding: 6px 12px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.95em;
}
.friend-request-accept {
  background: #4caf50;
  color: #fff;
}
.friend-request-decline {
  background: #ff4444;
  color: #fff;
}

/* ========== Team Details Modal ========== */
.team-details-modal {
  position: relative !important;
  max-width: 600px;
  max-height: 80vh;
  overflow-y: auto;
}
.team-details-modal #team-details-header { position: relative; }

/* Ensure the close button sits at the top-right INSIDE the team modal */
.team-details-modal .close-btn {
  position: absolute !important;
  top: 12px !important;
  right: 12px !important;
  margin-left: 0;
}

/* Teams modal dedicated close button style when using team-close-btn class */
.team-details-modal .team-close-btn {
  margin-left: auto;
  background: none;
  border: none;
  color: #ccc;
  font-size: 18px;
  cursor: pointer;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.team-details-modal .team-close-btn:hover {
  background: rgba(255,255,255,0.12);
  color: #fff;
}

/* Anchor close button to the team modal header's top-right */
.team-details-modal .modal-header {
  position: relative !important;
}

.team-details-modal .modal-header .close-btn {
  position: absolute !important;
  top: 8px !important;
  right: 8px !important;
}

.team-info-section {
  margin-bottom: 24px;
  padding-bottom: 20px;
  border-bottom: 1px solid #333;
}

.team-basic-info {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.team-game-badge {
  display: inline-block;
  background: #4caf50;
  color: white;
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: bold;
  text-transform: uppercase;
  align-self: flex-start;
}

.team-description {
  color: #ccc;
  line-height: 1.5;
  font-size: 14px;
  background: #2c2c2c;
  padding: 12px;
  border-radius: 6px;
  border-left: 3px solid #8a2be2;
}

.team-stats {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}

.stat-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.stat-label {
  font-size: 12px;
  color: #999;
  text-transform: uppercase;
  font-weight: bold;
}

.stat-value {
  font-size: 16px;
  color: #8a2be2;
  font-weight: bold;
}

.team-members-section {
  margin-bottom: 24px;
}

.team-members-section h4 {
  color: #8a2be2;
  margin-bottom: 16px;
  font-size: 16px;
  border-bottom: 1px solid #333;
  padding-bottom: 8px;
}

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

.member-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  background: #2c2c2c;
  border-radius: 8px;
  border: 1px solid #444;
  transition: border-color 0.3s;
}

.member-item:hover {
  border-color: #8a2be2;
}

.member-item.current-user {
  border-color: #4caf50;
  background: #1a2e1a;
}

.member-avatar {
  width: 40px;
  height: 40px;
  background: #8a2be2;
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 16px;
  flex-shrink: 0;
}

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

.member-name {
  font-weight: bold;
  color: white;
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.creator-badge {
  background: #ffd700;
  color: #000;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: bold;
}

.you-badge {
  background: #4caf50;
  color: white;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: bold;
}

.member-role {
  font-size: 12px;
  color: #999;
  font-style: italic;
}

.team-actions-section {
  border-top: 1px solid #333;
  padding-top: 20px;
}

.team-action-buttons {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
}

.team-action-btn {
  flex: 1;
  min-width: 140px;
  padding: 12px 16px;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.team-action-btn.leave-btn {
  background: #ff4444;
  color: white;
}

.team-action-btn.leave-btn:hover {
  background: #cc0000;
}

/* Responsive design for team details modal */
@media (max-width: 768px) {
  .team-details-modal {
    width: 95%;
    margin: 20px;
  }
  
  .team-stats {
    flex-direction: column;
    gap: 12px;
  }
  
  .team-action-buttons {
    flex-direction: column;
  }
  
  .team-action-btn {
    min-width: auto;
  }
  
  .member-item {
    flex-direction: column;
    text-align: center;
    gap: 8px;
  }
  
  .member-avatar {
    width: 50px;
    height: 50px;
    font-size: 18px;
  }
}

/* ========== Team Management Modal ========== */
.team-management-modal {
  max-width: 700px;
  max-height: 85vh;
  overflow-y: auto;
}

.management-tabs {
  display: flex;
  border-bottom: 1px solid #333;
  margin-bottom: 20px;
  background: #2c2c2c;
  border-radius: 6px 6px 0 0;
}

.management-tab {
  flex: 1;
  padding: 12px 16px;
  background: none;
  border: none;
  color: #ccc;
  cursor: pointer;
  font-weight: bold;
  transition: all 0.3s;
  border-bottom: 3px solid transparent;
}

.management-tab:hover {
  background: #3c3c3c;
  color: #fff;
}

.management-tab.active {
  background: #8a2be2;
  color: white;
  border-bottom-color: #4caf50;
}

.management-content {
  min-height: 400px;
}

.tab-panel {
  display: none;
}

.tab-panel.active {
  display: block;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 1px solid #333;
}

.section-header h4 {
  color: #8a2be2;
  margin: 0;
  font-size: 18px;
}

.invite-btn {
  padding: 8px 16px;
  font-size: 14px;
}

/* Members Management */
.members-management-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.member-management-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px;
  background: #2c2c2c;
  border-radius: 8px;
  border: 1px solid #444;
  transition: border-color 0.3s;
}

.member-management-item:hover {
  border-color: #8a2be2;
}

.member-management-item.creator {
  border-color: #ffd700;
  background: #2a2a1a;
}

.member-info {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
}

.member-details {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.member-actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}

.promote-btn {
  background: #ffd700;
  color: #000;
  border: none;
  padding: 6px 12px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 12px;
  font-weight: bold;
  transition: background 0.3s;
}

.promote-btn:hover {
  background: #ffed4e;
}

.remove-btn {
  background: #ff4444;
  color: white;
  border: none;
  padding: 6px 12px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 12px;
  font-weight: bold;
  transition: background 0.3s;
}

.remove-btn:hover {
  background: #cc0000;
}

.no-actions {
  color: #999;
  font-style: italic;
  font-size: 12px;
}

/* Settings Form */
.settings-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.settings-form .form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.settings-form label {
  font-weight: bold;
  color: #ccc;
  font-size: 14px;
}

.settings-form input,
.settings-form select,
.settings-form textarea {
  padding: 10px 12px;
  background: #2c2c2c;
  border: 1px solid #444;
  border-radius: 6px;
  color: white;
  font-size: 14px;
  transition: border-color 0.3s;
}

.settings-form input:focus,
.settings-form select:focus,
.settings-form textarea:focus {
  outline: none;
  border-color: #8a2be2;
}

.settings-form textarea {
  resize: vertical;
  min-height: 80px;
}

.form-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid #333;
}

.form-actions button {
  padding: 12px 24px;
  font-size: 14px;
  font-weight: bold;
}

/* Danger Zone */
.danger-warning {
  color: #ff6b6b;
  font-size: 14px;
  margin: 0;
  font-style: italic;
}

.danger-actions {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.danger-action-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  background: #2a1a1a;
  border: 1px solid #ff4444;
  border-radius: 8px;
  transition: all 0.3s;
}

.danger-action-item:hover {
  background: #3a2a2a;
  border-color: #ff6666;
}

.danger-action-info {
  flex: 1;
  margin-right: 20px;
}

.danger-action-info h5 {
  color: #ff4444;
  margin: 0 0 8px 0;
  font-size: 16px;
}

.danger-action-info p {
  color: #ccc;
  margin: 0;
  font-size: 14px;
  line-height: 1.4;
}

.transfer-btn {
  background: #ff9800;
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 6px;
  cursor: pointer;
  font-weight: bold;
  transition: background 0.3s;
}

.transfer-btn:hover {
  background: #f57c00;
}

.disband-btn {
  background: #d32f2f;
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 6px;
  cursor: pointer;
  font-weight: bold;
  transition: background 0.3s;
}

.disband-btn:hover {
  background: #b71c1c;
}

/* Responsive design for team management modal */
@media (max-width: 768px) {
  .team-management-modal {
    width: 95%;
    margin: 20px;
  }
  
  .management-tabs {
    flex-direction: column;
  }
  
  .management-tab {
    border-bottom: none;
    border-right: 3px solid transparent;
  }
  
  .management-tab.active {
    border-bottom: none;
    border-right-color: #4caf50;
  }
  
  .section-header {
    flex-direction: column;
    gap: 12px;
    align-items: stretch;
  }
  
  .member-management-item {
    flex-direction: column;
    gap: 12px;
    text-align: center;
  }
  
  .member-info {
    flex-direction: column;
    gap: 8px;
  }
  
  .member-actions {
    justify-content: center;
  }
  
  .danger-action-item {
    flex-direction: column;
    gap: 16px;
    text-align: center;
  }
  
  .danger-action-info {
    margin-right: 0;
  }
  
  .form-actions {
    flex-direction: column;
  }
}

/* ========== Enhanced Mobile Responsiveness ========== */

/* Mobile-first improvements */
@media (max-width: 768px) {
  /* General mobile improvements */
  body {
    font-size: 16px; /* Prevent zoom on iOS */
    overflow-x: hidden;
    overflow-y: auto; /* Allow vertical scrolling on mobile */
    -webkit-overflow-scrolling: touch; /* Smooth scrolling on iOS */
    overscroll-behavior: contain; /* Prevent scroll chaining */
  }
  
  /* Tab navigation for mobile */
  #tabs {
    height: auto;
    min-height: 56px;
    flex-wrap: wrap;
    padding: 8px 4px;
    gap: 4px;
  }
  
  .tab-button {
    flex: 1;
    min-width: 80px;
    padding: 8px 12px;
    font-size: 12px;
    margin-right: 4px;
    margin-bottom: 4px;
    border-radius: 6px;
    white-space: nowrap;
  }
  
  /* Main content adjustments */
  .tab-content {
    margin-left: 0;
    margin-right: 0;
    padding: 15px 10px;
    margin-top: 60px; /* Account for fixed tabs */
  }
  
  /* Profile and auth positioning */
  #profilePic {
    top: 10px;
    right: 60px;
    width: 32px;
    height: 32px;
    line-height: 32px;
    font-size: 14px;
  }
  
  #authActionBtn {
    top: 10px;
    right: 10px;
    padding: 4px 8px;
    font-size: 12px;
  }
  
  /* Home page mobile improvements */
  .home-description {
    padding: 20px 15px;
    margin: 10px;
    font-size: 14px;
  }
  
  .home-description-intro {
    font-size: 16px;
  }
  
  .home-features {
    font-size: 14px;
    padding-left: 15px;
  }
  
  .home-features li {
    margin-bottom: 6px;
  }
  
  /* Logo adjustments */
  .teamitup-logo {
    transform: scale(0.8);
    margin: 10px auto;
  }
  
  .logo-icon {
    font-size: 40px;
  }
  
  .logo-title {
    font-size: 20px;
  }
  
  .logo-subtitle {
    font-size: 14px;
  }
  
  /* Top left logo */
  .top-left-logo {
    position: static !important;
    display: block !important;
    margin: 16px auto 0 auto !important;
    left: 0 !important;
    right: 0 !important;
    top: 0 !important;
    width: 100vw !important;
    max-width: 100vw !important;
    text-align: center !important;
    z-index: 1 !important;
    background: none !important;
    box-shadow: none !important;
  }
  
  .top-left-logo span {
    font-size: 22px !important;
    margin: 0 auto !important;
    display: block !important;
  }
  
  #tabs {
    margin-top: 12px !important;
    position: relative !important;
    z-index: 2 !important;
  }
  
  /* Teams page mobile improvements */
  .teams-container {
    padding: 0;
  }
  
  .teams-actions {
    flex-direction: column;
    gap: 10px;
    margin-bottom: 20px;
  }
  
  .teams-actions button {
    width: 100%;
    padding: 12px;
    font-size: 14px;
  }
  
  .team-item {
    margin-bottom: 15px;
    padding: 12px;
  }
  
  .team-header {
    flex-direction: column;
    gap: 10px;
    align-items: flex-start;
  }
  
  .team-actions {
    flex-wrap: wrap;
    gap: 6px;
    width: 100%;
  }
  
  .team-actions button {
    flex: 1;
    min-width: 80px;
    padding: 8px 6px;
    font-size: 11px;
  }
  
  /* Team search improvements */
  .search-controls {
    flex-direction: column;
    gap: 10px;
  }
  
  .game-select {
    width: 100%;
    min-width: auto;
  }
  
  /* Chat improvements for mobile */
  #chat {
    flex-direction: column;
    height: calc(100vh - 120px);
  }
  
  #chat-list {
    width: 100%;
    max-width: none;
    border-right: none;
    border-bottom: 1px solid #333;
    max-height: 200px;
  }
  
  #chat-box {
    flex: 1;
    width: 100%;
  }
  
  #chat-messages {
    max-height: calc(100vh - 300px);
  }
  
  #chat-input-area {
    padding: 10px;
  }
  
  #chat-input {
    font-size: 16px; /* Prevent zoom on iOS */
  }
  
  /* Matchmaking improvements */
  #matchmaking {
    text-align: center;
    padding: 20px 10px;
    min-height: 50vh;
    overflow-y: auto; /* Allow scrolling on mobile */
    height: auto; /* Allow content to expand */
  }
  
  .matchmaking-features {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  
  .feature-item {
    padding: 15px;
  }
  
  .matchmaking-launch-btn {
    padding: 14px 30px;
    font-size: 16px;
  }
  
  /* Matchmaking modal mobile styles */
  .matchmaking-modal {
    width: 95%;
    max-width: 95vw;
    margin: 20px auto;
    max-height: none;
    overflow: visible;
  }
  
  /* Mobile matchmaking styles are now handled above in the dedicated mobile section */
  
  .game-select {
    padding: 14px 16px;
    font-size: 16px; /* Prevent zoom on iOS */
  }
  
  .matchmaking-btn {
    padding: 14px 20px;
    font-size: 16px;
    min-height: 48px; /* Touch-friendly */
  }
  
  .match-status, .match-found {
    padding: 20px;
    margin: 15px 0;
  }
  
  .status-icon, .success-icon {
    font-size: 36px;
  }
  
  .match-actions {
    flex-direction: column;
    gap: 10px;
  }
  
  .match-actions button {
    width: 100%;
    padding: 14px 20px;
    font-size: 16px;
    min-height: 48px;
  }
  
  /* Contact page improvements */
  .contact-container {
    flex-direction: column;
    gap: 20px;
  }
  
  .contact-info, .contact-form {
    width: 100%;
  }
  
  .contact-methods {
    flex-direction: column;
    gap: 15px;
  }
  
  .contact-method {
    flex-direction: row;
    text-align: left;
    gap: 15px;
  }
  
  .contact-icon {
    font-size: 24px;
    min-width: 40px;
  }
  
  /* Modal improvements for mobile */
  .modal-content {
    width: 95%;
    max-width: 95vw;
    margin: 20px auto;
    max-height: 90vh;
  }
  
  .modal-header {
    padding: 15px;
  }
  
  .modal-header h3 {
    font-size: 16px;
  }
  
  .modal-body {
    padding: 15px;
  }
  
  /* Form improvements */
  .form-group input,
  .form-group select,
  .form-group textarea {
    font-size: 16px; /* Prevent zoom on iOS */
    padding: 12px;
  }
  
  /* Button improvements */
  .cta-button,
  .secondary-button {
    padding: 12px 16px;
    font-size: 14px;
    min-height: 44px; /* Touch-friendly */
  }
  
  /* Sidebar improvements */
  #right-sidebar {
    width: 100%;
    right: 0;
    top: 60px;
    height: calc(100vh - 60px);
    transform: translateX(100%);
    transition: transform 0.3s;
  }
  
  #right-sidebar:not(.hidden) {
    transform: translateX(0);
  }
  
  #show-right-sidebar {
    top: 60px;
    right: 10px;
  }
  
  /* Tournament banner improvements */
  #tournament-banner {
    width: 100%;
    left: 0;
    top: 60px;
    height: calc(100vh - 60px);
    transform: translateX(-100%);
    transition: transform 0.3s;
  }
  
  #tournament-banner:not(.hidden) {
    transform: translateX(0);
  }
  
  #show-left-sidebar {
    top: 60px;
    left: 10px;
  }
}

/* Extra small devices */
@media (max-width: 480px) {
  .tab-button {
    font-size: 11px;
    padding: 6px 8px;
    min-width: 70px;
  }
  
  .tab-content {
    padding: 10px 8px;
  }
  
  .home-description {
    padding: 15px 10px;
    font-size: 13px;
  }
  
  .home-description-intro {
    font-size: 15px;
  }
  
  .home-features {
    font-size: 13px;
  }
  
  .team-actions button {
    font-size: 10px;
    padding: 6px 4px;
  }
  
  .modal-content {
    margin: 10px;
    width: 98%;
  }
  
  .modal-header {
    padding: 12px;
  }
  
  .modal-body {
    padding: 12px;
  }
  
  /* Improve touch targets */
  .cta-button,
  .secondary-button {
    min-height: 48px;
    padding: 14px 16px;
  }
  
  /* Better spacing for small screens */
  .team-item,
  .member-item,
  .member-management-item {
    padding: 10px;
  }
  
  /* Improve form inputs */
  .form-group input,
  .form-group select,
  .form-group textarea {
    padding: 14px;
  }
}

/* Landscape orientation improvements */
@media (max-width: 768px) and (orientation: landscape) {
  .tab-content {
    margin-top: 50px;
  }
  
  #tabs {
    min-height: 50px;
  }
  
  #chat-list {
    max-height: 150px;
  }
  
  #chat-messages {
    max-height: calc(100vh - 250px);
  }
  
  .modal-content {
    max-height: 85vh;
  }
}

/* High DPI displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
  .tab-button,
  .cta-button,
  .secondary-button {
    border-width: 0.5px;
  }
}

/* Dark mode improvements for mobile */
@media (max-width: 768px) {
  body.dark-mode {
    background-color: #000;
  }
  
  .modal-overlay {
    background: rgba(0, 0, 0, 0.9);
  }
  
  .modal-content {
    background: #111;
    border: 1px solid #333;
  }
  
  /* Improve contrast on mobile */
  .tab-button {
    background-color: #1a1a1a;
    border: 1px solid #333;
  }
  
  .tab-button.active {
    background-color: #8a2be2;
    border-color: #8a2be2;
  }
  
  /* Better touch feedback */
  .tab-button:active,
  .cta-button:active,
  .secondary-button:active {
    transform: scale(0.98);
  }
}

/* Accessibility improvements for mobile */
@media (max-width: 768px) {
  /* Larger touch targets */
  button,
  input[type="button"],
  input[type="submit"],
  input[type="reset"] {
    min-height: 44px;
    min-width: 44px;
  }
  
  /* Better focus indicators */
  button:focus,
  input:focus,
  select:focus,
  textarea:focus {
    outline: 2px solid #8a2be2;
    outline-offset: 2px;
  }
  
  /* Improve text readability */
  body {
    line-height: 1.6;
  }
  
  h1, h2, h3, h4, h5, h6 {
    line-height: 1.3;
  }
}

/* Critical mobile fixes for iPhone - must be at the end to override all other styles */
@media (max-width: 768px) {
  /* Force full width layout */
  .tab-content {
    margin-left: 0 !important;
    margin-right: 0 !important;
    width: 100% !important;
    max-width: 100vw !important;
    padding: 15px 10px !important;
    overflow-y: auto !important; /* Allow scrolling on mobile */
    height: auto !important; /* Allow content to expand */
    -webkit-overflow-scrolling: touch !important; /* Smooth scrolling on iOS */
    overscroll-behavior: contain !important; /* Prevent scroll chaining */
  }

  /* Hide sidebar completely on mobile */
  #right-sidebar {
    display: none !important;
    width: 0 !important;
  }
  
  /* Improve touch targets for clickable friend names */
  .online-friend .friend-name.clickable {
    padding: 8px 0 !important;
    min-height: 44px !important;
    display: flex !important;
    align-items: center !important;
    font-size: 16px !important;
  }
  
  /* Improve touch targets for message icon */
  .online-friend .message-icon {
    padding: 8px !important;
    min-width: 44px !important;
    min-height: 44px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 18px !important;
  }
  
  /* Mobile popup adjustments */
  .delete-friend-popup {
    min-width: 180px !important;
    max-width: 90vw !important;
  }
  
  .delete-friend-buttons {
    flex-direction: column !important;
    gap: 8px !important;
  }
  
  .delete-friend-cancel,
  .delete-friend-confirm {
    padding: 12px 16px !important;
    font-size: 16px !important;
    min-height: 44px !important;
  }
  
  .success-message {
    top: 10px !important;
    right: 10px !important;
    left: 10px !important;
    text-align: center !important;
    font-size: 16px !important;
    padding: 16px 20px !important;
  }

  /* Adjust main content wrapper */
  #main-content-wrapper {
    margin-left: 0 !important;
    width: 100% !important;
    max-width: 100vw !important;
  }

  /* Make chat full width */
  .chat-container {
    margin-left: 0 !important;
    width: 100% !important;
  }

  /* Fix tab navigation */
  #tabs {
    width: 100vw !important;
    overflow-x: auto !important;
    justify-content: flex-start !important;
    padding: 8px 4px !important;
  }

  .tab-button {
    flex-shrink: 0 !important;
    white-space: nowrap !important;
    min-width: auto !important;
  }
  


  /* Fix profile positioning */
  #profilePic {
    top: 10px !important;
    right: 60px !important;
  }

  #authActionBtn {
    top: 10px !important;
    right: 10px !important;
  }

  /* Improve team layout */
  .team-item {
    width: 100% !important;
    margin: 10px 0 !important;
  }

  .team-actions {
    flex-wrap: wrap !important;
    gap: 8px !important;
  }

  .team-actions button {
    flex: 1 !important;
    min-width: 80px !important;
  }

  /* Fix modal positioning */
  .modal-content {
    width: 95% !important;
    max-width: 95vw !important;
    margin: 20px auto !important;
  }

  /* Improve form inputs */
  input, textarea, select {
    font-size: 16px !important; /* Prevent zoom on iOS */
    padding: 12px !important;
  }
}

/* iPhone specific fixes */
@media (max-width: 414px) {
  .tab-content {
    padding: 10px 8px !important;
  }
  
  .tab-button {
    font-size: 12px !important;
    padding: 8px 10px !important;
  }
  
  .modal-content {
    width: 98% !important;
    margin: 10px auto !important;
  }
  
  .team-actions button {
    font-size: 11px !important;
    padding: 8px 6px !important;
  }
}

/* --- Extra iPhone/mobile fixes for layout and centering --- */
@media (max-width: 600px) {
  #tabs {
    display: flex !important;
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    width: 100vw !important;
    min-width: 0 !important;
    padding: 0 !important;
    gap: 0 !important;
    border-bottom: 2px solid #222;
    background: #181818;
  }
  .tab-button {
    font-size: 13px !important;
    padding: 8px 10px !important;
    min-width: 90px !important;
    flex: 0 0 auto !important;
    margin: 0 2px !important;
    border-radius: 0 !important;
  }
  .tab-button.active {
    border-bottom: 3px solid #8a2be2 !important;
    background: #222 !important;
  }
  .logo-container, #home {
    text-align: center !important;
    margin: 0 auto !important;
    width: 100% !important;
    max-width: 100vw !important;
    box-sizing: border-box !important;
  }
  
  #home {
    padding: 20px 10px !important;
  }
  
  .home-hero {
    padding: 30px 15px 40px !important;
  }
  
  .home-hero-title {
    font-size: 28px !important;
  }
  
  .home-hero-subtitle {
    font-size: 16px !important;
  }
  
  .home-section {
    padding: 0 10px !important;
    margin-bottom: 40px !important;
  }
  
  .section-title {
    font-size: 24px !important;
    margin-bottom: 25px !important;
  }
  
  .step-card, .feature-card, .tip-card {
    padding: 20px !important;
  }
  
  .feature-card h3 {
    font-size: 20px !important;
  }
  
  .home-cta {
    padding: 30px 15px !important;
    margin: 40px 10px 30px !important;
  }
  
  .home-cta h2 {
    font-size: 24px !important;
  }
  h2, h3, h4, h5, h6 {
    text-align: center !important;
    word-break: break-word !important;
  }
  #main-content-wrapper {
    margin: 0 !important;
    padding: 0 !important;
    width: 100vw !important;
    max-width: 100vw !important;
  }
  .top-left-logo {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    height: 0 !important;
    width: 0 !important;
    pointer-events: none !important;
    position: absolute !important;
    left: -9999px !important;
  }
  #authActionBtn {
    position: fixed !important;
    left: 50% !important;
    top: 10px !important;
    transform: translateX(-50%) !important;
    z-index: 3000 !important;
    font-size: 18px !important;
    padding: 12px 28px !important;
    border-radius: 8px !important;
    background: #8a2be2 !important;
    color: #fff !important;
    box-shadow: 0 2px 8px #0005 !important;
    width: auto !important;
    min-width: 120px !important;
    display: block !important;
  }
  #profilePic {
    top: 60px !important;
    right: 10px !important;
  }
  #tabs {
    margin-top: 60px !important;
  }
}

#contact .contact-container {
  margin-left: 100px;
}
@media (max-width: 1100px) {
  #contact .contact-container {
    margin-left: 0;
  }
}

/* In-app error notification */
.error-message {
  position: fixed;
  top: 30px;
  left: 50%;
  transform: translateX(-50%);
  background: #d32f2f;
  color: #fff;
  padding: 16px 32px;
  border-radius: 8px;
  font-size: 1.1em;
  font-weight: 600;
  z-index: 3000;
  box-shadow: 0 4px 16px rgba(211,47,47,0.2);
  animation: popupFadeIn 0.3s;
}

/* In-app confirmation modal */
.confirm-dialog-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.45);
  z-index: 4000;
  display: flex;
  align-items: center;
  justify-content: center;
}
.confirm-dialog {
  background: #222;
  color: #fff;
  padding: 32px 28px 24px 28px;
  border-radius: 12px;
  box-shadow: 0 8px 32px #0008;
  min-width: 320px;
  max-width: 90vw;
  text-align: center;
  animation: popupFadeIn 0.2s;
}
.confirm-message {
  font-size: 1.1em;
  margin-bottom: 24px;
}
.confirm-actions {
  display: flex;
  gap: 18px;
  justify-content: center;
}
.confirm-dialog .cta-button {
  background: #8a2be2;
  color: #fff;
  font-weight: 600;
  border: none;
  border-radius: 6px;
  padding: 10px 22px;
  cursor: pointer;
  font-size: 1em;
  transition: background 0.2s;
}
.confirm-dialog .cta-button:hover {
  background: #6c1bbd;
}
.confirm-dialog .secondary-button {
  background: #444;
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 10px 22px;
  cursor: pointer;
  font-size: 1em;
  transition: background 0.2s;
}
.confirm-dialog .secondary-button:hover {
  background: #333;
}

.inline-confirm-popover {
  position: absolute;
  background: #232323;
  color: #fff;
  border-radius: 10px;
  box-shadow: 0 4px 24px #0007;
  padding: 18px 22px 14px 22px;
  min-width: 220px;
  z-index: 5000;
  animation: popupFadeIn 0.18s;
  border: 1.5px solid #8a2be2;
}
.inline-confirm-message {
  font-size: 1em;
  margin-bottom: 14px;
  text-align: center;
}
.inline-confirm-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
}
.inline-confirm-popover .cta-button {
  background: #8a2be2;
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 7px 18px;
  font-size: 0.98em;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}
.inline-confirm-popover .cta-button:hover {
  background: #6c1bbd;
}
.inline-confirm-popover .secondary-button {
  background: #444;
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 7px 18px;
  font-size: 0.98em;
  cursor: pointer;
  transition: background 0.2s;
}
.inline-confirm-popover .secondary-button:hover {
  background: #333;
}

.tournament-game span {
  font-size: 1em;
  font-weight: bold;
  color: #8a2be2;
  letter-spacing: 0.2px;
  margin-right: 8px;
  text-transform: none;
  text-shadow: none;
  background: none;
  border-radius: 0;
  font-family: inherit;
  box-shadow: none;
  display: inline;
  transition: none;
}
.tournament-game span:hover {
  color: #8a2be2;
  background: none;
}

.upcoming-game-info strong {
  font-size: 1em;
  font-weight: bold;
  color: #8a2be2;
  letter-spacing: 0.2px;
  text-transform: none;
  text-shadow: none;
  background: none;
  border-radius: 0;
  font-family: inherit;
  box-shadow: none;
  display: inline;
  transition: none;
}
.upcoming-game-info strong:hover {
  color: #8a2be2;
  background: none;
}

.mini-hide-btn {
  background: #232323;
  color: #bfaaff;
  border: none;
  border-radius: 5px;
  font-size: 0.92em;
  padding: 2px 10px;
  margin-left: 8px;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
  opacity: 0.8;
}
.mini-hide-btn:hover {
  background: #8a2be2;
  color: #fff;
  opacity: 1;
}

.modal-overlay#match-search-modal {
  pointer-events: none;
  background: none;
}
.modal-overlay#match-search-modal .modal-content {
  pointer-events: auto;
  box-shadow: 0 4px 32px #000a;
}

/* Hide admin elements by default */
.admin-only,
#admin {
  display: none !important;
}

/* Override for when admin is logged in */
.admin-only.show-admin {
  display: block !important;
}

/* Admin page content should be visible when tab is active */
#admin {
  display: none;
}

/* Admin page visible when not hidden (tab is active) */
#admin:not(.hidden) {
  display: block !important;
  visibility: visible !important;
  margin-left: 280px;
  padding-left: 40px;
  padding-right: 20px;
}

/* Admin dashboard styles */
.admin-dashboard {
  display: block !important;
  visibility: visible !important;
}

/* Force admin dashboard to always be visible */
#admin-dashboard {
  display: block !important;
  visibility: visible !important;
}

/* Force admin sections to always be visible */
#admin-dashboard .admin-section {
  display: block !important;
  visibility: visible !important;
}

.admin-section {
  margin-bottom: 30px;
  padding: 20px;
  background: #2a2a2a !important;
  border-radius: 8px;
  border: 1px solid #444;
  display: block !important;
  visibility: visible !important;
}

.admin-controls {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 15px;
}

.admin-btn {
  padding: 8px 16px;
  background: #8a2be2;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
}

.admin-btn:hover {
  background: #6a1b9a;
}

.admin-btn.secondary {
  background: #555;
}

.admin-btn.secondary:hover {
  background: #444;
}

.admin-input {
  padding: 8px 12px;
  background: #333;
  border: 1px solid #555;
  border-radius: 4px;
  color: white;
  font-size: 14px;
  width: 100%;
  margin-bottom: 10px;
}

.admin-input:focus {
  border-color: #8a2be2;
  outline: none;
}

/* ========== User Management Panel Styles ========== */
.user-panel {
  margin-top: 20px;
  padding: 20px;
  background: #2a2a2a;
  border-radius: 8px;
  border: 1px solid #444;
}

.user-panel.hidden {
  display: none;
}

.user-search-section {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
  align-items: center;
}

.user-search-section input {
  flex: 1;
  min-width: 200px;
}

.users-list-container h4 {
  margin: 0 0 15px 0;
  color: #8a2be2;
}

.users-list {
  max-height: 400px;
  overflow-y: auto;
}

.user-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px;
  margin-bottom: 10px;
  background: #333;
  border-radius: 6px;
  border: 1px solid #555;
  gap: 15px;
}

.user-info {
  display: flex;
  align-items: center;
  gap: 15px;
}

.user-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, #8a2be2, #6a1b9a);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: bold;
  font-size: 16px;
}

.user-details h5 {
  margin: 0 0 5px 0;
  color: #fff;
  font-size: 16px;
}

.user-details p {
  margin: 0 0 3px 0;
  color: #ccc;
  font-size: 14px;
}

.user-details small {
  color: #888;
  font-size: 12px;
}

.user-status {
  display: flex;
  gap: 8px;
}

.admin-badge {
  background: #8a2be2;
  color: white;
  padding: 4px 8px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: bold;
}

.user-badge {
  background: #555;
  color: #ccc;
  padding: 4px 8px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: bold;
}

.muted-badge {
  background: #ffc107;
  color: #000;
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 0.75em;
  font-weight: bold;
  margin-left: 8px;
}

.user-actions {
  display: flex;
  flex-direction: column;
  gap: 5px;
  align-items: flex-end;
}

.admin-protected {
  color: #6c757d;
  font-size: 0.8em;
  font-style: italic;
}

.mute-btn, .delete-btn {
  font-size: 0.8em;
  padding: 4px 8px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.mute-btn:hover, .delete-btn:hover {
  opacity: 0.8;
  transform: translateY(-1px);
}

/* ========== Profile Modal Styles ========== */
.profile-info {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 24px;
  padding-bottom: 20px;
  border-bottom: 1px solid #333;
}

.profile-avatar {
  flex-shrink: 0;
}

.profile-avatar .empty,
.profile-avatar .logged-in {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: #8a2be2;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  color: white;
  font-weight: bold;
}

.profile-avatar .empty {
  background: #444;
}

.profile-details h4 {
  margin: 0 0 8px 0;
  color: #8a2be2;
  font-size: 20px;
}

.profile-details p {
  margin: 4px 0;
  color: #ccc;
  font-size: 14px;
}

.profile-stats h4 {
  color: #8a2be2;
  margin: 0 0 16px 0;
  font-size: 18px;
}

.team-item {
  background: #2a2a2a;
  padding: 12px 16px;
  border-radius: 8px;
  margin-bottom: 8px;
  border: 1px solid #444;
}

.team-item:last-child {
  margin-bottom: 0;
}
.profile-info {
  display: flex;
  gap: 24px;
  margin-bottom: 24px;
  align-items: flex-start;
}

.profile-avatar {
  display: flex;
  justify-content: center;
  align-items: center;
  min-width: 120px;
}

.profile-avatar .avatar-circle {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: linear-gradient(135deg, #8a2be2, #6a1b9a);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  font-weight: bold;
  color: white;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.profile-details {
  flex: 1;
}

.profile-field {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid #3a3a5a;
}

.profile-field:last-child {
  border-bottom: none;
}

.profile-field label {
  font-weight: 600;
  color: #8a2be2;
  min-width: 120px;
}

.profile-value {
  color: #fff;
  text-align: right;
  flex: 1;
}

.profile-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  margin-top: 24px;
}

/* ========== Upcoming Games Filtering Styles ========== */

/* Genre Filter Buttons */
.genre-filter-btn {
  transition: all 0.3s ease;
  border-radius: 20px;
  padding: 8px 16px;
  font-size: 0.9em;
  cursor: pointer;
  border: 1px solid transparent;
}

.genre-filter-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(138, 43, 226, 0.3);
}

.genre-filter-btn.cta-button {
  background: #8a2be2;
  color: white;
  font-weight: bold;
}

.genre-filter-btn.secondary-button {
  background: #444;
  color: #ccc;
  border: 1px solid #666;
}

.genre-filter-btn.secondary-button:hover {
  background: #555;
  color: white;
  border-color: #8a2be2;
}

/* Upcoming Game Items */
.upcoming-game-item {
  transition: all 0.3s ease;
  opacity: 1;
}

.upcoming-game-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}

/* Fade In Animation */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* No Results Message */
.no-results-message {
  text-align: center;
  padding: 40px 20px;
  color: #aaa;
  font-style: italic;
  font-size: 1.1em;
  background: #2a2a2a;
  border-radius: 12px;
  border: 1px solid #444;
  margin: 20px 0;
}

/* Teammate Search Results */
.teammate-result-card {
  transition: all 0.3s ease;
}

.teammate-result-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 16px rgba(138, 43, 226, 0.3);
  border-color: #8a2be2;
}

#st-results-list {
  scrollbar-width: thin;
  scrollbar-color: #8a2be2 #1a1a1a;
}

#st-results-list::-webkit-scrollbar {
  width: 8px;
}

#st-results-list::-webkit-scrollbar-track {
  background: #1a1a1a;
  border-radius: 4px;
}

#st-results-list::-webkit-scrollbar-thumb {
  background: #8a2be2;
  border-radius: 4px;
}

#st-results-list::-webkit-scrollbar-thumb:hover {
  background: #6a1b9a;
}

#st-games {
  scrollbar-width: thin;
  scrollbar-color: #8a2be2 #1e1e1e;
}

#st-games::-webkit-scrollbar {
  width: 8px;
}

#st-games::-webkit-scrollbar-track {
  background: #1e1e1e;
  border-radius: 4px;
}

#st-games::-webkit-scrollbar-thumb {
  background: #8a2be2;
  border-radius: 4px;
}

#st-games label:hover {
  background: #333 !important;
}

#st-games input[type="checkbox"]:checked + span {
  color: #8a2be2;
  font-weight: 600;
}

/* Search Teammate Modal Enhancements */
#search-teammate-modal .close-btn:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: rotate(90deg);
}

#search-teammate-modal .game-select:hover {
  border-color: #8a2be2;
  box-shadow: 0 0 0 2px rgba(138, 43, 226, 0.2);
}

#search-teammate-modal .game-select:focus {
  outline: none;
  border-color: #8a2be2;
  box-shadow: 0 0 0 3px rgba(138, 43, 226, 0.3);
}

#search-teammate-modal .filter-group {
  transition: all 0.3s ease;
}

#search-teammate-modal .filter-group:hover {
  border-color: #444;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

#search-teammate-modal #st-games label:hover {
  background: #333 !important;
  border-color: #8a2be2;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(138, 43, 226, 0.2);
}

#search-teammate-modal #st-games label:has(input:checked) {
  background: rgba(138, 43, 226, 0.2) !important;
  border-color: #8a2be2;
  border-width: 2px;
}

#search-teammate-modal #st-games label:has(input:checked) span {
  color: #8a2be2;
  font-weight: 600;
}

#search-teammate-modal .cta-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(138, 43, 226, 0.5);
}

#search-teammate-modal .secondary-button:hover {
  background: #3a3a3a;
  border-color: #555;
}

/* Game Search Dropdown */
#st-game-dropdown {
  scrollbar-width: thin;
  scrollbar-color: #8a2be2 #1a1a1a;
}

#st-game-dropdown::-webkit-scrollbar {
  width: 8px;
}

#st-game-dropdown::-webkit-scrollbar-track {
  background: #1a1a1a;
  border-radius: 4px;
}

#st-game-dropdown::-webkit-scrollbar-thumb {
  background: #8a2be2;
  border-radius: 4px;
}

#st-game-dropdown .game-option:hover {
  background: #2a2a2a !important;
  color: #8a2be2;
}

/* Selected Games Chips */
.selected-game-chip {
  transition: all 0.2s ease;
}

.selected-game-chip:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(138, 43, 226, 0.4);
}

.remove-game-btn:hover {
  background: rgba(255, 255, 255, 0.3) !important;
  transform: scale(1.1);
}

#st-game-search:focus {
  outline: none;
  border-color: #8a2be2;
  box-shadow: 0 0 0 3px rgba(138, 43, 226, 0.3);
}

/* Hours Active Filter Checkboxes */
#st-hours-container {
  scrollbar-width: thin;
  scrollbar-color: #8a2be2 #1a1a1a;
}

#st-hours-container::-webkit-scrollbar {
  width: 8px;
}

#st-hours-container::-webkit-scrollbar-track {
  background: #1a1a1a;
  border-radius: 4px;
}

#st-hours-container::-webkit-scrollbar-thumb {
  background: #8a2be2;
  border-radius: 4px;
}

#st-hours-container label:hover {
  background: #333 !important;
  border-color: #8a2be2;
}

#st-hours-container label:has(input:checked) {
  background: rgba(138, 43, 226, 0.2) !important;
  border-color: #8a2be2;
  border-width: 2px;
}

#st-hours-container label:has(input:checked) span {
  color: #8a2be2;
  font-weight: 600;
}

/* ========== Welcome Tutorial Modal ========== */
#welcome-tutorial-modal {
  z-index: 6000;
}

.tutorial-modal-content {
  background: #1a1a1a;
  border: 1px solid #333;
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
  animation: modalFadeIn 0.3s ease-out;
}

@keyframes modalFadeIn {
  from {
    opacity: 0;
    transform: scale(0.9) translateY(-20px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.tutorial-modal-content .modal-header {
  position: relative;
  padding: 20px;
  border-bottom: 1px solid #333;
}

.tutorial-modal-content .modal-body {
  padding: 30px;
}

.tutorial-modal-content .modal-body p {
  color: #ccc;
  margin-bottom: 30px;
  font-size: 16px;
  line-height: 1.6;
}
