@import url("https://fonts.googleapis.com/css2?family=Exo+2:wght@400;500;600;700&display=swap");

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --primary-blue: #253686;
  --primary-pink: #da007b;
  --primary-pink-hover: #b00063;
  --primary-blue-hover: #1a2560;
  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-400: #9ca3af;
  --gray-600: #4b5563;
  --green-500: #22c55e;
  --white: #ffffff;
  --black-40: rgba(0, 0, 0, 0.4);
  --white-90: rgba(255, 255, 255, 0.9);
  --white-80: rgba(255, 255, 255, 0.8);
  --blue-gradient: linear-gradient(to top, rgba(37, 54, 134, 0.9), transparent);
}

html {
  overflow: hidden;
}

body {
  font-family: "Exo 2", sans-serif;
  background-color: var(--gray-50);
  min-height: 100vh;
  padding: 48px 16px;
  overflow: hidden;
}

.container {
  max-width: 100%;
  margin: 0 auto;
}

.designs-wrapper {
  display: flex;
  justify-content: center;
  gap: 32px;
  flex-wrap: wrap;
}

.design-container {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.desktop-container {
  width: 600px;
}

.mobile-container {
  width: 382px;
}

.design-label {
  margin-bottom: 16px;
  text-align: center;
}

.desktop-label {
  background-color: var(--primary-blue);
  color: var(--white);
  padding: 4px 16px;
  border-radius: 9999px;
  font-size: 14px;
  display: inline-block;
}

.mobile-label {
  background-color: var(--primary-pink);
  color: var(--white);
  padding: 4px 16px;
  border-radius: 9999px;
  font-size: 14px;
  display: inline-block;
}

.voting-block {
  width: 100%;
}

.voting-block:not(.mobile) {
  padding: 32px;
}

.voting-block.mobile {
  padding: 16px;
}

/* Header */
.header {
  text-align: center;
  margin-bottom: 32px;
}

.voting-block.mobile .header {
  margin-bottom: 16px;
}

.title {
  color: var(--primary-blue);
  font-size: 24px;
  font-weight: 600;
  margin-bottom: 8px;
}

.voting-block.mobile .title {
  font-size: 20px;
}

.subtitle {
  color: var(--gray-600);
  font-size: 16px;
}

.voting-block.mobile .subtitle {
  font-size: 14px;
}

.current-year {
  font-weight: 600;
}

/* Year Selector */
.year-selector {
  margin-bottom: 32px;
}

.voting-block.mobile .year-selector {
  margin-bottom: 16px;
}

.year-list {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
  padding: 0 16px;
}

.voting-block.mobile .year-list {
  justify-content: center;
  overflow-x: auto;
  padding: 0;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.voting-block.mobile .year-list::-webkit-scrollbar {
  display: none;
}

.year-btn {
  position: relative;
  padding: 8px 12px;
  border-radius: 8px;
  border: none;
  background-color: var(--gray-100);
  color: var(--primary-blue);
  cursor: pointer;
  transition: all 0.3s;
  font-size: 16px;
  font-weight: 500;
  font-family: "Exo 2", sans-serif;
}

.voting-block.mobile .year-btn {
  padding: 6px 10px;
  font-size: 14px;
  flex-shrink: 0;
}

.year-btn:hover:not(.active) {
  background-color: var(--gray-200);
}

.year-btn.active {
  background-color: var(--primary-pink);
  color: var(--white);
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
}

.year-btn.voted::after {
  content: '';
  position: absolute;
  top: -4px;
  right: -4px;
  width: 16px;
  height: 16px;
  background-color: var(--green-500);
  border-radius: 50%;
  border: 2px solid var(--white);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3'%3E%3Cpath d='M20 6L9 17l-5-5'/%3E%3C/svg%3E");
  background-size: 10px;
  background-position: center;
  background-repeat: no-repeat;
}

.voting-block.mobile .year-btn.voted::after {
  width: 12px;
  height: 12px;
  background-size: 8px;
}

/* Artist Grid */
.artist-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 32px;
}

.voting-block.mobile .artist-grid {
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-bottom: 16px;
}

.artist-card {
  position: relative;
  aspect-ratio: 1;
  border-radius: 12px;
  overflow: hidden;
  cursor: pointer;
  transition: all 0.3s;
}

.artist-card:hover {
  transform: scale(1.05);
}

.artist-card.selected {
  transform: scale(1.05);
  box-shadow: 0 0 0 4px var(--primary-pink), 0 20px 25px -5px rgba(218, 0, 123, 0.3);
}

.artist-card.voted-year {
  filter: grayscale(100%);
  opacity: 0.7;
  cursor: default;
  pointer-events: none;
}

.artist-card.voted-year:hover {
  transform: none;
}

.artist-card.voted-year .artist-overlay {
  opacity: 0.6 !important;
}

/* Voted card (selected in submitted year) should remain in color */
.artist-card.selected {
  filter: none;
}

.artist-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.artist-overlay {
  position: absolute;
  inset: 0;
  background: var(--black-40);
  backdrop-filter: blur(8px);
  opacity: 0;
  transition: opacity 0.3s;
  pointer-events: none;
}

.artist-card:hover .artist-overlay,
.artist-card.selected .artist-overlay {
  opacity: 1;
}

.play-button {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background-color: var(--white);
  border-radius: 50%;
  padding: 20px;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
  display: none;
  transition: transform 0.3s;
}

.voting-block.mobile .play-button {
  padding: 12px;
}

.artist-card:hover:not(.selected) .play-button:not(.playing) {
  display: flex;
  align-items: center;
  justify-content: center;
}

.artist-card .play-button.playing {
  display: flex !important;
  align-items: center;
  justify-content: center;
}

.artist-card:hover:not(.selected) .play-button:hover {
  transform: translate(-50%, -50%) scale(1.1);
}

.play-icon,
.stop-icon {
  width: 28px;
  height: 28px;
  fill: var(--primary-pink);
  color: var(--primary-pink);
}

.voting-block.mobile .play-icon,
.voting-block.mobile .stop-icon {
  width: 20px;
  height: 20px;
}

.heart-icon {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 20px;
  height: 20px;
  color: var(--primary-pink);
  display: none;
}

.voting-block.mobile .heart-icon {
  top: 8px;
  right: 8px;
  width: 16px;
  height: 16px;
}

.artist-card:hover:not(.selected) .heart-icon.hover {
  display: block;
  background-color: var(--white-90);
  border-radius: 50%;
  padding: 6px;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
  width: 24px;
  height: 24px;
}

.voting-block.mobile .artist-card:hover:not(.selected) .heart-icon.hover {
  padding: 4px;
  width: 20px;
  height: 20px;
}

.artist-card.selected .heart-icon.selected {
  display: block;
  width: 24px;
  height: 24px;
  filter: drop-shadow(0 4px 4px rgba(0, 0, 0, 0.26));
}

.voting-block.mobile .artist-card.selected .heart-icon.selected {
  width: 20px;
  height: 20px;
}

.artist-info {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--blue-gradient);
  padding: 12px;
}

