body { 
  font-family: 'Poppins', sans-serif; 
  margin: 0; 
  padding: 20px; 
  background-color: #1a1a1a; 
  color: #ffffff;
}

.container { 
  max-width: 1200px; 
  margin: 0 auto; 
  position: relative;
  z-index: 1;
}

h1 { 
  text-align: center; 
  color: #ffffff; 
  position: relative;
  text-shadow: 2px 2px 4px rgba(0,0,0,0.8);
  font-weight: 700;
  font-size: 2.5em;
}

.controls, .gallery-controls { 
  display: flex; 
  gap: 10px; 
  margin-bottom: 20px; 
  flex-wrap: wrap; 
  justify-content: center; 
  position: relative;
}

input, textarea, select, button { 
  padding: 8px; 
  border: 1px solid rgba(255,255,255,0.3); 
  border-radius: 6px; 
  font-size: 14px; 
  background-color: rgba(0,0,0,0.7);
  color: #ffffff;
}

button { 
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: #ffffff; 
  cursor: pointer; 
  height: 36px; 
  line-height: 1; 
  border: none;
  font-weight: 500;
  transition: all 0.3s ease;
}

button:hover { 
  background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

.style-grid { 
  display: grid; 
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); 
  gap: 5px; 
  margin-bottom: 20px;
  position: relative;
}

.style-option { 
  border: 2px solid rgba(255,255,255,0.3); 
  border-radius: 6px; 
  padding: 8px; 
  text-align: center; 
  cursor: pointer; 
  transition: all 0.3s ease; 
  font-size: 13px; 
  display: flex; 
  align-items: center; 
  justify-content: center;
  background-color: rgba(0,0,0,0.6);
  color: #ffffff;
}

.style-option.active { 
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: #ffffff;
  border-color: #667eea;
  box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

.style-option i { margin-right: 5px; }

#imageGallery { 
  display: grid; 
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); 
  gap: 10px; 
  position: relative;
}

.gallery-item { 
  position: relative; 
  border-radius: 8px; 
  overflow: hidden; 
  background: #000; 
  transition: all 0.3s ease; 
  cursor: pointer;
  border: 2px solid rgba(255,255,255,0.2);
}

.gallery-item img { 
  width: 100%; 
  height: auto; 
  display: block; 
  transition: transform 0.3s; 
}

.gallery-item:hover img { 
  transform: scale(1.05); 
}

.gallery-item.shared {
  position: relative;
}

.shared-by {
  position: absolute;
  bottom: 30px;
  left: 0;
  right: 0;
  background-color: rgba(0,0,0,0.8);
  display: flex;
  align-items: center;
  padding: 3px;
  font-size: 10px;
  color: #ffffff;
}

.shared-avatar {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  margin-right: 5px;
}

.share-button {
  position: absolute;
  top: 5px;
  right: 5px;
  background: rgba(0,0,0,0.7);
  color: #ffffff;
  border: none;
  border-radius: 50%;
  width: 25px;
  height: 25px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 1;
}

.share-button:hover {
  background: rgba(255,255,255,0.2);
}

.gallery-item.selected,
.gallery-item:hover { 
  box-shadow: 0 4px 20px rgba(102, 126, 234, 0.4);
  border-color: #667eea;
  transform: translateY(-2px);
}

.gallery-item.failed-image {
  border-color: #e74c3c;
  opacity: 0.8;
}

.gallery-item.failed-image:hover {
  border-color: #c0392b;
  box-shadow: 0 4px 20px rgba(231, 76, 60, 0.4);
}

.gallery-item.fallback-image {
  border-color: #f39c12;
}

.gallery-item.fallback-image:hover {
  border-color: #e67e22;
  box-shadow: 0 4px 20px rgba(243, 156, 18, 0.4);
}

.status-indicator {
  position: absolute;
  top: 5px;
  left: 5px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  z-index: 2;
  color: #ffffff;
}

.status-indicator.failed {
  background-color: #e74c3c;
}

.status-indicator.fallback {
  background-color: #f39c12;
}

.status-indicator.retry {
  background-color: #3498db;
}

.style-label { 
  display: flex; 
  justify-content: space-between; 
  align-items: center; 
  padding: 6px; 
  font-size: 12px; 
  border-top: 1px solid rgba(255,255,255,0.3);
  background-color: rgba(0,0,0,0.8);
  color: #ffffff;
  font-weight: 500;
}

.checkbox-wrapper { 
  display: flex; 
  align-items: center; 
}

.style-checkbox { 
  appearance: none; 
  width: 10px; 
  height: 10px; 
  border: 2px solid; 
  border-radius: 3px; 
  margin-right: 5px; 
  position: relative; 
  cursor: pointer; 
  background-color: rgba(0,0,0,0.5);
}

.style-checkbox:checked::after { 
  content: '\2714'; 
  position: absolute; 
  top: 50%; 
  left: 50%; 
  transform: translate(-50%, -50%);
  color: #fff;
}

.size-options { 
  display: flex; 
  gap: 5px; 
  flex-wrap: wrap;
}

.size-option { 
  padding: 6px 10px; 
  border: 1px solid rgba(255,255,255,0.3); 
  border-radius: 6px; 
  cursor: pointer; 
  font-size: 13px; 
  display: flex; 
  align-items: center;
  background-color: rgba(0,0,0,0.6);
  color: #ffffff;
  transition: all 0.3s ease;
}

