/* Bout Detail Page Styles - Dark Theme */
.bout-detail-page {
  min-height: 100vh;
  background: #000;
  padding-top: 76px;
}

/* Submissions Section */
#submissions-section .card {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

#submissions-section .submission-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 24px rgba(102, 126, 234, 0.3);
}

#submissions-section .form-check-input {
  cursor: pointer;
  width: 3rem;
  height: 1.5rem;
  background-color: #2a2a2a;
  border-color: #444;
}

#submissions-section .form-check-input:checked {
  background-color: #667eea;
  border-color: #667eea;
}

#submissions-section .form-check-label {
  cursor: pointer;
  user-select: none;
}

/* Submission Detail Modal */
#submissionDetailModal .modal-dialog {
  max-height: 95vh;
}

#submissionDetailModal .modal-content {
  max-height: 95vh;
  display: flex;
  flex-direction: column;
}

#submissionDetailModal .modal-body {
  overflow-y: auto;
  overflow-x: hidden;
  max-height: calc(95vh - 60px);
  flex: 1;
}

#submissionDetailModal .btn-primary:hover {
  opacity: 1 !important;
  background-color: #5568d3;
}

#submissionDetailModal .btn-close:hover {
  opacity: 0.75;
}

/* Submission Ratings Container */
.submission-ratings-container {
  height: 70vh;
  overflow-y: auto;
  padding-right: 10px;
}

/* Mobile responsiveness for submission modal */
@media (max-width: 768px) {
  /* Completely override Bootstrap modal on mobile for native scrolling */
  html.modal-open,
  body.modal-open {
    overflow: hidden !important;
    position: fixed !important;
    width: 100% !important;
    height: 100% !important;
  }
  
  #submissionDetailModal {
    display: none;
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    z-index: 1055 !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    -webkit-overflow-scrolling: touch !important;
    background: rgba(0, 0, 0, 0.5);
  }
  
  #submissionDetailModal.show {
    display: block !important;
  }
  
  #submissionDetailModal .modal-dialog {
    margin: 0 !important;
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    min-height: 100% !important;
    transform: none !important;
    pointer-events: none;
  }
  
  #submissionDetailModal .modal-content {
    width: 100%;
    height: auto !important;
    min-height: 100vh !important;
    border-radius: 0;
    border: none;
    pointer-events: auto;
    display: block;
  }
  
  #submissionDetailModal .modal-header {
    position: sticky;
    top: 0;
    z-index: 10;
    background: #1a1a1a;
    padding: 12px 15px;
    border-bottom: 1px solid #333;
  }
  
  #submissionDetailModal .modal-body {
    padding: 15px !important;
    overflow: visible !important;
    height: auto !important;
    min-height: auto !important;
    max-height: none !important;
  }
  
  #submissionDetailModal .modal-body .row {
    display: block;
    margin: 0;
  }
  
  #submissionDetailModal .modal-body .row > div {
    width: 100%;
    padding: 0;
  }
  
  /* Image sizing on mobile */
  #submissionDetailModal #modal-submission-image {
    max-height: 35vh !important;
    width: 100% !important;
    height: auto !important;
    margin-bottom: 15px;
  }
  
  /* Submitter info */
  #submissionDetailModal .modal-body .d-flex {
    margin-bottom: 20px;
  }
  
  /* Ratings container - let it expand naturally */
  .submission-ratings-container {
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    overflow: visible !important;
    margin-top: 20px;
    padding-bottom: 120px !important;
    padding-right: 0 !important;
  }
  
  #modal-ratings-list {
    overflow: visible !important;
    height: auto !important;
  }
  
  /* Hide Bootstrap's backdrop since we're using modal as backdrop */
  .modal-backdrop {
    display: none !important;
  }
}

/* Custom scrollbar for ratings list */
#modal-ratings-list::-webkit-scrollbar {
  width: 8px;
}

#modal-ratings-list::-webkit-scrollbar-track {
  background: #1a1a1a;
}

#modal-ratings-list::-webkit-scrollbar-thumb {
  background: #444;
  border-radius: 4px;
}

#modal-ratings-list::-webkit-scrollbar-thumb:hover {
  background: #555;
}

/* Custom scrollbar for modal body on mobile */
#submissionDetailModal .modal-body::-webkit-scrollbar {
  width: 6px;
}

#submissionDetailModal .modal-body::-webkit-scrollbar-track {
  background: #1a1a1a;
}

#submissionDetailModal .modal-body::-webkit-scrollbar-thumb {
  background: #444;
  border-radius: 3px;
}

#submissionDetailModal .modal-body::-webkit-scrollbar-thumb:hover {
  background: #555;
}

/* Bout Hero */
.bout-hero {
  position: relative;
  height: 400px;
  overflow: hidden;
  background: #1a1a1a;
}

.bout-hero-image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.bout-hero-image::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0.3), rgba(0, 0, 0, 0.8));
}

.bout-hero-overlay {
  position: relative;
  z-index: 1;
  height: 100%;
  display: flex;
  align-items: flex-end;
  padding-bottom: 40px;
}

.bout-status-badge {
  display: inline-block;
  padding: 8px 20px;
  border-radius: 20px;
  font-size: 14px;
  font-weight: 600;
  text-transform: uppercase;
  margin-bottom: 15px;
}

.bout-status-badge.ongoing {
  background: #28a745;
  color: white;
}

.bout-status-badge.ended {
  background: #6c757d;
  color: white;
}

.bout-status-badge.upcoming {
  background: #667eea;
  color: white;
}

.bout-title {
  color: white;
  font-size: 42px;
  font-weight: 700;
  margin-bottom: 15px;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.8);
}

