/* assets/css/theme.css */

/* ====== Responsive Header ====== */

.bestloot-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  background: #f3ebd0;
}
.bestloot-header .logo {
  flex: 1;
}
.bestloot-header nav {
  display: flex;
  gap: 15px;
}
.bestloot-header nav a {
  color: #244250;
  text-decoration: none;
  font-weight: 600;
  padding: 8px;
  transition: background .2s;
}
.bestloot-header nav a:hover {
  background: rgba(36, 66, 80, 0.1);
  border-radius: 4px;
}

/* Hamburger menu button */
.bestloot-header .menu-btn {
  display: none;
  font-size: 1.5rem;
  cursor: pointer;
}

/* ====== Mobile ====== */
@media (max-width: 768px) {
  .bestloot-header nav {
    position: absolute;
    top: 60px;
    right: 0;
    background: #f3ebd0;
    flex-direction: column;
    width: 200px;
    transform: translateX(100%);
    transition: transform .3s ease;
    box-shadow: -2px 2px 8px rgba(0,0,0,0.1);
  }
  .bestloot-header nav.open {
    transform: translateX(0);
  }
  .bestloot-header .menu-btn {
    display: block;
  }
}

/* ====== Responsive Footer ====== */
.footer {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 20px;
  background: #f3ebd0;
  font-size: .9rem;
}
@media (max-width: 480px) {
  .footer {
    font-size: .8rem;
    text-align: center;
    padding: 10px;
  }
}


/* ====== PUSH CONTENT DOWN ====== */
body {
  margin: 0;
  padding-top: 60px;
  padding-bottom: 60px;
  background: #f3ebd0;
  color: #244250;
  font-family: 'Segoe UI', sans-serif;
}

/* ====== RESET & LAYOUT ====== */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
.container {
  width: 85%;
  max-width: 900px;
  margin: 20px auto;
}

