/* Global Berkshire Swash, color palette: white, green (#00b050), red (#ff3b3b) */
:root{
  --white: #ffffff;
  --green: #00b050;
  --red: #ff3b3b;
  --bg: #050507;
  --base-size: 20px; /* increased base for readability */
}

*{box-sizing:border-box}
html{font-size:var(--base-size)}
body{height:100%;margin:0;font-family:'Berkshire Swash',cursive;background-color:var(--bg);color:var(--white);-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}

/* background image (treasurespin.png expected in project root). Uses overlay for readability. */
body::before{content:'';position:fixed;inset:0;z-index:0;background-image:url('treasurespin.png');background-position:center center;background-repeat:no-repeat;background-size:cover;opacity:1;filter:contrast(0.95) saturate(0.95)}
/* dark overlay to keep text readable */
body::after{content:'';position:fixed;inset:0;z-index:1;background:linear-gradient(180deg,rgba(0,0,0,0.55),rgba(0,0,0,0.65))}

.site-header{display:flex;align-items:center;justify-content:space-between;padding:20px 6vw;border-bottom:1px solid rgba(255,255,255,0.04);position:relative;z-index:3}
.brand .logo{font-size:3rem;margin:0;color:var(--red);letter-spacing:1px}
.brand .tag{margin:6px 0 0;color:var(--white);font-size:1.15rem}

.top-nav{display:flex;gap:16px}
.top-nav .nav-link{color:var(--white);text-decoration:none;padding:10px 14px;border-radius:10px;font-weight:800;font-size:1.15rem}
.top-nav .nav-link:hover{color:var(--green)}
.top-nav .nav-link:focus{outline:3px solid rgba(0,176,80,0.15);outline-offset:4px}

.hero{display:flex;justify-content:center;padding:56px 6vw 90px;position:relative;z-index:3}
.card{width:100%;max-width:920px;background:linear-gradient(180deg,rgba(0,0,0,0.36),rgba(0,0,0,0.28));backdrop-filter:blur(6px);-webkit-backdrop-filter:blur(6px);padding:28px;border-radius:16px;position:relative;overflow:hidden;border:1px solid rgba(255,255,255,0.06)}
.card h2{margin:0 0 10px;color:var(--white);font-size:2.8rem;line-height:1;text-shadow:0 6px 20px rgba(0,0,0,0.7)}
.card .lead{color:var(--white);line-height:1.4;font-weight:800;font-size:1.4rem;text-shadow:0 4px 14px rgba(0,0,0,0.6)}

/* Make all important text more visible: global subtle text-shadow */
body, body * { text-shadow: 0 3px 10px rgba(0,0,0,0.6); }

/* Block-level text separation: headings, paragraphs, nav links, meta, countdown, footer */
h1,h2,h3,h4,h5,h6, p, .card .lead, .meta, .countdown, .brand .tag, .top-nav .nav-link, .site-footer small {
  background: rgba(0,0,0,0.28);
  padding: 6px 10px;
  border-radius: 10px;
  display: inline-block;
}

/* Ensure nav links keep spacing and contrast */
.top-nav .nav-link{padding:8px 14px}

/* Longer paragraphs should still break nicely */
.card p{display:block}

.countdown{margin:24px 0;font-weight:900;color:var(--green);font-size:1.45rem;text-shadow:0 4px 10px rgba(0,0,0,0.6);padding:8px 14px;border-radius:12px;background:rgba(0,0,0,0.2);display:inline-block}
.meta{margin-top:14px;color:var(--white);font-size:1.15rem;font-weight:800}

/* pill for prize */
.meta #prize{display:inline-block;padding:8px 12px;border-radius:999px;background:rgba(255,255,255,0.04);box-shadow:inset 0 -4px 12px rgba(0,0,0,0.5)}

