/* Reset */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
.container {
  padding-bottom: 100px;
}

body {
  padding-bottom: 80px; /* Footer height + margin */
  font-family: 'Segoe UI', sans-serif;
  background: linear-gradient(to right, #3498db, #e74c3c);
  min-height: 100vh;
  color: white;
  padding: 20px;
  overflow-x: hidden;
}

/* Main layout */
main {
  width: 100%;
  max-width: 1600px;
  margin: 0 auto;
}

/* Title */
h1 {
  text-align: center;
  font-size: clamp(2rem, 5vw, 3.5rem);
  margin-bottom: 30px;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

/* Vote container */
.vote-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  padding: 0 10px;
  max-width: 100%;
}

/* Vote block */
.vote-block {
  text-align: center;
  padding: 25px 20px;
  border-radius: 25px;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

/* Names */
.vote-block h2 {
  font-size: clamp(2rem, 4vw, 3.5rem);
  margin-bottom: 20px;
  word-wrap: break-word;
}

/* Gifts */
.vote-block .gift-line {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 20px;
  min-height: 70px;
}

.vote-block .gift-line img {
  width: 80px;
  height: 80px;
  object-fit: contain;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

/* Points */
.vote-block p.points {
  font-size: clamp(1.5rem, 3vw, 2rem);
  margin-bottom: 15px;
}

#opt1-points,
#opt2-points {
  font-size: clamp(3rem, 6vw, 5rem);
  font-weight: 800;
  display: block;
  margin-top: 10px;
  transition: all 0.3s ease;
}

/* Button group */
.button-group {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}

/* Buttons */
.vote-block button {
  font-size: clamp(1rem, 2vw, 1.5rem);
  padding: 12px 20px;
  border: none;
  border-radius: 50px;
  background-color: rgba(255, 255, 255, 0.2);
  color: white;
  cursor: pointer;
  transition: all 0.3s ease;
  min-width: 70px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.vote-block button:hover {
  background-color: rgba(255, 255, 255, 0.35);
  transform: translateY(-2px);
}

/* Countdown */
#countdown {
  text-align: center;
  font-size: clamp(1.5rem, 4vw, 3rem);
  font-weight: 600;
  padding: 15px 30px;
  background: rgba(0, 0, 0, 0.7);
  border-radius: 20px;
  display: inline-block;
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1000;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

/* Setup form styles */
.form-center {
  text-align: center;
  margin-bottom: 40px;
  background: rgba(255, 255, 255, 0.1);
  padding: 30px;
  border-radius: 20px;
}

.form-center label {
  display: block;
  margin-bottom: 10px;
  font-weight: 600;
  font-size: clamp(1rem, 2vw, 1.2rem);
}

.form-center input {
  width: 100%;
  max-width: 500px;
  padding: 12px 16px;
  font-size: clamp(1rem, 2vw, 1.2rem);
  margin: 10px auto 20px;
  border-radius: 10px;
  border: 1px solid #ccc;
}

.form-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
  margin-bottom: 30px;
}

.form-side {
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(10px);
  padding: 25px;
  border-radius: 20px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
  color: white;
}

.form-side h2 {
  font-size: clamp(1.4rem, 3vw, 1.8rem);
  margin-bottom: 20px;
  text-align: center;
}

.form-side label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  font-size: clamp(0.9rem, 2vw, 1rem);
}

.form-side input[type="text"] {
  width: 100%;
  padding: 10px;
  margin-bottom: 15px;
  border-radius: 8px;
  border: 1px solid #ccc;
  font-size: clamp(0.9rem, 2vw, 1rem);
}

.form-side select,
.form-side input[type="color"] {
  width: 100%;
  padding: 10px;
  font-size: clamp(0.9rem, 2vw, 1rem);
  margin-bottom: 15px;
  border-radius: 8px;
  border: 1px solid #ccc;
  background: white;
  color: #333;
}

.form-side input[type="color"] {
  height: 50px;
  cursor: pointer;
}

button[type="submit"] {
  display: block;
  margin: 0 auto;
  padding: 16px 40px;
  font-size: clamp(1rem, 2vw, 1.3rem);
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
  border-radius: 50px;
  cursor: pointer;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

button[type="submit"]:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}

/* Animations */
@keyframes shake {
  0% { transform: translateX(-50%) translateX(-5px); }
  100% { transform: translateX(-50%) translateX(5px); }
}

/* Mobile responsive */
@media screen and (max-width: 768px) {
  body {
    padding: 15px;
  }

  .vote-container {
    grid-template-columns: 1fr;
    gap: 15px;
  }

  .vote-block {
    padding: 20px 15px;
  }

  .gift-line {
    min-height: 60px;
  }

  .button-group {
    gap: 8px;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .form-center {
    padding: 20px;
  }

  .form-side {
    padding: 20px;
  }

  #countdown {
    bottom: 10px;
    padding: 10px 20px;
  }
}

@media screen and (max-width: 480px) {
  body {
    padding: 10px;
    padding-bottom: 100px;
  }

  h1 {
    margin-bottom: 20px;
  }

  .vote-block h2 {
    margin-bottom: 15px;
  }

  .gift-line {
    gap: 8px;
  }

  .vote-block button {
    min-width: 65px;
    padding: 10px 15px;
  }
}