.bout-host {
  display: flex;
  align-items: center;
  color: white;
}

.bout-host img {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  margin-right: 12px;
  border: 2px solid white;
}

.bout-host span {
  font-size: 16px;
  text-shadow: 0 2px 5px rgba(0, 0, 0, 0.8);
}

/* Bout Sections */
.bout-section {
  background: #1a1a1a;
  border: 1px solid #333;
  border-radius: 15px;
  padding: 30px;
  margin-bottom: 30px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.bout-section h3 {
  font-size: 24px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 20px;
  padding-bottom: 15px;
  border-bottom: 2px solid #333;
}

.bout-description {
  font-size: 16px;
  line-height: 1.8;
  color: #ccc;
  white-space: pre-wrap;
}

.bout-details-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
}

.detail-item {
  display: flex;
  align-items: flex-start;
  gap: 15px;
}

.detail-item i {
  font-size: 24px;
  color: #667eea;
  margin-top: 3px;
}

.detail-item strong {
  display: block;
  font-size: 14px;
  color: #999;
  margin-bottom: 5px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.detail-item p {
  font-size: 16px;
  color: #fff;
  font-weight: 600;
  margin: 0;
}

.terms-content {
  font-size: 14px;
  line-height: 1.8;
  color: #ccc;
  white-space: pre-wrap;
}

/* Action Card */
.action-card {
  background: #1a1a1a;
  border: 1px solid #333;
  border-radius: 15px;
  padding: 25px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
  position: sticky;
  top: 100px;
}

.entry-fee-display {
  text-align: center;
  padding: 20px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: 12px;
  color: white;
  margin-bottom: 20px;
}

.entry-fee-display.free {
  background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
}

.entry-fee-display h4 {
  font-size: 14px;
  font-weight: 600;
  text-transform: uppercase;
  margin-bottom: 8px;
  opacity: 0.9;
}

.entry-fee-display .fee-amount {
  font-size: 36px;
  font-weight: 700;
  margin: 0;
}

.bout-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
  margin-bottom: 20px;
  padding-bottom: 20px;
  border-bottom: 1px solid #333;
}

.stat-item {
  display: flex;
  align-items: center;
  gap: 12px;
}

.stat-item i {
  font-size: 24px;
  color: #667eea;
}

.stat-item strong {
  display: block;
  font-size: 24px;
  color: #fff;
  line-height: 1;
}

.stat-item span {
  font-size: 12px;
  color: #999;
  text-transform: uppercase;
}

.btn-join-bout,
.btn-submit-entry {
  width: 100%;
  padding: 15px;
  font-size: 16px;
  font-weight: 600;
  border-radius: 10px;
  transition: all 0.3s;
}

.btn-join-bout {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border: none;
  color: white;
}

.btn-join-bout:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 20px rgba(102, 126, 234, 0.3);
}

.btn-submit-entry {
  background: #28a745;
  border: none;
  color: white;
}

.btn-submit-entry:hover {
  background: #218838;
  transform: translateY(-2px);
  box-shadow: 0 10px 20px rgba(40, 167, 69, 0.3);
}

.user-status-info {
  padding: 15px;
  background: #222;
  border: 1px solid #333;
  border-radius: 10px;
  font-size: 14px;
  color: #ccc;
}

.user-status-info.success {
  background: rgba(40, 167, 69, 0.1);
  color: #5cb85c;
  border: 1px solid #28a745;
}

.user-status-info i {
  margin-right: 8px;
}

/* Share Card */
.share-card {
  background: #1a1a1a;
  border: 1px solid #333;
  border-radius: 15px;
  padding: 20px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.share-card h5 {
  font-size: 16px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 15px;
}

.share-buttons {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.share-buttons .btn {
  flex: 1;
  min-width: 45px;
  background: #222;
  border: 1px solid #333;
  color: #fff;
}

.share-buttons .btn:hover {
  background: #333;
  border-color: #444;
  color: #fff;
}

/* Upload Modal */
.modal-content {
  background: #1a1a1a;
  border: 1px solid #333;
  color: #fff;
}

.modal-header {
  border-bottom: 1px solid #333;
}

.modal-title {
  color: #fff;
}

.modal-footer {
  border-top: 1px solid #333;
}

.btn-close {
  filter: invert(1);
}

.upload-area {
  border: 3px dashed #333;
  border-radius: 15px;
  padding: 40px 20px;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s;
  background: #222;
}

.upload-area:hover {
  border-color: #667eea;
  background: rgba(102, 126, 234, 0.1);
}

.upload-area i {
  color: #667eea;
}

.upload-area h5 {
  color: #fff;
  margin-bottom: 10px;
}

.upload-area p {
  color: #999;
}

#upload-preview img {
  max-height: 400px;
  object-fit: contain;
  background: #222;
  border-radius: 10px;
}

.form-label {
  color: #fff;
}

.form-control {
  background: #222;
  border: 1px solid #333;
  color: #fff;
}

.form-control:focus {
  background: #2a2a2a;
  border-color: #667eea;
  color: #fff;
  box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
}

.form-control::placeholder {
  color: #666;
}

/* Loading State */
#loading-state {
  color: #fff;
}

.spinner-border {
  color: #667eea;
}

/* Responsive */
@media (max-width: 768px) {
  .bout-hero {
    height: 300px;
  }

  .bout-title {
    font-size: 28px;
  }

  .bout-section {
    padding: 20px;
  }

  .bout-details-grid {
    grid-template-columns: 1fr;
  }

  .action-card {
    position: static;
    margin-top: 30px;
  }

  .bout-stats {
    grid-template-columns: 1fr;
  }
}
