/* === Global Reset & Base Styles === */
html, body {
    height: 100%;
    overflow: hidden;
}

body {
    margin: 0;
    padding: 0;
    font-family: sans-serif;
    background: #f0f0f0;
    display: flex;
    flex-direction: column;
    align-items: center;
    background-image: url(/img/bg.png);
    background-repeat: no-repeat;
    background-size: cover; /* or "contain" */
    background-position: center;
}

/* === Container & SVG === */
#game-container {
  position: relative;
  width: 90vw;
  max-width: 1000px;
  margin: auto;
  aspect-ratio: 1.2 / 1;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

#game-svg {
  width: 100%;
  height: 100%;
  display: block;
}

/* === Tile Styles === */
.tile-circle {
    fill: white;
    stroke: #333;
    stroke-width: 2;
}

.tile-text {
    font-size: 12px;
    text-anchor: middle;
    dominant-baseline: middle;
    pointer-events: none;
}

.tile-start {
    fill: orange;
    font-weight: bold;
}

/* === Zones === */
.zone-green {
    fill: #b7e4c7;
}

.zone-red {
    fill: #f8d7da;
}

.zone-purple {
    fill: #d6d3f0;
}

.zone-brown {
    fill: #d5af98;
}

.zone.good {
    position: absolute;
    top: 0;
    height: 100%;
    background: #7ef77e;
    border-radius: 10px;
}

.zone.blue {
    position: absolute;
    height: 100%;
    background: #3399ff;
    opacity: 0.6;
}

/* === Player Token === */
.player-token {
    stroke: black;
    stroke-width: 1.5;
}

/* === Info Panels === */
.panel {
    background: rgba(255 255 255 / 0.9);
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 0 10px rgba(0,0,0,0.2);
}

#info-panel {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 70%;
  max-width: 300px;
  text-align: center;
  pointer-events: none;
  z-index: 10;
}

#start-panel {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    max-width: 500px;
    text-align: center;
    font-size: xx-large;
    z-index: 10;
}

/* === Buttons === */
button {
    margin: 5px;
    padding: 10px 15px;
    font-size: 16px;
}

button.shake {
    animation: shake 0.8s ease;
}

/* === Sliders & Meters === */
.slider-bar {
    position: relative;
    width: 300px;
    height: 20px;
    background: #eee;
    margin: 10px auto;
    border-radius: 10px;
    overflow: hidden;
}

.slider-fill {
    position: absolute;
    top: 0;
    width: 40px;
    height: 100%;
    background: #4488ff;
    border-radius: 10px;
}

.needle-bar {
    position: relative;
    width: 300px;
    height: 30px;
    margin: 40px auto;
    background: #eee;
    border: 2px solid #ccc;
    border-radius: 8px;
    overflow: hidden;
}

.needle {
    position: absolute;
    width: 4px;
    height: 100%;
    background: red;
}

.needle-dial {
    position: relative;
    width: 200px;
    height: 100px;
    margin: 40px auto;
    border-top: 4px solid #ccc;
    border-radius: 100px 100px 0 0;
    background: #f9f9f9;
    overflow: visible;
}

.needle-arm {
    position: absolute;
    width: 4px;
    height: 90px;
    bottom: 0;
    left: 50%;
    background: red;
    transform-origin: bottom center;
    transform: rotate(0deg);
}

.zone-arc {
    position: absolute;
    width: 200px;
    height: 100px;
    top: 0;
    left: 0;
    border-top-left-radius: 100px;
    border-top-right-radius: 100px;
    pointer-events: none;
    overflow: hidden;
}

.zone-arc svg {
    width: 100%;
    height: 100%;
}

/* === Animations === */
@keyframes shake {
    0%, 100% {
        transform: translateX(0);
    }
    20%, 60% {
        transform: translateX(-8px);
    }
    40%, 80% {
        transform: translateX(8px);
    }
}
