.contest-content {
  text-align: center;
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
}

.contest-content--medium {
  max-width: 1000px;
}

.contest-content--narrow {
  max-width: 800px;
}

.contest-nav {
  margin-bottom: 30px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}

.contest-btn {
  display: inline-block;
  padding: 10px;
  color: #fff;
  text-decoration: none;
  border-radius: 5px;
  border: none;
  cursor: pointer;
  line-height: 1.2;
  font-size: 14px;
}

@media (max-width: 600px) {
  .contest-btn {
    flex: 1 1 calc(50% - 10px); /* Due bottoni per riga su mobile piccolo */
    min-width: 120px;
  }
}

.contest-btn--block {
  width: 100%;
  box-sizing: border-box;
  text-align: center;
}

.contest-btn--compact {
  padding: 5px 10px;
  border-radius: 3px;
}

.contest-btn--primary { background: #007bff; }
.contest-btn--success { background: #28a745; }
.contest-btn--danger { background: #dc3545; }
.contest-btn--secondary { background: #6c757d; }
.contest-btn--purple { background: #6f42c1; }

.contest-btn.is-loading {
  background: #6c757d;
  cursor: default;
}

.contest-alert {
  font-weight: bold;
  padding: 10px;
  border-radius: 5px;
  margin-bottom: 20px;
}

.contest-alert--success {
  color: green;
  border: 1px solid green;
  background: #e8f5e9;
}

.contest-alert--error {
  color: red;
  border: 1px solid red;
  background: #fff3f3;
}

.contest-alert--info {
  background: #e9ecef;
  color: #555;
  padding: 15px;
  border-radius: 5px;
  display: inline-block;
}

.contest-alert--muted {
  background: #f8f9fa;
  color: #6c757d;
  border: 1px solid #dee2e6;
  font-size: 0.85em;
  font-weight: normal;
  padding: 8px 12px;
}

.contest-countdown {
  margin-bottom: 16px;
}

.contest-countdown-value {
  font-variant-numeric: tabular-nums;
}

.contest-alert-text {
  margin: 0;
}

.contest-gallery {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  justify-items: stretch;
  margin-top: 20px;
}

@media (min-width: 720px) {
  .contest-gallery {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .contest-gallery {
    grid-template-columns: repeat(2, 1fr);
  }
}

.contest-photo-card {
  border: 1px solid #ccc;
  padding: 10px;
  border-radius: 5px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
  background: #fff;
  text-align: center;
  display: flex;
  flex-direction: column;
}

.contest-photo-container {
  position: relative;
  width: 100%;
}

.contest-photo-img {
  width: 100%;
  height: 220px;
  object-fit: contain;
  background: #f7f7f7;
  border-radius: 3px;
  cursor: pointer;
  display: block;
}

.contest-photo-meta {
  margin-top: 10px;
  text-align: left;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.contest-photo-footer {
  margin-top: auto;
}

.contest-photo-meta STRONG {
  font-size: .66em;
  display: block;
}

.contest-photo-title {
  margin: 0 0 10px 0;
  font-size: 1.1em;
  color: black;
}

.good-rank SPAN {
  background: #ffff00;
  padding: 2px 5px;
  border-radius: 3px;
}
.rank {
  font-size: .5em;
  display: block;
}

.contest-photo-meta p {
  margin: 6px 0;
}

.contest-judgment {
  margin-top: 10px;
  padding-top: 10px;  
  padding-bottom: 10px;
  font-size: 12px;
  line-height: 1.4;
  color: #333;
  text-align: left;
}

.contest-photo-footer {
  margin-top: auto;
  border-top: 1px solid #eee;
  padding-top: 10px;
}

.contest-photo-footer--no-border {
  border-top: none;
}

.contest-cards {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  justify-content: center;
  margin-top: 20px;
}

.contest-my-card {
  width: 300px;
  border: 1px solid #ddd;
  padding: 10px;
  border-radius: 5px;
  text-align: left;
  box-shadow: 0 2px 4px rgba(0,0,0,0.05);
  background: #fff;
}

.contest-my-card-img {
  width: 100%;
  height: auto;
  border-radius: 3px;
  cursor: pointer;
  display: block;
}

.contest-my-card-line {
  margin: 0;
}

.contest-my-card-line--first {
  margin-top: 10px;
  margin-bottom: 5px;
}

.contest-badge {
  margin-top: 10px;
  padding: 5px;
  color: #fff;
  text-align: center;
  border-radius: 3px;
  font-weight: bold;
}

.contest-badge--review { background: #ffc107; }
.contest-badge--info { background: #d39e00; }
.contest-badge--valid { background: #17a2b8; }
.contest-badge--hall { background: #6f42c1; }
.contest-badge--published { background: #28a745; }
.contest-badge--archived { background: #6c757d; }
.contest-badge--invalid { background: #ff757d; }

.contest-review {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid #eee;
  font-size: 12px;
  line-height: 1.4;
}

.contest-valid {
  margin-bottom: 6px;
  font-weight: bold;
}

.contest-valid--yes { color: #28a745; }
.contest-valid--no { color: #dc3545; }

.contest-muted {
  color: #555;
}

.contest-review-judgment {
  margin-top: 6px;
}

.contest-admin-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 20px;
}

.contest-admin-head {
  background: #f4f4f4;
}

.contest-admin-th,
.contest-admin-td {
  padding: 10px;
  border: 1px solid #ccc;
  vertical-align: top;
}

.contest-admin-thumb-cell {
  text-align: left;
  width: 45%;
  vertical-align: top;
}

.contest-admin-thumb {
  max-width: 100%;
  height: auto;
  border-radius: 3px;
  max-height: 150px;
  display: block;
  margin: 0 auto;
}

.contest-admin-thumb-meta {
  margin-top: 8px;
}

.contest-admin-dates {
  margin-top: 6px;
  font-size: 11px;
  color: #555;
  line-height: 1.3;
}

.contest-admin-details-inline {
  margin-top: 8px;
  font-size: 12px;
  line-height: 1.35;
}

.contest-admin-details-inline STRONG {
  font-size: 11px;
}

.contest-admin-form {
  margin-bottom: 15px;
}

.contest-admin-analyze {
  margin-bottom: 10px;
}

.contest-admin-analyze-status {
  margin-top: 6px;
  font-size: 12px;
  color: #555;
}

.contest-admin-score-form {
  background: #f9f9f9;
  padding: 10px;
  border-radius: 3px;
  margin-bottom: 10px;
}

.contest-admin-valid-row {
  margin-bottom: 8px;
}

.contest-admin-valid-label {
  display: flex;
  gap: 8px;
  align-items: center;
  font-size: 12px;
  font-weight: bold;
}

.contest-admin-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  margin-bottom: 8px;
}

.contest-admin-field-label {
  display: block;
  font-size: 11px;
  font-weight: bold;
}

.contest-admin-field--full {
  grid-column: span 4;
}

.contest-admin-input {
  width: 100%;
  padding: 3px;
  box-sizing: border-box;
}

.contest-admin-eval-row {
  margin-bottom: 8px;
}

.contest-admin-eval-label {
  display: block;
  font-size: 12px;
  font-weight: bold;
}

.contest-admin-textarea {
  width: 100%;
  padding: 3px;
  box-sizing: border-box;
  font-size: 11px;
}

.contest-admin-score {
  margin: 0 0 8px 0;
  font-size: 12px;
  color: #333;
}

.contest-status-error {
  color: #b00020;
}

.contest-upload-back {
  margin-bottom: 30px;
}

.contest-upload-success-link {
  color: #0056b3;
  text-decoration: underline;
}

.contest-upload-card {
  background: #f9f9f9;
  padding: 30px;
  border-radius: 5px;
  box-shadow: 0 4px 6px rgba(0,0,0,0.1);
  display: inline-block;
  text-align: left;
  width: 100%;
  max-width: 500px;
}

.contest-field {
  margin-bottom: 15px;
}

.contest-field--spaced {
  margin-bottom: 20px;
}

.contest-label {
  display: block;
  font-weight: bold;
  margin-bottom: 5px;
}

.contest-input {
  width: 100%;
  padding: 8px;
  box-sizing: border-box;
  border: 1px solid #ccc;
  border-radius: 4px;
}

.contest-input[disabled] {
  background: #e9ecef;
  color: #6c757d;
  border-color: #ced4da;
}

.contest-file {
  width: 100%;
}

.contest-upload-submit {
  padding: 12px 24px;
  font-size: 16px;
  font-weight: bold;
  transition: background 0.3s;
}

.contest-upload-status {
  margin-top: 15px;
  color: #666;
  text-align: center;
  font-weight: bold;
}

.contest-upload-already {
  background: #e9ecef;
  padding: 20px;
  border-radius: 5px;
  display: inline-block;
}

.contest-upload-already p {
  margin: 0;
  font-size: 14px;
  color: #6c757d;
}

/* Modal Regolamento */
.contest-modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0,0,0,0.4);
}

.contest-modal-content {
  background-color: #fefefe;
  margin: 10% auto;
  padding: 20px;
  border: 1px solid #888;
  width: 80%;
  max-width: 700px;
  border-radius: 8px;
  position: relative;
  text-align: left;
}

.contest-modal-close {
  color: #aaa;
  position: absolute;
  right: 15px;
  top: 10px;
  font-size: 28px;
  font-weight: bold;
  cursor: pointer;
}

.contest-modal-close:hover,
.contest-modal-close:focus {
  color: black;
  text-decoration: none;
}

.contest-btn--info {
  background: #17a2b8;
}

.contest-description {
  margin-bottom: 20px;
  font-style: italic;
  color: #666;
  text-align: left;
}

/* Admin Grid View */
.contest-admin-grid-view {
  display: grid;
  grid-template-columns: repeat(1, 1fr);
  gap: 15px;
  margin-top: 20px;
}

@media (min-width: 600px) {
  .contest-admin-grid-view {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .contest-admin-grid-view {
    grid-template-columns: repeat(3, 1fr);
  }
}

.contest-admin-card {
  border: 1px solid #ddd;
  border-radius: 5px;
  padding: 10px;
  background: #fff;
  text-align: center;
  box-shadow: 0 2px 4px rgba(0,0,0,0.05);
  display: flex;
  flex-direction: column;
}

.contest-admin-card-img {
  width: 100%;
  height: 150px;
  object-fit: contain;
  background: #f7f7f7;
  border-radius: 3px;
  cursor: pointer;
}

.contest-admin-card-meta {
  margin-top: 10px;
  font-size: 11px;
  text-align: left;
  line-height: 1.4;
  flex-grow: 1;
}

.contest-admin-card-meta strong {
  font-size: 10px;
  color: #666;
}

.contest-admin-card-actions {
  margin-top: 10px;
}

.contest-admin-archived-section {
  margin-top: 40px;
  padding-top: 20px;
  border-top: 2px dashed #ccc;
}

.contest-admin-archived-section h2 {
  text-align: center;
  color: #666;
}

.contest-admin-edit-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  max-width: 600px;
  margin: 20px auto;
}

.contest-admin-edit-actions .btn,
.contest-admin-edit-actions form {
  flex: 1;
  min-width: 120px;
  margin: 0 !important;
}

.contest-admin-edit-actions .btn {
  width: 100%;
}

/* Likes */
.contest-like-btn {
  position: absolute;
  bottom: 2px;
  right: 2px;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(192, 192, 192, 0.8);
  border-radius: 4px;
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #eee; /* Light gray */
  font-size: 16px;
  transition: all 0.2s;
  z-index: 10;
}

.contest-like-btn:hover {
  background: rgba(255, 255, 255, 0.9);
  border-color: #999;
  transform: scale(1.05);
  color: #a0a0a0;
}

.contest-like-btn.liked {
  color: #e91e63;
  border-color: #e91e63;
  background: rgba(255, 255, 255, 1);
}

.contest-photo-meta--center {
  text-align: center;
}

.contest-hof-award {
  font-size: 11px;
  color: #0088cc; /* Azzurro (come il nome personaggio) */
  margin-bottom: 10px;
  line-height: 1.4;
  font-weight: bold;
}

.contest-hof-award i.fa-trophy {
  color: #d39e00; /* Gold */
  margin-right: 3px;
}

.contest-login-prompt {
  position: absolute;
  bottom: 2px;
  right: 2px;
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid rgba(192, 192, 192, 0.8);
  border-radius: 4px;
  padding: 4px 8px;
  font-size: 9px;
  color: #666;
  max-width: 120px;
  text-align: center;
  line-height: 1.2;
  z-index: 10;
  pointer-events: none;
}