/* ====== SPINNER ====== */
.spinner-wrapper {
  position: relative;
  background: #f3ebd0;
  border-radius: 5px;
  padding: 10px 0;
  overflow: hidden;
  box-shadow: 0 4px 8px rgba(0,0,0,0.6);
  margin-bottom: 5px;
}
.selector-overlay {
  position: absolute;
  top: 4px; left: 50%;
  transform: translateX(-50%);
  width: 71px; height: 112px;
  border-radius: 2px;
  z-index: 2;
}
.spinner-track {
  display: flex;
  gap: 8px;
  will-change: transform;
  z-index: 2;
  padding: 0;
}
.number-box {
  flex: 0 0 60px;
  height: 100px;
  border-radius: 4px;
  padding: 5px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  font-weight: bold;
  color: #fff;
  box-shadow: 0 2px 4px rgba(0,0,0,0.5);
}
.number-box.red {
  background: #a40000;
}
.number-box.red .top-box {
  background: #7e031e;
}
.number-box.black {
  background: #244250;
}
.number-box.black .top-box {
  background: #163340;
}
.number-box.win {
  background: #6AE346 !important;
}
.number-box.win .top-box {
  background: #499F32 !important;
}
.top-box {
  width: 100%;
  height: 50%;
  border-radius: 2px;
  font-size: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.spinner-wrapper .arrow {
  position: absolute;
  bottom: 0; left: 50%;
  transform: translate(-50%, 50%);
  width: 35px; height: 30px;
  background: linear-gradient(to bottom, #d02e2e 0%, #d02e2e 44%, #a40000 46%, #7a0000 100%);
  clip-path: polygon(50% 0%, 0% 100%, 100% 100%);
  z-index: 3;
}

/* ====== GAME GRIDS ====== */
.game-words {
  display: flex;
  gap: 30px;
  margin-bottom: 20px;
}
.game-words-grid {
  flex: 1;
  border-radius: 5px;
  display: flex;
  flex-direction: column;
}
.game-words-grid.A {
  border: 2px solid #fff;
}
.game-words-grid.B {
  border: 2px solid #27ae60;
}
.game-words-grid h3 {
  text-align: center;
  margin-bottom: 10px;
  font-size: 15px;
  color: #244250;
  font-weight: bold;
}
.game-words-grid > div {
  flex: 1;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  justify-items: center;
  align-content: start;
}
.game-words-grid .cell {
  background: linear-gradient(to bottom, #d02e2e 0%, #d02e2e 44%, #a40000 46%, #7a0000 100%);
  height: 55px;
  border-radius: 5px;
  box-shadow: 0 1px 1px rgba(0,0,0,0.3);
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 20px;
  font-weight: bold;
  color: #f3ebd0;
  cursor: pointer;
  user-select: none;
  transition: background 0.2s;
  width: 85%;
}
.game-words-grid .cell.selected {
  background: linear-gradient(to bottom, #244250 0%, #244250 44%, #1f3c43 46%, #162d2f 100%) !important;
}
.game-words-grid .cell.win {
  background: linear-gradient(to bottom, #ffa500 0%, #ffa500 44%, #cc8400 46%, #996300 100%);
  color: #fff !important;
}

/* ====== HISTORY ====== */
.history {
  display: flex;
  gap: 30px;
  margin-bottom: 20px;
}
.history div {
  flex: 1;
  background: linear-gradient(to bottom, #d02e2e 0%, #d02e2e 44%, #a40000 46%, #7a0000 100%);
  border-radius: 5px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.5);
  text-align: center;
}
.history h4 {
  margin-bottom: -10px;
  font-size: 14px;
}
.history ul {
  list-style: none;
  padding: 0;
  display: flex;
  justify-content: center;
  gap: 5px;
  flex-wrap: wrap;
}
.history li {
  background: linear-gradient(to bottom, #244250 0%, #244250 44%, #1f3c43 46%, #162d2f 100%);
  padding: 5px 8px;
  border-radius: 2px;
  font-size: 14px;
  text-align: center;
}

/* ====== CONTROLS ====== */
.controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  background: linear-gradient(to bottom, #244250 0%, #244250 44%, #1f3c43 46%, #162d2f 100%);
  box-shadow: 0 2px 4px rgba(0,0,0,0.5);
  border-radius: 5px;
  padding: 10px;
}
.controls .bet-amt {
  font-size: 16px;
}
.controls button {
  background: linear-gradient(to bottom, #d02e2e 0%, #d02e2e 44%, #a40000 46%, #7a0000 100%);
  color: #f3ebd0;
  border: none;
  padding: 10px 20px;
  border-radius: 4px;
  font-weight: bold;
  cursor: pointer;
}

/* ====== WIN DISPLAY ====== */
.win-display {
  text-align: center;
  font-size: 20px;
  font-weight: bold;
  margin-bottom: 20px;
  color: #6AE346;
}

/* ====== POPUP ====== */
.popup-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.6);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 10;
}
.popup {
  background: #24262e;
  padding: 20px;
  border-radius: 8px;
  text-align: left;
  color: #f3ebd0;
  min-width: 220px;
  box-shadow: 0 4px 8px rgba(0,0,0,0.7);
}
.popup h2 {
  text-align: center;
  margin-bottom: 15px;
}
.popup .line {
  display: flex;
  justify-content: space-between;
  margin: 8px 0;
  font-size: 16px;
}
.popup hr {
  border-color: #444;
  margin: 10px 0;
}
.popup button {
  display: block;
  margin: 10px auto 0;
  padding: 8px 16px;
  background: #27ae60;
  border: none;
  border-radius: 4px;
  color: #f3ebd0;
  cursor: pointer;
  font-weight: bold;
}

/* ====== Responsive Login Form ====== */

.form-container {
  max-width: 400px;
  margin: 80px auto 40px;
  padding: 20px;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.form-container h2 {
  text-align: center;
  margin-bottom: 20px;
  color: #244250;
  font-size: 1.5rem;
}

.form-group {
  margin-bottom: 15px;
}
.form-group label {
  display: block;
  font-weight: 600;
  margin-bottom: 5px;
  color: #244250;
}
.form-group input {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-size: 1rem;
  transition: border-color .2s;
}
.form-group input:focus {
  border-color: #a40000;
  outline: none;
}

.alert-danger {
  background: #f8d7da;
  color: #842029;
  padding: 10px 12px;
  border-radius: 4px;
  margin-bottom: 15px;
  border: 1px solid #f5c2c7;
}

.btn {
  display: block;
  width: 100%;
  padding: 12px;
  background: #a40000;
  color: #fff;
  font-weight: 600;
  text-align: center;
  border: none;
  border-radius: 4px;
  font-size: 1rem;
  cursor: pointer;
  transition: background .2s;
}
.btn:hover {
  background: #7e031e;
}

@media (max-width: 480px) {
  .form-container {
    margin: 40px 10px;
    padding: 15px;
  }
  .form-container h2 {
    font-size: 1.25rem;
  }
}

