/* ============================================================================
   Retro's Casino - Sleek Cyberpunk Styles
   ============================================================================ */
@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@400;700;900&family=Outfit:wght@300;400;600;800&family=Share+Tech+Mono&display=swap');

:root {
  --primary-color: #00f3ff; /* Holographic Cyan */
  --secondary-color: #ff007b; /* Holographic Magenta */
  --accent-color: #ffaa00; /* Cyber Amber */
  --neon-green: #39ff14; /* Matrix Green */
  --bg-dark: #050508; /* Void Black */
  --bg-card: rgba(13, 13, 25, 0.7); /* Shaded Glass */
  --text-light: #f0f0ff;
  --text-gray: #82829a;
  --border-color: rgba(0, 243, 255, 0.15);
  --success: #39ff14;
  --error: #ff007b;
  --warning: #ffaa00;
  --cyan-glow: 0 0 15px rgba(0, 243, 255, 0.4);
  --magenta-glow: 0 0 15px rgba(255, 0, 123, 0.4);
}

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

body {
  font-family: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background-color: var(--bg-dark);
  background-image: 
    radial-gradient(at 10% 20%, rgba(255, 0, 123, 0.05) 0px, transparent 50%),
    radial-gradient(at 90% 80%, rgba(0, 243, 255, 0.05) 0px, transparent 50%);
  background-attachment: fixed;
  color: var(--text-light);
  line-height: 1.6;
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Orbitron', sans-serif;
  letter-spacing: 1px;
}

.mono-display {
  font-family: 'Share Tech Mono', monospace;
}

/* ============================================================================
   Loading Screen
   ============================================================================ */

.loading-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  background: var(--bg-dark);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.loader {
  border: 3px solid rgba(0, 243, 255, 0.1);
  border-top: 3px solid var(--primary-color);
  border-radius: 50%;
  width: 60px;
  height: 60px;
  animation: spin 1s cubic-bezier(0.68, -0.55, 0.27, 1.55) infinite;
  box-shadow: var(--cyan-glow);
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* ============================================================================
   Auth Screen
   ============================================================================ */

.auth-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  background: radial-gradient(circle at 50% 50%, #0d0b1a 0%, #030206 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9998;
  overflow: hidden;
}

/* Cyber Grid and Scanlines Overlay */
.auth-screen::before {
  content: " ";
  display: block;
  position: absolute;
  top: 0; left: 0; bottom: 0; right: 0;
  background: linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.25) 50%), linear-gradient(90deg, rgba(255, 0, 0, 0.06), rgba(0, 255, 0, 0.02), rgba(0, 0, 255, 0.06));
  z-index: 2;
  background-size: 100% 4px, 6px 100%;
  pointer-events: none;
}

.auth-container {
  background: rgba(13, 13, 25, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  padding: 45px 35px;
  border-radius: 16px;
  border: 1px solid var(--primary-color);
  box-shadow: 0 0 30px rgba(0, 243, 255, 0.2), inset 0 0 15px rgba(0, 243, 255, 0.1);
  width: 95%;
  max-width: 420px;
  text-align: center;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  z-index: 5;
  position: relative;
}

.auth-container:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 40px rgba(0, 243, 255, 0.35), inset 0 0 20px rgba(0, 243, 255, 0.15);
}

.auth-container h1 {
  font-size: 2.2rem;
  margin-bottom: 8px;
  color: var(--primary-color);
  text-shadow: var(--cyan-glow);
}

.subtitle {
  color: var(--text-gray);
  font-size: 0.95rem;
  margin-bottom: 30px;
}

.auth-form {
  text-align: left;
}

.auth-form h2 {
  font-size: 1.4rem;
  margin-bottom: 20px;
  color: var(--text-light);
  border-left: 3px solid var(--secondary-color);
  padding-left: 10px;
}

.form-group {
  margin-bottom: 22px;
}

.form-group label {
  display: block;
  margin-bottom: 6px;
  color: var(--text-gray);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.form-group input {
  width: 100%;
  padding: 12px 16px;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(0, 243, 255, 0.15);
  border-radius: 8px;
  color: var(--text-light);
  font-size: 1rem;
  font-family: 'Outfit', sans-serif;
  transition: all 0.3s ease;
}

.form-group input:focus {
  outline: none;
  border-color: var(--primary-color);
  background: rgba(0, 0, 0, 0.5);
  box-shadow: 0 0 10px rgba(0, 243, 255, 0.15);
}

.form-group small {
  display: block;
  margin-top: 6px;
  color: var(--text-gray);
  font-size: 0.75rem;
}

.btn {
  padding: 12px 24px;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  font-family: 'Orbitron', sans-serif;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  font-weight: 700;
  letter-spacing: 1px;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary-color) 0%, #00b8d4 100%);
  color: var(--bg-dark);
  width: 100%;
  box-shadow: var(--cyan-glow);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 25px rgba(0, 243, 255, 0.6);
}

.btn-small {
  padding: 8px 16px;
  font-size: 0.85rem;
}

.form-switch {
  margin-top: 24px;
  text-align: center;
  color: var(--text-gray);
  font-size: 0.9rem;
}

.form-switch a {
  color: var(--primary-color);
  text-decoration: none;
  font-weight: 600;
}

.form-switch a:hover {
  text-decoration: underline;
  text-shadow: 0 0 8px rgba(0, 243, 255, 0.4);
}

.error-message {
  background: rgba(255, 0, 123, 0.1);
  border: 1px solid var(--error);
  color: #ff4097;
  padding: 14px;
  border-radius: 8px;
  margin-top: 20px;
  font-size: 0.9rem;
}

.success-message {
  background: rgba(57, 255, 20, 0.1);
  border: 1px solid var(--success);
  color: #60ff48;
  padding: 14px;
  border-radius: 8px;
  margin-top: 20px;
  font-size: 0.9rem;
}

.reset-step {
  margin-bottom: 20px;
}

.reset-step p {
  margin-bottom: 15px;
  color: var(--text-gray);
  font-size: 0.9rem;
}

/* ============================================================================
   Main App Layout
   ============================================================================ */

.app-screen {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Header */
.header {
  background: rgba(13, 13, 25, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-color);
  padding: 18px 30px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 4px 20px rgba(0,0,0,0.2);
}

.header h1 {
  font-size: 1.6rem;
  color: var(--primary-color);
  text-shadow: var(--cyan-glow);
}

.header-right {
  display: flex;
  align-items: center;
  gap: 25px;
}

.balance-display {
  background: rgba(0, 0, 0, 0.4);
  padding: 10px 22px;
  border-radius: 8px;
  border: 1px solid rgba(0, 243, 255, 0.25);
  box-shadow: inset 0 0 10px rgba(0, 243, 255, 0.05);
}

.balance-label {
  color: var(--text-gray);
  margin-right: 12px;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.balance-amount {
  color: var(--success);
  font-family: 'Share Tech Mono', monospace;
  font-weight: bold;
  font-size: 1.3rem;
  text-shadow: 0 0 10px rgba(57, 255, 20, 0.3);
}

.user-info {
  display: flex;
  align-items: center;
  gap: 15px;
}

.user-info span {
  font-weight: 600;
  color: #fff;
}

/* Navigation */
.nav {
  background: rgba(13, 13, 25, 0.9);
  border-bottom: 1px solid var(--border-color);
  padding: 0 30px;
  display: flex;
  gap: 15px;
  overflow-x: auto;
}

.nav-btn {
  background: transparent;
  border: none;
  color: var(--text-gray);
  padding: 16px 20px;
  cursor: pointer;
  border-bottom: 3px solid transparent;
  transition: all 0.3s ease;
  font-family: 'Orbitron', sans-serif;
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.5px;
}

.nav-btn:hover {
  color: var(--text-light);
  background: rgba(0, 243, 255, 0.03);
}

.nav-btn.active {
  color: var(--primary-color);
  border-bottom-color: var(--primary-color);
  text-shadow: var(--cyan-glow);
}

/* Content */
.content {
  flex: 1;
  padding: 35px 30px;
  max-width: 1280px;
  margin: 0 auto;
  width: 100%;
}

.screen {
  display: none;
  animation: fadeIn 0.4s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.screen.active {
  display: block;
}

.screen h2 {
  margin-bottom: 22px;
  color: var(--primary-color);
  text-shadow: var(--cyan-glow);
  font-size: 1.8rem;
}

/* Stats Cards */
.quick-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
  margin-top: 30px;
}

.stat-card {
  background: var(--bg-card);
  backdrop-filter: blur(8px);
  padding: 22px;
  border-radius: 12px;
  border: 1px solid var(--border-color);
  text-align: center;
  transition: all 0.3s ease;
}

.stat-card:hover {
  border-color: rgba(0, 243, 255, 0.3);
  box-shadow: var(--cyan-glow);
  transform: translateY(-2px);
}

.stat-card h3 {
  color: var(--text-gray);
  font-size: 0.8rem;
  margin-bottom: 12px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.stat-value {
  font-size: 1.8rem;
  font-weight: bold;
  color: var(--primary-color);
  font-family: 'Share Tech Mono', monospace;
  text-shadow: var(--cyan-glow);
}

/* Notifications */
.notifications {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 10000;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 400px;
}

.notification {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 5px;
  padding: 15px;
  animation: slideIn 0.3s ease;
}

.notification.success {
  border-left: 4px solid var(--success);
}

.notification.error {
  border-left: 4px solid var(--error);
}

.notification.warning {
  border-left: 4px solid var(--warning);
}

@keyframes slideIn {
  from {
    transform: translateX(400px);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

/* ============================================================================
   Games
   ============================================================================ */

/* Game Tabs */
.game-tabs {
  display: flex;
  gap: 10px;
  margin-bottom: 30px;
  border-bottom: 1px solid var(--border-color);
}

.game-tab {
  background: transparent;
  border: none;
  color: var(--text-gray);
  padding: 15px 20px;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: all 0.3s;
}

.game-tab:hover {
  color: var(--text-light);
}

.game-tab.active {
  color: var(--primary-color);
  border-bottom-color: var(--primary-color);
}

.game-container {
  display: none;
}

.game-container.active {
  display: block;
}

/* Slots Game */
.slots-machine {
  max-width: 600px;
  margin: 0 auto;
}

.slots-display {
  background: var(--bg-card);
  border: 2px solid var(--primary-color);
  border-radius: 10px;
  padding: 30px;
  margin-bottom: 20px;
  box-shadow: 0 0 20px rgba(0, 255, 136, 0.3);
}

.reels {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-bottom: 20px;
}

.reel {
  background: var(--bg-dark);
  border: 2px solid var(--border-color);
  border-radius: 10px;
  width: 100px;
  height: 100px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  transition: all 0.3s;
}

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

.reel.result {
  animation: bounce 0.5s ease;
  border-color: var(--primary-color);
}

@keyframes spin-reel {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-5px); }
}

@keyframes bounce {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.1); }
}

.result-message {
  text-align: center;
  font-size: 1.2rem;
  font-weight: bold;
  min-height: 30px;
}

.result-message.win {
  color: var(--success);
  animation: pulse 0.5s ease;
}

.result-message.loss {
  color: var(--text-gray);
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}

/* Slots Controls */
.slots-controls {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 20px;
  margin-bottom: 20px;
}

.bet-section h3 {
  margin-bottom: 15px;
  color: var(--text-light);
}

.bet-buttons {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 15px;
}

.bet-btn {
  background: var(--bg-dark);
  border: 1px solid var(--border-color);
  color: var(--text-light);
  padding: 10px 20px;
  border-radius: 5px;
  cursor: pointer;
  transition: all 0.3s;
}

.bet-btn:hover {
  border-color: var(--primary-color);
  background: rgba(0, 255, 136, 0.1);
}

.bet-btn.active {
  background: var(--primary-color);
  color: var(--bg-dark);
  border-color: var(--primary-color);
}

.custom-bet {
  margin-bottom: 15px;
}

.custom-bet label {
  display: block;
  margin-bottom: 5px;
  color: var(--text-gray);
}

.custom-bet input {
  width: 100%;
  padding: 10px;
  background: var(--bg-dark);
  border: 1px solid var(--border-color);
  border-radius: 5px;
  color: var(--text-light);
  font-size: 1rem;
}

.custom-bet input:focus {
  outline: none;
  border-color: var(--primary-color);
}

.current-bet {
  text-align: center;
  color: var(--text-gray);
  font-size: 1.1rem;
  margin-top: 10px;
}

.current-bet span {
  color: var(--primary-color);
  font-weight: bold;
}

.spin-btn {
  width: 100%;
  padding: 20px;
  background: linear-gradient(135deg, var(--primary-color), #00cc6a);
  border: none;
  border-radius: 10px;
  color: var(--bg-dark);
  font-size: 1.5rem;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.3s;
  margin-top: 15px;
}

.spin-btn:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 5px 20px rgba(0, 255, 136, 0.5);
}

.spin-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Paytable */
.slots-paytable {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 20px;
}

.slots-paytable h4 {
  margin-bottom: 15px;
  color: var(--text-light);
  text-align: center;
}

.paytable-grid {
  display: grid;
  gap: 10px;
}

.paytable-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px;
  background: var(--bg-dark);
  border-radius: 5px;
}

