:root{
  --navy:#002147;
  --gold:#FFD231;
  --card-shadow:0 10px 30px rgba(0,0,0,.12);
}

*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0;
  font-family:system-ui,-apple-system,Segoe UI,Roboto,Arial,sans-serif;
  background:#EEF2F5;
  color:#111;
  overflow-x:hidden;
}

/* Top bar */
.navbar{
  position:sticky; top:0; z-index:50;
  display:flex; align-items:center; justify-content:space-between;
  padding:10px 16px; background:var(--navy); color:#fff;
  box-shadow:0 2px 8px rgba(0,0,0,.15);
}
.nav-left{display:flex; align-items:center; gap:10px}
.logo{display:block; height:32px; width:auto; object-fit:contain}
.logo-uls{height:36px}
.logo-rnb{height:32px}
.title{font-weight:700; font-size:18px; margin-left:6px}
.manage-link{color:#fff; text-decoration:none; font-weight:700; opacity:.95; margin-right:8px}
.manage-link:hover{opacity:1}
.sound-btn{
  appearance:none; border:0; border-radius:8px; padding:8px 10px;
  font-weight:700; cursor:pointer;
  background:#fff; color:#111;
}

/* Page bounds */
.page{max-width:1100px; margin:16px auto 96px; padding:0 16px}

/* Info card (index/upload pages) */
.info-card{
  background:#fff; border-radius:14px; padding:16px 18px;
  box-shadow:var(--card-shadow);
}
.info-card .stats{display:flex; gap:16px; flex-wrap:wrap; margin-top:8px}
.alert{padding:10px 12px; border-radius:8px; margin-bottom:10px}
.alert.ok{background:#e9f7ef; color:#145a32}
.alert.err{background:#fdecea; color:#7b241c}
.field{margin:10px 0}
.field input[type="file"]{display:block; margin-top:6px}
.hint{color:#555; font-size:14px}

/* Raffle card: NAVY blue, fixed height */
.raffle-card {
  position: relative;
  margin: 0 auto;
  width: min(100%, 980px);
  height: 56vh;                  /* same “flyer” height */
  border: 6px solid var(--gold);
  border-radius: 16px;
  overflow: hidden;               /* prevent spill */
  background: var(--navy);
  box-shadow: var(--card-shadow);
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Raffle display text */
.raffle-display {
  text-align: center;
  font-weight: 800;
  color: #fff;
  font-size: 34px;                /* base size; JS may shrink to fit */
  line-height: 1.15;
  z-index: 2;
  padding: 10px 16px;
  min-height: 58px;

  width: 92%;
  max-width: 920px;
  max-height: calc(56vh - 24px);
  overflow: hidden;
  white-space: normal;
  word-wrap: break-word;
  overflow-wrap: break-word;
  hyphens: auto;
  text-shadow: 0 2px 4px rgba(0,0,0,.6);
}

/* Winner look */
.winner {
  color: navy !important;     /* <-- Force navy blue */
  background: rgba(255,255,255,.92);
  text-shadow: 1px 1px 2px rgba(0,0,0, .6);
  border: 4px solid var(--gold);
  box-shadow: 0 10px 24px rgba(0,0,0,.25);
  animation: pop .85s ease forwards;
}

@keyframes pop{
  0%{transform:scale(.6); opacity:0}
  60%{transform:scale(1.1); opacity:1}
  100%{transform:scale(1)}
}

/* Buttons */
.buttons{
  display:flex; flex-wrap:wrap; justify-content:center; gap:16px;
  margin:18px auto 0;
}
.cta{
  appearance:none; border:0; border-radius:10px;
  background:var(--gold); color:#111; font-weight:800;
  padding:14px 18px; cursor:pointer; box-shadow:0 6px 16px rgba(0,0,0,.08);
  transition:transform .05s ease, box-shadow .2s ease, filter .2s ease;
}
.cta:hover{transform:translateY(-1px); filter:brightness(1.03)}
.cta:active{transform:translateY(0)}
.cta:disabled{background:#cfcfcf; color:#666; cursor:not-allowed; box-shadow:none}

/* Footer */
.footer{
  position:fixed; bottom:14px; right:14px; z-index:40;
  display:flex; align-items:center; gap:10px;
  background:#fff; border-radius:12px; padding:8px 12px;
  box-shadow:0 8px 22px rgba(0,0,0,.12);
}
.powered{font-size:12px; color:#444}
.mhl-logo{height:28px; width:auto; object-fit:contain}

/* Responsive tweaks */
@media (max-width: 640px){
  .title{display:none}
  .raffle-display{font-size: 28px}
  .cta{width:100%}
}
