:root{
  --bg: #fffaf5;
  --ink: #333;
  --accent: #f3567a; /* donut pink */
  --accent-2: #b5651d; /* bagel brown */
  --card: #ffffff;
  --shadow: 0 6px 18px rgba(0,0,0,.08);
  --bar-neutral: linear-gradient(90deg,#dfe9ff,#cfe0ff);
}

/* Global */
*{ box-sizing: border-box; }
html,body{ height:100%; }
body{
  margin:0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background:
    radial-gradient(12px 12px at 20% 10%, #ffe3ef 20%, transparent 21%),
    radial-gradient(10px 10px at 80% 30%, #ffe8c7 20%, transparent 21%),
    radial-gradient(8px 8px at 50% 70%, #e8f6ff 20%, transparent 21%),
    var(--bg);
  color: var(--ink);
  display:flex;
  align-items: flex-start;
  justify-content: center;
  padding: 2rem 1rem;
}

h3 { margin:0 0 .6rem 0; font-size:32px; }

.bottom {
    width:90%;
    margin: auto;
    padding-top: 30px;
}

input[type="radio"] {
  transform: scale(2.5); /* Adjust the scale value as needed */
  margin-right:10px;
  margin-top: 10px;
}


/* Layout container */
.container{
  width:100%;
  max-width:860px;
  background: var(--card);
  border-radius: 24px;
  box-shadow: var(--shadow);
  padding: 2rem 1.25rem;
  margin:auto;
}
.banner {
    margins:auto;
    padding-top:30px;
    height:90px;

}


/* Title */
.title{
  text-align:center;
  font-size: clamp(3.8rem, 4.5vw, 3.6rem);
  color: var(--accent-2);
  margin: 0 0 1rem 0;
  text-shadow: 0 2px #ffe3cf;
}

/* Poll form */
.poll-form{
  display:flex;
  align-items:center;
  justify-content:center;
  gap: 2.2rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}
.poll-option{
  font-size: clamp(3.2rem, 3.5vw, 3.0rem);
  display:flex;
  gap:.5rem;
  align-items:center;
  padding:.25rem .5rem;
  border-radius: 999px;
  background: #fff3f7;
  border: 1px dashed #ffc4d8;
}
.vote-btn{
  font-size: clamp(2.1rem, 4.3vw, 2.5rem);
  padding:.6rem 1.2rem;
  border:none;
  border-radius: 999px;
  background: linear-gradient(135deg, #ffa9c8, #ff7fb0);
  color:#fff;
  cursor:pointer;
  transition: transform .15s ease, box-shadow .15s ease;
  box-shadow: 0 6px 14px rgba(255,127,176,.35);
    content: "VOTE";
}
.vote-btn:hover{ transform: translateY(-1px); }

.vote-btn:active{ transform: translateY(0);
      background: linear-gradient(135deg, #cccccc, #dddddd);
      color:#000;
    content: "Voted!"; /* Change the text */

}

/* Results card */
.results{
  margin-top: 10px;
  padding: 1rem;
  border-radius: 18px;
  background: #fff;
  box-shadow: var(--shadow);
}

/* 2-col grid: row1 % | row2 bars | row3 images */
.results-grid{
  display:grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: auto auto auto; /* % row, bar row, image row */
  gap: 10px 20px;
  align-items: center;
  text-align:center;
}

/* Headline % */
.percent{
  margin:0;
  font-weight: 800;
  color: #666;
  font-size: clamp(4.6rem, 4vw, 4.2rem);
  letter-spacing: .5px;
}

.percent-donut{
  margin:0;
  font-weight: 800;
  color: var(--accent);
  font-size: clamp(4.6rem, 4vw, 4.2rem);
  letter-spacing: .5px;
}

.percent-bagel{
  margin:0;
  font-weight: 800;
  color: var(--accent-2);
  font-size: clamp(4.6rem, 4vw, 4.2rem);
  letter-spacing: .5px;
}

/* Bars */
.bar{
  height:36px;
  border-radius: 8px;
  background-repeat: repeat-x;
  background-size: contain; /* scales the donut/bagel tiles to bar height */
  background-color: #f5f7ff; /* fallback if image missing */
  box-shadow: inset 0 1px 2px rgba(0,0,0,.06);
}
.bar--neutral{
  background: var(--bar-neutral);
  background-repeat: no-repeat;
  background-size: auto;
}

/* Choice images */
.choice-img{
  display:block;
  margin:0 auto;
  height:auto;
  transition: transform .25s ease;
}
.choice-img:hover{ transform: scale(1.04); }

/* Total votes */
.total-votes{
  margin-top: 1.8rem;
  text-align:center;
  font-weight: 600;
  color:#666;
  font-size:3.5rem;
}

/* Share section (hidden by default until a vote) */
.share{ display:none; margin-top: 1.25rem; }
.share.is-visible{ display:block; }
.share h3{ margin:0 0 .6rem 0; font-size:32px; }
.share-buttons{
  display:flex;
  gap:14px;
  align-items:center;
  flex-wrap: wrap;
  font-size: 30px;
}
.btn-link{
  border:none;
  background: none;
  font: inherit;
  padding: 0 .25rem;
  cursor: pointer;
}
.copy-msg{
  display:none;
  margin-left:6px;
  color: #1f8b24;
}

/* Modal backdrop */
.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0,0,0,0.6);
  opacity: 0;
  transition: opacity 0.3s ease;
}

/* Modal visible */
.modal.show {
  display: block;
  opacity: 1;
}

/* Modal content box */
.modal-content {
  background: #fff7f0; /* solid pastel cream */
  margin: 10% auto;
  padding: 20px;
  border-radius: 16px;
  width: 80%;
  max-width: 750px;
  text-align: center;
  font-size: 1.8em;
  box-shadow: 0px 6px 20px rgba(0,0,0,0.3);
  transform: translateY(-20px);
  transition: transform 0.3s ease;
}

.modal.show .modal-content {
  transform: translateY(0);
}

/* Close button */
.close {
  color: #333;
  float: right;
  font-size: 28px;
  font-weight: bold;
  cursor: pointer;
}

.close:hover {
  color: #e67a7a;
}

/* About button */
.about-btn {
  display: block;
  margin: 30px auto;
  margin-top:30px;
  padding: 12px 24px;
  background: #f9a8d4; /* donut pink */
  border: none;
  border-radius: 24px;
  font-size: 36px;
  color: #000;
  cursor: pointer;
  transition: background 0.3s ease;

    z-index: 2000;
    width: auto;
    padding: 12px 24px;
    font-size: 2.75em;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
  }
}

/* === Animated Result Bars === */
.result-bar {
  height: 36px;
  margin: 8px 0;
  background-size: contain;
  background-repeat: repeat-x;
  transition: width 0.8s ease-in-out;
}

/* Animated scaling for images */
.result-img {
  transition: width 0.8s ease-in-out, height 0.8s ease-in-out;
}


.about-btn:hover {
  background: #ec4899;
}


/* Monthly breakdown */
.breakdown{ margin-top: 28px; }
.month-select{
  font-size: 2.1rem;
  padding:.4rem .6rem;
  border-radius: 10px;
  border:1px solid #e5d8cf;
  background:#fff;
}
.monthly-results{
  margin-top: .75rem;
  display: grid;
  gap: .6rem;
}
.month-row{
  display:grid;
  grid-template-columns: 220px 1fr;
  gap: .6rem;
  align-items:center;
}
.month-label{ font-size: 1rem; }


/* === Responsive Tweaks === */
@media (max-width: 668px) {
  body {
    font-size: 34px;
    margin: 1em;
  }

  h2 {
    font-size: 4.8em;
  }

  .vote-options {
    gap: 1em;
  }
  
  

  .result-col img.result-image {
    width: 250px;
  }

  .percent-label {
    font-size: 8.5em;
  }

  .bar {
    height: 28px; /* shrink bars a bit */
    background-size: auto 28px;
  }
}

@media (max-width: 480px) {
  body {
    font-size: 28px;
    margin: 0.5em;
  }

  h2 {
    font-size: 3.4em;
    margin-bottom: 1.5em;
  }

  .vote-options {
    flex-direction: column;
    align-items: center;
    font-size:50px;
    gap: 0.5em;
  }

  .results-grid {
    grid-template-columns: 1fr 1fr; /* keep 2-column side by side */
    gap: 1em;
  }

  .result-col img.result-image {
    width: 350px;
  }

  .percent-label {
    font-size: 4.2em;
  }

  .bar {
    height: 24px; /* smallest bar height on mobile */
    background-size: auto 24px;
  }

  .share {
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  .share button {
    width: 90%;
    font-size: 0.9em;
  }
}

/* === Sticky About Button === */
.about-btn {
  position: relative; /* default for desktop */
  margin: 20px auto;
  display: block;
}

@media (max-width: 768px) {
  .about-btn {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2000;
    width: auto;
    padding: 12px 24px;
    font-size: 1.1em;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
  }
}

/* === Animated Result Bars === */
.result-bar {
  height: 36px;
  margin: 8px 0;
  background-size: contain;
  background-repeat: repeat-x;
  transition: width 0.8s ease-in-out;
}

/* Animated scaling for images */
.result-img {
  transition: width 0.8s ease-in-out, height 0.8s ease-in-out;
}