.paytable-row span:first-child {
  font-size: 1.5rem;
}

.paytable-row span:last-child {
  color: var(--primary-color);
  font-weight: bold;
}

/* Big Win Overlay */
.big-win-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  background: rgba(0, 0, 0, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  animation: fadeIn 0.5s ease;
}

.big-win-overlay.fade-out {
  animation: fadeOut 0.5s ease;
}

.big-win-content {
  text-align: center;
  animation: zoomIn 0.5s ease;
}

.big-win-content h1 {
  font-size: 4rem;
  color: var(--primary-color);
  margin-bottom: 20px;
  text-shadow: 0 0 20px rgba(0, 255, 136, 0.8);
}

.big-win-amount {
  font-size: 3rem;
  color: var(--text-light);
  font-weight: bold;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes fadeOut {
  from { opacity: 1; }
  to { opacity: 0; }
}

@keyframes zoomIn {
  from { transform: scale(0.5); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

/* ============================================================================
   Roulette Game
   ============================================================================ */

.roulette-game {
  max-width: 900px;
  margin: 0 auto;
}

/* Wheel Display */
.roulette-wheel-container {
  text-align: center;
  margin-bottom: 30px;
}

.roulette-wheel {
  font-size: 6rem;
  margin-bottom: 15px;
  display: inline-block;
}

.roulette-wheel.spinning {
  animation: spin-wheel 0.5s linear infinite;
}

@keyframes spin-wheel {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.roulette-result {
  font-size: 1.2rem;
  font-weight: bold;
  min-height: 60px;
}

.roulette-result .red {
  color: #ff0000;
}

.roulette-result .black {
  color: #000000;
  background: #ffffff;
  padding: 2px 8px;
  border-radius: 3px;
}

.roulette-result .green {
  color: #00ff00;
}

.roulette-result .result-win {
  color: var(--success);
}

.roulette-result .result-loss {
  color: var(--text-gray);
}

/* Roulette Table */
.roulette-table-wrapper {
  background: var(--bg-card);
  padding: 20px;
  border-radius: 10px;
  border: 2px solid var(--primary-color);
  overflow-x: auto;
  margin-bottom: 20px;
}

.roulette-table {
  display: inline-block;
  min-width: 600px;
}

.number-grid {
  display: flex;
  gap: 5px;
  margin-bottom: 5px;
}

.zero-cell {
  background: #00aa00;
  color: white;
  font-weight: bold;
  font-size: 1.2rem;
  width: 60px;
  min-height: 360px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--border-color);
  border-radius: 5px;
  cursor: pointer;
  transition: all 0.2s;
  position: relative;
  writing-mode: vertical-rl;
  text-orientation: upright;
}

.zero-cell:hover {
  transform: scale(1.05);
  border-color: var(--primary-color);
}

.numbers-section {
  flex: 1;
  display: flex;
  flex-direction: row;
  gap: 5px;
}

.number-row {
  display: flex;
  flex-direction: column-reverse;
  gap: 5px;
}

.number-cell {
  width: 60px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  border: 2px solid var(--border-color);
  border-radius: 5px;
  cursor: pointer;
  transition: all 0.2s;
  position: relative;
}

.number-cell.red {
  background: #cc0000;
  color: white;
}

.number-cell.black {
  background: #000000;
  color: white;
}

.number-cell:hover {
  transform: scale(1.05);
  border-color: var(--primary-color);
  z-index: 10;
}

.number-cell.winning {
  animation: pulse-win 1s ease infinite;
  border-color: gold;
  box-shadow: 0 0 20px gold;
}

@keyframes pulse-win {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.1); }
}

.column-bets {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.column-bet {
  background: var(--bg-dark);
  color: var(--text-light);
  font-weight: bold;
  width: 60px;
  height: 113px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--border-color);
  border-radius: 5px;
  cursor: pointer;
  transition: all 0.2s;
  position: relative;
}

.column-bet:hover {
  border-color: var(--primary-color);
  background: rgba(0, 255, 136, 0.1);
}

/* Outside Bets */
.outside-bets {
  display: flex;
  gap: 5px;
  margin-bottom: 5px;
}

.outside-bet {
  background: var(--bg-dark);
  color: var(--text-light);
  font-weight: bold;
  flex: 1;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--border-color);
  border-radius: 5px;
  cursor: pointer;
  transition: all 0.2s;
  position: relative;
}

.outside-bet:hover {
  border-color: var(--primary-color);
  background: rgba(0, 255, 136, 0.1);
}

.outside-bet.red-bet {
  background: #cc0000;
}

.outside-bet.black-bet {
  background: #000000;
}

/* Chips on table */
.chip {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: var(--primary-color);
  color: var(--bg-dark);
  font-size: 0.7rem;
  font-weight: bold;
  padding: 4px 8px;
  border-radius: 50%;
  border: 2px solid white;
  z-index: 100;
  pointer-events: none;
  min-width: 35px;
  text-align: center;
}

/* Roulette Controls */
.roulette-controls {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 20px;
}

.chip-selection h3 {
  margin-bottom: 15px;
  color: var(--text-light);
}

.chip-buttons {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.chip-btn {
  background: var(--bg-dark);
  border: 2px solid var(--border-color);
  color: var(--text-light);
  padding: 10px 20px;
  border-radius: 5px;
  cursor: pointer;
  transition: all 0.3s;
  font-weight: bold;
}

.chip-btn:hover {
  border-color: var(--primary-color);
  background: rgba(0, 255, 136, 0.1);
}

.chip-btn.active {
  background: var(--primary-color);
  color: var(--bg-dark);
  border-color: var(--primary-color);
}

.bet-info {
  margin-bottom: 20px;
  text-align: center;
}

.total-bet {
  font-size: 1.2rem;
  color: var(--text-gray);
}

.total-bet span {
  color: var(--primary-color);
  font-weight: bold;
  font-size: 1.4rem;
}

.action-buttons {
  display: flex;
  gap: 15px;
}

.btn-clear,
.btn-spin {
  flex: 1;
  padding: 15px;
  border: none;
  border-radius: 8px;
  font-size: 1.1rem;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.3s;
}

.btn-clear {
  background: var(--bg-dark);
  color: var(--text-light);
  border: 2px solid var(--border-color);
}

.btn-clear:hover:not(:disabled) {
  border-color: var(--error);
  color: var(--error);
}

.btn-spin {
  background: linear-gradient(135deg, var(--primary-color), #00cc6a);
  color: var(--bg-dark);
}

.btn-spin:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 5px 20px rgba(0, 255, 136, 0.5);
}

.btn-clear:disabled,
.btn-spin:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* ============================================================================
   Blackjack Game
   ============================================================================ */

.blackjack-game {
  max-width: 800px;
  margin: 0 auto;
}

/* Betting Area */
.bj-betting-area {
  background: var(--bg-card);
  border: 2px solid var(--primary-color);
  border-radius: 10px;
  padding: 30px;
  text-align: center;
}

.bj-betting-area h3 {
  margin-bottom: 20px;
  color: var(--primary-color);
}

.bj-bet-btn {
  background: var(--bg-dark);
  border: 2px solid var(--border-color);
  color: var(--text-light);
  padding: 12px 24px;
  margin: 5px;
  border-radius: 5px;
  cursor: pointer;
  transition: all 0.3s;
  font-weight: bold;
}

.bj-bet-btn:hover {
  border-color: var(--primary-color);
  background: rgba(0, 255, 136, 0.1);
}

.bj-bet-btn.active {
  background: var(--primary-color);
  color: var(--bg-dark);
}

.btn-deal,
.btn-new-game {
  background: linear-gradient(135deg, var(--primary-color), #00cc6a);
  color: var(--bg-dark);
  border: none;
  padding: 15px 40px;
  border-radius: 8px;
  font-size: 1.3rem;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.3s;
  margin-top: 20px;
}

.btn-deal:hover,
.btn-new-game:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 20px rgba(0, 255, 136, 0.5);
}

/* Game Area */
.bj-game-area {
  background: var(--bg-card);
  border: 2px solid var(--primary-color);
  border-radius: 10px;
  padding: 30px;
}

.bj-dealer-section,
.bj-player-section {
  margin-bottom: 30px;
}

.bj-dealer-section h3,
.bj-player-section h3 {
  color: var(--text-light);
  margin-bottom: 15px;
}

.hand-value {
  color: var(--primary-color);
  font-weight: bold;
  margin-left: 10px;
}

.bj-cards-area {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
  min-height: 120px;
}

/* Player Hands */
.bj-player-hands {
  display: flex;
  gap: 30px;
  justify-content: center;
  flex-wrap: wrap;
}

.bj-hand {
  background: var(--bg-dark);
  border: 2px solid var(--border-color);
  border-radius: 8px;
  padding: 15px;
  min-width: 200px;
}

.bj-hand.active {
  border-color: var(--primary-color);
  box-shadow: 0 0 20px rgba(0, 255, 136, 0.3);
}

.bj-hand-label {
  color: var(--text-gray);
  font-size: 0.9rem;
  margin-bottom: 10px;
}

.bj-hand .bj-cards {
  display: flex;
  gap: 10px;
  justify-content: center;
  margin-bottom: 10px;
}

.bj-hand-value {
  color: var(--primary-color);
  font-weight: bold;
  text-align: center;
  font-size: 1.2rem;
}

/* Cards */
.card {
  background: white;
  border: 2px solid #333;
  border-radius: 8px;
  width: 80px;
  height: 110px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  font-weight: bold;
  position: relative;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  transition: transform 0.3s;
}

.card:hover {
  transform: translateY(-5px);
}

.card.red {
  color: #cc0000;
}

.card.black {
  color: #000000;
}

.card-back {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  font-size: 3rem;
}

.card-rank {
  position: absolute;
  top: 5px;
  left: 8px;
  font-size: 1.2rem;
}

.card-suit {
  font-size: 2.5rem;
}

/* Action Buttons */
.bj-actions {
  display: flex;
  gap: 15px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 20px;
}

.bj-action-btn {
  background: var(--bg-dark);
  border: 2px solid var(--primary-color);
  color: var(--primary-color);
  padding: 15px 30px;
  border-radius: 8px;
  font-size: 1.1rem;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.3s;
  min-width: 120px;
}

.bj-action-btn:hover:not(:disabled) {
  background: var(--primary-color);
  color: var(--bg-dark);
  transform: translateY(-2px);
}

.bj-action-btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
  border-color: var(--border-color);
  color: var(--text-gray);
}

/* Result Area */
.bj-result-area {
  background: var(--bg-card);
  border: 2px solid var(--primary-color);
  border-radius: 10px;
  padding: 40px;
  text-align: center;
}

.bj-result-message {
  font-size: 1.5rem;
  font-weight: bold;
  margin-bottom: 30px;
}

.bj-result-message.win {
  color: var(--success);
}

.bj-result-message.loss {
  color: var(--error);
}

.bj-result-message.push {
  color: var(--warning);
}

.bj-result-message.blackjack {
  color: var(--primary-color);
  font-size: 2rem;
  animation: pulse 1s ease infinite;
}

.bj-results-details {
  background: var(--bg-dark);
  border-radius: 5px;
  padding: 15px;
  margin-top: 15px;
}

.result-row {
  padding: 8px;
  margin: 5px 0;
  border-radius: 3px;
}

.result-row.win,
.result-row.blackjack {
  background: rgba(0, 255, 136, 0.1);
  color: var(--success);
}

.result-row.loss {
  background: rgba(255, 0, 102, 0.1);
  color: var(--error);
}

.result-row.push {
  background: rgba(255, 170, 0, 0.1);
  color: var(--warning);
}

.result-main {
  font-size: 1.8rem;
  margin-bottom: 15px;
}

