/* Vote Page Styles */

.voting-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem;
}

.voting-container.loading {
  opacity: 0;
}

.voting-container.loaded {
  opacity: 1;
  transition: opacity 0.15s ease-in;
}

.breadcrumb {
  margin-bottom: 1.5rem;
}

.breadcrumb a {
  color: var(--primary);
  text-decoration: none;
  margin-right: 1rem;
}

.category-header {
  margin-bottom: 2rem;
}

.category-header h2 {
  margin: 0 0 0.5rem 0;
}

.category-description {
  color: #666;
  margin: 0 0 1rem 0;
}

.voting-info {
  display: flex;
  gap: 1rem;
  align-items: center;
}

.vote-badge {
  background: #0066cc;
  color: white;
  padding: 0.5rem 1rem;
  border-radius: 20px;
  font-size: 0.875rem;
  font-weight: 600;
}

.total-predictions {
  color: #666;
  font-size: 0.875rem;
}

.alert {
  padding: 1rem;
  border-radius: 8px;
  margin-bottom: 1.5rem;
}

.alert-info {
  background: #e3f2fd;
  border-left: 4px solid #0066cc;
}

.voting-interface {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  margin-bottom: 2rem;
}

.rankings-panel,
.nominees-panel {
  background: var(--bg-white);
  border: 2px solid var(--border);
  border-radius: 12px;
  padding: 1.5rem;
}

.rankings-panel h3,
.nominees-panel h3 {
  margin: 0 0 0.5rem 0;
}

.help-text {
  color: var(--text-light);
  font-size: 0.875rem;
  margin: 0 0 1rem 0;
}

.rankings-list {
  min-height: 200px;
  border: 2px dashed var(--border);
  border-radius: 8px;
  padding: 1rem;
}

.ranking-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.75rem;
  background: var(--bg);
  border-radius: 8px;
  margin-bottom: 0.5rem;
  cursor: move;
}

.ranking-item:hover {
  background: var(--card-bg);
}

.rank-number {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  background: #0066cc;
  color: white;
  border-radius: 50%;
  font-weight: 700;
  font-size: 0.875rem;
  flex-shrink: 0;
}

.ranking-game-cover {
  width: 45px;
  height: 60px;
  object-fit: cover;
  border-radius: 4px;
  flex-shrink: 0;
}

.ranking-game-cover-placeholder {
  width: 45px;
  height: 60px;
  background: var(--border);
  border-radius: 4px;
  flex-shrink: 0;
}

.game-info {
  flex: 1;
  min-width: 0;
}

.game-name {
  font-weight: 600;
  font-size: 0.9rem;
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.remove-btn {
  background: #dc3545;
  color: white;
  border: none;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.remove-btn:hover {
  background: #c82333;
}

.empty-state {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 200px;
  color: #999;
  font-style: italic;
}

.controls-box {
  margin-bottom: 1rem;
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.search-box {
  flex: 1;
  min-width: 200px;
}

.search-box input {
  width: 100%;
  padding: 0.75rem;
  border: 2px solid var(--border);
  border-radius: 8px;
  font-size: 1rem;
  background: var(--bg);
  color: var(--text);
}

.sort-box {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.sort-box select {
  padding: 0.75rem;
  border: 2px solid var(--border);
  border-radius: 8px;
  font-size: 0.875rem;
  background: var(--bg);
  color: var(--text);
}

.nominees-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 0.75rem;
  max-height: 600px;
  overflow-y: auto;
}

.nominee-card {
  background: var(--bg);
  border: 2px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  transition: all 0.2s ease;
  cursor: pointer;
}

.nominee-card:hover {
  border-color: var(--primary);
  transform: translateY(-2px);
  box-shadow: 0 2px 8px rgba(0, 102, 204, 0.15);
}

.nominee-card.selected {
  border-color: var(--accent);
  background: rgba(0, 204, 102, 0.1);
}

.game-cover {
  width: 100%;
  aspect-ratio: 3/4;
  object-fit: cover;
  display: block;
}

.game-cover-placeholder {
  width: 100%;
  aspect-ratio: 3/4;
  background: var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  color: var(--text-light);
  text-align: center;
  padding: 0.5rem;
  word-break: break-word;
}

.nominee-info {
  padding: 0.5rem;
}

.nominee-name {
  font-size: 0.75rem;
  font-weight: 600;
  margin: 0 0 0.25rem 0;
  line-height: 1.2;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 2.4em;
}

.community-count {
  font-size: 0.65rem;
  color: var(--text-light);
  margin: 0 0 0.4rem 0;
}

.add-btn {
  width: 100%;
  padding: 0.4rem 0.25rem;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: 4px;
  font-size: 0.7rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}

.add-btn:hover:not(:disabled) {
  background: var(--primary-dark);
}

.add-btn:disabled {
  background: #ccc;
  cursor: not-allowed;
}

.voting-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  padding: 1.5rem;
  background: var(--bg-white);
  border: 2px solid var(--border);
  border-radius: 12px;
}

.nav-buttons {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.action-buttons {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

/* Responsive */
@media (max-width: 900px) {
  .voting-interface {
    grid-template-columns: 1fr;
  }

  .nominees-list {
    max-height: 400px;
  }
}

@media (max-width: 600px) {
  .voting-container {
    padding: 0.75rem;
    max-width: 100%;
    box-sizing: border-box;
    overflow-x: hidden;
  }

  .category-header h2 {
    font-size: 1.25rem;
  }

  .voting-info {
    flex-wrap: wrap;
    gap: 0.5rem;
  }

  .vote-badge {
    font-size: 0.75rem;
    padding: 0.375rem 0.75rem;
  }

  .rankings-panel,
  .nominees-panel {
    padding: 0.75rem;
    border-radius: 8px;
    overflow: hidden;
    max-width: 100%;
    box-sizing: border-box;
  }

  .rankings-list {
    padding: 0.5rem;
    min-height: 120px;
    overflow: hidden;
    max-width: 100%;
    box-sizing: border-box;
  }

  .ranking-item {
    gap: 0.5rem;
    padding: 0.5rem;
    max-width: 100%;
    overflow: hidden;
  }

  .rank-number {
    width: 22px;
    height: 22px;
    font-size: 0.75rem;
  }

  .ranking-game-cover,
  .ranking-game-cover-placeholder {
    display: none;
  }

  .game-info {
    min-width: 0;
    overflow: hidden;
  }

  .game-name {
    font-size: 0.8rem;
  }

  .remove-btn {
    width: 24px;
    height: 24px;
    font-size: 1rem;
  }

  .controls-box {
    flex-direction: column;
    gap: 0.5rem;
  }

  .search-box {
    min-width: 0;
    width: 100%;
  }

  .search-box input {
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
  }

  .sort-box {
    width: 100%;
  }

  .sort-box select {
    flex: 1;
    padding: 0.5rem;
    font-size: 0.8125rem;
  }

  .nominees-list {
    grid-template-columns: repeat(auto-fill, minmax(90px, 1fr)) !important;
    gap: 0.5rem;
    max-height: 350px;
  }

  .voting-actions {
    flex-direction: column;
    align-items: stretch;
    padding: 0.75rem;
    gap: 0.75rem;
  }

  .nav-buttons,
  .action-buttons {
    justify-content: center;
  }

  .help-text {
    font-size: 0.8rem;
  }

  .empty-state {
    min-height: 100px;
    font-size: 0.875rem;
  }
}
