:root {
  --timber-night: #4A2818;
  --roasted-cedar: #9B4F20;
  --latte-gold: #C57A32;
  --cream-paper: #F3E8D5;
  --foam-white: #FFFFFF;
  --sage-mint: #9EBFA7;
  --moss-black: #232B12;
  --espresso-ink: #16100B;
  --soft-border: rgba(74, 40, 24, 0.16);
  --card-glow: 0 18px 45px rgba(35, 43, 18, 0.16);
  --nav-height: 76px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  font-family: Arial, Helvetica, sans-serif;
  background:
    radial-gradient(circle at top left, rgba(158, 191, 167, 0.32), transparent 32rem),
    linear-gradient(180deg, #fffaf1 0%, var(--cream-paper) 34%, #fffaf1 100%);
  color: var(--espresso-ink);
  line-height: 1.62;
  overflow-x: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
  height: auto;
}

/* --- Buttons --- */
.sip-button {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  min-height: 48px;
  padding: 13px 24px;
  border-radius: 999px;
  font-weight: 900;
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
  white-space: nowrap;
  color: var(--espresso-ink);
  background: var(--latte-gold);
  box-shadow: 0 8px 0 var(--roasted-cedar);
}

.sip-button:hover {
  transform: translateY(-3px);
  box-shadow: 0 11px 0 var(--roasted-cedar);
}

.sip-button:active {
  transform: translateY(3px);
  box-shadow: 0 2px 0 var(--roasted-cedar);
}

/* --- Layout Elements --- */
.cream-page {
  width: min(92%, 1040px);
  margin: 0 auto;
  padding: 40px 0 70px;
}

.grain-section {
  margin: 46px 0;
}

.grain-heading {
  position: relative;
  margin: 0 0 18px;
  padding: 0 0 12px;
  color: var(--timber-night);
  font-size: clamp(1.8rem, 4vw, 2.55rem);
  line-height: 1.08;
  letter-spacing: -0.04em;
}

.grain-heading::after {
  content: "";
  display: block;
  width: 86px;
  height: 5px;
  margin-top: 14px;
  margin-left: auto;
  margin-right: auto;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--latte-gold), var(--sage-mint));
}

.section-divider {
  border: none;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--soft-border), transparent);
  margin: 60px 0;
}

/* --- Affiliate Table Elements --- */
.cedar-wrap {
  width: 100%;
  margin: 0 auto 50px;
  position: relative;
  z-index: 3;
}

.cedar-wrap.affiliate-list {
    margin-top: 20px;
}

.cedar-board {
  border-radius: 32px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--card-glow);
  border: 1px solid rgba(255, 255, 255, 0.78);
}

.cedar-row {
  display: grid;
  grid-template-columns: minmax(230px, 1.1fr) minmax(220px, 1fr) 170px;
  gap: 18px;
  align-items: center;
  padding: 20px 24px;
  border-bottom: 1px solid var(--soft-border);
}

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

.cedar-brand {
  display: flex;
  align-items: center;
  gap: 16px;
  min-width: 0;
}

.cedar-logo {
  width: 66px;
  height: 66px;
  padding: 8px;
  border-radius: 22px;
  object-fit: contain;
  background: var(--foam-white);
  border: 1px solid var(--soft-border);
  box-shadow: 0 10px 24px rgba(22, 16, 11, 0.08);
  flex-shrink: 0;
}

.cedar-brand-name {
  display: block;
  font-size: 1.1rem;
  font-weight: 900;
  color: var(--timber-night);
}

.cedar-bonus {
  color: var(--moss-black);
  font-size: 1.18rem;
  font-weight: 900;
}

/* --- Footer --- */
.moss-footer {
  padding: 52px 5%;
  color: rgba(255, 255, 255, 0.72);
  text-align: center;
  background:
    linear-gradient(90deg, rgba(35, 43, 18, 0.98), rgba(74, 40, 24, 0.96)),
    url('/images/footer-texture.webp') center / cover no-repeat;
  border-top: 8px solid var(--latte-gold);
}

.moss-footer strong {
  display: block;
  margin-bottom: 8px;
  color: var(--foam-white);
  font-size: 1.2rem;
}

/* =========================================================
   ROULETTE WIDGET STYLES
   ========================================================= */

.roulette-widget {
  border-radius: 32px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--card-glow, 0 18px 45px rgba(35, 43, 18, 0.16));
  border: 1px solid rgba(255, 255, 255, 0.78);
  padding: 30px;
  max-width: 450px;
  margin: 0 auto;
  text-align: center;
  font-family: Arial, Helvetica, sans-serif;
}