/* Responsive */
@media (max-width: 768px) {
  .header {
    flex-direction: column;
    gap: 15px;
  }

  .header-right {
    flex-direction: column;
    width: 100%;
  }

  .balance-display,
  .user-info {
    width: 100%;
    justify-content: center;
  }

  .nav {
    overflow-x: auto;
  }

  .content {
    padding: 20px;
  }

  .quick-stats {
    grid-template-columns: 1fr;
  }

  .reels {
    gap: 10px;
  }

  .reel {
    width: 80px;
    height: 80px;
    font-size: 2.5rem;
  }

  .bet-buttons {
    justify-content: center;
  }

  .big-win-content h1 {
    font-size: 2.5rem;
  }

  .big-win-amount {
    font-size: 2rem;
  }

  /* Roulette responsive */
  .roulette-table {
    min-width: 400px;
  }

  .number-cell {
    width: 45px;
    height: 35px;
    font-size: 0.9rem;
  }

  .zero-cell {
    width: 45px;
    min-height: 300px;
  }

  .column-bet {
    width: 45px;
    height: 95px;
    font-size: 0.8rem;
  }

  .outside-bet {
    font-size: 0.8rem;
    height: 40px;
  }

  .roulette-wheel {
    font-size: 4rem;
  }

  .chip-buttons {
    justify-content: center;
  }

  .action-buttons {
    flex-direction: column;
  }

  /* Blackjack responsive */
  .card {
    width: 60px;
    height: 85px;
    font-size: 1.5rem;
  }

  .card-rank {
    font-size: 1rem;
  }

  .card-suit {
    font-size: 2rem;
  }

  .bj-player-hands {
    flex-direction: column;
    gap: 15px;
  }

  .bj-hand {
    min-width: auto;
  }

  .bj-actions {
    flex-direction: column;
  }

  .bj-action-btn {
    width: 100%;
  }

  .result-main {
    font-size: 1.3rem;
  }

  /* Leaderboard responsive */
  .leaderboard-tabs {
    flex-wrap: wrap;
  }

  .profile-stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .breakdown-grid {
    grid-template-columns: 1fr;
  }
}

/* ============================================================================
   Leaderboard
   ============================================================================ */

.leaderboard-tabs {
  display: flex;
  gap: 10px;
  margin-bottom: 30px;
  border-bottom: 1px solid var(--border-color);
}

.lb-tab {
  background: transparent;
  border: none;
  color: var(--text-gray);
  padding: 15px 20px;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: all 0.3s;
  font-size: 0.95rem;
}

.lb-tab:hover {
  color: var(--text-light);
}

.lb-tab.active {
  color: var(--primary-color);
  border-bottom-color: var(--primary-color);
}

.your-rank-card {
  background: var(--bg-card);
  border: 2px solid var(--primary-color);
  border-radius: 10px;
  padding: 20px;
  margin-bottom: 30px;
  text-align: center;
}

.your-rank-card h3 {
  color: var(--text-light);
  margin-bottom: 15px;
}

.rank-content {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 20px;
}

.rank-number {
  font-size: 2rem;
  font-weight: bold;
  color: var(--primary-color);
}

.rank-value {
  font-size: 1.5rem;
  color: var(--text-light);
}

.leaderboard-container {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 20px;
  overflow-x: auto;
}

.leaderboard-table {
  width: 100%;
  border-collapse: collapse;
}

.leaderboard-table th {
  color: var(--text-gray);
  text-align: left;
  padding: 15px;
  border-bottom: 2px solid var(--border-color);
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.9rem;
}

.leaderboard-table td {
  padding: 15px;
  border-bottom: 1px solid var(--border-color);
  color: var(--text-light);
}

.leaderboard-table tr:last-child td {
  border-bottom: none;
}

.leaderboard-table .rank {
  font-weight: bold;
  width: 100px;
}

.leaderboard-table .username {
  font-weight: 600;
}

.leaderboard-table .value {
  text-align: right;
  color: var(--primary-color);
  font-weight: bold;
}

.leaderboard-table .top-1 {
  background: rgba(255, 215, 0, 0.1);
}

.leaderboard-table .top-2 {
  background: rgba(192, 192, 192, 0.1);
}

.leaderboard-table .top-3 {
  background: rgba(205, 127, 50, 0.1);
}

.leaderboard-table .loading,
.leaderboard-table .error,
.leaderboard-table .empty {
  text-align: center;
  color: var(--text-gray);
  padding: 30px;
}

.leaderboard-table .error {
  color: var(--error);
}

/* ============================================================================
   Profile
   ============================================================================ */

.profile-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  margin-bottom: 30px;
}

.profile-stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 20px;
  text-align: center;
}

.profile-stat-card h3 {
  color: var(--text-gray);
  font-size: 0.9rem;
  margin-bottom: 10px;
  text-transform: uppercase;
}

.profile-stat-card .stat-value {
  font-size: 1.8rem;
  font-weight: bold;
  color: var(--primary-color);
}

.profile-stat-card .stat-value.success {
  color: var(--success);
}

.profile-stat-card .stat-value.error {
  color: var(--error);
}

.game-breakdown,
.recent-games {
  margin-bottom: 30px;
}

.game-breakdown h3,
.recent-games h3 {
  color: var(--text-light);
  margin-bottom: 20px;
}

.breakdown-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
}

.game-breakdown-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 20px;
}

.game-breakdown-card h4 {
  color: var(--primary-color);
  margin-bottom: 15px;
  font-size: 1.2rem;
}

.breakdown-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.breakdown-stat {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
}

.breakdown-stat .stat-label {
  color: var(--text-gray);
  font-size: 0.9rem;
}

.breakdown-stat .stat-value {
  color: var(--text-light);
  font-weight: 600;
}

.breakdown-stat .stat-value.success {
  color: var(--success);
}

.breakdown-stat .stat-value.error {
  color: var(--error);
}

.games-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.game-history-item {
  background: var(--bg-card);
  border-left: 4px solid var(--border-color);
  border-radius: 5px;
  padding: 15px;
  transition: all 0.3s;
}

.game-history-item:hover {
  transform: translateX(5px);
  border-left-color: var(--primary-color);
}

.game-history-item.success {
  border-left-color: var(--success);
}

.game-history-item.error {
  border-left-color: var(--error);
}

.game-history-item.warning {
  border-left-color: var(--warning);
}

.game-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.game-icon {
  font-size: 1.5rem;
}

.game-name {
  color: var(--text-light);
  font-weight: 600;
  flex: 1;
}

.game-time {
  color: var(--text-gray);
  font-size: 0.85rem;
}

.game-details {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.9rem;
}

.game-bet {
  color: var(--text-gray);
}

.game-result {
  font-weight: bold;
  padding: 4px 8px;
  border-radius: 3px;
}

.game-result.success {
  background: rgba(0, 255, 136, 0.1);
  color: var(--success);
}

.game-result.error {
  background: rgba(255, 0, 102, 0.1);
  color: var(--error);
}

.game-result.warning {
  background: rgba(255, 170, 0, 0.1);
  color: var(--warning);
}

.game-payout {
  font-weight: bold;
}

.game-payout.success {
  color: var(--success);
}

.game-payout.error {
  color: var(--error);
}

.empty-message {
  text-align: center;
  color: var(--text-gray);
  padding: 30px;
}

/* Profile Settings */
.profile-settings {
  margin-bottom: 30px;
}

.profile-settings h3 {
  color: var(--text-light);
  margin-bottom: 20px;
}

.settings-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 15px;
}

.settings-grid .btn {
  width: 100%;
}

/* Avatar Grid */
.avatar-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
  gap: 15px;
  margin: 20px 0;
}

.avatar-option {
  width: 80px;
  height: 80px;
  cursor: pointer;
  border: 2px solid transparent;
  border-radius: 50%;
  transition: all 0.3s;
}

.avatar-option:hover {
  border-color: var(--primary-color);
  transform: scale(1.1);
}

/* ============================================================================
   Admin Panel
   ============================================================================ */

/* ============================================================================
   ADMIN TERMINAL (CYBERPUNK)
   ============================================================================ */

.admin-hud-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 25px;
  border-bottom: 1px solid var(--primary-color);
  padding-bottom: 15px;
}

.admin-hud-tag {
  color: var(--error);
  font-size: 0.75rem;
  font-family: var(--font-mono);
  letter-spacing: 2px;
  animation: pulse-glow-red 2s infinite;
}

.admin-hud-header h2 {
  color: var(--primary-color);
  font-size: 1.8rem;
  text-transform: uppercase;
  margin: 5px 0;
  text-shadow: 0 0 10px rgba(0, 255, 136, 0.4);
}

.admin-hud-sub {
  color: var(--text-gray);
  font-size: 0.85rem;
  font-family: var(--font-mono);
}

.admin-hud-badge {
  background: rgba(255, 0, 102, 0.15);
  border: 1px solid var(--error);
  color: var(--error);
  padding: 5px 12px;
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  display: flex;
  align-items: center;
  gap: 8px;
}

.blink-dot {
  width: 8px;
  height: 8px;
  background: var(--error);
  border-radius: 50%;
  animation: blink 1s infinite;
}

@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: 0; } }
@keyframes pulse-glow-red { 0%, 100% { text-shadow: 0 0 5px var(--error); } 50% { text-shadow: 0 0 15px var(--error); } }

/* Admin Tabs */
.admin-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 25px;
  flex-wrap: wrap;
}

.admin-tab {
  background: rgba(0, 0, 0, 0.6);
  border: 1px solid var(--border-color);
  color: var(--text-gray);
  padding: 8px 16px;
  font-family: var(--font-mono);
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.2s ease;
  clip-path: polygon(10px 0, 10px 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%, 0 10px);
}

.admin-tab:hover {
  background: rgba(0, 255, 136, 0.1);
  border-color: var(--primary-color);
  color: var(--text-light);
}

.admin-tab.active {
  background: rgba(0, 255, 136, 0.2);
  border-color: var(--primary-color);
  color: var(--primary-color);
  box-shadow: 0 0 10px rgba(0, 255, 136, 0.2) inset;
}

.admin-tab-content {
  display: none;
  animation: crtFlicker 0.15s ease-out;
}

.admin-tab-content.active {
  display: block;
}

.admin-section-header {
  margin-bottom: 20px;
  border-left: 3px solid var(--primary-color);
  padding-left: 10px;
  display: flex;
  flex-direction: column;
}

.admin-section-header.row {
  flex-direction: row;
  justify-content: space-between;
  align-items: flex-end;
}

.admin-section-tag {
  color: var(--text-gray);
  font-family: var(--font-mono);
  font-size: 0.7rem;
}

.admin-section-header h3,
.admin-section-header h4 {
  color: var(--text-light);
  margin: 0;
  margin-top: 5px;
  font-weight: 500;
  text-transform: uppercase;
}

/* Stats Grid */
.admin-stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 15px;
}

.admin-stat-card {
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid var(--border-color);
  padding: 15px;
  border-radius: 4px;
  position: relative;
  overflow: hidden;
}

.admin-stat-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 2px;
  height: 100%;
  background: var(--primary-color);
}

.admin-stat-card.danger::before { background: var(--error); }
.admin-stat-card.success::before { background: var(--success); }
.admin-stat-card.warning::before { background: var(--warning); }

.admin-stat-label {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-gray);
  margin-bottom: 10px;
}

.admin-stat-value {
  font-size: 1.5rem;
  color: var(--text-light);
  font-weight: bold;
}

/* Common UI Elements */
.admin-input, .admin-select, .admin-textarea {
  background: rgba(0, 0, 0, 0.6);
  border: 1px solid var(--border-color);
  color: var(--text-light);
  padding: 8px 12px;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  transition: all 0.3s;
}

.admin-input:focus, .admin-select:focus, .admin-textarea:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 8px rgba(0, 255, 136, 0.3);
}

.admin-btn, .admin-btn-sm, .admin-btn-green, .admin-btn-red, .admin-btn-orange {
  background: transparent;
  color: var(--text-light);
  border: 1px solid var(--border-color);
  padding: 8px 15px;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.2s;
  text-transform: uppercase;
}

.admin-btn-sm { padding: 4px 8px; font-size: 0.75rem; }

.admin-btn:hover { border-color: var(--text-light); background: rgba(255,255,255,0.1); }
.admin-btn-green { border-color: var(--primary-color); color: var(--primary-color); }
.admin-btn-green:hover { background: rgba(0, 255, 136, 0.2); box-shadow: 0 0 10px rgba(0,255,136,0.5); }
.admin-btn-red { border-color: var(--error); color: var(--error); }
.admin-btn-red:hover { background: rgba(255, 0, 102, 0.2); box-shadow: 0 0 10px rgba(255,0,102,0.5); }
.admin-btn-orange { border-color: var(--accent-color); color: var(--accent-color); }
.admin-btn-orange:hover { background: rgba(255, 153, 0, 0.2); box-shadow: 0 0 10px rgba(255,153,0,0.5); }

/* Tables */
.admin-search-bar {
  display: flex;
  gap: 10px;
  margin-bottom: 15px;
  flex-wrap: wrap;
}
.admin-search-bar input { flex: 1; min-width: 200px; }

.admin-table-wrap {
  width: 100%;
  overflow-x: auto;
  border: 1px solid var(--border-color);
  background: rgba(0,0,0,0.4);
  margin-bottom: 15px;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}

.admin-table th {
  background: rgba(0, 255, 136, 0.1);
  color: var(--primary-color);
  padding: 10px;
  text-align: left;
  font-family: var(--font-mono);
  border-bottom: 1px solid var(--primary-color);
}

.admin-table td {
  padding: 10px;
  border-bottom: 1px solid rgba(255,255,255,0.05);
  color: var(--text-light);
}

.admin-table tr:hover td { background: rgba(255,255,255,0.05); }

