html, body {
    height: 100%;
    margin: 0;
    padding: 0;
    background: transparent;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    overflow: hidden;
  }
  .wrapper {
    display: flex;
    flex-direction: column;
    background: transparent;
    margin: 2px;
    padding: 4px;
    height: calc(100vh - 60px);
    overflow: visible;
    box-sizing: border-box;
  }
  #header {
    margin: 8px 4px 16px 4px;
    font-size: clamp(24px, 3.5vw, 36px);
    color: #1a1a1a;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    text-align: center;
    font-weight: 700;
    letter-spacing: -0.01em;
    line-height: 1.1;
  }
  #labels {
    background-color: none;
    display: flex;
    gap: 8px;
    justify-content: space-around;
    flex-shrink: 0;
    padding: 12px 8px;
    min-height: 50px;
    position: relative;
    z-index: 10;
  }
  #bars {
    flex: 1;
    display: flex;
    align-items: flex-end;
    gap: clamp(6px, 1.5vw, 16px);
    padding: 25px 8px 0 8px;
    min-height: 80px;
    max-height: calc(100vh - 150px);
  }
  .equalsize {
  flex-grow:1
  }
  .shadow {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  }
  .bar {
    height: 0%;
    bottom: 0;
    width: 100%;
    position: absolute;
    will-change: height;
    transition: height 0.6s cubic-bezier(0.23, 1, 0.32, 1);
    border-top-left-radius: 12px;
    border-top-right-radius: 12px;
    background: var(--bar-color);
    overflow: visible;
    min-height: 30px;
  }
  .bar:hover {
    filter: brightness(1.1);
  }
  .proportion {
    display: inline-block;
    position: relative;
    height: 100%;
    min-height: 80px;
    margin: 0px;
    width: 98%;
  }
  .valbg {
    background: #ffffff;
    width: 50px;
    height: 50px;
    min-width: 40px;
    min-height: 40px;
    border-radius: 50%;
    position: absolute;
    top: -25px;
    left: 50%;
    transform: translateX(-50%);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    border: 2px solid #ffffff;
    transition: transform 0.2s ease;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  .valbg:hover {
    transform: translateX(-50%) scale(1.05);
  }
  .minshadow {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  }
  .value {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    font-size: clamp(14px, calc(1.5vw + .3vh), 24px);
    color: #1a1a1a;
    text-align: center;
    font-weight: 700;
    line-height: 1;
    font-variant-numeric: tabular-nums;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
  }
  .barlabel {
    width: 100%;
    margin: auto;
    padding: 8px 4px;
    font-size: clamp(12px, calc(1.2vw + .4vh), 16px);
    color: #2d3748;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    text-align: center;
    font-weight: 700;
    letter-spacing: 0.01em;
    line-height: 1.2;
    word-wrap: break-word;
    hyphens: auto;
    background-color: rgba(255, 255, 255, 0.9);
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  }
  #bar0 {
    --bar-color: #4F46E5;
  }
  #bar1 {
    --bar-color: #0891B2;
  }
  #bar2 {
    --bar-color: #DC2626;
  }
  #bar3 {
    --bar-color: #059669;
  }
  #bar4 {
    --bar-color: #D97706;
  }
  #bar5 {
    --bar-color: #7C2D12;
  }
  /* Timer styling */
  #timer {
    font-family: helvetica;
    font-size: 18px;
    color: white; /* Changed from #333 to white for visibility on dark overlay */
    text-align: center;
    margin: 10px 0;
    padding: 10px;
    border-radius: 8px;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
    position: relative;
    z-index: 20;
    font-weight: bold;
  }

    /* Vote overlay styling - fills the full screen */
  #voteoverlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 1);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: helvetica;
    z-index: 10;
  }
  #covertext {
    text-align: center;
    font-size: 3em;
    font-weight: bold;
    line-height: 1.2;
  }
  #covertext #timer {
    font-size: 0.8em;
    margin-top: 20px;
    padding: 10px 20px;
    display: inline-block;
    color:white
  }

  /* Aplomb styles (scoped) */
  .aplomb .container { background: #fff; border-radius: 24px; box-shadow: 0 8px 32px rgba(0,0,0,0.10); padding: 32px; max-width: 900px; margin: 20px auto; text-align: center; }
  .aplomb .title h1 { font-size: 2em; font-weight: 700; color: #222; margin-bottom: 0.2em; }
  .aplomb .subtitle { font-size: 1.1em; color: #888; margin-bottom: 2em; }
  .aplomb .bar-row { display: flex; align-items: flex-end; justify-content: center; gap: 0; margin-bottom: 0; }
  .aplomb .barcontainer { flex: 1 1 0; display: flex; flex-direction: column; align-items: center; margin: 0; position: relative; min-width: 120px; }
  .aplomb .bar { width: 100px; border-radius: 8px 8px 0 0; box-shadow: 0 4px 16px rgba(0,0,0,0.10); position: relative; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; overflow: visible; margin-bottom: -8px; opacity: 1; }
  .aplomb .bar-label { width: 100px; background: inherit; color: #fff; font-weight: 700; font-size: 1.1em; border-radius: 0 0 8px 8px; padding: 8px 0; margin-top: 0; box-shadow: 0 2px 8px rgba(0,0,0,0.08); }
  .aplomb .bar-icon { width: 48px; height: 48px; background: rgba(255,255,255,0.15); border-radius: 50%; display: flex; align-items: center; justify-content: center; margin: 0 auto 8px auto; font-size: 2em; color: #fff; box-shadow: 0 2px 8px rgba(0,0,0,0.08); }
  .aplomb .bar-value { font-size: 2em; font-weight: 700; color: #fff; margin-bottom: 8px; text-shadow: 0 2px 8px rgba(0,0,0,0.10); }
  /* Loading animation for bars */
  @keyframes pulse {
    0%, 100% {
      transform: scale(1);
    }
    50% {
      transform: scale(1.02);
    }
  }
  
  .wrapper {
    animation: fadeIn 0.6s ease-out;
  }
  
  @keyframes fadeIn {
    from {
      opacity: 0;
      transform: translateY(20px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }
  
  /* Responsive improvements */
  @media (max-width: 768px) {
    .wrapper {
      margin: 2px;
      padding: 6px;
    }
    
    #header {
      font-size: clamp(18px, 4vw, 24px);
      margin: 4px 2px 8px 2px;
    }
    
    .valbg {
      width: 40px;
      height: 40px;
      min-width: 30px;
      min-height: 30px;
      top: -20px;
    }
    
    .bar {
      min-height: 25px;
    }
    
    .value {
      font-size: clamp(11px, 2.5vw, 16px);
    }
    
    #bars {
      gap: clamp(2px, 0.8vw, 6px);
      padding: 0 2px;
      min-height: 80px;
    }
    
    .proportion {
      min-height: 60px;
    }
  }
  
  @media (max-width: 900px) {
    .aplomb .container { max-width: 100vw; }
    .aplomb .bar-row { flex-wrap: wrap; }
    .aplomb .barcontainer { min-width: 90px; }
    .aplomb .bar, .aplomb .bar-label { width: 80px; }
    .aplomb .bar-icon { width: 36px; height: 36px; font-size: 1.5em; }
  }