.create-tournament-container {
  max-width: 800px;
  margin: 0 auto;
  padding: 20px;
  background: #2c2c2c;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  color: #ffffff;
}

.create-tournament-header {
  text-align: center;
  margin-bottom: 30px;
  padding-bottom: 20px;
  border-bottom: 2px solid #f0f0f0;
}

.create-tournament-header h2 {
  color: #ffffff;
  margin: 0 0 10px 0;
  font-size: 28px;
  font-weight: 600;
}

.create-tournament-header p {
  color: #bdc3c7;
  margin: 0;
  font-size: 16px;
}

.create-tournament-form {
  display: flex;
  flex-direction: column;
  gap: 30px;
}

.form-section {
  margin-bottom: 30px;
}

.form-section h4 {
  font-size: 16px;
  font-weight: 600;
  color: var(--light-color);
  margin-bottom: 15px;
  text-transform: uppercase;
  letter-spacing: 1px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding-bottom: 8px;
}

.form-group {
  margin-bottom: 20px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

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

.form-group label.required::after {
  content: ' *';
  color: #e74c3c;
}

.form-field-container input,
.form-field-container select,
.form-field-container textarea {
  width: 100%;
  padding: 12px 15px;
  background-color: rgba(20, 20, 20, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--border-radius);
  color: var(--light-color);
  font-size: 14px;
  transition: all 0.3s ease;
}

.form-field-container input:focus,
.form-field-container select:focus,
.form-field-container textarea:focus {
  outline: none;
  border-color: #e74c3c;
  box-shadow: 0 0 0 2px rgba(231, 76, 60, 0.2);
}

.form-field-container input::placeholder,
.form-field-container textarea::placeholder {
  color: rgba(255, 255, 255, 0.5);
}

.form-field-container select {
  cursor: pointer;
}

.form-field-container select option {
  background-color: #1e1e1e;
  color: var(--light-color);
}

.form-help {
  display: block;
  margin-top: 5px;
  font-size: 12px;
  color: #bdc3c7;
}

/* Image Upload Styles */
.image-upload-container {
  position: relative;
  width: 100%;
}

.image-input {
  position: absolute;
  opacity: 0;
  width: 100%;
  height: 100%;
  cursor: pointer;
  z-index: 2;
}

.image-preview {
  width: 100%;
  height: 120px;
  border: 2px dashed rgba(255, 255, 255, 0.3);
  border-radius: var(--border-radius);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  background-color: rgba(20, 20, 20, 0.5);
}

.image-preview:hover {
  border-color: #e74c3c;
  background-color: rgba(231, 76, 60, 0.1);
}

.upload-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  color: rgba(255, 255, 255, 0.6);
  text-align: center;
}

.upload-icon {
  font-size: 24px;
  margin-bottom: 8px;
}

.image-preview.has-image {
  border-style: solid;
  border-color: #e74c3c;
}

.image-preview img {
  max-width: 100%;
  max-height: 100%;
  object-fit: cover;
  border-radius: calc(var(--border-radius) - 2px);
}

/* Terrain Selection Styles */
.terrain-selection {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.terrain-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 15px;
  max-height: 300px;
  overflow-y: auto;
  padding: 15px;
  background: #1a1a1a;
  border: 1px solid #4a4a4a;
  border-radius: 6px;
}

.terrain-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 10px;
  border: 2px solid #4a4a4a;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.3s ease;
  background: #2c2c2c;
}

.terrain-item:hover {
  border-color: #3498db;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(52, 152, 219, 0.2);
}

.terrain-item.selected {
  border-color: #27ae60;
  background: #d5f4e6;
}

.terrain-item img {
  width: 80px;
  height: 60px;
  object-fit: cover;
  border-radius: 4px;
  margin-bottom: 8px;
}

.terrain-item span {
  font-size: 12px;
  text-align: center;
  color: #ffffff;
  font-weight: 500;
}

.selected-terrains {
  min-height: 50px;
  padding: 15px;
  background: #3a3a3a;
  border: 1px solid #4a4a4a;
  border-radius: 6px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.no-terrains {
  color: #bdc3c7;
  font-style: italic;
}

.terrain-tag {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 4px 8px;
  background: #3498db;
  color: white;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 500;
}

.terrain-tag .remove {
  cursor: pointer;
  font-weight: bold;
  font-size: 14px;
}

.terrain-tag .remove:hover {
  color: #e74c3c;
}

/* Checkbox Styles */
.checkbox-label {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  font-weight: 500;
  color: #ffffff;
}

.checkbox-label input[type="checkbox"] {
  display: none;
}

.checkmark {
  width: 20px;
  height: 20px;
  border: 2px solid #bdc3c7;
  border-radius: 4px;
  position: relative;
  transition: all 0.3s ease;
  background: #2c2c2c;
}

.checkbox-label input[type="checkbox"]:checked + .checkmark {
  background: #3498db;
  border-color: #3498db;
}

.checkbox-label input[type="checkbox"]:checked + .checkmark::after {
  content: '✓';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: white;
  font-size: 12px;
  font-weight: bold;
}

/* Button Styles */
.form-actions {
  display: flex;
  gap: 15px;
  justify-content: flex-end;
  margin-top: 30px;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.btn {
  padding: 12px 24px;
  border: none;
  border-radius: var(--border-radius);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  text-transform: uppercase;
  letter-spacing: 1px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.btn-primary {
  background: linear-gradient(135deg, #e74c3c, #c0392b);
  color: white;
}

.btn-primary:hover:not(:disabled) {
  background: linear-gradient(135deg, #c0392b, #a93226);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(231, 76, 60, 0.3);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.1);
  color: var(--light-color);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn-secondary:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.3);
}

.btn-loading {
  display: none;
  align-items: center;
  gap: 8px;
}

/* Submit button spinner specific styles */
.submit-button-spinner {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 44px; /* Match button height */
}

/* Error and Success States */
.form-group.error input,
.form-group.error select,
.form-group.error textarea {
  border-color: #e74c3c;
}

.error-message {
  color: #e74c3c;
  font-size: 12px;
  margin-top: 5px;
  display: flex;
  align-items: center;
  gap: 5px;
}

.success-message {
  color: #27ae60;
  font-size: 12px;
  margin-top: 5px;
  display: flex;
  align-items: center;
  gap: 5px;
}

/* Responsive Design */
.create-tournament-container {
  margin: 10px;
  padding: 15px;
}

.form-row {
  grid-template-columns: 1fr;
}

.form-actions {
  flex-direction: column;
}

.btn {
  width: 100%;
  justify-content: center;
}

.terrain-grid {
  grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
}

.create-tournament-header h2 {
  font-size: 24px;
}

.form-section {
  padding: 20px;
}

.terrain-grid {
  grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
  gap: 10px;
} 