/* Global Styles */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  min-height: 100vh;
  padding: 20px;
  color: #333;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  background: white;
  border-radius: 20px;
  padding: 30px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

/* Headers */
h1,
h2,
h3 {
  color: #333;
  margin-bottom: 20px;
}

h1 {
  font-size: 2.5rem;
  text-align: center;
  background: linear-gradient(45deg, #667eea, #764ba2);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Buttons */
.btn-primary,
.btn-secondary {
  display: inline-block;
  padding: 12px 30px;
  border: none;
  border-radius: 10px;
  font-size: 16px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.3s ease;
  text-align: center;
}

.btn-primary {
  background: linear-gradient(45deg, #667eea, #764ba2);
  color: white;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.btn-secondary {
  background: #f3f4f6;
  color: #333;
  margin-top: 10px;
}

.btn-secondary:hover {
  background: #e5e7eb;
}

/* Navigation */
.nav-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
  margin: 40px 0;
}

.nav-card {
  background: #f8f9fa;
  padding: 40px;
  border-radius: 15px;
  text-decoration: none;
  color: #333;
  transition: all 0.3s ease;
  text-align: center;
}

.nav-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.nav-card.admin {
  background: linear-gradient(135deg, #ffd89b 0%, #19547b 100%);
  color: white;
}

.nav-card h3 {
  font-size: 1.8rem;
  margin-bottom: 10px;
}

/* Forms */
.form-group {
  margin-bottom: 25px;
}

label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  color: #555;
}

input[type="text"],
input[type="number"],
input[type="file"] {
  width: 100%;
  padding: 12px;
  border: 2px solid #e5e7eb;
  border-radius: 8px;
  font-size: 16px;
  transition: border-color 0.3s ease;
}

input:focus {
  outline: none;
  border-color: #667eea;
}

/* Radio Buttons */
.radio-group {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.radio-label {
  display: flex;
  align-items: center;
  padding: 15px;
  background: #f8f9fa;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.radio-label:hover {
  background: #e5e7eb;
}

.radio-label input[type="radio"] {
  margin-right: 10px;
}

.radio-text {
  font-size: 18px;
  font-weight: 500;
}

/* Category Colors */
.adults {
  color: #9333ea;
}
.kids {
  color: #3b82f6;
}
.little-kids {
  color: #10b981;
}

.category-badge {
  display: inline-block;
  padding: 5px 15px;
  border-radius: 20px;
  font-size: 14px;
  font-weight: 600;
  margin: 0 5px;
}

.category-badge.adults {
  background: #f3e8ff;
}
.category-badge.kids {
  background: #dbeafe;
}
.category-badge.little-kids {
  background: #d1fae5;
}

/* Upload Section */
.upload-box {
  border: 3px dashed #cbd5e1;
  border-radius: 15px;
  padding: 60px;
  text-align: center;
  transition: all 0.3s ease;
  cursor: pointer;
}

.upload-box:hover,
.upload-box.drag-over {
  border-color: #667eea;
  background: #f0f9ff;
}

.upload-label {
  cursor: pointer;
}

.upload-icon {
  font-size: 4rem;
  margin-bottom: 20px;
}

/* Preview Grid */
.preview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 20px;
  margin: 30px 0;
}

.preview-item {
  text-align: center;
}

.preview-item img {
  width: 100%;
  max-width: 300px;
  height: 300px;
  object-fit: contain;
  background: #f8f9fa;
  border-radius: 10px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  margin: 0 auto;
}

/* Progress Bar */
.progress-section {
  margin-top: 30px;
}

.progress-bar {
  height: 30px;
  background: #e5e7eb;
  border-radius: 15px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(45deg, #667eea, #764ba2);
  width: 0;
  transition: width 0.5s ease;
}

/* Game Section */
.jar-display {
  text-align: center;
  margin: 30px 0;
}

.jar-image {
  width: 50vw;
  height: 50vw;
  max-width: 500px;
  max-height: 500px;
  object-fit: contain;
  border-radius: 15px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  background: #f8f9fa;
  margin: 0 auto;
  display: block;
}

.guess-form {
  max-width: 400px;
  margin: 0 auto;
  text-align: center;
}

.guess-form input {
  margin: 15px 0;
}

.button-group {
  display: flex;
  gap: 15px;
  justify-content: center;
  flex-wrap: wrap;
}

/* Selfie Upload */
.selfie-upload {
  text-align: center;
  margin: 15px 0;
}

.selfie-preview {
  margin-top: 15px;
}

.selfie-preview img {
  max-width: 200px;
  max-height: 200px;
  border-radius: 10px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

/* Winners Page */
.loading-state {
  text-align: center;
  padding: 50px;
}

.spinner {
  width: 50px;
  height: 50px;
  border: 5px solid #f3f3f3;
  border-top: 5px solid #667eea;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 20px auto;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

.jar-display-state {
  text-align: center;
  padding: 30px;
  min-height: 70vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.jar-info h2 {
  margin-bottom: 10px;
}

.actual-count {
  font-size: 1.2rem;
  color: #667eea;
  font-weight: 600;
  margin-bottom: 30px;
}

.jar-image-container {
  position: relative;
  margin: 30px 0;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 50vw;
}

.countdown {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 5rem;
  font-weight: bold;
  color: #ff6b6b;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
  animation: countdownPulse 1s ease-in-out infinite;
}

@keyframes countdownPulse {
  0%,
  100% {
    transform: translate(-50%, -50%) scale(1);
  }
  50% {
    transform: translate(-50%, -50%) scale(1.2);
  }
}

.winner-reveal-state {
  text-align: center;
  position: relative;
  overflow: hidden;
  min-height: 80vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.confetti-container {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 100%;
  pointer-events: none;
  z-index: 1;
}

.confetti {
  position: absolute;
  width: 10px;
  height: 10px;
  animation: confettiFall 3s linear infinite;
}

@keyframes confettiFall {
  0% {
    transform: translateY(-100vh) rotate(0deg);
    opacity: 1;
  }
  100% {
    transform: translateY(100vh) rotate(360deg);
    opacity: 0;
  }
}

.winner-announcement {
  position: relative;
  z-index: 2;
  background: rgba(255, 255, 255, 0.95);
  border-radius: 20px;
  padding: 30px;
  margin: 20px 0;
}

.jar-and-winner {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 40px;
  margin-top: 20px;
  flex-wrap: wrap;
}

.winner-display-column {
  flex: 0 0 auto;
  text-align: center;
}

.jar-reference {
  flex: 0 0 auto;
  text-align: center;
}

.jar-reference h3 {
  margin-bottom: 15px;
  color: #666;
  font-size: 1.2rem;
}

.jar-image-small {
  width: 25vw;
  height: 25vw;
  max-width: 250px;
  max-height: 250px;
  object-fit: contain;
  border-radius: 15px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  background: #f8f9fa;
}

.winner-card {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 40px;
  margin: 30px 0;
  padding: 40px;
  border-radius: 15px;
  background: linear-gradient(135deg, #fff 0%, #f8f9fa 100%);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  flex-wrap: wrap;
}

.winner-selfie {
  width: 50vw;
  height: 50vw;
  max-width: 500px;
  max-height: 500px;
  border-radius: 50%;
  overflow: hidden;
  border: 8px solid #ffd700;
  box-shadow: 0 0 30px rgba(255, 215, 0, 0.6);
  animation: winnerGlow 2s ease-in-out infinite alternate;
  margin: 0 auto;
}

@keyframes winnerGlow {
  0% {
    box-shadow: 0 0 30px rgba(255, 215, 0, 0.6);
  }
  100% {
    box-shadow: 0 0 50px rgba(255, 215, 0, 0.9);
  }
}

.winner-selfie img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.no-selfie {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 8rem;
  background: linear-gradient(135deg, #667eea, #764ba2);
  color: white;
}

.winner-info h3 {
  font-size: 2rem;
  margin-bottom: 10px;
  color: #333;
}

.winner-category {
  color: #666;
  margin-bottom: 10px;
}

.winner-guess {
  font-size: 1.3rem;
  font-weight: 600;
  color: #667eea;
}

.winner-difference {
  font-size: 1.1rem;
  margin-top: 10px;
}

.winner-difference.exact {
  color: #28a745;
  font-weight: bold;
}

.rankings {
  margin-top: 40px;
}

.podium {
  display: flex;
  justify-content: center;
  align-items: flex-end;
  gap: 20px;
  margin: 30px 0;
  flex-wrap: wrap;
}

.place-card {
  background: white;
  border-radius: 15px;
  padding: 20px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  text-align: center;
  min-width: 150px;
}

.first-place {
  order: 2;
  border: 3px solid #ffd700;
  transform: scale(1.1);
}

.second-place {
  order: 1;
  border: 3px solid #c0c0c0;
}

.third-place {
  order: 3;
  border: 3px solid #cd7f32;
}

.medal {
  font-size: 2rem;
  margin-bottom: 10px;
}

.place-info strong {
  display: block;
  margin-bottom: 5px;
}

.other-guesses {
  margin-top: 30px;
  padding: 20px;
  background: #f8f9fa;
  border-radius: 10px;
}

.other-guess {
  padding: 5px 0;
  color: #666;
}

.navigation {
  margin-top: 30px;
}

.navigation button {
  margin: 0 10px;
}

.completion-state {
  text-align: center;
  padding: 50px;
}

/* Game Progress Section */
.previous-guesses {
  background: #f8f9fa;
  border-radius: 15px;
  padding: 20px;
  margin-top: 30px;
}

.progress-summary {
  margin-bottom: 20px;
  text-align: center;
}

.progress-count {
  background: linear-gradient(45deg, #667eea, #764ba2);
  color: white;
  padding: 8px 16px;
  border-radius: 20px;
  font-weight: 600;
}

.jars-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 15px;
  margin-top: 20px;
}

.jar-item {
  background: white;
  border-radius: 12px;
  padding: 15px;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
  display: flex;
  align-items: center;
  gap: 15px;
  transition: all 0.3s ease;
  border: 2px solid transparent;
}

.jar-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.15);
}

.jar-item.completed {
  border-color: #28a745;
  background: linear-gradient(135deg, #fff 0%, #f8fff8 100%);
}

.jar-item.current {
  border-color: #667eea;
  background: linear-gradient(135deg, #fff 0%, #f0f3ff 100%);
  box-shadow: 0 5px 20px rgba(102, 126, 234, 0.3);
}

.jar-thumbnail-container {
  position: relative;
  flex-shrink: 0;
}

.jar-mini-thumb {
  width: 60px;
  height: 60px;
  object-fit: cover;
  border-radius: 8px;
  border: 2px solid #ddd;
}

.jar-status-indicator {
  position: absolute;
  top: -5px;
  right: -5px;
  background: #28a745;
  color: white;
  border-radius: 50%;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: bold;
}

.jar-item.current .jar-status-indicator {
  background: #667eea;
}

.jar-details {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.jar-title {
  font-weight: 600;
  color: #333;
  font-size: 1rem;
}

.jar-guess {
  color: #666;
  font-size: 0.9rem;
}

.jar-item.completed .jar-guess {
  color: #28a745;
  font-weight: 500;
}

.jar-nav-btn {
  align-self: flex-start;
  padding: 6px 12px;
  border: none;
  border-radius: 6px;
  background: #667eea;
  color: white;
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 500;
  transition: all 0.3s ease;
  min-width: 60px;
}

.jar-nav-btn:hover:not(:disabled) {
  background: #5a6fd8;
  transform: translateY(-1px);
}

.jar-nav-btn:disabled,
.jar-nav-btn.current {
  background: #6c757d;
  cursor: not-allowed;
  opacity: 0.7;
}

.jar-item.completed .jar-nav-btn:not(.current) {
  background: #28a745;
}

.jar-item.completed .jar-nav-btn:hover:not(:disabled) {
  background: #218838;
}

/* Mobile Responsive for Game Progress */
@media (max-width: 768px) {
  .jars-list {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .jar-item {
    padding: 12px;
    gap: 12px;
  }

  .jar-mini-thumb {
    width: 50px;
    height: 50px;
  }

  .jar-details {
    gap: 3px;
  }

  .jar-title {
    font-size: 0.9rem;
  }

  .jar-guess {
    font-size: 0.8rem;
  }

  .jar-nav-btn {
    padding: 5px 10px;
    font-size: 0.8rem;
    min-width: 50px;
  }
}

/* Answers Grid Layout */
.answers-grid-section {
  padding: 20px 0;
}

.progress-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 30px;
  flex-wrap: wrap;
  gap: 20px;
}

.bulk-actions {
  display: flex;
  gap: 10px;
}

.filter-tabs {
  display: flex;
  gap: 10px;
  margin-bottom: 30px;
  overflow-x: auto;
  padding-bottom: 10px;
}

.filter-tab {
  padding: 10px 20px;
  border: 2px solid #ddd;
  background: white;
  border-radius: 25px;
  cursor: pointer;
  transition: all 0.3s ease;
  white-space: nowrap;
  font-weight: 500;
}

.filter-tab:hover {
  border-color: #667eea;
  color: #667eea;
}

.filter-tab.active {
  background: linear-gradient(45deg, #667eea, #764ba2);
  color: white;
  border-color: transparent;
}

.jars-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 20px;
  margin-bottom: 30px;
}

.jar-card {
  background: white;
  border-radius: 15px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  transition: all 0.3s ease;
  border: 2px solid transparent;
}

.jar-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.jar-card.answered {
  border-color: #28a745;
  background: linear-gradient(135deg, #fff 0%, #f8fff8 100%);
}

.jar-card.modified {
  border-color: #ffc107;
  background: linear-gradient(135deg, #fff 0%, #fffbf0 100%);
}

.jar-image-container {
  position: relative;
  height: 150px;
  overflow: hidden;
}

.jar-thumbnail {
  width: 100%;
  height: 100%;
  object-fit: cover;
  cursor: pointer;
  transition: transform 0.3s ease;
}

.jar-thumbnail:hover {
  transform: scale(1.05);
}

.jar-number {
  position: absolute;
  top: 10px;
  left: 10px;
  background: rgba(0, 0, 0, 0.7);
  color: white;
  padding: 5px 10px;
  border-radius: 15px;
  font-weight: bold;
  font-size: 0.9rem;
}

.jar-info {
  padding: 15px;
}

.jar-categories {
  font-size: 0.85rem;
  color: #666;
  margin-bottom: 10px;
  font-weight: 500;
}

.answer-input-group {
  display: flex;
  gap: 10px;
  align-items: center;
}

.answer-input {
  flex: 1;
  padding: 8px 12px;
  border: 2px solid #ddd;
  border-radius: 8px;
  font-size: 1rem;
  transition: border-color 0.3s ease;
}

.answer-input:focus {
  outline: none;
  border-color: #667eea;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.quick-save-btn {
  padding: 8px 12px;
  border: none;
  border-radius: 8px;
  background: #667eea;
  color: white;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 1rem;
  min-width: 40px;
}

.quick-save-btn:hover {
  background: #5a6fd8;
  transform: translateY(-1px);
}

.quick-save-btn[data-saved="true"] {
  background: #28a745;
}

.quick-save-btn[data-saved="true"]:hover {
  background: #218838;
}

.no-jars {
  grid-column: 1 / -1;
  text-align: center;
  padding: 50px;
  color: #666;
  font-size: 1.2rem;
}

/* Image Modal */
.image-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  padding: 20px;
}

.modal-content {
  background: white;
  border-radius: 20px;
  max-width: 90vw;
  max-height: 90vh;
  overflow: hidden;
  position: relative;
  display: flex;
  flex-direction: column;
}

.close-modal {
  position: absolute;
  top: 15px;
  right: 20px;
  font-size: 2rem;
  color: white;
  cursor: pointer;
  background: rgba(0, 0, 0, 0.5);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1001;
  transition: background 0.3s ease;
}

.close-modal:hover {
  background: rgba(0, 0, 0, 0.7);
}

#modalImage {
  max-width: 100%;
  max-height: 70vh;
  object-fit: contain;
  display: block;
}

.modal-info {
  padding: 20px;
  background: white;
}

.modal-info h3 {
  margin: 0 0 10px 0;
  color: #333;
}

.modal-info p {
  margin: 0;
  color: #666;
}

/* Mobile Responsive */
@media (max-width: 768px) {
  .jars-grid {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 15px;
  }

  .jar-image-container {
    height: 120px;
  }

  .progress-info {
    flex-direction: column;
    align-items: stretch;
  }

  .filter-tabs {
    justify-content: center;
  }

  .modal-content {
    margin: 10px;
  }
}

/* Admin Winners Display */
.winners-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
  margin-top: 20px;
}

.winner-card {
  background: white;
  border-radius: 15px;
  padding: 20px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  text-align: center;
  border: 3px solid #ddd;
  transition: all 0.3s ease;
}

.winner-card.exact-match {
  border-color: #ffd700;
  background: linear-gradient(135deg, #fff 0%, #fffbf0 100%);
  box-shadow: 0 10px 30px rgba(255, 215, 0, 0.3);
}

.winner-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
}

.winner-card img {
  width: 100%;
  max-width: 200px;
  height: 150px;
  object-fit: cover;
  border-radius: 10px;
  margin-bottom: 15px;
}

.winner-card h3 {
  margin: 10px 0;
  color: #333;
  font-size: 1.2rem;
}

.winner-name {
  font-size: 1.3rem;
  font-weight: bold;
  color: #667eea;
  margin: 10px 0;
}

.winner-category {
  color: #666;
  font-size: 0.9rem;
  margin: 5px 0;
}

.winner-details {
  background: #f8f9fa;
  padding: 10px;
  border-radius: 8px;
  margin: 10px 0;
  font-weight: 500;
}

.winner-time {
  color: #999;
  font-size: 0.8rem;
  margin-top: 10px;
}

.runner-up {
  color: #666;
  font-size: 0.85rem;
  margin: 5px 0;
  padding: 3px 8px;
  background: #e9ecef;
  border-radius: 5px;
  display: inline-block;
}

/* Photo Display for Categorization */
.photo-display {
  text-align: center;
  margin: 30px 0;
}

.photo-display img {
  max-width: 500px;
  max-height: 500px;
  width: 100%;
  height: auto;
  object-fit: contain;
  background: #f8f9fa;
  border-radius: 15px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

/* Category Selection */
.category-selection {
  text-align: center;
  margin-top: 30px;
}

.category-checkboxes {
  display: flex;
  gap: 15px;
  justify-content: center;
  margin: 20px 0;
  flex-wrap: wrap;
}

.category-checkbox {
  display: flex;
  align-items: center;
  cursor: pointer;
}

.category-checkbox input[type="checkbox"] {
  margin-right: 10px;
  transform: scale(1.2);
}

.category-checkbox .category-btn {
  margin: 0;
}

.submit-categories {
  background: linear-gradient(45deg, #667eea, #764ba2);
  color: white;
  border: none;
  padding: 15px 30px;
  border-radius: 10px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  margin-top: 20px;
}

.submit-categories:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

/* Category Buttons */
.category-buttons {
  display: flex;
  gap: 15px;
  justify-content: center;
  margin-top: 30px;
}

.category-btn {
  flex: 1;
  padding: 20px;
  font-size: 18px;
  font-weight: 600;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.3s ease;
  color: white;
}

.category-btn.adults {
  background: #9333ea;
}

.category-btn.kids {
  background: #3b82f6;
}

.category-btn.little-kids {
  background: #10b981;
}

.category-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
}

/* Admin Panel */
.admin-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
  gap: 30px;
  margin-top: 30px;
}

.admin-card {
  background: #f8f9fa;
  padding: 30px;
  border-radius: 15px;
}

.admin-card.full-width {
  grid-column: 1 / -1;
}

.category-tabs {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
}

.tab-btn {
  flex: 1;
  padding: 10px;
  border: none;
  background: #e5e7eb;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.3s ease;
}

.tab-btn.active {
  background: linear-gradient(45deg, #667eea, #764ba2);
  color: white;
}

/* Jars List */
.jars-list {
  max-height: 400px;
  overflow-y: auto;
}

.jar-answer-item {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 15px;
  background: white;
  border-radius: 10px;
  margin-bottom: 10px;
}

.jar-answer-item img {
  width: 120px;
  height: 120px;
  object-fit: contain;
  background: #f8f9fa;
  border-radius: 8px;
}

.answer-input {
  flex: 1;
}

.answer-input input {
  width: 150px;
}

input.saved {
  border-color: #10b981;
  background: #d1fae5;
}

/* Winners Display */
.winners-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
  margin-top: 20px;
}

.winner-card {
  background: white;
  padding: 20px;
  border-radius: 15px;
  text-align: center;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.winner-card.exact-match {
  background: linear-gradient(135deg, #ffd700, #ffed4e);
  animation: pulse 2s infinite;
}

.winner-card img {
  height: 100%;
  object-fit: contain;
  background: #f8f9fa;
  border-radius: 10px;
  margin: 0 auto 15px;
  display: block;
}

.winner-name {
  font-size: 1.5rem;
  font-weight: bold;
  color: #333;
}

.winner-category {
  color: #666;
  margin-bottom: 10px;
}

.winner-details {
  font-size: 1.1rem;
  margin: 10px 0;
}

.winner-time {
  font-size: 0.9rem;
  color: #999;
}

/* Animations */
@keyframes pulse {
  0% {
    box-shadow: 0 5px 15px rgba(255, 215, 0, 0.4);
  }
  50% {
    box-shadow: 0 5px 25px rgba(255, 215, 0, 0.6);
  }
  100% {
    box-shadow: 0 5px 15px rgba(255, 215, 0, 0.4);
  }
}

/* Utility Classes */
.back-btn {
  display: inline-block;
  padding: 8px 16px;
  background: #f3f4f6;
  color: #333;
  text-decoration: none;
  border-radius: 8px;
  font-weight: 500;
  transition: all 0.3s ease;
}

.back-btn:hover {
  background: #e5e7eb;
}

.header {
  margin-bottom: 30px;
}

.completion-message {
  text-align: center;
  padding: 40px;
}

.no-jars {
  text-align: center;
  color: #999;
  padding: 40px;
}

/* Jar Navigation for Winners Page */
.jar-navigation {
  background: rgba(255, 255, 255, 0.95);
  padding: 15px 20px;
  border-radius: 20px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
  margin: 30px auto;
  max-width: 90vw;
  text-align: center;
}

.jar-navigation h3 {
  margin: 0 0 10px 0;
  font-size: 0.9rem;
  color: #666;
}

.jar-links {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
}

.jar-nav-link {
  padding: 8px 15px;
  border: 2px solid #ddd;
  background: white;
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 0.85rem;
  font-weight: 500;
}

.jar-nav-link:hover {
  border-color: #667eea;
  background: #f0f3ff;
  transform: translateY(-2px);
}

.jar-nav-link.active {
  background: linear-gradient(45deg, #667eea, #764ba2);
  color: white;
  border-color: transparent;
}

/* Mobile Responsive */
@media (max-width: 768px) {
  .container {
    padding: 20px;
  }

  h1 {
    font-size: 2rem;
  }

  .nav-grid,
  .admin-grid {
    grid-template-columns: 1fr;
  }

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

  .jar-image {
    width: 70vw;
    height: 70vw;
    max-width: 300px;
    max-height: 300px;
  }

  .jar-navigation {
    padding: 10px 15px;
    max-width: 95vw;
    margin: 20px auto;
  }

  .jar-navigation h3 {
    font-size: 0.8rem;
    margin-bottom: 8px;
  }

  .jar-nav-link {
    padding: 6px 12px;
    font-size: 0.8rem;
  }

  .winner-selfie {
    width: 70vw;
    height: 70vw;
    max-width: 300px;
    max-height: 300px;
  }

  .no-selfie {
    font-size: 5rem;
  }

  .winner-card {
    gap: 20px;
    padding: 20px;
    flex-direction: column;
  }

  .jar-image-container {
    min-height: 70vw;
  }

  .jar-display-state {
    min-height: 60vh;
  }

  .winner-reveal-state {
    min-height: 70vh;
  }

  .jar-and-winner {
    flex-direction: column;
    gap: 30px;
  }

  .jar-image-small {
    width: 40vw;
    height: 40vw;
    max-width: 200px;
    max-height: 200px;
  }

  .jar-reference h3 {
    font-size: 1rem;
  }
}
