.fccv-vote {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  background: #ffffff;
  max-width: 420px;
}

.fccv-vote__variant {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #6b7280;
}

.fccv-vote__badge {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: #fee2e2;
  color: #991b1b;
  border-radius: 999px;
  padding: 2px 6px;
  align-self: flex-start;
}

.fccv-vote--contest {
  border-color: #fecaca;
}

.fccv-vote__button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: #f59e0b;
  color: #111827;
  border: none;
  padding: 10px 16px;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.fccv-vote__button:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 6px 14px rgba(245, 158, 11, 0.3);
}

.fccv-vote__button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.fccv-vote__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 13px;
  color: #6b7280;
}

.fccv-vote__login {
  color: #2563eb;
  text-decoration: none;
}

.fccv-vote__login:hover {
  text-decoration: underline;
}

.fccv-vote__status {
  font-size: 13px;
  color: #374151;
  min-height: 18px;
}

.fccv-vote__status.is-error {
  color: #b91c1c;
}

.fccv-vote__status.is-success {
  color: #15803d;
}

.fccv-ranking {
  margin-top: 12px;
  padding: 12px;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  background: #ffffff;
}

.fccv-ranking--global {
  border-color: #f5c46b;
}

.fccv-vote--original .fccv-vote__button {
  background: #14b8a6;
  color: #0f172a;
}

.fccv-vote--original .fccv-vote__button:hover:not(:disabled) {
  box-shadow: 0 6px 14px rgba(20, 184, 166, 0.3);
}

.fccv-vote--original .fccv-vote__variant {
  color: #0f766e;
}

.fccv-ranking--original {
  border-color: #7dd3c8;
}

.fccv-vote--fanfiction .fccv-vote__button {
  background: #a855f7;
  color: #ffffff;
}

.fccv-vote--fanfiction .fccv-vote__button:hover:not(:disabled) {
  box-shadow: 0 6px 14px rgba(168, 85, 247, 0.35);
}

.fccv-vote--fanfiction .fccv-vote__variant {
  color: #7e22ce;
}

.fccv-ranking--fanfiction {
  border-color: #c084fc;
}

.fccv-ranking__title {
  margin: 0 0 8px;
  font-size: 16px;
}

.fccv-ranking__list {
  margin: 0;
  padding-left: 20px;
}

.fccv-ranking__item {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 4px 0;
}

.fccv-ranking__item.is-contest {
  font-weight: 600;
}

.fccv-ranking__badge {
  margin-left: 8px;
  padding: 2px 6px;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: #fee2e2;
  color: #991b1b;
  border-radius: 999px;
}

.fccv-ranking__count {
  color: #6b7280;
  font-size: 13px;
  margin-left: auto;
}

.fccv-ranking__empty {
  color: #6b7280;
  font-style: italic;
}

.fccv-tabs {
  margin-top: 14px;
}

.fccv-tabs__title {
  margin: 0 0 10px;
  font-size: 18px;
}

.fccv-tabs__nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
}

.fccv-tabs__tab {
  border: 1px solid #e5e7eb;
  background: #ffffff;
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 12px;
  cursor: pointer;
}

.fccv-tabs__tab.is-active {
  background: #111827;
  color: #ffffff;
  border-color: #111827;
}

.fccv-tabs__panel {
  display: none;
}

.fccv-tabs__panel.is-active {
  display: block;
}

.fccv-stats {
  margin-top: 16px;
  padding: 16px;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  background: #ffffff;
}

.fccv-stats__title {
  margin: 0 0 12px;
  font-size: 16px;
}

.fccv-stats__grid {
  display: grid;
  gap: 10px;
}

.fccv-stats__row {
  display: grid;
  grid-template-columns: 90px 1fr 70px;
  gap: 10px;
  align-items: center;
  font-size: 13px;
}

.fccv-stats__bar {
  background: #f3f4f6;
  border-radius: 999px;
  height: 8px;
  overflow: hidden;
}

.fccv-stats__bar span {
  display: block;
  height: 100%;
  background: #f59e0b;
}

.fccv-stats__value {
  text-align: right;
  color: #4b5563;
}

.fccv-stats__subtitle {
  margin: 16px 0 8px;
  font-size: 14px;
}

.fccv-stats__history {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 6px;
  font-size: 13px;
}

.fccv-stats__history li {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  background: #f9fafb;
  padding: 6px 10px;
  border-radius: 8px;
}

.fccv-stats__history-name {
  font-weight: 600;
  color: #111827;
}

.fccv-stats__history-votes {
  color: #16a34a;
}

.fccv-stats__history-date {
  color: #6b7280;
  margin-left: auto;
}

/* Coin Toss Animation */
.fccv-toss-coin {
  position: absolute;
  width: 24px;
  height: 24px;
  background: #f59e0b;
  border-radius: 50%;
  pointer-events: none;
  animation: fccv-toss var(--fccv-dur, 1s) ease-out forwards;
  z-index: 999999;
  box-shadow: inset 0 -3px 6px rgba(0, 0, 0, 0.2), 0 3px 6px rgba(0, 0, 0, 0.15), inset 0 2px 2px rgba(255, 255, 255, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  border: 1px solid #d97706;
}

.fccv-toss-coin::after {
  content: "+1";
  text-shadow: 0 1px 1px rgba(0, 0, 0, 0.3);
}

@keyframes fccv-toss {
  0% {
    transform: translate(0, 0) scale(0.3);
    opacity: 1;
  }

  50% {
    transform: translate(var(--fccv-x, 0px), -60px) scale(1.2);
    opacity: 1;
  }

  100% {
    transform: translate(calc(var(--fccv-x, 0px) * 1.5), -100px) scale(1);
    opacity: 0;
  }
}