/* Hysteria Game - Modern Grey-Green Design */

#bodydiv {
  overflow: auto;
  max-width: 1400px;
  margin: 0 auto;
  padding: 15px;
  background: linear-gradient(135deg, #f5f5f5 0%, #e8f0ec 100%);
}

/* Cast Bar - Clean Player Cards */
#castbar {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
  gap: 12px;
  margin-bottom: 15px;
}

.userbox {
  background: #ffffff;
  padding: 10px 8px;
  text-align: center;
  position: relative;
  transition: all 0.3s ease;
  overflow: hidden;
  border: 1px solid #d0dcd6;
  border-radius: 10px;
  box-shadow: 0 2px 4px rgba(100, 100, 100, 0.06);
}

.userbox:hover {
  background: #f5f8f6;
  border-color: #8fa89a;
  box-shadow: 0 4px 12px rgba(100, 120, 110, 0.15);
  transform: translateY(-2px);
}

.userava, .userava-out {
  background-repeat: no-repeat;
  background-size: 180%;
  background-position: top;
  width: 100%;
  max-width: 70px;
  height: 70px;
  margin: 0 auto 8px;
  border: 2px solid #9db3a3;
  transition: all 0.3s ease;
}

.userbox:hover .userava {
  border-color: #7a9485;
  box-shadow: 0 0 12px rgba(100, 120, 110, 0.25);
}

.userava-out {
  filter: grayscale(100%);
  opacity: 0.5;
  border-color: #ccc;
}

.vote-loading {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 16px;
  height: 16px;
}

.username-text {
  font-size: 13px;
  font-weight: 600;
  margin: 4px 0 3px 0;
  color: #4a5a52;
}

.power-badge {
  font-size: 10px;
  font-weight: 700;
  padding: 3px 6px;
  margin: 4px 0;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: white;
}