/* Embedded Player Panel */
.admin-player-panel {
  margin-top: 25px;
  border: 1px solid var(--primary-color);
  background: rgba(0,0,0,0.8);
  position: relative;
  box-shadow: 0 0 20px rgba(0,255,136,0.1);
  animation: slideInUp 0.3s ease;
}

.admin-player-panel-header {
  background: rgba(0, 255, 136, 0.1);
  padding: 15px;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  border-bottom: 1px solid var(--primary-color);
}

.admin-close-btn {
  background: transparent;
  border: none;
  color: var(--error);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  cursor: pointer;
}
.admin-close-btn:hover { text-shadow: 0 0 8px var(--error); }

.admin-player-tabs {
  display: flex;
  border-bottom: 1px solid var(--border-color);
}
.admin-player-tab {
  padding: 10px 20px;
  background: transparent;
  border: none;
  color: var(--text-gray);
  cursor: pointer;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  transition: all 0.2s;
}
.admin-player-tab.active {
  color: var(--primary-color);
  border-bottom: 2px solid var(--primary-color);
}
.admin-player-pane { display: none; padding: 20px; }
.admin-player-pane.active { display: block; }

/* Cheat Input Groups */
.admin-cheat-group {
  margin-bottom: 20px;
  background: rgba(255,255,255,0.02);
  padding: 15px;
  border: 1px solid rgba(255,255,255,0.05);
}
.admin-cheat-label {
  color: var(--text-gray);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  margin-bottom: 10px;
}
.admin-cheat-row { display: flex; gap: 10px; }
.admin-cheat-row.flex-wrap { flex-wrap: wrap; }

/* Market Cheats Row */
.admin-cheat-cards-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 15px;
}
.admin-cheat-card {
  background: rgba(0,0,0,0.6);
  border: 1px solid var(--border-color);
  padding: 15px;
  display: flex;
  flex-direction: column;
}
.admin-cheat-card.success { border-color: rgba(0,255,136,0.3); }
.admin-cheat-card.danger { border-color: rgba(255,0,102,0.3); }
.admin-cheat-card-icon { font-size: 1.5rem; margin-bottom: 10px; }
.admin-cheat-card-title { font-weight: bold; margin-bottom: 5px; color: var(--text-light); }
.admin-cheat-card-desc { font-size: 0.75rem; color: var(--text-gray); margin-bottom: 15px; flex-grow: 1; }

/* Rigging Console */
.admin-rig-console {
  border: 1px solid var(--accent-color);
  background: rgba(255, 153, 0, 0.05);
  padding: 20px;
  margin-bottom: 20px;
}
.admin-rig-console-header {
  color: var(--accent-color);
  font-family: var(--font-mono);
  font-weight: bold;
  margin-bottom: 15px;
  display: flex;
  flex-direction: column;
}
.admin-rig-row { display: flex; gap: 10px; flex-wrap: wrap; }
.admin-rig-row select { width: 150px; }
.admin-rig-row input { flex: 1; min-width: 200px; }

@media (max-width: 768px) {
  .admin-cheat-row { flex-direction: column; }
  .admin-search-bar { flex-direction: column; }
  .admin-search-bar input, .admin-search-bar select, .admin-search-bar button { width: 100%; }
}

/* ============================================================================
   Achievements
   ============================================================================ */

.achievement-stats-bar {
  display: flex;
  justify-content: space-around;
  align-items: center;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  padding: 20px;
  border-radius: 8px;
  margin-bottom: 30px;
  flex-wrap: wrap;
  gap: 20px;
}

.achievement-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
}

.achievement-stat .stat-label {
  color: var(--text-gray);
  font-size: 0.9rem;
}

.achievement-stat .stat-value {
  font-size: 1.5rem;
  font-weight: bold;
  color: var(--primary-color);
}

.progress-bar {
  width: 200px;
  height: 20px;
  background: var(--bg-dark);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary-color), var(--success));
  transition: width 0.5s ease;
}

#achievements-progress-text {
  font-weight: bold;
  color: var(--primary-color);
  margin-top: 5px;
}

/* Category Filter */
.achievement-categories {
  display: flex;
  gap: 10px;
  margin-bottom: 30px;
  flex-wrap: wrap;
}

.category-btn {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-light);
  padding: 10px 20px;
  border-radius: 5px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.category-btn:hover {
  background: var(--border-color);
}

.category-btn.active {
  background: var(--primary-color);
  color: var(--bg-dark);
  border-color: var(--primary-color);
}

/* Achievements Grid */
.achievements-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
  margin-bottom: 40px;
}

.achievement-card {
  background: var(--bg-card);
  border: 2px solid var(--primary-color);
  border-radius: 10px;
  padding: 20px;
  display: flex;
  gap: 15px;
  align-items: flex-start;
  position: relative;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.achievement-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 20px rgba(0, 255, 136, 0.2);
}

.achievement-card.locked {
  border-color: var(--border-color);
  opacity: 0.6;
}

.achievement-card.locked:hover {
  transform: none;
  box-shadow: none;
}

.achievement-icon {
  font-size: 3rem;
  flex-shrink: 0;
}

.achievement-card.locked .achievement-icon {
  filter: grayscale(1);
  opacity: 0.5;
}

.achievement-info {
  flex: 1;
}

.achievement-name {
  color: var(--primary-color);
  margin-bottom: 5px;
  font-size: 1.1rem;
}

.achievement-card.locked .achievement-name {
  color: var(--text-gray);
}

.achievement-desc {
  color: var(--text-gray);
  font-size: 0.9rem;
  margin-bottom: 10px;
}

.achievement-requirement {
  color: var(--text-light);
  font-size: 0.85rem;
  background: var(--bg-dark);
  padding: 5px 10px;
  border-radius: 3px;
  display: inline-block;
  margin-bottom: 5px;
}

.achievement-reward {
  color: var(--success);
  font-weight: bold;
  font-size: 0.9rem;
  margin-top: 5px;
}

.achievement-unlocked-date {
  color: var(--text-gray);
  font-size: 0.8rem;
  margin-top: 5px;
  font-style: italic;
}

.achievement-checkmark {
  position: absolute;
  top: 10px;
  right: 10px;
  background: var(--success);
  color: var(--bg-dark);
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 1.2rem;
}

/* Recent Achievements */
.recent-achievements {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 20px;
}

.recent-achievements h3 {
  color: var(--primary-color);
  margin-bottom: 15px;
}

.recent-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.recent-achievement-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  background: var(--bg-dark);
  border-radius: 5px;
  border-left: 3px solid var(--primary-color);
}

.recent-icon {
  font-size: 1.5rem;
}

.recent-player {
  font-weight: bold;
  color: var(--primary-color);
}

.recent-name {
  color: var(--text-light);
  flex: 1;
}

.recent-time {
  color: var(--text-gray);
  font-size: 0.85rem;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
  .achievement-stats-bar {
    flex-direction: column;
  }

  .achievements-grid {
    grid-template-columns: 1fr;
  }

  .achievement-categories {
    justify-content: center;
  }

  .progress-bar {
    width: 100%;
  }
}
/* ============================================================================
   Chat Widget
   ============================================================================ */

/* Chat Toggle Button */
.chat-toggle-btn {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary-color), var(--success));
  border: none;
  color: var(--bg-dark);
  font-size: 1.8rem;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0, 255, 136, 0.4);
  z-index: 999;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.chat-toggle-btn:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 16px rgba(0, 255, 136, 0.6);
}

/* Chat Container */
.chat-container {
  position: fixed;
  bottom: 90px;
  right: 20px;
  width: 350px;
  height: 500px;
  background: var(--bg-card);
  border: 2px solid var(--primary-color);
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  z-index: 998;
  transform: translateX(400px);
  transition: transform 0.3s ease;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
}

.chat-container.open {
  transform: translateX(0);
}

/* Chat Header */
.chat-header {
  background: linear-gradient(135deg, var(--primary-color), var(--success));
  color: var(--bg-dark);
  padding: 15px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-radius: 8px 8px 0 0;
}

.chat-header h3 {
  margin: 0;
  font-size: 1.1rem;
}

.chat-close-btn {
  background: none;
  border: none;
  color: var(--bg-dark);
  font-size: 1.8rem;
  cursor: pointer;
  padding: 0;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: background 0.3s ease;
}

.chat-close-btn:hover {
  background: rgba(0, 0, 0, 0.1);
}

/* Chat Messages */
.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 15px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: var(--bg-dark);
}

.chat-empty,
.chat-messages .loading {
  text-align: center;
  color: var(--text-gray);
  padding: 20px;
}

.chat-message {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 10px;
  position: relative;
}

.chat-msg-own {
  background: rgba(0, 255, 136, 0.1);
  border-color: var(--primary-color);
}

.chat-msg-admin {
  border-left: 3px solid var(--error);
}

.chat-msg-mod {
  border-left: 3px solid var(--warning);
}

.chat-msg-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 5px;
}

.chat-msg-username {
  font-weight: bold;
  color: var(--primary-color);
  font-size: 0.9rem;
}

.chat-badge {
  font-size: 0.7rem;
  padding: 2px 6px;
  border-radius: 3px;
  font-weight: bold;
}

.chat-badge.admin {
  background: var(--error);
  color: var(--text-light);
}

.chat-badge.mod {
  background: var(--warning);
  color: var(--bg-dark);
}

.chat-msg-time {
  font-size: 0.75rem;
  color: var(--text-gray);
  margin-left: auto;
}

.chat-delete-btn {
  background: var(--error);
  color: var(--text-light);
  border: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1rem;
  line-height: 1;
  padding: 0;
  margin-left: 5px;
  opacity: 0.7;
  transition: opacity 0.3s ease;
}

.chat-delete-btn:hover {
  opacity: 1;
}

.chat-msg-content {
  color: var(--text-light);
  font-size: 0.9rem;
  word-wrap: break-word;
  line-height: 1.4;
}

/* Chat Input */
.chat-input-area {
  display: flex;
  gap: 10px;
  padding: 15px;
  background: var(--bg-card);
  border-top: 1px solid var(--border-color);
  border-radius: 0 0 8px 8px;
}

#chat-input {
  flex: 1;
  background: var(--bg-dark);
  border: 1px solid var(--border-color);
  color: var(--text-light);
  padding: 10px;
  border-radius: 5px;
  font-size: 0.9rem;
}

#chat-input:focus {
  outline: none;
  border-color: var(--primary-color);
}

.chat-send-btn {
  background: var(--primary-color);
  color: var(--bg-dark);
  border: none;
  padding: 10px 20px;
  border-radius: 5px;
  cursor: pointer;
  font-weight: bold;
  transition: opacity 0.3s ease;
}

.chat-send-btn:hover {
  opacity: 0.8;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
  .chat-container {
    width: 90%;
    right: 5%;
    bottom: 80px;
    height: 400px;
  }

  .chat-toggle-btn {
    width: 50px;
    height: 50px;
    font-size: 1.5rem;
  }
}
/* ============================================================================
   Economy (Properties, Stocks, Crypto)
   ============================================================================ */

.economy-tabs {
  display: flex;
  gap: 10px;
  margin-bottom: 30px;
  flex-wrap: wrap;
}

.economy-tab {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-light);
  padding: 12px 24px;
  border-radius: 5px;
  cursor: pointer;
  font-size: 1rem;
  transition: all 0.3s ease;
}

.economy-tab:hover {
  background: var(--border-color);
}

.economy-tab.active {
  background: var(--primary-color);
  color: var(--bg-dark);
  border-color: var(--primary-color);
  font-weight: bold;
}

.economy-tab-content {
  display: none;
}

.economy-tab-content.active {
  display: block;
}

.economy-stats-bar {
  display: flex;
  justify-content: space-around;
  align-items: center;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  padding: 20px;
  border-radius: 8px;
  margin-bottom: 30px;
  flex-wrap: wrap;
  gap: 20px;
}

.economy-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
}

.economy-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
  margin-bottom: 30px;
}

.stocks-table-container,
.crypto-table-container {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 20px;
  margin-bottom: 30px;
}

.crypto-actions {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 20px;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
  .economy-stats-bar {
    flex-direction: column;
  }

  .economy-grid {
    grid-template-columns: 1fr;
  }

  .economy-tabs {
    justify-content: center;
  }
}

/* ============================================================================
   CRASH GAME STYLES
   ============================================================================ */

.crash-game {
  padding: 30px;
  max-width: 800px;
  margin: 0 auto;
}

.crash-display {
  background: var(--bg2);
  border-radius: 12px;
  padding: 40px;
  margin-bottom: 30px;
  text-align: center;
  min-height: 250px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.crash-multiplier-container {
  margin-bottom: 20px;
}

.crash-multiplier {
  font-size: 72px;
  font-weight: bold;
  color: var(--success);
  text-shadow: 0 0 20px rgba(76, 175, 80, 0.5);
  transition: all 0.1s ease;
}

.crash-multiplier.success {
  color: var(--success);
  animation: pulse 0.5s ease;
}

.crash-multiplier.crashed {
  color: var(--error);
  text-shadow: 0 0 20px rgba(244, 67, 54, 0.5);
  animation: shake 0.5s ease;
}

@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.1); }
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-10px); }
  75% { transform: translateX(10px); }
}