.voting-block.mobile .artist-info {
  padding: 8px;
}

.artist-name {
  color: var(--white);
  font-size: 16px;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.voting-block.mobile .artist-name {
  font-size: 14px;
}

.artist-song {
  color: var(--white-80);
  font-size: 14px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.voting-block.mobile .artist-song {
  font-size: 12px;
}

/* Navigation Buttons */
.navigation-buttons {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin-bottom: 24px;
}

.voting-block.mobile .navigation-buttons {
  margin-bottom: 16px;
}

.nav-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  background-color: var(--primary-blue);
  color: var(--white);
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s;
  font-size: 16px;
  font-weight: 500;
  font-family: "Exo 2", sans-serif;
}

.voting-block.mobile .nav-btn {
  padding: 8px 16px;
  font-size: 14px;
}

.nav-btn:hover:not(:disabled) {
  background-color: var(--primary-blue-hover);
}

.nav-btn:disabled {
  background-color: var(--gray-200);
  color: var(--gray-400);
  cursor: not-allowed;
}

.nav-btn .icon {
  width: 20px;
  height: 20px;
}

.voting-block.mobile .nav-btn .icon {
  width: 16px;
  height: 16px;
}

/* Vote Button */
.vote-section {
  text-align: center;
}

.vote-btn {
  padding: 16px 32px;
  border-radius: 8px;
  border: none;
  font-size: 16px;
  font-weight: 500;
  font-family: "Exo 2", sans-serif;
  cursor: pointer;
  transition: all 0.3s;
  width: 100%;
}

.voting-block.mobile .vote-btn {
  padding: 12px 24px;
}

.vote-btn:not(:disabled) {
  background-color: var(--primary-pink);
  color: var(--white);
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

.vote-btn:not(:disabled):hover {
  background-color: var(--primary-pink-hover);
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
  transform: scale(1.05);
}

.vote-btn:disabled {
  background-color: var(--gray-200);
  color: var(--gray-400);
  cursor: not-allowed;
}

/* Animation for artist grid */
.artist-grid.animating {
  animation: fadeIn 0.4s ease-in-out;
}

.artist-grid.animating-left {
  animation: fadeIn 0.4s ease-in-out;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* Responsive adjustments */
/* Default: show desktop, hide mobile */
.mobile-container {
  display: none;
}

.desktop-container {
  width: 600px;
}

/* Mobile styles */
@media (max-width: 768px) {
  body {
    padding: 24px 12px;
  }
  
  .designs-wrapper {
    gap: 24px;
  }
}

