:root {
  --btn-bg: #313030;
  --btn-color: white;
  --btn-border: solid 4px white;
}

* {
  box-sizing: border-box;
  font-family: 'Black Ops One', sans-serif;
}


body {
  background-color: #2d2d2d;
  width: 100vw;
  height: 100vh;
}

.gold {
  color: gold !important;
}

.green {
  color: green;
}

.text-warning {
  color: #000000 !important;
}

.text-white {
  color: #00ff00 !important;
}

/* Mer spesifikke regler for å overstyre Bootstrap */
.controls .text-warning {
  color: #000000 !important;
}

.controls .text-white {
  color: #00ff00 !important;
}

#credits.text-white {
  color: #00ff00 !important;
}

#bet.text-white {
  color: #00ff00 !important;
}

.winner-display {
  color: #000000 !important;
}

.bet-btn {
  background: linear-gradient(145deg, #4a4a4a, #3a3a3a);
  border: 2px solid #666;
  border-radius: 5px;
  color: white;
  font-weight: bold;
  padding: 4px 8px;
  font-size: 11px;
  min-width: 35px;
  transition: all 0.2s ease;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.bet-btn:hover {
  background: linear-gradient(145deg, #5a5a5a, #4a4a4a);
  border-color: #777;
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.4);
}

.bet-btn.active {
  background: linear-gradient(145deg, #ffd700, #ffed4e);
  color: #000;
  border-color: #ffd700;
  box-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
}

div.modal-footer,
div.modal-body,
div.modal-header {
  background-color: #000000de;
  color: white;
}

.lil-gui {
  --background-color: #000000A0;
  --text-color: white;
  --title-background-color: #000000D3;
  --title-text-color: white;
}

.lil-gui.autoPlace {
  position: absolute !important;
  left: 50% !important;
  right: auto !important;
  top: auto !important;
  bottom: 20px !important;
  transform: translateX(-50%) !important;
  z-index: 1000;
}

.game-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  justify-content: center;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  margin: auto;
  position: fixed;
  z-index: 1;
}

.main-frame {
  background: linear-gradient(145deg, #3a3a3a, #2a2a2a);
  border: 10px solid #555;
  border-radius: 25px;
  padding: 20px;
  padding-bottom: 60px;
  box-shadow: 
    0 0 40px rgba(0, 0, 0, 0.9),
    inset 0 0 25px rgba(255, 255, 255, 0.15);
  position: relative;
  z-index: 10;
  width: min(40vw, 600px);
  height: min(60vh, 600px);
  max-width: 40vw;
  max-height: 60vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.main-frame::before {
  content: '';
  position: absolute;
  top: -5px;
  left: -5px;
  right: -5px;
  bottom: -5px;
  background: linear-gradient(45deg, #ffd700, #ffed4e, #ffd700);
  border-radius: 30px;
  z-index: -1;
}

.game-content-frame {
  background: linear-gradient(145deg, #2a2a2a, #1a1a1a);
  border: 4px solid #444;
  border-radius: 12px;
  padding: 15px;
  box-shadow: 
    0 0 20px rgba(0, 0, 0, 0.8),
    inset 0 0 15px rgba(255, 255, 255, 0.1);
  position: relative;
  z-index: 20;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.game-content-frame::before {
  content: '';
  position: absolute;
  top: -4px;
  left: -4px;
  right: -4px;
  bottom: -4px;
  background: linear-gradient(45deg, #ffd700, #ffed4e, #ffd700);
  border-radius: 16px;
  z-index: -1;
}

#slot {
  border: 4px solid #343a40;
  max-width: 100%;
  height: auto;
  box-sizing: content-box;
  border-radius: 40px;
}

.winner-display {
  color: #FFD700;
  font-size: 28px;
  border-radius: 20px;
  border: 0;
  font-weight: bold;
  overflow: hidden;
  padding: 8px 16px;
}

#spin-manual {
  background-color: #9a0102;
  color: wheat;
  border: 4px solid #dc3545;
  border-radius: 40px;
  padding: 16px;
  font-size: 24px;
  cursor: pointer;
  justify-content: center;
  text-align: center;
  flex: 1;
}

.bet-action-btn {
  border-radius: 50%;
  border: solid 4px #343a40;
  background-color: var(--btn-bg);
  color: wheat;
}

#spin-auto, #pay-table {
  background-color: var(--btn-bg);
  color: wheat;
  border: 4px solid #343a40;
  border-radius: 40px;
  padding: 4px 8px;
  font-size: 13px;
  cursor: pointer;
}

.controls .left {
  font-size: 20px;
}

.controls .middle {
  width: 250px;
}

button {
  position: relative;
  z-index: 50;
  pointer-events: auto;
}

/* Responsive Design */
@media (max-width: 1200px) {
  .main-frame {
    width: 50vw;
    height: 70vh;
  }
}

@media (max-width: 992px) {
  .main-frame {
    width: 60vw;
    height: 75vh;
    padding: 25px;
    padding-bottom: 70px;
  }
  
  .slot-frame {
    padding: 12px;
    margin-bottom: 12px;
  }
  
  .controls-frame {
    padding: 12px;
    margin-top: 12px;
  }
}

@media (max-width: 768px) {
  .main-frame {
    width: 80vw;
    height: 80vh;
    max-width: 80vw;
    max-height: 80vh;
    padding: 20px;
    padding-bottom: 60px;
  }
  
  .slot-frame {
    padding: 10px;
    margin-bottom: 10px;
  }
  
  .controls-frame {
    padding: 10px;
    margin-top: 10px;
  }
  
  .bet-btn {
    padding: 5px 8px;
    font-size: 11px;
    min-width: 38px;
  }
  
/* Responsive Canvas */
canvas {
  max-width: 100%;
  height: auto;
}

@media (max-width: 768px) {
  canvas {
    width: 100% !important;
    height: auto !important;
  }
}
  
  .controls {
    flex-direction: column;
    gap: 15px;
  }
  
  .controls .left,
  .controls .right {
    align-items: center !important;
  }
}

@media (max-width: 576px) {
  .main-frame {
    width: 95vw;
    height: 85vh;
    max-width: 95vw;
    max-height: 85vh;
    padding: 15px;
    padding-bottom: 50px;
  }
  
  .bet-buttons {
    flex-direction: column;
    gap: 8px;
  }
  
  .bet-buttons .d-flex {
    justify-content: center;
    gap: 8px;
  }
  
  .bet-btn {
    padding: 8px 12px;
    font-size: 12px;
    min-width: 50px;
  }
  
  .controls {
    gap: 10px;
  }
  
  .controls .middle {
    order: -1;
  }
}

@media (max-width: 400px) {
  .main-frame {
    width: 98vw;
    height: 90vh;
    padding: 10px;
    padding-bottom: 40px;
  }
  
  .slot-frame,
  .controls-frame {
    padding: 8px;
  }
  
  .bet-btn {
    padding: 6px 10px;
    font-size: 10px;
    min-width: 45px;
  }
  
  .winner-display {
    font-size: 14px;
  }
  
  .text-warning,
  .text-white {
    font-size: 12px;
  }
}

/* Responsive Typography */
@media (max-width: 768px) {
  .winner-display {
    font-size: 16px;
  }
  
  .text-warning,
  .text-white {
    font-size: 14px;
  }
}

@media (max-width: 576px) {
  .winner-display {
    font-size: 14px;
  }
  
  .text-warning,
  .text-white {
    font-size: 12px;
  }
}

button:hover {
  opacity: 0.8 !important;
  box-shadow: 0 0 10px 0 #000000;
}

button:active {
  background-color: #afaeae !important;
}

#pay-table-modal {
  position: fixed;
  margin: auto;
  left: 0;
  right: 0;
}

table tr td {
  text-align: center;
  vertical-align: middle;
}