.power-badge.HOH {
  background: linear-gradient(135deg, #ffd700 0%, #ffb300 100%);
  box-shadow: 0 2px 4px rgba(255, 215, 0, 0.3);
}

.power-badge.POV {
  background: linear-gradient(135deg, #58d9c3 0%, #58d9c3 100%);
  box-shadow: 0 2px 4px rgba(90, 119, 104, 0.3);
}

.power-badge.NOM {
  background: linear-gradient(135deg, #ff5252 0%, #d32f2f 100%);
  box-shadow: 0 2px 4px rgba(255, 82, 82, 0.3);
}

.power-badge.SAVED {
  background: linear-gradient(135deg, #ab47bc 0%, #8e24aa 100%);
  box-shadow: 0 2px 4px rgba(171, 71, 188, 0.3);
}

.power-badge.SAFE {
  background: linear-gradient(135deg, #8fa89a 0%, #6b7d75 100%);
  box-shadow: 0 2px 4px rgba(107, 125, 117, 0.3);
}

.evictplace {
  font-size: 16px;
  font-weight: 700;
  color: #dbdbdb;
  margin: 5px 0;
}

/* Health Bar - Dynamic Color */
.health-bar {
  width: 100%;
  height: 6px;
  background: #e0e0e0;
  border-radius: 3px;
  overflow: hidden;
  margin: 6px 0 3px 0;
}

.health-fill {
  height: 100%;
  transition: all 0.3s ease;
  border-radius: 3px;
}

.health-text {
  font-size: 11px;
  font-weight: 600;
  color: #5a6c64;
  margin: 2px 0 0 0;
}

/* Main Content Grid */
.content-grid {
  display: flex;
  gap: 15px;
  margin-bottom: 15px;
  align-items: flex-start;
}

.actionbox {
  flex: 0 0 500px;
  min-width: 0;
}

#commentsec {
  flex: 1;
  min-width: 0;
}

@media (max-width: 1100px) {
  .content-grid {
    flex-direction: column;
  }
  
  .actionbox {
    flex: 1 1 auto;
    width: 100%;
  }
  
  #commentsec {
    flex: 1 1 auto;
    width: 100%;
  }
}

/* Game Status Compact (inside actionbox) */
.game-status-compact {
  display: flex;
  justify-content: space-between;
  background: #f5f8f6;
  padding: 10px 12px;
  margin-bottom: 15px;
  border-radius: 6px;
  border: 1px solid #d5e0da;
  font-size: 0.85em;
  flex-wrap: wrap;
  gap: 8px;
}

.status-compact-item {
  color: #5a6c64;
  white-space: nowrap;
}

.status-compact-item strong {
  color: #6b7d75;
  margin-right: 4px;
}

/* Action Box - Modern and Clean */
.actionbox {
  background: #ffffff;
  padding: 20px;
  border-radius: 10px;
  border: 1px solid #c8d6d0;
  box-shadow: 0 3px 10px rgba(100, 100, 100, 0.08);
}

.actionbox h3 {
  color: #6b7d75;
  margin: 0 0 15px 0;
  font-size: 1.3em;
  font-weight: 700;
  padding-bottom: 10px;
  border-bottom: 2px solid #d5e0da;
}

.actionbox h4 {
  color: #5a6c64;
  margin: 15px 0 10px 0;
  font-size: 1.1em;
  font-weight: 600;
}

.actionbox p {
  color: #37474f;
  line-height: 1.6;
  margin: 8px 0;
}

/* Competition Section */
.competition-section {
  background: #f5f8f6;
  padding: 15px;
  border-radius: 8px;
  margin-bottom: 15px;
  border: 1px solid #c8d6d0;
}

.comp-selection {
  background: #f5f8f6;
  padding: 15px;
  border-radius: 8px;
  margin-bottom: 15px;
  border: 1px solid #c8d6d0;
}

.comp-type-buttons {
  display: flex;
  gap: 10px;
  margin: 10px 0;
}

.comp-type-btn {
  flex: 1;
  padding: 12px;
  font-size: 14px;
  font-weight: 600;
  border: 2px solid #8fa89a;
  background: white;
  color: #5a6c64;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.comp-type-btn:hover {
  background: #7a9485;
  color: white;
  border-color: #6b8578;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(100, 120, 110, 0.2);
}

.comp-type-btn.hoh-btn {
  border-color: #ffb300;
  color: #f57f17;
}

.comp-type-btn.hoh-btn:hover {
  background: linear-gradient(135deg, #ffd700 0%, #ffb300 100%);
  color: white;
  border-color: #f57f17;
}

.comp-type-btn.pov-btn {
  border-color: #8fa89a;
  color: #5a6c64;
}

.comp-type-btn.pov-btn:hover {
  background: #7a9485;
  color: white;
  border-color: #6b8578;
}

.competition-link {
  display: inline-block;
  padding: 14px;
  font-size: 15px;
  font-weight: 700;
  background: #7a9485;
  color: white;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
  text-transform: uppercase;
  letter-spacing: 1px;
  box-shadow: 0 3px 8px rgba(100, 120, 110, 0.2);
  text-align: center;
  text-decoration: none;
}

.competition-link:hover {
  background: #6b8578;
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(100, 120, 110, 0.3);
}

.competition-buttons {
  display: flex;
  gap: 10px;
  margin: 10px 0;
}

.comp-btn {
  flex: 1;
  padding: 12px;
  font-size: 14px;
  font-weight: 600;
  border: 2px solid #8fa89a;
  background: white;
  color: #5a6c64;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.comp-btn:hover {
  background: #7a9485;
  color: white;
  border-color: #6b8578;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(100, 120, 110, 0.2);
}

.comp-btn.selected {
  background: #6b7d75;
  color: white;
  border-color: #5a6c64;
}

.comp-btn-hoh {
  border-color: #ffb300;
  color: #f57f17;
}

.comp-btn-hoh:hover {
  background: linear-gradient(135deg, #ffd700 0%, #ffb300 100%);
  color: white;
  border-color: #f57f17;
}

.comp-btn-pov {
  border-color: #8fa89a;
  color: #5a6c64;
}

.comp-btn-pov:hover {
  background: #7a9485;
  color: white;
  border-color: #6b8578;
}

.goto-comp-btn {
  width: 100%;
  padding: 14px;
  font-size: 15px;
  font-weight: 700;
  background: #7a9485;
  color: white;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
  text-transform: uppercase;
  letter-spacing: 1px;
  box-shadow: 0 3px 8px rgba(100, 120, 110, 0.2);
}

.goto-comp-btn:hover {
  background: #6b8578;
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(100, 120, 110, 0.3);
}

/* Health Display */
.health-display {
  background: #f5f8f6;
  padding: 12px;
  border-radius: 8px;
  margin: 12px 0;
  border: 1px solid #c8d6d0;
}

.health-display-large {
  text-align: center;
  font-size: 28px;
  font-weight: 700;
  color: #5a6c64;
  margin: 8px 0;
}

.health-multiplier {
  text-align: center;
  font-size: 13px;
  color: #6b7d75;
  margin-top: 5px;
}

/* Action Buttons */
.action-btn {
  width: 100%;
  padding: 12px;
  margin: 8px 0;
  font-size: 14px;
  font-weight: 600;
  border: 2px solid #8fa89a;
  background: white;
  color: #5a6c64;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
  text-transform: uppercase;
}

.action-btn:hover {
  background: #7a9485;
  color: white;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(100, 120, 110, 0.2);
}

.action-btn.nominate {
  border-color: #e57373;
  color: #c62828;
}

.action-btn.nominate:hover {
  background: linear-gradient(135deg, #ef5350 0%, #d32f2f 100%);
  color: white;
}

.action-btn.save {
  border-color: #7a9485;
  color: #4a5a52;
}

.action-btn.save:hover {
  background: #6b8578;
  color: white;
}

.action-btn.discard {
  border-color: #90a4ae;
  color: #455a64;
}

.action-btn.discard:hover {
  background: linear-gradient(135deg, #78909c 0%, #546e7a 100%);
  color: white;
}

/* Select Dropdowns */
select {
  width: 100%;
  padding: 10px;
  margin: 8px 0;
  font-size: 14px;
  border: 2px solid #c8d6d0;
  border-radius: 6px;
  background: white;
  color: #37474f;
  cursor: pointer;
  transition: all 0.3s ease;
}

select:hover, select:focus {
  border-color: #8fa89a;
  outline: none;
  box-shadow: 0 0 0 3px rgba(143, 168, 154, 0.1);
}

/* Jury Voting Styles */
.jury-list {
  background: #f8faf9;
  padding: 15px;
  border-radius: 8px;
  margin: 10px 0;
  min-height: 100px;
  border: 2px dashed #c8d6d0;
}

.jury-item {
  background: white;
  padding: 10px;
  margin: 5px 0;
  border-radius: 6px;
  border-left: 3px solid #7a9485;
  box-shadow: 0 2px 4px rgba(100, 100, 100, 0.08);
  color: rgb(41, 41, 41);
}

.jury-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 10px 0;
}

.jury-btn {
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 600;
  background: white;
  color: #5a6c64;
  border: 2px solid #c8d6d0;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.jury-btn:hover:not(:disabled) {
  background: #7a9485;
  color: white;
  border-color: #6b8578;
}

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

.save-jury-btn, .reset-jury-btn {
  width: 100%;
  padding: 12px;
  margin: 5px 0;
  font-size: 14px;
  font-weight: 600;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
  text-transform: uppercase;
  border: none;
}

.save-jury-btn {
  background: #7a9485;
  color: white;
  box-shadow: 0 3px 8px rgba(100, 120, 110, 0.2);
}

.save-jury-btn:hover {
  background: #6b8578;
  transform: translateY(-1px);
}

.reset-jury-btn {
  background: linear-gradient(135deg, #e0e0e0 0%, #bdbdbd 100%);
  color: #424242;
}

.reset-jury-btn:hover {
  background: linear-gradient(135deg, #bdbdbd 0%, #9e9e9e 100%);
}

/* Comments Section - Modern and Clean */
/* Comments container (ID used in markup) */
#commentsec {
  background: #ffffff;
  padding: 16px;
  border-radius: 10px;
  border: 1px solid #e4ebe7;
}

#commentsec h2 {
  margin: 0 0 12px 0;
  font-size: 1.2em;
  color: #5a6c64;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.private-messages-toggle {
  padding: 8px 12px;
  font-size: 12px;
  font-weight: 600;
  background: #f4f7f5;
  color: #5a6c64;
  border: 1px solid #dfe7e3;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.private-messages-toggle:hover {
  background: #eaf1ed;
}

.private-messages-toggle.active {
  background: #7a9485;
  border-color: #6b8578;
  color: #ffffff;
}

#commentsdiv {
  max-height: 500px;
  overflow-y: auto;
  margin: 15px 0;
  padding-right: 10px;
}

/* Custom scrollbar */
#commentsdiv::-webkit-scrollbar {
  width: 8px;
}

#commentsdiv::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 4px;
}

#commentsdiv::-webkit-scrollbar-thumb {
  background: #a8bdb0;
  border-radius: 4px;
}

#commentsdiv::-webkit-scrollbar-thumb:hover {
  background: #8fa89a;
}

.comm, .systemcomm {
  display: flex;
  gap: 10px;
  padding: 10px 12px;
  margin-bottom: 8px;
  background: #ffffff;
  border-radius: 8px;
  border: 1px solid #edf1ee;
  transition: background-color 0.2s ease, border-color 0.2s ease;
}

.comm:hover {
  background: #f9fbfa;
  border-color: #e4ebe7;
}

.systemcomm {
  background: #fffef5;
  border: 1px solid #efe7b0;
}

.privatecomm {
  background: linear-gradient(135deg, #f3e5f5 0%, #e1bee7 100%);
  border: 1px solid #ba68c8;
}

.smallava {
  background-repeat: no-repeat;
  background-size: 180%;
  background-position: top;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  flex-shrink: 0;
  border: 2px solid #9db3a3;
}

.conty {
  flex: 1;
  font-size: 14px;
  color: #37474f;
  line-height: 1.6;
  word-wrap: break-word;
  margin: 0;
}

.details {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}

.details .smallusername {
  font-weight: 700;
  color: #5a6c64;
  font-size: 14px;
}

.details .timestamp {
  font-size: 11px;
  color: #78909c;
}

.private-indicator {
  background: #f1e8ff;
  color: #5a4a8a;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  height: 10%;
}

/* Comment Form */
.comment-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 15px;
}

.comment-form textarea {
  width: 100%;
  padding: 12px;
  border: 2px solid #c8d6d0;
  border-radius: 8px;
  font-size: 14px;
  resize: vertical;
  min-height: 80px;
  transition: all 0.3s ease;
  box-sizing: border-box;
}

.comment-form textarea:focus {
  outline: none;
  border-color: #8fa89a;
  box-shadow: 0 0 0 3px rgba(143, 168, 154, 0.1);
}

.comment-controls {
  display: flex;
  gap: 10px;
  align-items: center;
}

.comment-controls label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: #455a64;
  cursor: pointer;
}

