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

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

.container {
  max-width: 1200px;
  margin: 0 auto;
}

header {
  text-align: center;
  color: white;
  margin-bottom: 40px;
}

header h1 {
  font-size: 3rem;
  margin-bottom: 10px;
  text-shadow: 2px 2px 4px rgba(0,0,0,0.2);
}

header p {
  font-size: 1.2rem;
  opacity: 0.9;
}

.admin-link {
  display: inline-block;
  margin-top: 14px;
  color: #fff;
  text-decoration: underline;
  font-weight: 600;
}

.submit-section {
  background: white;
  padding: 24px;
  border-radius: 12px;
  margin-bottom: 24px;
  box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.submit-section h2 {
  margin-bottom: 8px;
  color: #333;
}

.submit-help {
  color: #666;
  margin-bottom: 14px;
}

.submission-form {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.submission-form input {
  flex: 1;
  min-width: 220px;
  padding: 12px;
  border: 2px solid #e0e0e0;
  border-radius: 8px;
  font-size: 1rem;
}

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

.submission-message {
  margin-top: 10px;
  font-size: 0.95rem;
  min-height: 20px;
}

.submission-message.success {
  color: #1f8b3b;
}

.submission-message.error {
  color: #c82333;
}

.info-banner {
  background: rgba(255, 255, 255, 0.2);
  padding: 12px 20px;
  border-radius: 8px;
  margin-top: 15px;
  font-size: 0.95rem;
  backdrop-filter: blur(10px);
}

.info-banner code {
  background: rgba(255, 255, 255, 0.3);
  padding: 2px 8px;
  border-radius: 4px;
  font-family: monospace;
  font-weight: 600;
}

.admin-section {
  background: white;
  padding: 20px;
  border-radius: 12px;
  margin-bottom: 30px;
  box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.admin-panel {
  margin-top: 20px;
  padding-top: 20px;
  border-top: 2px solid #f0f0f0;
}

.admin-panel h2 {
  margin-bottom: 15px;
  color: #333;
}

#addPhotoForm {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.info-text {
  background: #e7f3ff;
  padding: 12px;
  border-radius: 8px;
  margin-bottom: 15px;
  color: #0066cc;
  font-size: 0.95rem;
}

.info-text code {
  background: rgba(0, 0, 0, 0.1);
  padding: 2px 6px;
  border-radius: 4px;
  font-family: monospace;
}

#addPhotoForm input,
#addPhotoForm select {
  flex: 1;
  min-width: 200px;
  padding: 12px;
  border: 2px solid #e0e0e0;
  border-radius: 8px;
  font-size: 1rem;
  transition: border-color 0.3s;
}

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

.btn {
  padding: 12px 24px;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
}

.btn-primary {
  background: #667eea;
  color: white;
}

.btn-primary:hover {
  background: #5568d3;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(102, 126, 234, 0.3);
}

.btn-secondary {
  background: #6c757d;
  color: white;
}

.btn-secondary:hover {
  background: #5a6268;
}

.photos-section {
  background: white;
  padding: 30px;
  border-radius: 12px;
  box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.photos-section h2 {
  margin-bottom: 20px;
  color: #333;
  text-align: center;
}

.photos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
}

.photo-card {
  background: white;
  border: 2px solid #e0e0e0;
  border-radius: 12px;
  overflow: hidden;
  transition: all 0.3s;
  position: relative;
}

.photo-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 16px rgba(0,0,0,0.1);
}

.photo-card img {
  width: 100%;
  height: 250px;
  object-fit: cover;
  display: block;
}

.photo-image-wrap {
  position: relative;
}

.photo-name-badge {
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: 10px;
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
  border-radius: 8px;
  padding: 8px 10px;
  font-size: 0.95rem;
  font-weight: 600;
  text-align: center;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

.photo-info {
  padding: 15px;
}

.photo-name {
  font-size: 1.2rem;
  font-weight: 600;
  color: #333;
  margin-bottom: 10px;
}

.photo-votes {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.votes-count {
  font-size: 1.5rem;
  font-weight: 700;
  color: #667eea;
}

.rank-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  background: rgba(255, 215, 0, 0.95);
  color: #333;
  padding: 8px 12px;
  border-radius: 20px;
  font-weight: 700;
  font-size: 1rem;
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.rank-badge.first {
  background: rgba(255, 215, 0, 0.95);
}

.rank-badge.second {
  background: rgba(192, 192, 192, 0.95);
}

.rank-badge.third {
  background: rgba(205, 127, 50, 0.95);
}

.vote-btn {
  width: 100%;
  padding: 12px;
  background: #28a745;
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
}

.vote-btn:hover {
  background: #218838;
  transform: scale(1.05);
}

.vote-btn:active {
  transform: scale(0.95);
}

.delete-btn {
  width: 100%;
  margin-top: 8px;
  padding: 8px;
  background: #dc3545;
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.3s;
}

.delete-btn:hover {
  background: #c82333;
}

.loading {
  text-align: center;
  padding: 40px;
  color: #666;
  font-size: 1.2rem;
}

.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: #666;
}

.empty-state h3 {
  font-size: 1.5rem;
  margin-bottom: 10px;
}

/* Animação de voto */
@keyframes voteAnimation {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.2);
  }
  100% {
    transform: scale(1);
  }
}

.voting {
  animation: voteAnimation 0.3s ease;
}

.admin-login,
.admin-dashboard {
  background: #fff;
  border-radius: 12px;
  padding: 24px;
  box-shadow: 0 4px 6px rgba(0,0,0,0.1);
  margin-bottom: 20px;
}

.admin-dashboard.hidden,
.admin-login.hidden {
  display: none;
}

.admin-form {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 10px;
}

.admin-form input {
  flex: 1;
  min-width: 220px;
  padding: 12px;
  border: 2px solid #e0e0e0;
  border-radius: 8px;
}

.pending-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
  margin-top: 12px;
}

.pending-card {
  border: 2px solid #ececec;
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
}

.pending-card img {
  width: 100%;
  height: 220px;
  object-fit: cover;
}

.pending-info {
  padding: 12px;
}

.pending-name {
  font-weight: 700;
  color: #333;
}

.pending-date {
  color: #666;
  font-size: 0.9rem;
  margin: 6px 0 10px;
}

.pending-actions {
  display: flex;
  gap: 8px;
}

.btn-approve {
  background: #28a745;
  color: #fff;
}

.btn-approve:hover {
  background: #218838;
}

.btn-reject {
  background: #dc3545;
  color: #fff;
}

.btn-reject:hover {
  background: #c82333;
}

/* Responsivo */
@media (max-width: 768px) {
  header h1 {
    font-size: 2rem;
  }
  
  .photos-grid {
    grid-template-columns: 1fr;
  }
  
  #addPhotoForm {
    flex-direction: column;
  }

  .submission-form,
  .admin-form {
    flex-direction: column;
  }
  
  #addPhotoForm input {
    width: 100%;
  }
}
