body {
  background: #f0f2f5;
  font-family: 'Montserrat', sans-serif;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  margin: 0;
  padding: 20px;
  box-sizing: border-box;
}

/* MACHINE */
.evm-wrapper {
  width: 100%;
  max-width: 320px;
  background: #ffffff;
  border-radius: 8px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1), 0 2px 5px rgba(0, 0, 0, 0.05);
  padding: 10px;
  position: relative;
  margin-top: 20px;
}

/* TOP TAB */
.top-tab {
  position: absolute;
  top: -7px;
  right: 30px;
  width: 74px;
  height: 18px;
  background: #00568f;
  border-radius: 4px 4px 0 0;
  box-shadow: inset 0 -3px 5px rgba(0, 0, 0, 0.2);
}

/* STATUS HEADER */
.evm-header {
  display: flex;
  justify-content: space-between;
  padding: 15px 25px 15px;
  font-size: 0.70rem;
  font-weight: 800;
  color: #1a1a1a;
}

.status-ready,
.status-ballot {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* LEDS */
.led {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
  box-shadow: inset -2px -2px 4px rgba(0, 0, 0, 0.4), inset 2px 2px 4px rgba(255, 255, 255, 0.4);
}

.led.green.on {
  background: #00ff00;
  box-shadow: 0 0 8px #00ff00, inset 0 0 3px rgba(255, 255, 255, 0.7);
}

.led.black {
  background: #111;
  box-shadow: inset -1px -1px 3px rgba(0, 0, 0, 0.8), inset 1px 1px 3px rgba(255, 255, 255, 0.2);
}

.led.red {
  background: #a00000;
  width: 12px;
  height: 12px;
  box-shadow: inset -1px -1px 3px rgba(0, 0, 0, 0.5), inset 1px 1px 3px rgba(255, 255, 255, 0.2);
}

.voteRow.active .led.red {
  background: #ff0000;
  box-shadow: 0 0 10px 2px #ff0000, inset 0 0 4px rgba(255, 255, 255, 0.6);
}

/* BALLOT SECTION */
.ballot-section {
  display: flex;
  padding: 0 2px 5px 2px;
}

/* LEFT PANEL */
.left-panel {
  flex: 1.8;
  background: #f4f4f4;
  border: 1px solid #d0d0d0;
  border-top-right-radius: 20px;
  border-top-left-radius: 4px;
  border-bottom-left-radius: 4px;
  border-bottom-right-radius: 0px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: inset -2px 0 5px rgba(0, 0, 0, 0.02);
}

/* RIGHT PANEL */
.right-panel {
  flex: 1.2;
  display: flex;
  flex-direction: column;
}

/* ROWS */
.left-row,
.voteRow {
  height: 65px;
  box-sizing: border-box;
}

.left-row {
  display: flex;
  align-items: stretch;
  border-bottom: 1px solid #e0e0e0;
}

.left-row:last-child {
  border-bottom: none;
}

.col-sno {
  width: 32px;
  text-align: center;
  font-weight: 700;
  font-size: 0.85rem;
  color: #222;
  border-right: 1px solid #e0e0e0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.col-cand {
  flex: 1;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 8px;
}

.cand-text {
  font-size: 0.65rem;
  font-weight: 700;
  line-height: 1.3;
  color: #1a1a1a;
}

.cand-symbol img {
  height: 24px;
  width: 24px;
  object-fit: contain;
}

.voteRow {
  display: flex;
  justify-content: space-around;
  align-items: center;
  border-bottom: 1px solid #e0e0e0;
  padding-left: 10px;
}

.voteRow:last-child {
  border-bottom: none;
}

/* BUTTON */
.vote-btn {
  width: 75px;
  height: 28px;
  background: linear-gradient(to bottom, #006eb8 0%, #004c82 100%);
  border-radius: 14px;
  border: none;
  cursor: pointer;
  box-shadow: inset 0 -2px 0 rgba(0, 0, 0, 0.3), inset 0 2px 2px rgba(255, 255, 255, 0.3), 0 3px 5px rgba(0, 0, 0, 0.2);
  transition: all 0.1s ease;
  flex-shrink: 0;
}

.vote-btn:active {
  transform: translateY(2px);
  box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.4), 0 1px 2px rgba(0, 0, 0, 0.1);
  background: linear-gradient(to bottom, #004c82 0%, #006eb8 100%);
}

/* RESULT PAGE & SUCCESS SCREEN */
.hidden {
  display: none !important;
}

#videoContainer {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #ffffff;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 10;
}

#voteVideo {
  width: 100%;
  max-width: 100%;
  height: 100%;
  object-fit: contain;
  /* ensures video is fully visible without cropping */
}

.success-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #efefef;
  display: flex;
  flex-direction: column;
  justify-content: center;
  /* keep completely centered */
  align-items: center;
  z-index: 20;
}

.success-content {
  text-align: center;
  width: 100%;
  padding: 0 20px;
  box-sizing: border-box;
}

/* Animated SVG Check */
.check-wrap {
  width: 50px;
  height: 50px;
  margin: 0 auto 20px;
}

.check-svg {
  width: 100%;
  height: 100%;
}

/* Circle draws itself */
.check-circle-anim {
  stroke-dasharray: 276;
  stroke-dashoffset: 276;
  animation: draw-circle 0.6s ease forwards;
}

/* Tick strokes in after circle */
.check-tick {
  stroke-dasharray: 70;
  stroke-dashoffset: 70;
  animation: draw-tick 0.4s ease forwards 0.55s;
}

@keyframes draw-circle {
  to { stroke-dashoffset: 0; }
}

@keyframes draw-tick {
  to { stroke-dashoffset: 0; }
}

.success-title {
  color: #16a34a;
  font-size: 1.25rem;
  margin-bottom: 10px;
  font-weight: 800;
}

.success-sub {
  font-size: 0.9rem;
  color: #555;
  margin-bottom: 30px;
  font-weight: 600;
}

.btn-group {
  margin-top: 20px;
  display: flex;
  justify-content: center;
  gap: 15px;
}

.btn-group button {
  background: #333;
  color: white;
  border: none;
  padding: 12px 20px;
  border-radius: 8px;
  font-size: 1rem;
  cursor: pointer;
  font-weight: 700;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  transition: all 0.2s;
}

.btn-group button:active {
  transform: translateY(2px);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.footer {
  position: absolute;
  bottom: 20px;
  font-size: 0.50rem;
  font-weight: 600;
  color: #888;
  width: 100%;
  text-align: center;
}