.crash-controls {
  background: var(--bg2);
  border-radius: 12px;
  padding: 30px;
}

.auto-cashout {
  margin-top: 20px;
  padding: 15px;
  background: var(--bg1);
  border-radius: 8px;
}

.auto-cashout label {
  display: block;
  margin-bottom: 8px;
  color: var(--text);
}

.auto-cashout input {
  width: 100%;
  padding: 10px;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text);
  font-size: 16px;
}

.auto-cashout small {
  display: block;
  margin-top: 5px;
  color: var(--text-dim);
  font-size: 12px;
}

/* ============================================================================
   COINFLIP GAME STYLES
   ============================================================================ */

.coinflip-game {
  padding: 30px;
  max-width: 800px;
  margin: 0 auto;
}

.coinflip-display {
  background: var(--bg2);
  border-radius: 12px;
  padding: 40px;
  margin-bottom: 30px;
  text-align: center;
  min-height: 250px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.coinflip-coin {
  font-size: 120px;
  margin-bottom: 20px;
  transition: all 0.3s ease;
}

.coinflip-coin.flipping {
  animation: flip 1.5s ease-in-out;
}

.coinflip-coin.win {
  color: var(--success);
  animation: bounce 0.6s ease;
}

.coinflip-coin.lose {
  color: var(--error);
  opacity: 0.6;
}

@keyframes flip {
  0%, 100% { transform: rotateY(0deg); }
  50% { transform: rotateY(1800deg); }
}

@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-20px); }
}

.coinflip-controls {
  background: var(--bg2);
  border-radius: 12px;
  padding: 30px;
}

.choice-section {
  margin: 20px 0;
}

.choice-section h3 {
  text-align: center;
  margin-bottom: 15px;
  color: var(--text);
}

.choice-buttons {
  display: flex;
  gap: 15px;
  justify-content: center;
}

.choice-btn {
  flex: 1;
  max-width: 200px;
  padding: 15px 25px;
  font-size: 18px;
  font-weight: bold;
  background: var(--bg1);
  color: var(--text);
  border: 2px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.choice-btn:hover {
  background: var(--primary);
  border-color: var(--primary);
  transform: translateY(-2px);
}

.choice-btn.active {
  background: var(--primary);
  border-color: var(--primary);
  box-shadow: 0 0 15px rgba(33, 150, 243, 0.5);
}

/* ============================================================================
   PLINKO GAME STYLES
   ============================================================================ */

.plinko-game {
  padding: 30px;
  max-width: 900px;
  margin: 0 auto;
}

.plinko-board {
  background: var(--bg2);
  border-radius: 12px;
  padding: 40px 20px;
  margin-bottom: 30px;
  min-height: 400px;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.plinko-pegs {
  position: absolute;
  top: 40px;
  left: 0;
  right: 0;
  height: 280px;
  background-image: 
    radial-gradient(circle, var(--border) 4px, transparent 4px);
  background-size: 50px 40px;
  background-position: center;
}

.plinko-ball {
  position: absolute;
  width: 20px;
  height: 20px;
  background: var(--primary);
  border-radius: 50%;
  box-shadow: 0 0 15px rgba(33, 150, 243, 0.8);
  z-index: 10;
}

.plinko-slots {
  display: flex;
  gap: 2px;
  justify-content: space-between;
  padding: 0 10px;
}

.plinko-slot {
  flex: 1;
  padding: 15px 5px;
  text-align: center;
  font-weight: bold;
  font-size: 16px;
  border-radius: 8px;
  transition: all 0.3s ease;
}

.plinko-slot.high {
  background: linear-gradient(135deg, #ff6b6b 0%, #ee5a24 100%);
  color: white;
}

.plinko-slot.medium {
  background: linear-gradient(135deg, #feca57 0%, #ff9ff3 100%);
  color: var(--bg1);
}

.plinko-slot.normal {
  background: linear-gradient(135deg, #48dbfb 0%, #0abde3 100%);
  color: white;
}

.plinko-slot.low {
  background: linear-gradient(135deg, #c8d6e5 0%, #8395a7 100%);
  color: var(--bg1);
}

.plinko-slot.highlight {
  transform: scale(1.1);
  box-shadow: 0 0 20px rgba(255, 255, 255, 0.8);
  animation: glow 0.5s ease-in-out infinite alternate;
}

@keyframes glow {
  from { box-shadow: 0 0 10px rgba(255, 255, 255, 0.5); }
  to { box-shadow: 0 0 20px rgba(255, 255, 255, 1); }
}

.plinko-controls {
  background: var(--bg2);
  border-radius: 12px;
  padding: 30px;
}

/* ============================================================================
   SHARED GAME CONTROLS
   ============================================================================ */

.bet-input-group {
  display: flex;
  align-items: center;
  gap: 10px;
  justify-content: center;
  margin: 15px 0;
}

.bet-input-group input {
  width: 150px;
  padding: 10px;
  text-align: center;
  font-size: 18px;
  font-weight: bold;
  background: var(--bg1);
  border: 2px solid var(--border);
  border-radius: 6px;
  color: var(--text);
}

.btn-small {
  width: 40px;
  height: 40px;
  font-size: 20px;
  font-weight: bold;
}

.play-btn {
  width: 100%;
  padding: 18px;
  margin-top: 20px;
  font-size: 20px;
  font-weight: bold;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.play-btn:hover:not(:disabled) {
  background: #1976D2;
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(33, 150, 243, 0.4);
}

.play-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.current-bet {
  text-align: center;
  font-size: 16px;
  margin: 15px 0;
  color: var(--text);
}

.current-bet span {
  font-weight: bold;
  color: var(--success);
}

/* Result messages */
.result-message {
  margin-top: 20px;
  padding: 20px;
  border-radius: 8px;
  text-align: center;
}

.result-win {
  background: rgba(76, 175, 80, 0.1);
  border: 2px solid var(--success);
}

.result-win h3 {
  color: var(--success);
  margin-bottom: 10px;
}

.result-loss {
  background: rgba(244, 67, 54, 0.1);
  border: 2px solid var(--error);
}

.result-loss h3 {
  color: var(--error);
  margin-bottom: 10px;
}

.result-profit {
  font-size: 24px;
  font-weight: bold;
  color: var(--success);
  margin-top: 10px;
}

/* ============================================================================
   American Roulette Grid Styling
   ============================================================================ */
.zeros-section {
  display: flex;
  flex-direction: column;
  gap: 5px;
  width: 60px;
}

.zeros-section .zero-cell {
  background: #00aa00;
  color: white;
  font-weight: bold;
  font-size: 1.2rem;
  width: 100%;
  height: 62px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--border-color);
  border-radius: 5px;
  cursor: pointer;
  transition: all 0.2s;
  position: relative;
  writing-mode: vertical-rl;
  text-orientation: upright;
}

.zeros-section .zero-cell:hover {
  transform: scale(1.05);
  border-color: var(--primary-color);
  box-shadow: 0 0 10px rgba(0, 255, 136, 0.4);
}

/* ============================================================================
   Cyber Clicker Interface Styling
   ============================================================================ */
.clicker-layout {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 30px;
  margin-top: 25px;
}

@media (max-width: 768px) {
  .clicker-layout {
    grid-template-columns: 1fr;
  }
}

.clicker-node-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 40px 20px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
  position: relative;
}

.clicker-core-node {
  width: 180px;
  height: 180px;
  background: radial-gradient(circle, var(--bg-dark) 40%, rgba(0, 255, 136, 0.15) 100%);
  border: 4px solid var(--primary-color);
  border-radius: 50%;
  cursor: pointer;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.1s ease, box-shadow 0.2s ease;
  user-select: none;
  box-shadow: 0 0 20px rgba(0, 255, 136, 0.2), inset 0 0 15px rgba(0, 255, 136, 0.2);
}

.clicker-core-node:hover {
  transform: scale(1.03);
  box-shadow: 0 0 30px rgba(0, 255, 136, 0.5), inset 0 0 25px rgba(0, 255, 136, 0.4);
}

.clicker-core-node:active {
  transform: scale(0.95);
  box-shadow: 0 0 15px rgba(0, 255, 136, 0.8), inset 0 0 10px rgba(0, 255, 136, 0.7);
}

.clicker-core-glow {
  position: absolute;
  top: -10px;
  left: -10px;
  right: -10px;
  bottom: -10px;
  border-radius: 50%;
  border: 2px dashed rgba(0, 255, 136, 0.3);
  animation: rotate-core-glow 20s linear infinite;
}

@keyframes rotate-core-glow {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.clicker-core-icon {
  font-size: 4rem;
  filter: drop-shadow(0 0 10px var(--primary-color));
  animation: pulse-core-icon 2s ease-in-out infinite alternate;
}

@keyframes pulse-core-icon {
  0% { transform: scale(1); filter: drop-shadow(0 0 8px var(--primary-color)); }
  100% { transform: scale(1.1); filter: drop-shadow(0 0 18px var(--primary-color)); }
}

.clicker-click-power-info {
  margin-top: 30px;
  text-align: center;
  font-size: 1.1rem;
  color: var(--text-light);
  line-height: 1.6;
}

.clicker-upgrades-container {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 25px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
  max-height: 520px;
  overflow-y: auto;
}

.clicker-upgrades-grid {
  display: flex;
  flex-direction: column;
  gap: 15px;
  margin-top: 15px;
}

.upgrade-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--bg-dark);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 15px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.upgrade-card.affordable {
  border-color: rgba(0, 255, 136, 0.25);
}

.upgrade-card.affordable:hover {
  border-color: var(--primary-color);
  box-shadow: 0 0 10px rgba(0, 255, 136, 0.1);
}

.upgrade-info {
  flex: 1;
  padding-right: 15px;
}

.upgrade-name {
  font-weight: bold;
  color: var(--text-light);
  font-size: 1rem;
  margin-bottom: 4px;
}

.upgrade-desc {
  color: var(--text-gray);
  font-size: 0.85rem;
  margin-bottom: 8px;
}

.upgrade-stats {
  color: var(--primary-color);
  font-size: 0.8rem;
  font-weight: 600;
}

.upgrade-btn {
  padding: 10px 15px;
  min-width: 130px;
  font-size: 0.85rem;
}

.click-particle {
  position: fixed;
  color: var(--primary-color);
  font-weight: 800;
  font-size: 1.4rem;
  pointer-events: none;
  z-index: 99999;
  animation: float-up-fade 0.8s cubic-bezier(0.1, 0.8, 0.3, 1) forwards;
  text-shadow: 0 0 8px rgba(0, 255, 136, 0.8);
}

@keyframes float-up-fade {
  0% { transform: translateY(0) scale(1); opacity: 1; }
  100% { transform: translateY(-80px) scale(0.8); opacity: 0; }
}

/* ============================================================================
   AI Upgrades / Rebirth Screen Styling
   ============================================================================ */
.rebirth-overview-container {
  display: grid;
  grid-template-columns: 1fr 1.3fr;
  gap: 30px;
  margin-top: 25px;
}

@media (max-width: 768px) {
  .rebirth-overview-container {
    grid-template-columns: 1fr;
  }
}

.rebirth-core-info {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 30px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
  display: flex;
  flex-direction: column;
}

.shards-display-box {
  background: rgba(255, 0, 128, 0.08);
  border: 1px solid rgba(255, 0, 128, 0.3);
  border-radius: 6px;
  padding: 15px;
  margin: 20px 0;
  text-align: center;
  font-size: 1.1rem;
  color: var(--text-light);
}

.neon-pink-text {
  color: #ff0080;
  font-weight: bold;
  text-shadow: 0 0 10px rgba(255, 0, 128, 0.5);
}

.rebirth-progress-block {
  margin-bottom: 25px;
}

.rebirth-progress-label {
  font-size: 0.9rem;
  color: var(--text-gray);
  margin-bottom: 8px;
}

.progress-bar-container {
  width: 100%;
  height: 12px;
  background: var(--bg-dark);
  border-radius: 6px;
  border: 1px solid var(--border-color);
  overflow: hidden;
  margin-bottom: 8px;
}

.progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--primary-color), #ff0080);
  width: 0%;
  transition: width 0.4s ease;
  box-shadow: 0 0 8px var(--primary-color);
}

.progress-ratio {
  display: block;
  text-align: right;
  font-size: 0.85rem;
  color: var(--text-light);
}

.rebirth-keep-options {
  background: var(--bg-dark);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 20px;
  margin-bottom: 25px;
}

.rebirth-keep-options h4 {
  color: var(--primary-color);
  font-size: 0.95rem;
  margin-bottom: 12px;
  text-transform: uppercase;
}

.keep-option-select {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  gap: 15px;
}

.keep-option-select:last-child {
  margin-bottom: 0;
}

.keep-option-select label {
  font-size: 0.85rem;
  color: var(--text-gray);
}

.keep-option-select select {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-light);
  padding: 6px 10px;
  border-radius: 4px;
  flex: 1;
  max-width: 200px;
}

.rebirth-upgrades-tree {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 25px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
  max-height: 520px;
  overflow-y: auto;
}

.skills-grid {
  display: flex;
  flex-direction: column;
  gap: 15px;
  margin-top: 15px;
}

.skill-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--bg-dark);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 15px;
  transition: all 0.2s ease;
}