.comment-controls input[type="checkbox"] {
  width: 18px;
  height: 18px;
  cursor: pointer;
}

.submit-comment-btn {
  padding: 12px 24px;
  font-size: 14px;
  font-weight: 600;
  background: #7a9485;
  color: white;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  box-shadow: 0 3px 8px rgba(100, 120, 110, 0.2);
}

.submit-comment-btn:hover {
  background: #6b8578;
  transform: translateY(-1px);
  box-shadow: 0 5px 12px rgba(100, 120, 110, 0.3);
}

/* Responsive Design */
@media (max-width: 768px) {
  #bodydiv {
    padding: 10px;
  }

  #castbar {
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    gap: 8px;
  }

  .game-status-bar {
    padding: 8px 12px;
    font-size: 0.9em;
  }

  .actionbox, .commentsbox {
    padding: 15px;
  }

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

  .comm, .systemcomm {
    flex-direction: column;
    gap: 8px;
  }

  .smallava {
    width: 40px;
    height: 40px;
  }
}

@media (max-width: 480px) {
  #castbar {
    grid-template-columns: repeat(auto-fill, minmax(70px, 1fr));
  }

  .status-value {
    font-size: 1.2em;
  }

  .actionbox h3, .commentsbox h3 {
    font-size: 1.1em;
  }
}

/* Timer Styles */
#timer {
  display: inline;
  font-weight: 700;
  color: #6b7d75;
}

/* Utility Classes */
.text-center {
  text-align: center;
}

.mb-10 {
  margin-bottom: 10px;
}

.mb-15 {
  margin-bottom: 15px;
}

.mt-10 {
  margin-top: 10px;
}