.btn-play{display:inline-block;background:linear-gradient(180deg,var(--green),#007a3d);color:var(--white);padding:30px 96px;border-radius:34px;box-shadow:0 28px 70px rgba(0,0,0,0.6);font-size:3rem;letter-spacing:3px;text-decoration:none;font-weight:900}
.btn-play:focus{outline:4px solid rgba(255,59,59,0.12);outline-offset:6px}
.btn-play:active{transform:translateY(1px)}

.play-cta{display:flex;justify-content:center;margin-top:22px}

/* Snow overlay */
.snow{pointer-events:none;position:fixed;inset:0;z-index:2;background-image:radial-gradient(circle at 10% 20%, rgba(255,255,255,0.035) 1px, transparent 1px), radial-gradient(circle at 40% 60%, rgba(255,255,255,0.03) 1px, transparent 1px), radial-gradient(circle at 80% 30%, rgba(255,255,255,0.025) 1px, transparent 1px);background-size: 6px 6px, 8px 8px, 5px 5px;opacity:0.95;mix-blend-mode:screen;animation:snowDrift 16s linear infinite}
@keyframes snowDrift{from{transform:translateY(-10vh)}to{transform:translateY(10vh)}}

.garland{position:absolute;left:0;right:0;top:-26px;height:80px;display:flex;justify-content:center;gap:8px}
.bulb{width:18px;height:18px;border-radius:50%;display:inline-block;margin:10px 8px;box-shadow:0 8px 26px rgba(0,0,0,0.6)}
.b1{background:var(--red);box-shadow:0 0 16px var(--red)}
.b2{background:var(--green);box-shadow:0 0 16px var(--green)}
.b3{background:var(--red);box-shadow:0 0 16px var(--red)}
.b4{background:var(--green);box-shadow:0 0 16px var(--green)}
.b5{background:var(--red);box-shadow:0 0 16px var(--red)}
.bulb{animation:twinkle 2.2s infinite ease-in-out}
@keyframes twinkle{0%,100%{transform:scale(1);opacity:1}50%{transform:scale(0.88);opacity:0.85}}

/* Edge bulbs: create glowing bulbs along the page edges */
.edge-bulbs{position:fixed;pointer-events:none;z-index:6;overflow:visible}
.edge-bulbs.top,.edge-bulbs.bottom{left:0;right:0;height:36px;display:flex;align-items:flex-start;gap:8px;padding:0 12px}
.edge-bulbs.left,.edge-bulbs.right{top:0;bottom:0;width:36px;display:flex;flex-direction:column;align-items:flex-start;gap:8px;padding:12px 0}
.edge-bulbs.top{top:0;justify-content:space-between}
.edge-bulbs.bottom{bottom:0;justify-content:space-between}
.edge-bulbs.left{left:0;justify-content:space-between}
.edge-bulbs.right{right:0;justify-content:space-between}

/* bulbs sit half-over the edge: use translate offsets per side */
.edge-bulbs .bulb{width:28px;height:28px;border-radius:50%;margin:2px;background:var(--red);box-shadow:0 0 18px rgba(255,59,59,0.85),0 8px 24px rgba(0,0,0,0.6);transition:transform .18s,box-shadow .18s,filter .18s}
.edge-bulbs .bulb.green{background:var(--green);box-shadow:0 0 18px rgba(0,176,80,0.85),0 8px 24px rgba(0,0,0,0.6)}

/* offset bulbs so only half is visible */
.edge-bulbs.top .bulb{transform:translateY(-50%)}
.edge-bulbs.bottom .bulb{transform:translateY(50%)}
.edge-bulbs.left .bulb{transform:translateX(-50%)}
.edge-bulbs.right .bulb{transform:translateX(50%)}

/* animation for bulbs (randomized via different animation delays) */
@keyframes bulbPulse{0%{opacity:0.9;filter:brightness(0.95)}50%{opacity:1;filter:brightness(1.2)}100%{opacity:0.9;filter:brightness(0.95)}}
.edge-bulbs .bulb{animation:bulbPulse 2.6s infinite ease-in-out}

/* active glow on hover/focus */
.edge-bulbs.active-glow .bulb{box-shadow:0 0 30px rgba(255,59,59,0.95),0 10px 40px rgba(0,0,0,0.6);transform:scale(1.2)}
.edge-bulbs.left.active-glow .bulb{transform:translateX(-50%) scale(1.2)}
.edge-bulbs.right.active-glow .bulb{transform:translateX(50%) scale(1.2)}
.edge-bulbs.top.active-glow .bulb{transform:translateY(-50%) scale(1.2)}
.edge-bulbs.bottom.active-glow .bulb{transform:translateY(50%) scale(1.2)}

/* specific glow for CTA */
.btn-play{transition:transform .12s,box-shadow .18s;text-shadow:0 6px 18px rgba(0,0,0,0.6)}
.btn-play:hover{transform:translateY(-6px) scale(1.02);box-shadow:0 30px 90px rgba(0,176,80,0.25),0 0 40px rgba(0,176,80,0.08)}

/* extra card glow */
.card::before{content:'';position:absolute;inset:-2px;background:linear-gradient(90deg,rgba(255,59,59,0.06),rgba(0,176,80,0.06));filter:blur(20px);opacity:0.8;pointer-events:none}

/* populate edge bulbs with CSS-generated elements (progressive enhancement) */
.edge-bulbs.top,.edge-bulbs.bottom{display:flex}
.edge-bulbs.top .bulb,.edge-bulbs.bottom .bulb{animation:bulbPulse 2.6s infinite ease-in-out}
.edge-bulbs.left .bulb,.edge-bulbs.right .bulb{animation:bulbPulse 2.6s infinite ease-in-out}

/* Responsive reduce bulbs on small screens */
@media (max-width:600px){
  .edge-bulbs.top,.edge-bulbs.bottom{display:none}
  .edge-bulbs.left,.edge-bulbs.right{display:none}
}

/* footer */
.site-footer{padding:28px 5vw;text-align:center;color:var(--white);border-top:1px solid rgba(255,255,255,0.02);font-size:1.05rem;text-shadow:0 2px 6px rgba(0,0,0,0.6)}

/* Responsive tweaks */
@media (max-width:920px){
  html{font-size:18px}
  .card h2{font-size:2.2rem}
  .btn-play{font-size:2.2rem;padding:22px 64px}
}
@media (max-width:480px){
  html{font-size:16px}
  .brand .logo{font-size:2rem}
  .card h2{font-size:1.8rem}
  .card .lead{font-size:1.15rem}
  .btn-play{font-size:1.6rem;padding:16px 36px}
  .top-nav .nav-link{font-size:1rem;padding:8px 10px}
}