.roulette-header {
  color: var(--timber-night, #4A2818);
  font-size: 2rem;
  font-weight: 900;
  margin-bottom: 20px;
  letter-spacing: -0.04em;
}

.roulette-screen {
  background: var(--cream-paper, #F3E8D5);
  border: 1px solid var(--soft-border, rgba(74, 40, 24, 0.16));
  border-radius: 22px;
  padding: 20px;
  margin-bottom: 24px;
  box-shadow: inset 0 4px 12px rgba(74, 40, 24, 0.05);
}

.roulette-balance {
  color: var(--moss-black, #232B12);
  font-weight: 800;
  font-size: 1.1rem;
  margin-bottom: 10px;
}

/* --- TRUE VISUAL WHEEL STYLES --- */
.wheel-container {
  position: relative;
  width: 240px;
  height: 240px;
  margin: 20px auto 30px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.wheel-pointer {
  position: absolute;
  top: -18px;
  z-index: 10;
  color: var(--latte-gold);
  font-size: 28px;
  line-height: 1;
  filter: drop-shadow(0 3px 4px rgba(0,0,0,0.4));
}

.actual-wheel {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  border-radius: 50%;
  border: 6px solid var(--timber-night);
  box-shadow: 0 10px 25px rgba(35, 43, 18, 0.2);
  background: conic-gradient(
      var(--sage-mint) 0deg 9.73deg,
      #D32F2F 9.73deg 19.46deg,
      var(--espresso-ink) 19.46deg 29.19deg,
      #D32F2F 29.19deg 38.92deg,
      var(--espresso-ink) 38.92deg 48.65deg,
      #D32F2F 48.65deg 58.38deg,
      var(--espresso-ink) 58.38deg 68.11deg,
      #D32F2F 68.11deg 77.84deg,
      var(--espresso-ink) 77.84deg 87.57deg,
      #D32F2F 87.57deg 97.30deg,
      var(--espresso-ink) 97.30deg 107.03deg,
      #D32F2F 107.03deg 116.76deg,
      var(--espresso-ink) 116.76deg 126.49deg,
      #D32F2F 126.49deg 136.22deg,
      var(--espresso-ink) 136.22deg 145.95deg,
      #D32F2F 145.95deg 155.68deg,
      var(--espresso-ink) 155.68deg 165.41deg,
      #D32F2F 165.41deg 175.14deg,
      var(--espresso-ink) 175.14deg 184.86deg,
      #D32F2F 184.86deg 194.59deg,
      var(--espresso-ink) 194.59deg 204.32deg,
      #D32F2F 204.32deg 214.05deg,
      var(--espresso-ink) 214.05deg 223.78deg,
      #D32F2F 223.78deg 233.51deg,
      var(--espresso-ink) 233.51deg 243.24deg,
      #D32F2F 243.24deg 252.97deg,
      var(--espresso-ink) 252.97deg 262.70deg,
      #D32F2F 262.70deg 272.43deg,
      var(--espresso-ink) 272.43deg 282.16deg,
      #D32F2F 282.16deg 291.89deg,
      var(--espresso-ink) 291.89deg 301.62deg,
      #D32F2F 301.62deg 311.35deg,
      var(--espresso-ink) 311.35deg 321.08deg,
      #D32F2F 321.08deg 330.81deg,
      var(--espresso-ink) 330.81deg 340.54deg,
      #D32F2F 340.54deg 350.27deg,
      var(--espresso-ink) 350.27deg 360deg
  );
  transition: transform 3s cubic-bezier(0.25, 1, 0.1, 1);
}

.roulette-number {
  position: relative;
  z-index: 2;
  font-size: 3rem;
  font-weight: 900;
  width: 120px;
  height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--cream-paper);
  border: 4px solid var(--timber-night);
  box-shadow: 0 4px 15px rgba(0,0,0,0.2);
  transition: color 0.3s ease;
}

/* Updated Hub Colors */
.roulette-red { color: #D32F2F; }
.roulette-black { color: var(--espresso-ink); }
.roulette-green { color: var(--moss-black); }
.roulette-neutral { color: var(--timber-night); opacity: 0.3; }

.roulette-color-label {
  font-size: 1rem;
  font-weight: 800;
  text-transform: uppercase;
  color: rgba(22, 16, 11, 0.58);
  letter-spacing: 0.1em;
  min-height: 20px;
}

.roulette-controls {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.roulette-input-group {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.roulette-input {
  width: 100%;
  padding: 14px 16px;
  border-radius: 16px;
  border: 1px solid var(--soft-border, rgba(74, 40, 24, 0.16));
  background: var(--foam-white, #FFFFFF);
  color: var(--timber-night, #4A2818);
  font-size: 1rem;
  font-weight: bold;
  outline: none;
  transition: border-color 0.2s ease;
}

.roulette-input:focus {
  border-color: var(--latte-gold, #C57A32);
}

.roulette-message {
  margin-top: 20px;
  min-height: 24px;
  font-weight: 800;
  font-size: 1.1rem;
}

.msg-win { color: #406d4d; }
.msg-lose { color: var(--roasted-cedar, #9B4F20); }
.msg-error { color: #D32F2F; }

/* Responsive Media Queries */
@media (max-width: 880px) {
  .cedar-row {
    grid-template-columns: 1fr;
    gap: 14px;
    padding: 18px;
  }
}

@media (max-width: 560px) {
  .cedar-logo {
    width: 58px;
    height: 58px;
    border-radius: 18px;
  }
  .roulette-widget {
      padding: 22px;
      border-radius: 24px;
  }
  .roulette-input-group {
      grid-template-columns: 1fr;
  }
  .roulette-number {
      font-size: 2.5rem;
      width: 90px;
      height: 90px;
  }
  .wheel-container {
      width: 180px;
      height: 180px;
  }
}