:root {
  --fv-primary: #2563eb;
  --fv-primary-hover: #1d4ed8;
  --fv-secondary: #4f46e5;
  --fv-surface: #ffffff;
  --fv-bg: #f3f4f6;
  --fv-text: #1f2937;
  --fv-text-muted: #6b7280;
  --fv-border: #e5e7eb;
  --fv-radius: 12px;
  --fv-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --fv-font: 'Inter', system-ui, -apple-system, sans-serif;
}

.festival-results {
  background: var(--fv-surface);
  border: 1px solid var(--fv-border);
  border-radius: var(--fv-radius);
  padding: 20px;
  box-shadow: var(--fv-shadow);
  font-family: var(--fv-font);
}

.festival-results h3 {
  margin-top: 0;
  color: var(--fv-text);
  font-size: 1.5rem;
  margin-bottom: 1rem;
}

.festival-results__row {
  display: flex;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid var(--fv-border);
}

.festival-results__row:last-child {
  border-bottom: none;
}

.festival-results__info {
  flex: 1;
}

.festival-results__name {
  font-weight: 600;
  color: var(--fv-text);
  font-size: 1.1rem;
}

.festival-results__meta {
  font-size: 0.9rem;
  color: var(--fv-text-muted);
}

.festival-results__bar-container {
  margin-top: 8px;
  background: var(--fv-bg);
  height: 8px;
  border-radius: 4px;
  overflow: hidden;
}

.festival-results__bar {
  height: 100%;
  background: linear-gradient(90deg, var(--fv-primary), var(--fv-secondary));
  width: 0;
  transition: width 1s ease-out;
}

/* Voting Form */
.fv-vote {
  max-width: 600px;
  margin: 2rem auto;
  padding: 2rem;
  background: var(--fv-surface);
  border-radius: var(--fv-radius);
  box-shadow: var(--fv-shadow);
  font-family: var(--fv-font);
  border: 1px solid var(--fv-border);
}

.fv-vote__title {
  margin: 0 0 0.5rem 0;
  font-size: 1.75rem;
  color: var(--fv-text);
}

.fv-vote__steps {
  margin-bottom: 1.5rem;
  color: var(--fv-text-muted);
  font-size: 0.95rem;
}

.fv-field {
  margin-bottom: 1.5rem;
}

.fv-field label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--fv-text);
}

.fv-input, .fv-select {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid var(--fv-border);
  border-radius: 8px;
  font-size: 1rem;
  transition: border-color 0.2s, box-shadow 0.2s;
  background: #fff;
}

.fv-input:focus, .fv-select:focus {
  outline: none;
  border-color: var(--fv-primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.fv-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.5rem;
  background: var(--fv-primary);
  color: white;
  border: none;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
  font-size: 1rem;
}

.fv-btn:hover {
  background: var(--fv-primary-hover);
  transform: translateY(-1px);
}

.fv-msg {
  margin-top: 1rem;
  padding: 1rem;
  border-radius: 8px;
  font-weight: 500;
  display: none;
}

.fv-msg.error {
  display: block;
  background: #fef2f2;
  color: #991b1b;
  border: 1px solid #fecaca;
}

.fv-msg.ok {
  display: block;
  background: #f0fdf4;
  color: #166534;
  border: 1px solid #bbf7d0;
}

/* Selected Candidate */
.fv-selected {
  display: flex;
  gap: 1rem;
  align-items: center;
  padding: 1rem;
  background: var(--fv-bg);
  border-radius: var(--fv-radius);
  margin-bottom: 1.5rem;
}

.fv-selected img {
  width: 80px;
  height: 80px;
  border-radius: 8px;
  object-fit: cover;
}

/* Grid */
.fv-grid {
  display: grid;
  gap: 24px;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  font-family: var(--fv-font);
}

.fv-card {
  background: var(--fv-surface);
  border-radius: var(--fv-radius);
  overflow: hidden;
  box-shadow: var(--fv-shadow);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  border: 1px solid var(--fv-border);
  display: flex;
  flex-direction: column;
}

.fv-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

.fv-card__media {
  position: relative;
  padding-top: 75%; /* 4:3 Aspect Ratio */
}

.fv-card__media img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.fv-card__body {
  padding: 1.25rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.fv-card__title {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: var(--fv-text);
}

.fv-card__meta {
  font-size: 0.9rem;
  color: var(--fv-text-muted);
  margin-bottom: 1rem;
  flex: 1;
}

.fv-badge {
  display: inline-block;
  background: var(--fv-bg);
  padding: 0.25rem 0.75rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.8rem;
  color: var(--fv-text);
  margin-right: 0.5rem;
}

/* Modal */
.fv-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  z-index: 10000;
}

.fv-modal.is-active {
  display: flex;
  animation: fvFadeIn 0.2s ease-out;
}

.fv-modal__dialog {
  background: var(--fv-surface);
  border-radius: 16px;
  width: 100%;
  max-width: 500px;
  padding: 2rem;
  position: relative;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
  animation: fvSlideUp 0.3s ease-out;
}

.fv-modal__close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: transparent;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--fv-text-muted);
  transition: color 0.2s;
}

.fv-modal__close:hover {
  color: var(--fv-text);
}

.fv-modal__content {
  text-align: center;
}

.fv-modal__img {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  object-fit: cover;
  margin-bottom: 1rem;
  border: 4px solid var(--fv-bg);
}

@keyframes fvFadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes fvSlideUp { from { transform: translateY(20px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

/* QR */
.festival-qr {
  text-align: center;
  padding: 2rem;
  background: var(--fv-surface);
  border-radius: var(--fv-radius);
  border: 1px solid var(--fv-border);
  display: inline-block;
}

.festival-qr__title {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 1rem;
}
