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

header {
  position: sticky;
  background-image: url('assets/ui/title_bar.png');
  background-repeat: repeat-x;
  background-size: auto 100%;
  height: 64px;
  image-rendering: pixelated;
  display: flex;
  justify-content: center;
  align-items: center;
}

header h1 {
  font-family: 'Perfect DOS VGA 437', monospace;
  font-size: 2.2rem;
  color: #c7922e;
  position: sticky;
  z-index: 1;
}

body {
  margin: 0;
  font-family: system-ui, sans-serif;
  background-color: #000000;
}

.app-layout {
  display: flex;
  flex-direction: row;
  min-height: 100vh;
}

.left-panel {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
}

.right-panel {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 1rem;
  position: relative;
}

#OfficeCanvas {
  display: block;
  max-width: 100%;
  width: 640px;
  height: auto;
}

.timer-display {
  /* Layout */
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 1rem 0;
  
  /* Size - adjust to match your timer.png dimensions */
  width: 320px;      /* adjust to your PNG width */
  height: 160px;      /* adjust to your PNG height */
  
  /* Background image */
  background-image: url('assets/ui/timer.png');
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  image-rendering: pixelated;
  
  /* Text styling - same font as title */
  font-family: 'Perfect DOS VGA 437', monospace;
  font-size: 2.5rem;           /* adjust size to fit in frame */
  color: #c7922e;              /* same gold as title */
  text-shadow: 1px 1px 0px #5c3f12;
}

.currency-display {
  position: absolute;
  justify-content: flex start;
  padding-left: 15px;
  top: 20px;
  right: 20px;
  z-index: 15;
  background-image: url('assets/ui/currency_bar.png');
  background-size: contain;
  background-repeat: no-repeat;
  width: 140px;
  height: 35px;
  transform: scale(1);
  transform-origin: top right;
  display: flex;
  align-items: center;
  padding-left: 30px;
  image-rendering: pixelated;
}

.currency-display #coinAmount,
.currency-display .coin-label {
  font-family: 'Perfect DOS VGA 437', monospace;
  font-size: 1.2rem; 
  color: #000000;
}

.currency-coin {
  position: absolute;
  height: 65%;
  width: auto;
  margin-left: 25px;
  image-rendering: pixelated;
}

.timer-display {
  padding-top: 10px;     /* push text down */
  padding-bottom: 10px;  /* push text up */
  padding-left: 10px;    /* push text right */
  padding-right: 10px;   /* push text left */
}

.shop-panel {
  visibility: hidden;
  pointer-events: none;
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.85);
  z-index: 10; 
}

.shop-panel.is-open {
  display: flex;
  visibility: visible;
  pointer-events: auto;
}

.shop-ui-big {
  width: 100%;
  max-width: 600px;
  margin-bottom: 0;
  aspect-ratio: 15 / 17;
  background-image: url('assets/ui/shop_ui.png');
  background-size: 100% 100%;
  background-repeat: no-repeat;
  background-position: center;
  image-rendering: pixelated;
  position: relative;
}
.shop-grid {
  position: absolute;
  top: 12%;
  left: 8%;
  right: 8%;
  bottom: 8%;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  padding: 10px;
  overflow-y:  auto;
}

.shop-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 8px;
  background: rgba(199, 146, 46, 0.15);
  border: 2px solid #8b5e2b;
  cursor: pointer;  
  image-rendering: pixelated;
}

.shop-item:hover {
  background: rgba(199, 146, 46, 0.3);
}

.shop-item__img {
  width: 64px;
  height: 64px;
  object-fit: contain;
  image-rendering: pixelated;
}

.shop-item__name {
  font-family: 'Perfect DOS VGA 437', monospace;
  font-size: 0.8rem;
  color: #c7922e;
}

.shop-item__price {
  font-family: 'Perfect DOS VGA 437', monospace;
  font-size: 0.8rem;
  color: #c7922e;
  margin-top: 2px;
  text-align: center;
}

