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

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 20px;
}

.container {
  width: 100%;
  max-width: 800px;
}

.state-section {
  display: none;
}

.state-section.active {
  display: block;
}

/* Empty State */
.empty-content {
  background: white;
  border-radius: 20px;
  padding: 60px 40px;
  text-align: center;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  animation: slideUp 0.6s ease-out;
}

.empty-content .icon {
  width: 80px;
  height: 80px;
  color: #667eea;
  margin-bottom: 20px;
  opacity: 0.7;
}

.empty-content h2 {
  color: #333;
  font-size: 28px;
  margin-bottom: 15px;
}

.empty-content p {
  color: #666;
  font-size: 16px;
  line-height: 1.6;
}

/* Poll Container */
.poll-container {
  background: white;
  border-radius: 20px;
  padding: 40px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  animation: slideUp 0.6s ease-out;
}

.poll-header {
  margin-bottom: 40px;
  border-bottom: 2px solid #f0f0f0;
  padding-bottom: 20px;
}

.poll-question {
  font-size: 32px;
  color: #333;
  font-weight: 600;
  margin-bottom: 15px;
  word-break: break-word;
}

.poll-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 14px;
}

.vote-count {
  color: #999;
  font-weight: 500;
}

.live-badge {
  background: #ff4757;
  color: white;
  padding: 6px 12px;
  border-radius: 20px;
  font-weight: 600;
  font-size: 12px;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}

/* Options Grid */
.options-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 15px;
  margin-bottom: 40px;
}

.option-button {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border: 2px solid transparent;
  color: white;
  padding: 25px;
  border-radius: 15px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  text-align: center;
  min-height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 5px 15px rgba(102, 126, 234, 0.3);
  position: relative;
  overflow: hidden;
}

.option-button:hover:not(:disabled) {
  transform: translateY(-3px);
  box-shadow: 0 10px 25px rgba(102, 126, 234, 0.5);
}

.option-button:active:not(:disabled) {
  transform: translateY(-1px);
}

.option-button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  background: linear-gradient(135deg, #999 0%, #666 100%);
}

.option-button.voted {
  background: linear-gradient(135deg, #2ed573 0%, #26de81 100%);
  border-color: #26de81;
  box-shadow: 0 0 20px rgba(46, 213, 115, 0.5);
}

/* Results Section */
.results-section {
  margin-top: 30px;
  padding-top: 30px;
  border-top: 2px solid #f0f0f0;
}

.results-section h3 {
  color: #333;
  font-size: 18px;
  margin-bottom: 20px;
}

.results-list {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.result-item {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.result-label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 500;
  color: #333;
}

.result-votes {
  color: #999;
  font-size: 14px;
}

.result-bar-container {
  background: #f0f0f0;
  border-radius: 10px;
  height: 8px;
  overflow: hidden;
  position: relative;
}

.result-bar {
  background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
  height: 100%;
  border-radius: 10px;
  transition: width 0.4s ease;
  min-width: 0;
}

/* Voted Message */
.voted-message {
  background: #2ed573;
  color: white;
  padding: 15px;
  border-radius: 10px;
  text-align: center;
  font-weight: 500;
  animation: slideDown 0.4s ease-out;
  margin-top: 20px;
}

/* Animations */
@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Mobile Responsive */
@media (max-width: 600px) {
  .poll-container {
    padding: 25px;
    border-radius: 15px;
  }

  .poll-question {
    font-size: 24px;
  }

  .options-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .option-button {
    min-height: 70px;
    padding: 20px;
    font-size: 15px;
  }

  .empty-content {
    padding: 40px 25px;
  }

  .empty-content h2 {
    font-size: 22px;
  }
}
