/* =========================================================
   VOTING COMPETITION — front-end styles
   Matches dashboard theme: #3d0612 maroon + #ffb703 gold neon
========================================================= */

.vcomp-wrap {
  --vc-primary: #3d0612;
  --vc-primary-light: #5c0e1f;
  --vc-primary-lighter: #7a1a2e;
  --vc-neon: #ffb703;
  --vc-neon-glow: rgba(255, 183, 3, 0.5);
  --vc-bg-soft: #fbeef0;
  --vc-radius: 18px;
  --vc-shadow: 0 6px 24px rgba(61, 6, 18, 0.12);
  --vc-shadow-hover: 0 14px 36px rgba(61, 6, 18, 0.22);

  max-width: 1200px;
  margin: 0 auto;
  padding: 20px 16px 60px;
  font-family: 'Poppins', 'Inter', sans-serif;
  color: #2b2b2b;
}

.vcomp-login-banner {
  background: linear-gradient(120deg, var(--vc-primary), var(--vc-primary-light));
  color: #fff;
  padding: 16px 22px;
  border-radius: 12px;
  margin-bottom: 28px;
  font-weight: 500;
  box-shadow: var(--vc-shadow);
}
.vcomp-login-banner a { color: var(--vc-neon); font-weight: 700; text-decoration: underline; }

.vcomp-title {
  color: var(--vc-primary);
  font-weight: 800;
  font-size: 26px;
  margin: 36px 0 22px;
  position: relative;
  display: inline-block;
}
.vcomp-title::after {
  content: "";
  position: absolute;
  left: 0; bottom: -8px;
  width: 56px; height: 4px;
  border-radius: 4px;
  background: linear-gradient(90deg, var(--vc-neon), var(--vc-primary));
  box-shadow: 0 0 10px var(--vc-neon-glow);
}