.skill-card:hover {
  border-color: rgba(255, 0, 128, 0.3);
  box-shadow: 0 0 10px rgba(255, 0, 128, 0.05);
}

.skill-info {
  flex: 1;
  padding-right: 15px;
}

.skill-name {
  font-weight: bold;
  color: var(--text-light);
  margin-bottom: 4px;
}

.skill-desc {
  color: var(--text-gray);
  font-size: 0.85rem;
  margin-bottom: 8px;
}

.skill-stats {
  color: #ff0080;
  font-size: 0.8rem;
  font-weight: 600;
}

.cyber-btn-pink {
  background: transparent;
  border: 2px solid #ff0080;
  color: #ff0080;
  padding: 8px 15px;
  border-radius: 4px;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.2s ease;
  text-shadow: 0 0 5px rgba(255, 0, 128, 0.3);
}

.cyber-btn-pink:hover:not(:disabled) {
  background: #ff0080;
  color: white;
  box-shadow: 0 0 12px rgba(255, 0, 128, 0.6);
}

/* ============================================================================
   VPN Tunnel travel gate interface
   ============================================================================ */
.subnet-gate {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 450px;
  background: radial-gradient(circle, rgba(16, 20, 30, 0.9) 20%, rgba(5, 8, 12, 0.98) 100%);
  border: 1px dashed var(--border-color);
  border-radius: 12px;
  padding: 40px;
}

.gate-card {
  max-width: 480px;
  text-align: center;
  background: var(--bg-card);
  border: 2px solid var(--primary-color);
  border-radius: 10px;
  padding: 35px;
  box-shadow: 0 0 25px rgba(0, 255, 136, 0.15);
}

.gate-card h2 {
  color: var(--text-light);
  font-size: 1.4rem;
  margin-bottom: 12px;
}

.gate-card p {
  color: var(--text-gray);
  font-size: 0.9rem;
  line-height: 1.6;
  margin-bottom: 25px;
}

.gate-progress-container {
  background: var(--bg-dark);
  border: 1px solid var(--border-color);
  border-radius: 4px;
  padding: 5px;
  margin-bottom: 20px;
  text-align: left;
}

.gate-progress-bar {
  height: 8px;
  background: var(--primary-color);
  width: 0%;
  border-radius: 2px;
  transition: width 0.1s linear;
  box-shadow: 0 0 8px var(--primary-color);
}

#gate-status {
  display: block;
  font-size: 0.8rem;
  color: var(--primary-color);
  margin-top: 8px;
  text-align: center;
  font-family: monospace;
}

/* ============================================================================
   Neon Derby Mech Racing Track Styles
   ============================================================================ */
.derby-lane-row {
  display: flex;
  align-items: center;
  margin-bottom: 12px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 6px;
  padding: 10px;
}

.derby-lane-label {
  width: 140px;
  font-weight: bold;
  font-family: 'Outfit', sans-serif;
  font-size: 0.9rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.derby-track-lane {
  flex: 1;
  height: 35px;
  background: linear-gradient(90deg, rgba(0,0,0,0.4) 0%, rgba(20,20,30,0.5) 100%);
  border: 1px dashed rgba(255, 0, 85, 0.2);
  position: relative;
  border-radius: 4px;
  margin-left: 10px;
}

.mech-steed-avatar {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.4rem;
  transition: left 0.38s linear;
  z-index: 10;
}

.disabled-tab {
  opacity: 0.4;
  cursor: not-allowed !important;
}

/* Cyber Helpers */
.cyber-card {
  background: var(--bg-card);
  backdrop-filter: blur(8px);
  border-radius: 12px;
  border: 1px solid var(--border-color);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.4);
}

.cyber-card.neon-border-orange {
  border-color: rgba(255, 170, 0, 0.25);
}
.cyber-card.neon-border-orange:hover {
  border-color: rgba(255, 170, 0, 0.5);
  box-shadow: 0 0 15px rgba(255, 170, 0, 0.2);
}

.cyber-card.neon-border-blue {
  border-color: rgba(0, 243, 255, 0.25);
}
.cyber-card.neon-border-blue:hover {
  border-color: rgba(0, 243, 255, 0.5);
  box-shadow: 0 0 15px rgba(0, 243, 255, 0.2);
}

.orange-glow-text {
  color: var(--accent-color);
  text-shadow: 0 0 10px rgba(255, 170, 0, 0.4);
}

.cyber-input {
  background: rgba(0, 0, 0, 0.4) !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  color: #fff !important;
  border-radius: 8px !important;
}
.cyber-input:focus {
  border-color: var(--primary-color) !important;
  box-shadow: 0 0 10px rgba(0, 243, 255, 0.2) !important;
}

.cyber-btn-orange {
  background: linear-gradient(135deg, var(--accent-color) 0%, #ff6600 100%);
  border: none;
  color: #000;
  font-weight: 700;
  border-radius: 8px;
  padding: 10px 20px;
  font-family: 'Orbitron', sans-serif;
  cursor: pointer;
  transition: all 0.3s;
  box-shadow: 0 0 10px rgba(255, 170, 0, 0.25);
}
.cyber-btn-orange:hover {
  transform: translateY(-1px);
  box-shadow: 0 0 20px rgba(255, 170, 0, 0.45);
}

.cyber-btn-blue {
  background: linear-gradient(135deg, var(--primary-color) 0%, #00b8d4 100%);
  border: none;
  color: #000;
  font-weight: 700;
  border-radius: 8px;
  padding: 10px 20px;
  font-family: 'Orbitron', sans-serif;
  cursor: pointer;
  transition: all 0.3s;
  box-shadow: 0 0 10px rgba(0, 243, 255, 0.25);
}
/* Admin Badges & Modal Styling */
.role-badge {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.role-badge.role-admin {
  background: rgba(255, 0, 123, 0.2);
  border: 1px solid var(--secondary-color);
  color: #ff4097;
}
.role-badge.role-moderator {
  background: rgba(255, 170, 0, 0.2);
  border: 1px solid var(--accent-color);
  color: var(--accent-color);
}
.role-badge.role-player {
  background: rgba(0, 243, 255, 0.15);
  border: 1px solid var(--primary-color);
  color: var(--primary-color);
}

.status-badge {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
}
.status-badge.status-active {
  background: rgba(57, 255, 20, 0.15);
  border: 1px solid var(--success);
  color: var(--success);
}
.status-badge.status-banned {
  background: rgba(255, 0, 123, 0.2);
  border: 1px solid var(--error);
  color: var(--error);
}
.status-badge.status-muted {
  background: rgba(255, 170, 0, 0.2);
  border: 1px solid var(--warning);
  color: var(--warning);
}
.status-badge.status-maintenance {
  background: rgba(255, 170, 0, 0.2);
  border: 1px solid var(--warning);
  color: var(--warning);
}
.status-badge.status-disabled {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid var(--border-color);
  color: var(--text-gray);
}

.admin-modal-tabs button {
  background: transparent;
  border: none;
  color: var(--text-gray);
  padding: 8px 14px;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  font-family: 'Orbitron', sans-serif;
  font-size: 0.85rem;
  font-weight: 600;
  transition: all 0.2s;
}
.admin-modal-tabs button:hover {
  color: var(--text-light);
}
.admin-modal-tabs button.active {
  color: var(--primary-color);
  border-bottom-color: var(--primary-color);
  text-shadow: var(--cyan-glow);
}

.game-settings-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}

/* ============================================================================
   Responsive American Roulette Board (Mobile Vertical Stack)
   ============================================================================ */
@media (max-width: 768px) {
  .roulette-table-wrapper {
    padding: 10px;
  }
  
  .roulette-table {
    min-width: auto !important;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
  }
  
  .number-grid {
    flex-direction: column !important;
    align-items: center;
    width: 100%;
    gap: 5px;
  }
  
  .zeros-section {
    flex-direction: row !important;
    width: 100%;
    max-width: 190px; /* 3 numbers + gaps wide */
    height: auto !important;
  }
  
  .zeros-section .zero-cell {
    height: 45px !important;
    min-height: auto !important;
    width: 50% !important;
    writing-mode: horizontal-tb !important;
    text-orientation: mixed !important;
  }
  
  .numbers-section {
    width: 100%;
    max-width: 190px;
  }
  
  .number-row {
    width: 100%;
    display: flex;
    gap: 5px;
  }
  
  .number-cell {
    flex: 1;
    height: 45px !important;
  }
  
  .column-bets {
    flex-direction: row !important;
    width: 100%;
    max-width: 190px;
    height: auto !important;
    gap: 5px;
  }
  
  .column-bet {
    flex: 1;
    height: 45px !important;
  }
  
  .outside-bets {
    width: 100%;
    max-width: 190px;
    flex-direction: column !important;
    gap: 5px;
    margin-top: 5px;
  }
  
  .outside-bet {
    width: 100% !important;
    height: 45px !important;
  }
}

/* ============================================================================
   Lore Log Ticker Footer
   ============================================================================ */
.lore-ticker {
  background: rgba(5, 5, 8, 0.95);
  border-top: 1px dashed var(--primary-color);
  padding: 8px 30px;
  display: flex;
  align-items: center;
  gap: 15px;
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.85rem;
  z-index: 100;
  border-bottom: 1px solid rgba(0, 243, 255, 0.1);
  box-shadow: 0 -5px 15px rgba(0, 243, 255, 0.03);
}

.lore-ticker-title {
  color: var(--accent-color);
  font-weight: bold;
  white-space: nowrap;
}

.lore-ticker-scroll {
  flex: 1;
  overflow: hidden;
  position: relative;
  white-space: nowrap;
}

#lore-ticker-text {
  display: inline-block;
  color: var(--primary-color);
  text-shadow: 0 0 5px rgba(0, 243, 255, 0.5);
  transition: opacity 0.15s ease;
  animation: glitch-text 4s infinite alternate;
}

@keyframes glitch-text {
  0%, 100% { transform: skew(0deg); opacity: 1; }
  92% { transform: skew(0deg); opacity: 1; }
  93% { transform: skew(3deg); opacity: 0.8; color: var(--secondary-color); }
  94% { transform: skew(-3deg); opacity: 0.9; color: var(--primary-color); }
  95% { transform: skew(0deg); opacity: 1; }
}

/* ============================================================================
   Casino Game Customizations & Felt Themes
   ============================================================================ */

/* Table Felt Theme Overrides */
.roulette-game.felt-pink, .blackjack-game.felt-pink {
  background: radial-gradient(circle, rgba(255, 0, 127, 0.15) 0%, rgba(15, 10, 20, 0.95) 100%) !important;
  border-color: #ff007f !important;
  box-shadow: inset 0 0 50px rgba(255, 0, 127, 0.2) !important;
}
.roulette-game.felt-blue, .blackjack-game.felt-blue {
  background: radial-gradient(circle, rgba(0, 240, 255, 0.1) 0%, rgba(10, 15, 25, 0.95) 100%) !important;
  border-color: #00f0ff !important;
  box-shadow: inset 0 0 50px rgba(0, 240, 255, 0.2) !important;
}
.roulette-game.felt-red, .blackjack-game.felt-red {
  background: radial-gradient(circle, rgba(204, 0, 0, 0.15) 0%, rgba(15, 5, 5, 0.95) 100%) !important;
  border-color: #cc0000 !important;
  box-shadow: inset 0 0 50px rgba(204, 0, 0, 0.2) !important;
}

/* Card Skin Overrides */
.card.skin-hologram {
  background: rgba(0, 10, 20, 0.9) !important;
  border: 2px solid #00f0ff !important;
  box-shadow: 0 0 15px rgba(0, 240, 255, 0.5) !important;
  color: #00f0ff !important;
}
.card.skin-hologram.red {
  border-color: #ff007f !important;
  box-shadow: 0 0 15px rgba(255, 0, 127, 0.5) !important;
  color: #ff007f !important;
}
.card.skin-hologram.black {
  border-color: #00f0ff !important;
  box-shadow: 0 0 15px rgba(0, 240, 255, 0.5) !important;
  color: #00f0ff !important;
}
.card-back.skin-hologram {
  background: radial-gradient(circle, #00f0ff 0%, #000 100%) !important;
  border-color: #00f0ff !important;
  color: #fff !important;
}

.card.skin-gold {
  background: linear-gradient(135deg, #ffe066 0%, #f5b041 100%) !important;
  border: 2px solid #d4ac0d !important;
  box-shadow: 0 0 15px rgba(245, 176, 65, 0.5) !important;
  color: #1a1a2e !important;
}
.card.skin-gold.red {
  color: #900c3f !important;
}
.card.skin-gold.black {
  color: #111111 !important;
}
.card-back.skin-gold {
  background: repeating-linear-gradient(45deg, #d4ac0d, #d4ac0d 10px, #ffe066 10px, #ffe066 20px) !important;
  border-color: #ffe066 !important;
  color: #1a1a2e !important;
}

/* Customizer Modal */
.custom-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.85);
  align-items: center;
  justify-content: center;
  z-index: 1000000000;
}
.custom-modal-content {
  background: #0f1016;
  border: 2px solid var(--border-color);
  border-radius: 12px;
  padding: 25px;
  max-width: 600px;
  width: 90%;
  box-shadow: 0 0 30px rgba(0,0,0,0.8);
  position: relative;
  animation: modal-glow 0.3s ease-out;
}
@keyframes modal-glow {
  from { transform: scale(0.9); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}


/* ============================================================================
   CLICKER TERMINAL — CYBERPUNK HUD REDESIGN
   ============================================================================ */

/* HUD Header */
.clicker-hud-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  padding: 18px 20px;
  background: linear-gradient(135deg, rgba(0,255,136,0.04) 0%, rgba(0,0,0,0) 100%);
  border: 1px solid rgba(0,255,136,0.15);
  border-radius: 8px;
  margin-bottom: 24px;
}
.clicker-hud-tag {
  display: block;
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.65rem;
  color: var(--primary-color);
  opacity: 0.6;
  letter-spacing: 1px;
  margin-bottom: 4px;
}
.clicker-hud-header h2 {
  margin: 0 0 4px 0;
  font-size: 1.3rem;
  font-family: 'Share Tech Mono', monospace;
  color: var(--primary-color);
  text-shadow: 0 0 12px rgba(0,255,136,0.5);
  letter-spacing: 2px;
}
.clicker-hud-sub {
  font-size: 0.72rem;
  color: var(--text-gray);
  font-family: 'Share Tech Mono', monospace;
}
.clicker-hud-stats {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.clicker-stat-pill {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: rgba(0,0,0,0.5);
  border: 1px solid rgba(0,255,136,0.2);
  border-radius: 8px;
  padding: 10px 16px;
  min-width: 90px;
}
.clicker-stat-label {
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.58rem;
  color: var(--text-gray);
  letter-spacing: 1px;
  margin-bottom: 4px;
}
.clicker-stat-value {
  font-family: 'Share Tech Mono', monospace;
  font-size: 1.4rem;
  font-weight: bold;
  color: #fff;
  line-height: 1;
}
.clicker-stat-unit {
  font-size: 0.6rem;
  color: var(--primary-color);
  margin-top: 3px;
  font-family: 'Share Tech Mono', monospace;
}

/* Layout */
.clicker-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 24px;
  align-items: start;
}
@media (max-width: 700px) {
  .clicker-layout { grid-template-columns: 1fr; }
}

/* Core Click Node */
.clicker-node-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}
.clicker-core-wrap {
  position: relative;
  width: 200px;
  height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.clicker-ring {
  position: absolute;
  border-radius: 50%;
  border: 1px solid rgba(0,255,136,0.2);
  animation: clicker-ring-pulse 3s ease-in-out infinite;
}
.clicker-ring-1 { width: 120px; height: 120px; animation-delay: 0s; border-color: rgba(0,255,136,0.35); }
.clicker-ring-2 { width: 155px; height: 155px; animation-delay: 0.4s; border-color: rgba(0,255,136,0.2); }
.clicker-ring-3 { width: 190px; height: 190px; animation-delay: 0.8s; border-color: rgba(0,255,136,0.1); }

@keyframes clicker-ring-pulse {
  0%, 100% { transform: scale(1); opacity: 0.6; }
  50% { transform: scale(1.04); opacity: 1; }
}
.clicker-core-node {
  position: relative;
  width: 100px;
  height: 100px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(0,255,136,0.25) 0%, rgba(0,20,10,0.9) 70%);
  border: 2px solid var(--primary-color);
  box-shadow: 0 0 20px rgba(0,255,136,0.4), inset 0 0 30px rgba(0,255,136,0.1);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  transition: all 0.08s ease;
  z-index: 2;
  user-select: none;
}
.clicker-core-node:hover {
  box-shadow: 0 0 35px rgba(0,255,136,0.7), inset 0 0 40px rgba(0,255,136,0.2);
  border-color: #fff;
  transform: scale(1.04);
}
.clicker-core-node:active {
  transform: scale(0.93);
  box-shadow: 0 0 50px rgba(0,255,136,1), inset 0 0 60px rgba(0,255,136,0.3);
}
.clicker-core-icon {
  font-size: 2rem;
  line-height: 1;
}
.clicker-core-label {
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.6rem;
  color: var(--primary-color);
  letter-spacing: 2px;
}
.clicker-core-glow {
  display: none;
}
.clicker-core-hint {
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.62rem;
  color: var(--text-gray);
  letter-spacing: 2px;
  opacity: 0.5;
}

/* Upgrades Panel */
.clicker-upgrades-container {
  background: rgba(0,0,0,0.35);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 16px;
}
.clicker-upgrades-header {
  margin-bottom: 14px;
}
.clicker-upgrades-tag {
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.62rem;
  color: var(--primary-color);
  opacity: 0.6;
  letter-spacing: 1px;
  display: block;
  margin-bottom: 4px;
}
.clicker-upgrades-container h3 {
  margin: 0;
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.9rem;
  color: #ddd;
  letter-spacing: 1px;
}
.clicker-upgrades-grid {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 480px;
  overflow-y: auto;
  padding-right: 4px;
}

/* Override upgrade card styles to match new design */
.upgrade-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: rgba(10,12,20,0.8);
  border: 1px solid rgba(0,255,136,0.15);
  border-radius: 8px;
  padding: 12px 14px;
  transition: border-color 0.2s ease, background 0.2s ease;
}
.upgrade-card.affordable {
  border-color: rgba(0,255,136,0.4);
}
.upgrade-card.affordable:hover {
  background: rgba(0,255,136,0.05);
  border-color: var(--primary-color);
}
.upgrade-card.locked {
  opacity: 0.55;
  border-color: rgba(100,100,100,0.2);
}
.upgrade-info {
  flex: 1;
  min-width: 0;
}
.upgrade-name {
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.85rem;
  color: #fff;
  font-weight: bold;
  margin-bottom: 2px;
}
.upgrade-desc {
  font-size: 0.72rem;
  color: var(--text-gray);
  margin-bottom: 4px;
}
.upgrade-stats {
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.68rem;
  color: var(--primary-color);
}
.upgrade-btn {
  flex-shrink: 0;
  padding: 7px 14px;
  font-size: 0.75rem;
  border-radius: 6px;
  font-family: 'Share Tech Mono', monospace;
  font-weight: bold;
  cursor: pointer;
  border: none;
  white-space: nowrap;
}
.upgrade-btn.cyber-btn {
  background: rgba(0,255,136,0.15);
  color: var(--primary-color);
  border: 1px solid var(--primary-color);
}
.upgrade-btn.cyber-btn:hover {
  background: rgba(0,255,136,0.3);
  box-shadow: 0 0 10px rgba(0,255,136,0.4);
}
.upgrade-btn.btn-disabled {
  background: rgba(50,50,50,0.5);
  color: #555;
  cursor: not-allowed;
  border: 1px solid #333;
}

