:root {
  --nyan-gold: #ffd700;
  --nyan-pink: #ff66b2;
  --nyan-purple: #bc00ff;
  --glass: rgba(0, 0, 0, 0.8);
}

* {
  margin: 0; padding: 0; box-sizing: border-box;
  user-select: none; touch-action: none;
}

body {
  font-family: 'Outfit', 'M PLUS Rounded 1c', sans-serif;
  background-color: #121212; color: #fff;
  overflow: hidden; height: 100vh;
}

#app {
  width: 100vw; height: 100vh;
  background: url('bg.png') center/cover no-repeat;
  display: flex; flex-direction: column;
  justify-content: center; align-items: center;
}

#app::before {
  content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 100%;
  background: radial-gradient(circle, transparent 20%, rgba(0,0,0,0.7) 100%);
  z-index: 1;
}

.back-link {
  position: absolute; top: 20px; left: 20px; z-index: 100;
  background: var(--nyan-gold); color: #000;
  padding: 8px 15px; border-radius: 20px; font-weight: 900;
  text-decoration: none; font-size: 0.9rem;
  box-shadow: 0 0 20px var(--nyan-gold);
}

.casino-container {
  position: relative; z-index: 2;
  display: flex; flex-direction: column; align-items: center; gap: 30px;
  max-width: 500px; width: 90%;
}

.slot-machine {
  background: linear-gradient(135deg, #444, #111, #444);
  padding: 20px; border-radius: 40px;
  border: 8px solid #888;
  box-shadow: 0 0 50px rgba(255, 215, 0, 0.3), inset 0 0 20px #000;
  width: 100%;
}

.machine-header { text-align: center; margin-bottom: 20px; }
.jackpot-banner {
  background: #121212; color: var(--nyan-gold);
  padding: 10px; border-radius: 10px;
  font-size: 1.5rem; font-weight: 900;
  border: 2px solid var(--nyan-gold);
  text-shadow: 0 0 10px var(--nyan-gold);
  animation: glow 2s infinite;
}

@keyframes glow {
  0%, 100% { box-shadow: 0 0 10px var(--nyan-gold); }
  50% { box-shadow: 0 0 30px var(--nyan-gold); }
}

.reels {
  display: flex; gap: 15px; background: #222;
  padding: 20px; border-radius: 20px;
  position: relative; overflow: hidden;
  border: 4px solid #000;
}

.reel {
  flex: 1; background: #fff; height: 120px;
  border-radius: 10px; display: flex;
  justify-content: center; align-items: center;
  font-size: 4rem; color: #000;
  box-shadow: inset 0 0 20px rgba(0,0,0,0.5);
}

.reel.spinning {
  animation: blur-spin 0.1s infinite linear;
}

@keyframes blur-spin {
  0% { transform: translateY(-10px); filter: blur(2px); }
  100% { transform: translateY(10px); filter: blur(5px); }
}

.win-line {
  position: absolute; top: 50%; left: 0; width: 100%; height: 4px;
  background: var(--nyan-pink); transform: translateY(-50%);
  box-shadow: 0 0 15px var(--nyan-pink);
  z-index: 5; opacity: 0.3;
}

.machine-footer { margin-top: 25px; }
.info-row {
  display: flex; justify-content: space-between;
  margin-bottom: 20px; font-weight: 900; color: var(--nyan-gold);
}
.info-row.mini {
  gap: 8px;
  margin-bottom: 16px;
  color: rgba(255, 255, 255, 0.84);
  font-size: 0.82rem;
}

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

.bet-selector { display: flex; gap: 10px; justify-content: center; }
.bet-btn {
  background: #333; color: #fff; border: 2px solid #555;
  padding: 10px 20px; border-radius: 10px; font-weight: 900;
  cursor: pointer; transition: all 0.2s;
}
.bet-btn.active {
  background: var(--nyan-purple); border-color: #fff;
  box-shadow: 0 0 15px var(--nyan-purple);
}

.daily-btn {
  border: 1px solid rgba(255, 215, 0, 0.5);
  border-radius: 10px;
  padding: 10px;
  color: #111;
  background: var(--nyan-gold);
  font-weight: 900;
  cursor: pointer;
}

.daily-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

#spin-btn {
  background: linear-gradient(to bottom, var(--nyan-pink), #ff0066);
  color: #fff; border: none; padding: 20px; border-radius: 15px;
  font-size: 1.8rem; font-weight: 900; cursor: pointer;
  box-shadow: 0 8px 0 #990033, 0 15px 30px rgba(255,0,102,0.4);
  transition: all 0.1s;
}
#spin-btn:active {
  transform: translateY(4px); box-shadow: 0 4px 0 #990033;
}
#spin-btn:disabled { opacity: 0.5; cursor: not-allowed; }

.payout-table {
  background: var(--glass); padding: 15px; border-radius: 20px;
  width: 100%; border: 1px solid rgba(255,255,255,0.1);
  backdrop-filter: blur(10px);
}
.payout-table h3 { text-align: center; color: var(--nyan-gold); margin-bottom: 10px; }
.payout-row { display: flex; justify-content: space-between; font-weight: 800; padding: 5px 10px; }

.result-message {
  min-height: 24px;
  margin-bottom: 8px;
  color: var(--nyan-pink);
  text-align: center;
  font-weight: 900;
}

.history-title {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid rgba(255,255,255,0.12);
  color: var(--nyan-gold);
  font-size: 0.78rem;
  font-weight: 900;
  text-align: center;
}

.spin-history {
  display: grid;
  gap: 5px;
  margin-top: 8px;
  font-size: 0.78rem;
}

.history-row {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  padding: 5px 8px;
  border-radius: 8px;
  background: rgba(255,255,255,0.05);
}

.history-row.win {
  color: var(--nyan-gold);
}

/* Mobile Adjustments */
@media (max-width: 600px) {
  .reel { font-size: 3rem; height: 100px; }
  .jackpot-banner { font-size: 1.1rem; }
  #spin-btn { font-size: 1.5rem; }
  .casino-container { gap: 14px; }
  .slot-machine { padding: 14px; border-width: 5px; }
  .bet-selector { flex-wrap: wrap; }
  .info-row { flex-wrap: wrap; gap: 8px; justify-content: center; }
}


/* --- GLOBAL NYANTREPRENEUR OVERRIDES --- */
.back-link, .hub-btn {
  position: absolute !important; top: 15px !important; left: 15px !important; z-index: 9999 !important;
  background: rgba(18, 18, 18, 0.8) !important; color: #ffd700 !important;
  padding: 8px 16px !important; border-radius: 20px !important; font-weight: 800 !important;
  text-decoration: none !important; font-size: 0.8rem !important;
  border: 1px solid rgba(255, 215, 0, 0.3) !important;
  backdrop-filter: blur(10px) !important;
  box-shadow: 0 4px 6px rgba(0,0,0,0.3) !important;
  transition: all 0.2s ease !important;
}
