/* Reset y variables */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --primary: #4f46e5;
  --primary-dark: #4338ca;
  --secondary: #10b981;
  --background: #f9fafb;
  --surface: #ffffff;
  --text: #1f2937;
  --text-light: #6b7280;
  --border: #e5e7eb;
  --success: #10b981;
  --shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1);
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.6;
}

.container {
  max-width: 900px;
  margin: 0 auto;
  padding: 20px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Header */
header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 30px;
  flex-wrap: wrap;
  gap: 15px;
}

.logo h1 {
  color: white;
  font-size: 1.5rem;
  font-weight: 700;
}

/* Buttons */
.btn-primary, .btn-secondary {
  padding: 12px 24px;
  border-radius: 8px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  border: none;
  font-size: 1rem;
  transition: all 0.3s ease;
  display: inline-block;
  text-align: center;
}

.btn-primary {
  background: var(--primary);
  color: white;
  width: 100%;
  margin-top: 20px;
}

.btn-primary:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.2);
  color: white;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.3);
}

/* Main content */
main {
  flex: 1;
}

/* Survey Card */
.survey-card, .monitor-card {
  background: var(--surface);
  border-radius: 16px;
  padding: 40px;
  box-shadow: var(--shadow-lg);
  margin-bottom: 20px;
}

.survey-title {
  font-size: 1.75rem;
  color: var(--text);
  margin-bottom: 15px;
  font-weight: 700;
}

.survey-description {
  color: var(--text-light);
  margin-bottom: 30px;
  font-size: 1rem;
}

/* Success message */
.success-message {
  background: #d1fae5;
  color: #065f46;
  padding: 15px 20px;
  border-radius: 8px;
  margin-bottom: 25px;
  border-left: 4px solid var(--secondary);
  font-weight: 500;
}

/* Survey form */
.survey-form {
  margin-top: 30px;
}

.options-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.option-item {
  display: flex;
  align-items: center;
  padding: 16px 20px;
  border: 2px solid var(--border);
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s ease;
  background: var(--background);
}

.option-item:hover {
  border-color: var(--primary);
  background: white;
  transform: translateX(5px);
}

.option-item input[type="radio"] {
  margin-right: 15px;
  width: 20px;
  height: 20px;
  cursor: pointer;
  accent-color: var(--primary);
}

.option-text {
  font-size: 1.05rem;
  color: var(--text);
  font-weight: 500;
}

/* Info box */
.info-box {
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(10px);
  padding: 20px;
  border-radius: 12px;
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.info-box p {
  margin: 0;
  font-size: 0.95rem;
}

/* Monitor styles */
.stats-header {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  margin-bottom: 30px;
}

.stat-box {
  background: var(--background);
  padding: 20px;
  border-radius: 12px;
  text-align: center;
  border: 2px solid var(--border);
}

.stat-label {
  display: block;
  color: var(--text-light);
  font-size: 0.9rem;
  margin-bottom: 8px;
  font-weight: 500;
}

.stat-value {
  display: block;
  color: var(--primary);
  font-size: 2.5rem;
  font-weight: 700;
}

.stat-value.small {
  font-size: 1.5rem;
}

/* Results section */
.results-section {
  margin-top: 30px;
}

.results-section h3 {
  color: var(--text);
  margin-bottom: 20px;
  font-size: 1.3rem;
}

.results-table {
  overflow-x: auto;
  margin-bottom: 30px;
}

table {
  width: 100%;
  border-collapse: collapse;
  background: var(--surface);
}

thead {
  background: var(--background);
}

th {
  padding: 15px;
  text-align: left;
  font-weight: 600;
  color: var(--text);
  border-bottom: 2px solid var(--border);
}

td {
  padding: 15px;
  border-bottom: 1px solid var(--border);
}

tr:hover {
  background: var(--background);
}

.vote-count {
  font-weight: 600;
  color: var(--primary);
}

.percentage {
  font-weight: 700;
  color: var(--secondary);
}

/* Chart */
.chart-container {
  position: relative;
  height: 400px;
  margin-top: 30px;
  padding: 20px;
  background: var(--background);
  border-radius: 12px;
}

/* Auto refresh indicator */
.auto-refresh-indicator {
  margin-top: 20px;
  text-align: center;
  color: var(--text-light);
  font-size: 0.9rem;
  padding: 10px;
  background: var(--background);
  border-radius: 8px;
}

/* Footer */
footer {
  margin-top: 30px;
  text-align: center;
  color: white;
  font-size: 0.9rem;
  padding: 20px 0;
}

footer strong {
  font-weight: 700;
}

/* Responsive */
@media (max-width: 768px) {
  .survey-card, .monitor-card {
    padding: 25px;
  }
  
  .survey-title {
    font-size: 1.4rem;
  }
  
  header {
    flex-direction: column;
    align-items: flex-start;
  }
  
  .btn-secondary {
    width: 100%;
  }
  
  .chart-container {
    height: 300px;
  }
  
  .stat-value {
    font-size: 2rem;
  }
}