/* Click particle animation */
.click-particle {
  position: fixed;
  pointer-events: none;
  font-family: 'Share Tech Mono', monospace;
  font-size: 1rem;
  font-weight: bold;
  color: var(--primary-color);
  text-shadow: 0 0 8px rgba(0,255,136,0.8);
  animation: particle-rise 0.8s ease-out forwards;
  z-index: 9999;
}
@keyframes particle-rise {
  0% { transform: translateY(0) scale(1); opacity: 1; }
  100% { transform: translateY(-60px) scale(0.6); opacity: 0; }
}


/* ============================================================================
   STOCK MARKET TERMINAL — CYBERPUNK HUD REDESIGN
   ============================================================================ */

/* Market terminal header */
.market-hud-header {
  background: linear-gradient(135deg, rgba(0,240,255,0.04) 0%, rgba(0,0,0,0) 100%);
  border: 1px solid rgba(0,240,255,0.15);
  border-radius: 10px;
  padding: 18px 20px;
  margin-bottom: 20px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}
.market-tag {
  display: block;
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.62rem;
  color: var(--primary-color);
  opacity: 0.55;
  letter-spacing: 1px;
  margin-bottom: 4px;
}
.market-hud-title h3 {
  margin: 0 0 6px 0;
  font-family: 'Share Tech Mono', monospace;
  font-size: 1.1rem;
  color: var(--primary-color);
  text-shadow: 0 0 12px rgba(0,240,255,0.4);
  letter-spacing: 2px;
}
.market-status {
  display: flex;
  align-items: center;
  gap: 5px;
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.65rem;
  color: #00ff88;
  opacity: 0.7;
}
.blink-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  background: #00ff88;
  border-radius: 50%;
  animation: blink-pulse 1.2s ease-in-out infinite;
  box-shadow: 0 0 5px #00ff88;
}
@keyframes blink-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.2; }
}

/* Stat grid */
.market-stat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}
@media (max-width: 700px) {
  .market-stat-grid { grid-template-columns: repeat(2, 1fr); }
}
.market-stat-card {
  background: rgba(0,0,0,0.5);
  border: 1px solid rgba(0,240,255,0.15);
  border-radius: 8px;
  padding: 10px 14px;
  text-align: center;
  min-width: 80px;
}
.market-stat-label {
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.58rem;
  color: var(--text-gray);
  letter-spacing: 1px;
  margin-bottom: 5px;
}
.market-stat-val {
  font-family: 'Share Tech Mono', monospace;
  font-size: 1.1rem;
  font-weight: bold;
  color: #fff;
}

/* Section headers */
.market-section {
  margin-bottom: 20px;
}
.market-section-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
  border-bottom: 1px solid rgba(0,240,255,0.1);
  padding-bottom: 8px;
}
.market-section-tag {
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.6rem;
  color: var(--primary-color);
  opacity: 0.5;
  letter-spacing: 1px;
}
.market-section-header h4 {
  margin: 0;
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.85rem;
  color: #ccc;
  letter-spacing: 1px;
  font-weight: normal;
}

/* Market feed — replaces old stocks-table-container */
.stocks-market-feed {
  display: flex;
  flex-direction: column;
  gap: 0;
  border: 1px solid rgba(0,240,255,0.1);
  border-radius: 8px;
  overflow: hidden;
}

/* Override stocks table to use card-row style */
.stocks-market-feed .stocks-table {
  width: 100%;
  border-collapse: collapse;
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.8rem;
}
.stocks-market-feed .stocks-table thead tr {
  background: rgba(0,240,255,0.06);
  border-bottom: 1px solid rgba(0,240,255,0.2);
}
.stocks-market-feed .stocks-table th {
  padding: 10px 14px;
  text-align: left;
  font-size: 0.62rem;
  color: var(--text-gray);
  letter-spacing: 1px;
  text-transform: uppercase;
  font-weight: normal;
}
.stocks-market-feed .stocks-table td {
  padding: 11px 14px;
  border-bottom: 1px solid rgba(255,255,255,0.04);
  color: #ddd;
  vertical-align: middle;
}
.stocks-market-feed .stocks-table tbody tr {
  transition: background 0.15s ease;
}
.stocks-market-feed .stocks-table tbody tr:hover {
  background: rgba(0,240,255,0.04);
}
.stocks-market-feed .stocks-table tbody tr:last-child td {
  border-bottom: none;
}
.stocks-market-feed .stocks-table td strong {
  color: var(--primary-color);
  font-size: 0.85rem;
}
.stocks-market-feed .stocks-table .positive {
  color: #00ff88;
  font-weight: bold;
}
.stocks-market-feed .stocks-table .negative {
  color: #ff4466;
  font-weight: bold;
}
.stocks-market-feed .stocks-table .btn-sm {
  padding: 5px 10px;
  font-size: 0.7rem;
  border-radius: 4px;
  font-family: 'Share Tech Mono', monospace;
  cursor: pointer;
  border: none;
  margin: 0 2px;
}
.stocks-market-feed .stocks-table .btn-success {
  background: rgba(0,255,136,0.15);
  color: #00ff88;
  border: 1px solid rgba(0,255,136,0.4);
}
.stocks-market-feed .stocks-table .btn-success:hover {
  background: rgba(0,255,136,0.3);
}
.stocks-market-feed .stocks-table .btn-primary {
  background: rgba(0,100,255,0.15);
  color: #4499ff;
  border: 1px solid rgba(0,100,255,0.4);
}
.stocks-market-feed .stocks-table .btn-primary:hover {
  background: rgba(0,100,255,0.3);
}