.vcomp-empty { text-align: center; padding: 60px 20px; color: #777; font-size: 18px; }

/* ---------- Podium (Top 3) ---------- */
.vcomp-podium {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
  align-items: end;
  margin-bottom: 24px;
}

.vcomp-podium-card {
  background: #fff;
  border-radius: var(--vc-radius);
  box-shadow: var(--vc-shadow);
  padding: 20px;
  text-align: center;
  position: relative;
  border: 2px solid transparent;
  transition: all 0.3s ease;
}
.vcomp-podium-card:hover { transform: translateY(-6px); box-shadow: var(--vc-shadow-hover); }

.vcomp-podium-card.rank-1 {
  order: 2;
  border-color: var(--vc-neon);
  box-shadow: 0 0 0 1px rgba(255,183,3,0.3), var(--vc-shadow-hover), 0 0 30px rgba(255,183,3,0.25);
  transform: scale(1.06);
  z-index: 2;
}
.vcomp-podium-card.rank-2 { order: 1; }
.vcomp-podium-card.rank-3 { order: 3; }

.vcomp-medal {
  font-size: 40px;
  line-height: 1;
  margin-bottom: 10px;
  filter: drop-shadow(0 2px 6px rgba(0,0,0,0.2));
}

.vcomp-embed {
  position: relative;
  width: 100%;
  padding-top: 56.25%; /* 16:9 */
  border-radius: 12px;
  overflow: hidden;
  background: #000;
  margin-bottom: 14px;
}
.vcomp-embed iframe,
.vcomp-embed video {
  position: absolute; top: 0; left: 0;
  width: 100%; height: 100%;
  border: none;
}
.vcomp-novideo {
  padding: 40px 0;
  text-align: center;
  color: #999;
  background: var(--vc-bg-soft);
  border-radius: 12px;
  margin-bottom: 14px;
}

.vcomp-name { font-size: 17px; font-weight: 700; color: var(--vc-primary); margin: 6px 0 2px; }
.vcomp-participant { font-size: 13px; color: #777; margin: 0 0 10px; }

.vcomp-votecount {
  font-weight: 800;
  color: var(--vc-primary);
  margin-bottom: 12px;
  font-size: 15px;
}
.vcomp-votecount .vcomp-count-num {
  font-size: 20px;
  text-shadow: 0 0 10px rgba(255,183,3,0.35);
}

.vcomp-vote-btn {
  width: 100%;
  background: linear-gradient(135deg, var(--vc-primary), var(--vc-primary-light));
  color: #fff;
  border: none;
  border-radius: 10px;
  padding: 12px 20px;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.25s ease;
  box-shadow: 0 6px 16px rgba(61,6,18,0.3);
}
.vcomp-vote-btn:hover { transform: translateY(-2px); box-shadow: 0 10px 22px rgba(61,6,18,0.4), 0 0 16px rgba(255,183,3,0.25); }
.vcomp-vote-btn:disabled { cursor: not-allowed; opacity: 0.7; transform: none; }

.vcomp-vote-btn.voted {
  background: linear-gradient(135deg, var(--vc-neon), #e29b00);
  color: var(--vc-primary);
  box-shadow: 0 0 16px rgba(255,183,3,0.4);
}
.vcomp-vote-btn.voted::before { content: "✓ "; }

/* ---------- All Entries Grid ---------- */
.vcomp-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 22px;
}

.vcomp-card {
  background: #fff;
  border-radius: var(--vc-radius);
  box-shadow: var(--vc-shadow);
  padding: 18px;
  text-align: center;
  position: relative;
  border: 1px solid rgba(61,6,18,0.06);
  transition: all 0.3s ease;
}
.vcomp-card:hover { transform: translateY(-6px); box-shadow: var(--vc-shadow-hover); }

.vcomp-rank {
  position: absolute;
  top: 14px; left: 14px;
  background: var(--vc-primary);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 20px;
  z-index: 3;
}

/* Toast */
.vcomp-toast {
  position: fixed;
  bottom: 26px; left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--vc-primary);
  color: #fff;
  padding: 14px 26px;
  border-radius: 30px;
  font-weight: 600;
  box-shadow: 0 8px 24px rgba(61,6,18,0.4), 0 0 20px rgba(255,183,3,0.2);
  opacity: 0;
  pointer-events: none;
  transition: all 0.35s ease;
  z-index: 9999;
}
.vcomp-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ---------- Notices ---------- */
.vcomp-notice {
  padding: 14px 20px;
  border-radius: 12px;
  margin-bottom: 22px;
  font-weight: 500;
}
.vcomp-notice-success { background: #eafaf0; color: #1e7a45; border-left: 4px solid #2fb767; }
.vcomp-notice-error { background: #fdeeee; color: #a4222a; border-left: 4px solid #d64545; }

/* ---------- Submission Form ---------- */
.vcomp-submit-form {
  background: #fff;
  border-radius: var(--vc-radius);
  box-shadow: var(--vc-shadow);
  padding: 30px;
  max-width: 560px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.vcomp-submit-form label {
  font-weight: 700;
  color: var(--vc-primary);
  margin-top: 12px;
  font-size: 14px;
}
.vcomp-submit-form input[type="text"],
.vcomp-submit-form input[type="url"],
.vcomp-submit-form input[type="file"] {
  border: 1px solid #e5d9d9;
  border-radius: 10px;
  padding: 12px 14px;
  font-size: 14px;
  width: 100%;
  box-sizing: border-box;
}
.vcomp-submit-form input:focus {
  outline: none;
  border-color: var(--vc-primary);
  box-shadow: 0 0 0 4px rgba(61,6,18,0.12);
}
.vcomp-or {
  text-align: center;
  color: #999;
  font-size: 12px;
  margin: 10px 0;
  text-transform: uppercase;
  letter-spacing: 1px;
}
.vcomp-submit-btn { margin-top: 20px; width: auto; align-self: flex-start; padding: 13px 32px; }

.vcomp-subtitle { color: var(--vc-primary); font-weight: 700; font-size: 18px; margin: 34px 0 14px; }

.vcomp-my-list { display: flex; flex-direction: column; gap: 10px; max-width: 560px; }
.vcomp-my-item {
  background: #fff;
  border-radius: 12px;
  box-shadow: var(--vc-shadow);
  padding: 12px 18px;
  display: flex;
  align-items: center;
  gap: 14px;
}
.vcomp-my-title { font-weight: 600; flex: 1; }
.vcomp-my-votes { color: var(--vc-primary); font-weight: 700; font-size: 13px; }

.vcomp-badge {
  font-size: 11px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}
.vcomp-badge-live { background: #eafaf0; color: #1e7a45; }
.vcomp-badge-pending { background: #fff8e5; color: #a17400; }

/* ---------- Results Dashboard ---------- */
.vcomp-results-table {
  background: #fff;
  border-radius: var(--vc-radius);
  box-shadow: var(--vc-shadow);
  overflow: hidden;
}
.vcomp-results-head,
.vcomp-results-row {
  display: grid;
  grid-template-columns: 70px 2fr 1.4fr 90px 90px;
  gap: 12px;
  align-items: center;
  padding: 14px 20px;
}
.vcomp-wrap .vcomp-results-head span:nth-child(6),
.vcomp-wrap .vcomp-results-row span:nth-child(6) { display: block; }
.vcomp-results-head:has(span:nth-child(6)),
.vcomp-results-row:has(span:nth-child(6)) {
  grid-template-columns: 70px 2fr 1.4fr 90px 90px 1.4fr;
}
.vcomp-results-head {
  background: var(--vc-primary);
  color: #fff;
  font-weight: 700;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}
.vcomp-results-row { border-bottom: 1px solid #f1e6e6; transition: background 0.2s ease; }
.vcomp-results-row:last-child { border-bottom: none; }
.vcomp-results-row:hover { background: var(--vc-bg-soft); }
.vcomp-results-rank { font-weight: 800; font-size: 16px; }
.vcomp-results-name { font-weight: 600; color: var(--vc-primary); }
.vcomp-results-votes { font-weight: 800; color: var(--vc-primary); font-size: 16px; text-shadow: 0 0 8px rgba(255,183,3,0.3); }

.vcomp-voters-details summary {
  cursor: pointer;
  font-weight: 600;
  color: var(--vc-primary);
  font-size: 13px;
}
.vcomp-voters-details ul { margin: 8px 0 0; padding-left: 18px; font-size: 13px; }
.vcomp-voters-details li { margin-bottom: 4px; }
.vcomp-voters-details small { color: #999; }

/* ---------- Hub Tabs ---------- */
.vcomp-hub { max-width: 1200px; margin: 0 auto; padding: 20px 16px 60px; }

.vcomp-tabs {
  display: flex;
  gap: 8px;
  background: #fff;
  border-radius: 16px;
  padding: 8px;
  box-shadow: 0 6px 24px rgba(61, 6, 18, 0.1);
  margin-bottom: 10px;
  max-width: 560px;
}

.vcomp-tab-btn {
  flex: 1;
  border: none;
  background: transparent;
  color: #6b6b6b;
  font-weight: 700;
  font-size: 15px;
  padding: 12px 16px;
  border-radius: 11px;
  cursor: pointer;
  transition: all 0.25s ease;
}

.vcomp-tab-btn:hover { background: #fbeef0; color: #3d0612; }

.vcomp-tab-btn.active {
  background: linear-gradient(135deg, #3d0612, #5c0e1f);
  color: #fff;
  box-shadow: 0 6px 16px rgba(61, 6, 18, 0.3), 0 0 14px rgba(255,183,3,0.15);
}

.vcomp-tab-panel { display: none; animation: vcompFadeIn 0.3s ease; }
.vcomp-tab-panel.active { display: block; }

.vcomp-hub .vcomp-wrap { padding: 0; max-width: none; }

@keyframes vcompFadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ---------- Responsive ---------- */
@media (max-width: 720px) {
  .vcomp-tabs { max-width: 100%; }
  .vcomp-tab-btn { font-size: 13px; padding: 10px 8px; }

  .vcomp-podium { grid-template-columns: 1fr; }
  .vcomp-podium-card.rank-1,
  .vcomp-podium-card.rank-2,
  .vcomp-podium-card.rank-3 { order: initial; transform: none; }
  .vcomp-podium-card.rank-1 { transform: none; }

  .vcomp-results-head { display: none; }
  .vcomp-results-row {
    grid-template-columns: 1fr !important;
    gap: 4px;
    padding: 16px 18px;
  }
  .vcomp-results-row span::before {
    content: attr(data-label);
    font-weight: 700;
    color: #999;
    font-size: 11px;
    text-transform: uppercase;
    margin-right: 6px;
  }
}