.shop-item {
  cursor: default;
}

.shop-item__button {
  border: none;
  background-color: transparent;
  cursor: pointer;
  padding: 0;

  width: 120px;
  height: 40px;

  background-image: url('assets/ui/buy_button_animation1.png');
  background-size: 100% 100%;
  background-repeat: no-repeat;
  image-rendering: pixelated;

  font-size: 0;
}


.shop-item__button:hover,
.shop-item__button:focus {
  background-image: url('assets/ui/buy_button_animation2.png');
}

.shop-item__button--no-coins-reset {
  background-image: url('assets/ui/buy_button_animation1.png');
}


.close-shop-btn {
  position: absolute;
  bottom: 6%;
  left: 50%;
  transform: translateX(-50%);
  margin-top: 0;
  z-index: 20;
}

.close-shop-btn {
  display: none;
}

.shop-panel.is-open + .close-shop-btn {
  display: block;
}

.shop-item__button--no-coins {
  animation: noCoinsShake 0.3s; 
}

/* tijdens reset: altijd frame 1, ook bij hover/focus */
.shop-item__button--no-coins-reset,
.shop-item__button--no-coins-reset:hover,
.shop-item__button--no-coins-reset:focus {
  background-image: url('assets/ui/buy_button_animation1.png');
}

@keyframes noCoinsShake {
  0% { transform: translateX(0); }
  25% { transform: translateX(-3px); }
  50% { transform: translateX(3px); }
  75% { transform: translateX(-2px); }
  100% { transform: translateX(0); }
}
/* Button images: frame 1 = default, frame 2 = hover/focus */
.control-btn {
  margin: 0 0.25rem;
  border: none;
  background-color: transparent;
  cursor: pointer;
  padding: 0;
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
  font-size: 0;
  overflow: hidden;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
}

.control-btn--lg {
  width: 180px;
  height: 72px;
}

.control-btn--xl {
  width: 240px;
  height: 104px;
}

.control-btn--md {
  width: 160px;
  height: 60px;
}
/* Slider container */
.slider-container {
  display: flex;
  justify-content: center;
  margin: 0.5rem 0;
}

/* De slider zelf */
#focusSlider {
  -webkit-appearance: none;
  appearance: none;
  width: 320px;               /* pas aan naar breedte van je timerbar.png */
  height: 25px;               /* pas aan naar hoogte van je timerbar.png */
  background: url('assets/ui/timerbar.png');
  background-size: 100% 100%;
  background-repeat: no-repeat;
  image-rendering: pixelated;
  cursor: pointer;
}

/* De thumb (zandloper) - Chrome/Edge/Safari */
#focusSlider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 32px;                /* pas aan naar breedte van je zandloper.png */
  height: 32px;               /* pas aan naar hoogte van je zandloper.png */
  background: url('assets/ui/zandloper.png');
  background-size: contain;
  background-repeat: no-repeat;
  cursor: grab;
  image-rendering: pixelated;
}

/* De thumb (zandloper) - Firefox */
#focusSlider::-moz-range-thumb {
  width: 32px;
  height: 32px;
  background: url('assets/ui/zandloper.png');
  background-size: contain;
  background-repeat: no-repeat;
  border: none;
  cursor: grab;
  image-rendering: pixelated;
}

#focusSlider::-webkit-slider-runnable-track {
  width: 100%;
  height: 100%;
  background: transparent;
}

/* Track styling - Firefox (al aanwezig, maar controleer) */
#focusSlider::-moz-range-track {
  width: 100%;
  height: 100%;
  background: transparent;
}

/* Verwijder default track styling in Firefox */
#focusSlider::-moz-range-track {
  background: transparent;
}

#startBtn {
  background-image: url('assets/ui/start_button_animation1.png');
}
#startBtn:hover,
#startBtn:focus {
  background-image: url('assets/ui/start_button_animation2.png');
}