/* Modal redesign for buy/sell */
.modal-overlay {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(0,0,0,0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 99999;
}
.modal {
  background: #0a0c14;
  border: 1px solid rgba(0,240,255,0.3);
  border-radius: 12px;
  padding: 28px;
  width: 90%;
  max-width: 420px;
  box-shadow: 0 0 40px rgba(0,0,0,0.9), 0 0 20px rgba(0,240,255,0.1);
  font-family: 'Share Tech Mono', monospace;
  animation: modal-glow 0.2s ease-out;
}
.modal h3 {
  margin: 0 0 16px 0;
  color: var(--primary-color);
  font-size: 1rem;
  letter-spacing: 2px;
  border-bottom: 1px solid rgba(0,240,255,0.15);
  padding-bottom: 12px;
}
.modal p {
  margin: 4px 0;
  font-size: 0.8rem;
  color: #aaa;
}
.modal p strong {
  color: #fff;
}
.form-group {
  margin: 14px 0;
}
.form-group label {
  display: block;
  font-size: 0.7rem;
  color: #888;
  letter-spacing: 1px;
  margin-bottom: 5px;
}
.form-control {
  width: 100%;
  background: rgba(0,0,0,0.5);
  border: 1px solid rgba(0,240,255,0.2);
  border-radius: 6px;
  padding: 8px 12px;
  color: #fff;
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.85rem;
  box-sizing: border-box;
}
.form-control:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 8px rgba(0,255,136,0.3);
}
.form-group small {
  font-size: 0.65rem;
  color: #666;
  margin-top: 3px;
  display: block;
}
.modal-actions {
  display: flex;
  gap: 10px;
  margin-top: 18px;
  justify-content: flex-end;
}
.modal-actions .btn {
  padding: 8px 18px;
  font-size: 0.78rem;
  border-radius: 6px;
  font-family: 'Share Tech Mono', monospace;
  cursor: pointer;
  border: none;
  font-weight: bold;
}
.modal-actions .btn-success {
  background: rgba(0,255,136,0.15);
  color: #00ff88;
  border: 1px solid rgba(0,255,136,0.5);
}
.modal-actions .btn-success:hover { background: rgba(0,255,136,0.3); }
.modal-actions .btn-primary {
  background: rgba(0,100,255,0.15);
  color: #4499ff;
  border: 1px solid rgba(0,100,255,0.4);
}
.modal-actions .btn-primary:hover { background: rgba(0,100,255,0.3); }
.modal-actions .btn-secondary {
  background: rgba(100,100,100,0.15);
  color: #888;
  border: 1px solid rgba(100,100,100,0.3);
}
.modal-actions .btn-secondary:hover { background: rgba(100,100,100,0.25); }


/* Terminal Boot & Auth Styles */
.os-boot-container {
  width: 100%;
  height: 100vh;
  background: #050505;
  color: #00ff41;
  font-family: 'Share Tech Mono', monospace;
  padding: 2rem;
  box-sizing: border-box;
  overflow: hidden;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}
.os-boot-container::after {
  content: "";
  position: absolute;
  top: 0; left: 0; width: 100%; height: 100%;
  background: repeating-linear-gradient(0deg, rgba(0,0,0,0.15), rgba(0,0,0,0.15) 1px, transparent 1px, transparent 2px);
  pointer-events: none;
}
.boot-text {
  font-size: 0.95rem;
  line-height: 1.5;
  white-space: pre-wrap;
  margin-bottom: 2rem;
  text-shadow: 0 0 5px rgba(0,255,65,0.5);
  width: 100%;
  max-width: 800px;
  height: 60vh;
  overflow-y: auto;
  align-self: center;
}
.terminal-form {
  max-width: 400px;
  width: 100%;
  border: 1px solid #00ff41;
  padding: 20px;
  background: rgba(0,20,5,0.8);
  box-shadow: 0 0 15px rgba(0,255,65,0.2);
  z-index: 10;
}
.term-prompt { margin-bottom: 20px; font-weight: bold; text-align: center; font-size: 0.9rem; }
.term-group { margin-bottom: 15px; }
.term-group label { display: block; margin-bottom: 5px; font-size: 0.85rem; }
.term-input {
  width: 100%; background: transparent; border: none; border-bottom: 1px dashed #00ff41;
  color: #00ff41; font-family: 'Share Tech Mono', monospace; padding: 5px; outline: none;
}
.term-input:focus { background: rgba(0,255,65,0.1); border-bottom-style: solid; }
.term-btn {
  background: transparent; color: #00ff41; border: 1px solid #00ff41; padding: 10px 16px;
  cursor: pointer; font-family: 'Share Tech Mono', monospace; transition: all 0.2s; width: 100%; margin-top: 10px;
  font-weight: bold; font-size: 1rem;
}
.term-btn:hover { background: #00ff41; color: #000; box-shadow: 0 0 10px #00ff41; }
.term-link { margin-top: 15px; font-size: 0.8rem; text-align: center; }
.term-link a { color: #fff; text-decoration: none; border-bottom: 1px dashed #fff; transition: color 0.2s; }
.term-link a:hover { color: #00ff41; border-bottom-color: #00ff41; }
.term-error { color: #ff003c; margin-top: 10px; text-shadow: 0 0 5px #ff003c; border: 1px solid #ff003c; padding: 10px; text-align: center; background: rgba(255,0,60,0.1); }


/* ==========================================================================
   DESKTOP OS UI
   ========================================================================== */

.desktop-environment {
  width: 100%;
  height: 100vh;
  position: relative;
  overflow: hidden;
  background: #020202;
  font-family: 'Share Tech Mono', monospace;
}

.desktop-wallpaper {
  position: absolute;
  top: 0; left: 0; width: 100%; height: 100%;
  background: 
    linear-gradient(rgba(0,255,65,0.02) 1px, transparent 1px) 0 0 / 20px 20px,
    linear-gradient(90deg, rgba(0,255,65,0.02) 1px, transparent 1px) 0 0 / 20px 20px,
    radial-gradient(circle at center, #0a110a 0%, #000000 100%);
  z-index: 1;
}

.wallpaper-stats {
  position: absolute;
  top: 40px; right: 40px;
  width: 250px;
  border: 1px solid rgba(0,255,65,0.2);
  background: rgba(0,20,5,0.5);
  padding: 15px;
  box-shadow: 0 0 15px rgba(0,255,65,0.1);
  color: #00ff41;
}

.wallpaper-stats h2 { margin: 0 0 10px 0; font-size: 1.1rem; border-bottom: 1px dashed rgba(0,255,65,0.3); padding-bottom: 5px; }
.wallpaper-stats p { margin: 5px 0; font-size: 0.9rem; display: flex; justify-content: space-between; }

.desktop-icons {
  position: absolute;
  top: 20px; left: 20px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  z-index: 5;
}

.desktop-icon {
  width: 90px;
  height: 90px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  border-radius: 8px;
  border: 1px solid transparent;
  transition: all 0.2s;
  text-align: center;
}
.desktop-icon:hover {
  background: rgba(0,255,65,0.1);
  border-color: rgba(0,255,65,0.3);
}
.icon-emoji { font-size: 2.5rem; text-shadow: 0 0 10px rgba(0,255,65,0.5); }
.icon-label { font-size: 0.8rem; color: #fff; text-shadow: 0 0 3px #000; background: rgba(0,0,0,0.5); padding: 2px 5px; border-radius: 4px; }

/* Desktop Windows */
.desktop-window {
  position: absolute;
  background: #0a0a0a;
  border: 2px solid var(--primary-color);
  box-shadow: 0 0 20px rgba(0,255,65,0.15), inset 0 0 10px rgba(0,0,0,0.8);
  border-radius: 6px;
  display: flex;
  flex-direction: column;
  z-index: 10;
  overflow: hidden;
}

.window-header {
  background: var(--primary-color);
  color: #000;
  padding: 5px 10px;
  font-weight: bold;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.9rem;
  border-bottom: 2px solid #000;
  cursor: grab;
}
.window-title { display: flex; align-items: center; gap: 5px; }
.window-close { background: transparent; border: none; color: #000; font-weight: bold; cursor: pointer; padding: 0 5px; transition: color 0.2s; }
.window-close:hover { color: #fff; background: rgba(0,0,0,0.5); border-radius: 3px; }
.window-content { flex: 1; overflow-y: auto; position: relative; }

/* Specific Windows */
#desktop-clicker-window {
  width: 420px; height: 600px;
  top: 100px; left: 150px;
}
#desktop-browser-window {
  width: 75vw; height: 80vh;
  top: 50px; right: 50px;
}

/* Browser Specific */
.browser-toolbar {
  background: #111;
  border-bottom: 1px solid var(--border-color);
  padding: 10px;
}
#browser-url-bar {
  width: 100%;
  background: #000;
  border: 1px solid var(--border-color);
  color: var(--primary-color);
  padding: 5px 10px;
  font-family: 'Share Tech Mono', monospace;
  margin-bottom: 10px;
  border-radius: 3px;
}
.browser-tabs {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
}
.browser-tabs .nav-btn {
  background: transparent; border: 1px solid rgba(0,255,65,0.3); color: #888;
  padding: 5px 10px; font-size: 0.8rem; cursor: pointer; transition: all 0.2s; border-radius: 3px; font-family: 'Share Tech Mono', monospace;
}
.browser-tabs .nav-btn.active, .browser-tabs .nav-btn:hover {
  background: rgba(0,255,65,0.1); color: var(--primary-color); border-color: var(--primary-color);
}
.browser-content {
  padding: 20px;
  height: 100%;
  overflow-y: auto;
}

/* ==========================================================================
   Hacker Terminal (ROOT.EXE)
   ========================================================================== */
.hacker-terminal {
  background-color: #050505;
  color: #0f0;
  font-family: 'Share Tech Mono', monospace;
  position: relative;
  overflow: hidden;
  border: 1px solid #0f0;
  box-shadow: 0 0 20px rgba(0, 255, 0, 0.2);
}

.hacker-terminal::before {
  content: " ";
  display: block;
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  right: 0;
  background: linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.25) 50%), linear-gradient(90deg, rgba(255, 0, 0, 0.06), rgba(0, 255, 0, 0.02), rgba(0, 0, 255, 0.06));
  z-index: 2;
  background-size: 100% 2px, 3px 100%;
  pointer-events: none;
}

.hacker-header {
  background-color: #0f0;
  color: #000;
  padding: 5px 10px;
  font-weight: bold;
  display: flex;
  justify-content: space-between;
  align-items: center;
  text-transform: uppercase;
}

.hacker-nav {
  display: flex;
  border-bottom: 1px solid #0f0;
  background-color: #111;
  padding: 0;
}

.hacker-nav button {
  background: transparent;
  color: #0a0;
  border: none;
  border-right: 1px solid #0f0;
  padding: 10px 15px;
  cursor: pointer;
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.9rem;
  transition: all 0.2s;
  text-transform: uppercase;
}

.hacker-nav button:hover {
  background: #0f0;
  color: #000;
}

.hacker-nav button.active {
  background: #0f0;
  color: #000;
  font-weight: bold;
}

.hacker-panel {
  display: none;
  padding: 20px;
  height: calc(100% - 75px);
  overflow-y: auto;
}

.hacker-panel.active {
  display: block;
}

.hacker-group {
  margin-bottom: 20px;
  border: 1px solid #0f0;
  padding: 15px;
  background: rgba(0, 255, 0, 0.05);
}

.hacker-group h3 {
  margin-top: 0;
  color: #0f0;
  text-transform: uppercase;
  border-bottom: 1px solid #0f0;
  padding-bottom: 5px;
  margin-bottom: 15px;
}

.hacker-input {
  background: #000;
  border: 1px solid #0f0;
  color: #0f0;
  padding: 8px;
  font-family: 'Share Tech Mono', monospace;
  width: 100%;
  box-sizing: border-box;
  margin-bottom: 10px;
}

.hacker-input:focus {
  outline: none;
  box-shadow: 0 0 10px rgba(0, 255, 0, 0.5);
}

.hacker-btn {
  background: #000;
  color: #0f0;
  border: 1px solid #0f0;
  padding: 8px 15px;
  cursor: pointer;
  font-family: 'Share Tech Mono', monospace;
  text-transform: uppercase;
  transition: all 0.2s;
}

.hacker-btn:hover {
  background: #0f0;
  color: #000;
}

.hacker-btn-danger {
  color: #f00;
  border-color: #f00;
}

.hacker-btn-danger:hover {
  background: #f00;
  color: #000;
}

.hacker-table {
  width: 100%;
  border-collapse: collapse;
}

.hacker-table th, .hacker-table td {
  border: 1px solid #0f0;
  padding: 8px;
  text-align: left;
}

.hacker-table th {
  background: #0f0;
  color: #000;
}

.cheat-toggles {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.cheat-toggle {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px;
  background: rgba(0, 255, 0, 0.1);
  border: 1px solid #0f0;
}