.size-option i { 
  margin-right: 3px; 
}

.size-option.active { 
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: #ffffff;
  border-color: #667eea;
  box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

#prompt { 
  resize: vertical; 
  min-height: 42px; 
  flex-grow: 1;
  background-color: rgba(0,0,0,0.7);
  color: #ffffff;
  font-size: 15px;
}

.image-modal { 
  display: none; 
  position: fixed; 
  z-index: 2; 
  left: 0; 
  top: 0; 
  width: 100%; 
  height: 100%; 
  background-color: rgba(0,0,0,0.95); 
}

.modal-image-container { 
  position: relative; 
  width: 80%; 
  height: 80%; 
  margin: auto; 
}

.modal-image { 
  max-width: 100%; 
  max-height: 100%; 
  object-fit: contain; 
  border: 3px solid #667eea;
  border-radius: 8px;
}

.modal-close { 
  position: absolute; 
  top: 15px; 
  right: 35px; 
  color: #ffffff; 
  font-size: 40px; 
  font-weight: bold; 
  cursor: pointer; 
  text-shadow: 2px 2px 4px rgba(0,0,0,0.8);
  transition: color 0.3s ease;
}

.modal-nav { 
  position: absolute; 
  top: 50%; 
  transform: translateY(-50%); 
  font-size: 30px; 
  color: #ffffff; 
  cursor: pointer; 
  text-shadow: 2px 2px 4px rgba(0,0,0,0.8);
  transition: color 0.3s ease;
}

.modal-prev { 
  left: 20px; 
}

.modal-next { 
  right: 20px; 
}

.modal-actions { 
  position: absolute; 
  bottom: 20px; 
  left: 50%; 
  transform: translateX(-50%); 
  display: flex; 
  gap: 10px; 
}

.modal-actions button { 
  padding: 10px 18px; 
  border: none; 
  border-radius: 6px; 
  color: #ffffff; 
  cursor: pointer; 
  display: flex; 
  align-items: center; 
  gap: 8px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  font-weight: 500;
  transition: all 0.3s ease;
}

.modal-actions button i { 
  margin-right: 5px; 
}

.slider-container { 
  display: flex; 
  align-items: center; 
  justify-content: center; 
  margin-top: 10px;
  color: #ffffff;
}

.slider { 
  width: 150px;
  -webkit-appearance: none;
  height: 5px;
  border-radius: 5px;  
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  outline: none;
}

.slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 15px;
  height: 15px;
  border-radius: 50%; 
  background: #ffffff;
  cursor: pointer;
  box-shadow: 0 0 5px rgba(255,255,255,0.5);
}

.slider::-moz-range-thumb {
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: #ffffff;
  cursor: pointer;
  box-shadow: 0 0 5px rgba(255,255,255,0.5);
}

.shimmer-toggle {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 10;
}

#shimmerToggleLabel {
  font-size: 14px;
  font-weight: bold;
  color: #ffffff;
  cursor: pointer;
  padding: 8px 12px;
  border-radius: 20px;
  background-color: rgba(0, 0, 0, 0.7);
  display: inline-block;
  border: 1px solid rgba(255,255,255,0.3);
  transition: all 0.3s ease;
}

.multiplayer-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 10px 0;
}

#multiplayerButton {
  padding: 10px 18px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: #ffffff;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-weight: 500;
}

#multiplayerButton.active {
  background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
}

#multiplayerButton:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.online-users {
  background-color: rgba(0,0,0,0.7);
  border-radius: 8px;
  margin-bottom: 15px;
  padding: 10px;
  display: none;
  border: 1px solid rgba(255,255,255,0.2);
}

.online-users h3 {
  margin: 0 0 10px 0;
  font-size: 16px;
  text-align: center;
  color: #ffffff;
}

.user-avatars {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}

.user-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  overflow: hidden;
  box-shadow: 0 0 5px rgba(255,255,255,0.2);
}

.user-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.avatar-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: #ffffff;
  font-weight: bold;
}

.generation-status {
  background-color: rgba(0,0,0,0.8);
  color: #ffffff;
  padding: 10px 18px;
  border-radius: 6px;
  margin: 10px auto;
  text-align: center;
  width: 80%;
  max-width: 600px;
  transition: opacity 0.5s, background-color 0.3s;
  border: 1px solid rgba(255,255,255,0.3);
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
  font-size: 14px;
  position: sticky;
  top: 10px;
  z-index: 10;
}

.status-processing {
  background: linear-gradient(135deg, #2980b9, #3498db);
  border-color: #3498db;
}

.status-waiting {
  background: linear-gradient(135deg, #f39c12, #f1c40f);
  border-color: #f39c12;
}

.status-error {
  background: linear-gradient(135deg, #c0392b, #e74c3c);
  border-color: #e74c3c;
}

.status-info {
  background: linear-gradient(135deg, #2c3e50, #34495e);
  border-color: #2c3e50;
}

.generation-status .fa-spinner {
  margin-right: 8px;
}

.generation-status .fa-hourglass-half {
  margin-right: 8px;
}

.generation-status .fa-exclamation-triangle {
  margin-right: 8px;
  color: #ffcc00;
}

.hidden {
  display: none !important;
}

.container[style*="display: none;"],
#tournamentView[style*="display: block;"] {
  /* Styles when tournament is active */
}

.container[style*="display: block;"],
#tournamentView[style*="display: none;"] {
  /* Styles when generator is active */
}