#stopBtn {
  background-image: url('assets/ui/stop_button_animation1.png');
}
#stopBtn:hover,
#stopBtn:focus {
  background-image: url('assets/ui/stop_button_animation2.png');
}

#breakbtn {
  background-image: url('assets/ui/break_button_animation1.png');
}
#breakbtn:hover,
#breakbtn:focus {
  background-image: url('assets/ui/break_button_animation2.png');
}

#skipbreakBtn {
  background-image: url('assets/ui/skip_animation1.png');
  background-size: 100% 100%;
}
#skipbreakBtn:hover,
#skipbreakBtn:focus {
  background-image: url('assets/ui/skip_animation2.png');
}

#shopBtn {
  background-image: url('assets/ui/shop_button_animation1.png');
}
#shopBtn:hover,
#shopBtn:focus {
  background-image: url('assets/ui/shop_button_animation2.png');
}

#closeShopBtn {
  background-image: url('assets/ui/close_button_animation1.png');
}

#closeShopBtn:hover,
#closeShopBtn:focus {
  background-image: url('assets/ui/close_button_animation2.png');
}

.controls {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
}

/* ===========================================
   STATE-BASED BUTTON VISIBILITY
   =========================================== */

/* Standaard: Stop en Skip verbergen */
#stopBtn,
#skipbreakBtn {
  display: none;
}

/* IDLE state: Start en Break zichtbaar */
body[data-state="idle"] #startBtn,
body[data-state="idle"] #breakbtn {
  display: inline-block;
}

/* FOCUSING state: alleen Stop zichtbaar */
body[data-state="focusing"] #startBtn,
body[data-state="focusing"] #breakbtn,
body[data-state="focusing"] #skipbreakBtn {
  display: none;
}
body[data-state="focusing"] #stopBtn {
  display: inline-block;
}

/* BREAK state: alleen Skip Break zichtbaar */
body[data-state="break"] #startBtn,
body[data-state="break"] #breakbtn,
body[data-state="break"] #stopBtn {
  display: none;
}
body[data-state="break"] #skipbreakBtn {
  display: inline-block;
}

/* Slider verbergen tijdens focus state */
body[data-state="focusing"] .slider-container {
  display: none;
}

@media (max-width: 768px) {
  .shop-ui-big {
    max-width: 95vw;
  }
}

@media (min-width: 769px) and (max-width: 1850px) {
  .shop-ui-big {
    max-width: 500px; /* maak kleiner dan 600px, pas naar smaak aan */
  }
}

.timer-confirm {
  visibility: hidden;
  pointer-events: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;

  display: flex;
  align-items: center;
  justify-content: center;

  background: rgba(0, 0, 0, 0.85);
  z-index: 20;
}

.timer-confirm.is-open {
  visibility: visible;
  pointer-events: auto;
}

.timer-confirm__window {
  width: 100%;
  max-width: 500px;
  aspect-ratio: 4 / 3;
  background-image: url('assets/ui/pop_up.png');
  background-size: 100% 100%;
  background-repeat: no-repeat;
  background-position: center;
  image-rendering: pixelated;

  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.timer-confirm__text {
  font-family: 'Perfect DOS VGA 437', monospace;
  font-size: 1.5rem;
  color: #c7922e;
  text-align: center;
  margin-bottom: 12 
  
  px;
}

.timer-confirm__buttons {
  display: flex;
  gap: 16px;
}

.timer-confirm__btn {
  min-width: 110px;
  padding: 6px 10px;
  border: 2px solid #8b5e2b;
  background-color: #c7992e;
  color: #000000;
  font-family: 'Perfect DOS VGA 437', monospace;
  font-size: 0.9rem;
  cursor: pointer;
  image-rendering: pixelated;
}

.timer-confirm__btn:hover,
.timer-confirm__btn:focus {
  background-color: #e1b35a;
}

.timer-confirm__btn--resume {
  
}

.timer-confirm__btn--stop {

}

