/* Style definitions for Beat the Banker client game */

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@400;600;800;900&family=Orbitron:wght@700;900&display=swap');

:root {
  --bg-dark:    #07111f;
  --color-red:  #dd0016;
  --color-green: #00b83a;
  --color-gold:  #ffc800;
  --color-cyan:  #00deff;
  --font-body:   'Outfit', sans-serif;
  --font-ui:     'Orbitron', 'Outfit', sans-serif;
}

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

/* ===== BODY / BACKGROUND ===== */
body {
  background-color: var(--bg-dark);
  /* Hexagonal grid + top blue glow */
  background-image:
    radial-gradient(ellipse at 50% 0%, rgba(0, 80, 220, 0.22) 0%, transparent 55%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='60' height='69'%3E%3Cpolygon points='30,2 58,17.5 58,51.5 30,67 2,51.5 2,17.5' fill='none' stroke='%230d2040' stroke-width='1'/%3E%3C/svg%3E");
  background-size: 100% 100%, 60px 69px;
  color: #fff;
  font-family: var(--font-body);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  overflow-x: hidden;
  position: relative;
}

/* Scanline texture */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background: repeating-linear-gradient(0deg,
    rgba(0,0,0,0.06) 0, rgba(0,0,0,0.06) 1px,
    transparent 1px, transparent 4px);
  pointer-events: none;
  z-index: 9999;
}

/* ===== HEADER ===== */
header {
  width: 100%;
  max-width: 1440px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 24px;
  position: relative;
  z-index: 10;
  border-bottom: 1px solid rgba(0, 200, 255, 0.15);
  background: rgba(5, 9, 20, 0.85);
  backdrop-filter: blur(6px);
}

header::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 8%;
  right: 8%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--color-cyan), transparent);
  opacity: 0.4;
}

/* Brand — left */
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.ibi-logo {
  width: 48px;
  height: 48px;
  filter: drop-shadow(0 0 8px rgba(255,200,0,0.5));
  flex-shrink: 0;
}

.ibi-logo-right {
  width: 44px;
  height: 44px;
}

.logo-right .ibi-logo {
  filter: drop-shadow(0 0 10px rgba(255,200,0,0.55));
}

.brand-text-group {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.brand-name {
  display: flex;
  align-items: baseline;
  gap: 0;
  white-space: nowrap;
}

.brand-dollar {
  font-family: var(--font-ui);
  font-size: 1.1rem;
  font-weight: 900;
  color: var(--color-gold);
  text-shadow: 0 0 12px rgba(255,200,0,0.7);
}

.brand-btc {
  font-family: var(--font-ui);
  font-size: 1.1rem;
  font-weight: 900;
  color: var(--color-gold);
  text-shadow: 0 0 12px rgba(255,200,0,0.7);
}

.brand-text {
  font-family: var(--font-ui);
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 3px;
  color: rgba(255,255,255,0.7);
}

/* Title — center */
.title-banner {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.title-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.solana-circle {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: rgba(20, 30, 60, 0.8);
  border: 1.5px solid rgba(20, 241, 149, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 12px rgba(20, 241, 149, 0.25);
  flex-shrink: 0;
}

.coin-logo {
  width: 48px;
  height: 48px;
  flex-shrink: 0;
  filter: drop-shadow(0 2px 8px rgba(0,0,0,0.5));
}

.title-banner-img {
  max-height: 96px;
  width: auto;
  filter: drop-shadow(0 0 18px rgba(255,200,0,0.55)) drop-shadow(0 0 6px rgba(0,220,255,0.3));
}

.round-info {
  background: rgba(5, 15, 45, 0.9);
  border: 1.5px solid rgba(0, 220, 255, 0.45);
  padding: 5px 26px;
  border-radius: 20px;
  font-family: var(--font-ui);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 2.5px;
  color: var(--color-cyan);
  box-shadow: 0 0 16px rgba(0, 220, 255, 0.18), inset 0 0 10px rgba(0, 220, 255, 0.04);
  animation: round-glow 2.5s ease-in-out infinite;
}

/* BTC icon — right */
.logo-right { display: flex; align-items: center; }

/* ===== MAIN LAYOUT ===== */
.game-container {
  display: grid;
  grid-template-columns: 175px 1fr 175px;
  gap: 14px;
  width: 100%;
  max-width: 1440px;
  padding: 10px 14px;
  flex: 1;
  position: relative;
  z-index: 5;
}

/* ===== PRIZE SIDEBARS ===== */
.sidebar {
  display: flex;
  flex-direction: column;
  gap: 6px;
  justify-content: center;
}

/* Hexagonal pill shape */
.prize-node {
  position: relative;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-ui);
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 1px;
  transition: filter 0.3s, opacity 0.3s;
  clip-path: polygon(7% 0%, 93% 0%, 100% 50%, 93% 100%, 7% 100%, 0% 50%);
}

/* Left column — RED */
.sidebar-left .prize-node {
  background: linear-gradient(135deg, #cc0015 0%, #8c000e 100%);
  color: #ffffff;
  text-shadow: 0 1px 4px rgba(0,0,0,0.6);
  filter: drop-shadow(0 0 4px rgba(200,0,20,0.3));
}

.sidebar-left .prize-node.eliminated {
  opacity: 0.15;
  text-decoration: line-through;
  filter: none;
}

/* Right column — GREEN */
.sidebar-right .prize-node {
  background: linear-gradient(135deg, #007f28 0%, #00551a 100%);
  color: #ffffff;
  text-shadow: 0 1px 4px rgba(0,0,0,0.6);
  filter: drop-shadow(0 0 4px rgba(0,180,50,0.3));
}

/* Right column — GOLD tiers */
.sidebar-right .prize-node.gold-tier {
  background: linear-gradient(135deg, #b37800 0%, #7a5000 100%);
  color: #ffe680;
  filter: drop-shadow(0 0 5px rgba(255,200,0,0.35));
}

.sidebar-right .prize-node.eliminated {
  opacity: 0.15;
  text-decoration: line-through;
  filter: none;
}

/* Highlighted tier nodes */
.prize-node.highlighted {
  animation: tier-glow 2s ease-in-out infinite;
}

.prize-node .tier-label {
  position: absolute;
  bottom: 2px;
  font-family: var(--font-body);
  font-size: 0.44rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: rgba(255,255,255,0.8);
  text-transform: uppercase;
}

/* ===== CENTER COLUMN ===== */
.center-content {
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: center;
}

/* Wallets Grid */
.wallets-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 9px;
  width: 100%;
  background: rgba(5, 12, 32, 0.65);
  border: 1px solid rgba(0, 200, 255, 0.12);
  border-radius: 12px;
  padding: 12px;
  backdrop-filter: blur(8px);
  box-shadow: inset 0 0 30px rgba(0, 20, 60, 0.4), 0 4px 20px rgba(0,0,0,0.4);
}

/* Wallet Card */
.wallet-card {
  position: relative;
  height: 82px;
  cursor: pointer;
  transition: transform 0.5s ease, filter 0.2s ease;
  perspective: 800px;
}

.wallet-card:hover:not(.opened):not(.selected-bag) {
  transform: translateY(-5px) scale(1.06);
}

.wallet-card.selected-bag {
  opacity: 0.22;
  pointer-events: none;
  filter: saturate(0.2);
}

.wallet-card.opened {
  pointer-events: none;
}

.wallet-card.opened .wallet-front {
  transform: rotateY(-160deg);
}

.wallet-front, .wallet-back {
  position: absolute;
  inset: 0;
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 3px;
}

.wallet-front {
  z-index: 2;
  transform-origin: left center;
  backface-visibility: hidden;
  background: linear-gradient(160deg, rgba(25, 45, 90, 0.9) 0%, rgba(10, 18, 50, 0.95) 100%);
  border: 1.5px solid rgba(0, 180, 255, 0.22);
  box-shadow: inset 0 0 10px rgba(0,40,100,0.3), 0 2px 8px rgba(0,0,0,0.4);
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.55s cubic-bezier(0.4, 0, 0.2, 1);
}

.wallet-card:hover:not(.opened):not(.selected-bag) .wallet-front {
  border-color: var(--color-gold);
  box-shadow: 0 0 16px rgba(255, 200, 0, 0.35), inset 0 0 8px rgba(255,200,0,0.08);
}

.wallet-back {
  z-index: 1;
  background: linear-gradient(135deg, rgba(12, 22, 55, 0.97) 0%, rgba(5, 10, 28, 0.99) 100%);
  border: 1.5px solid var(--color-gold);
  box-shadow: 0 0 18px rgba(0, 220, 255, 0.4);
}

.wallet-img {
  width: 92%;
  height: auto;
  max-height: 72px;
  object-fit: contain;
  filter: drop-shadow(0 2px 6px rgba(0,0,0,0.5));
}

.wallet-number {
  position: absolute;
  top: 3px;
  left: 4px;
  font-family: var(--font-ui);
  font-size: 0.55rem;
  font-weight: 700;
  color: var(--color-gold);
  background: rgba(0, 0, 0, 0.65);
  border-radius: 50%;
  width: 16px;
  height: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255,200,0,0.5);
}

.wallet-value {
  font-family: var(--font-ui);
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--color-gold);
  text-shadow: 0 0 8px rgba(255,200,0,0.7);
  text-align: center;
}

/* ===== BOTTOM CONSOLE ===== */
.bottom-console {
  display: grid;
  grid-template-columns: 185px 1fr;
  gap: 14px;
  width: 100%;
}

/* Pedestal */
.pedestal-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
}

.pedestal {
  background: radial-gradient(ellipse at 50% 30%, rgba(35, 55, 100, 0.9) 0%, rgba(6, 10, 28, 0.98) 100%);
  border: 2px solid var(--color-gold);
  border-radius: 50%;
  width: 148px;
  height: 34px;
  position: relative;
  box-shadow: 0 0 20px rgba(255,200,0,0.35), 0 0 50px rgba(255,200,0,0.1), inset 0 0 18px rgba(255,200,0,0.12);
  display: flex;
  justify-content: center;
  transform: perspective(100px) rotateX(22deg);
  margin-top: 60px;
}

.pedestal-wallet {
  position: absolute;
  bottom: 16px;
  width: 82px;
  height: auto;
  transform: perspective(100px) rotateX(-22deg);
  z-index: 10;
  filter: drop-shadow(0 8px 18px rgba(0,0,0,0.8)) drop-shadow(0 0 8px rgba(255,200,0,0.2));
  animation: float 3s ease-in-out infinite;
}

.pedestal-label {
  margin-top: 14px;
  text-align: center;
  font-family: var(--font-ui);
  font-weight: 700;
  font-size: 0.68rem;
  letter-spacing: 2px;
  color: rgba(255,255,255,0.75);
}

.pedestal-label span {
  color: var(--color-gold);
  font-size: 0.56rem;
  display: block;
  margin-top: 2px;
  font-family: var(--font-body);
  letter-spacing: 1px;
  opacity: 0.8;
}

/* ===== BANKER PANEL ===== */
.banker-panel {
  background: linear-gradient(135deg, rgba(8, 16, 42, 0.97) 0%, rgba(4, 8, 24, 0.99) 100%);
  border: 1.5px solid rgba(0, 220, 255, 0.22);
  border-radius: 12px;
  padding: 22px 20px 16px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
  position: relative;
  box-shadow: 0 0 30px rgba(0,0,0,0.5), inset 0 0 30px rgba(0,15,50,0.35);
  margin-top: 10px;
}

.banker-panel::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--color-cyan), transparent);
  opacity: 0.6;
}

.banker-title {
  position: absolute;
  top: -10px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--bg-dark);
  padding: 2px 18px;
  border-radius: 10px;
  border: 1px solid rgba(0, 220, 255, 0.35);
  font-family: var(--font-ui);
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 2.5px;
  color: var(--color-cyan);
  white-space: nowrap;
}

/* Phone image */
.phone-asset-container {
  width: 88px;
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-right: 1px solid rgba(255,255,255,0.07);
  padding-right: 14px;
  flex-shrink: 0;
}

.phone-asset {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  animation: phone-idle 5s ease-in-out infinite;
  filter: drop-shadow(0 4px 10px rgba(0,0,0,0.5));
}

/* Offer section */
.banker-offer-details {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
}

.banker-status {
  font-family: var(--font-ui);
  font-size: 0.62rem;
  font-weight: 700;
  color: var(--color-red);
  letter-spacing: 2px;
  text-transform: uppercase;
  text-shadow: 0 0 10px rgba(220,0,22,0.7);
}

.offer-label {
  font-family: var(--font-ui);
  font-size: 0.58rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: rgba(255,255,255,0.4);
  margin-top: 2px;
}

.offer-value {
  font-family: var(--font-ui);
  font-size: 1.35rem;
  font-weight: 900;
  color: #ffffff;
  text-shadow: 0 0 14px rgba(255,255,255,0.5);
  letter-spacing: 1px;
}

.offer-conversions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  margin-top: 4px;
  min-height: 30px;
}

.offer-conv-row {
  font-family: var(--font-ui);
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 1px;
  color: var(--color-gold);
  text-shadow: 0 0 8px rgba(255,200,0,0.5);
  white-space: nowrap;
}

.offer-conv-wbtc {
  color: var(--color-cyan);
  text-shadow: 0 0 8px rgba(0,220,255,0.5);
}

/* Buttons — full-width row below phone+offer */
.banker-buttons {
  width: 100%;
  display: flex;
  flex-direction: row;
  justify-content: center;
  gap: 20px;
}

.console-btn {
  flex: 1;
  max-width: 260px;
  height: 90px;
  padding: 0 20px;
  border-radius: 12px;
  font-family: var(--font-ui);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  transition: transform 0.18s, box-shadow 0.18s, opacity 0.25s;
}

.btn-deal {
  background: linear-gradient(160deg, #00601e 0%, #003d13 100%);
  border: 2px solid var(--color-green);
  color: #fff;
  box-shadow: 0 0 22px rgba(0,200,60,0.35), inset 0 0 18px rgba(0,200,60,0.1);
}

.btn-nodeal {
  background: linear-gradient(160deg, #880011 0%, #55000b 100%);
  border: 2px solid var(--color-red);
  color: #fff;
  box-shadow: 0 0 22px rgba(220,0,20,0.35), inset 0 0 18px rgba(220,0,20,0.1);
}

.console-btn:not([disabled]):hover {
  transform: scale(1.05);
}

.btn-deal:not([disabled]):hover {
  background: linear-gradient(160deg, #008028 0%, #005018 100%);
  box-shadow: 0 0 40px rgba(0,230,80,0.6), inset 0 0 20px rgba(0,230,80,0.15);
}

.btn-nodeal:not([disabled]):hover {
  background: linear-gradient(160deg, #aa0016 0%, #700010 100%);
  box-shadow: 0 0 40px rgba(255,0,30,0.6), inset 0 0 20px rgba(255,0,30,0.15);
}

.console-btn[disabled] {
  opacity: 0.28;
  cursor: default;
}

.btn-main {
  font-family: var(--font-ui);
  font-size: 1.4rem;
  font-weight: 900;
  letter-spacing: 2px;
  line-height: 1;
}

.btn-sub {
  font-family: var(--font-ui);
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 3px;
  opacity: 0.7;
}

/* ===== FOOTER ===== */
footer {
  width: 100%;
  max-width: 1440px;
  padding: 10px 24px;
  border-top: 1px solid rgba(0, 200, 255, 0.1);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.72rem;
  color: rgba(255,255,255,0.42);
  background: rgba(4, 7, 18, 0.75);
  backdrop-filter: blur(4px);
  position: relative;
  z-index: 10;
}

.live-badge {
  color: var(--color-green);
  font-weight: 800;
  text-shadow: 0 0 6px var(--color-green);
  animation: blink 2s ease-in-out infinite;
}

/* ===== MODAL ===== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(2, 4, 14, 0.9);
  backdrop-filter: blur(10px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.modal-box {
  background: linear-gradient(160deg, #111f44 0%, #060d24 60%, #040820 100%);
  border: 2px solid rgba(255, 200, 0, 0.55);
  border-radius: 16px;
  width: 92%;
  max-width: 500px;
  padding: 38px 38px 30px;
  text-align: center;
  box-shadow:
    0 0 40px rgba(255,200,0,0.22),
    0 0 90px rgba(0,0,0,0.7),
    inset 0 0 30px rgba(0,15,50,0.5);
  transform: translateY(-22px) scale(0.97);
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
  position: relative;
  overflow: hidden;
}

.modal-box::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--color-gold), transparent);
}

.modal-overlay.active .modal-box {
  transform: translateY(0) scale(1);
}

.modal-box h2 {
  font-family: var(--font-ui);
  font-size: 1.4rem;
  font-weight: 900;
  color: var(--color-gold);
  margin-bottom: 14px;
  text-shadow: 0 0 20px rgba(255,200,0,0.5);
  letter-spacing: 2px;
}

.modal-box p {
  font-size: 0.92rem;
  margin-bottom: 26px;
  line-height: 1.6;
  color: rgba(255,255,255,0.82);
}

.modal-btn {
  background: linear-gradient(135deg, var(--color-gold) 0%, #d4a200 100%);
  color: #000;
  border: none;
  padding: 11px 36px;
  font-family: var(--font-ui);
  font-weight: 700;
  font-size: 0.78rem;
  letter-spacing: 2px;
  border-radius: 7px;
  cursor: pointer;
  box-shadow: 0 0 20px rgba(255,200,0,0.4);
  transition: transform 0.18s, box-shadow 0.18s;
}

.modal-btn:hover {
  transform: scale(1.06);
  box-shadow: 0 0 30px rgba(255,200,0,0.6);
}

/* ===== ANIMATIONS ===== */
@keyframes float {
  0%, 100% { transform: translateY(0) perspective(100px) rotateX(-22deg); }
  50%       { transform: translateY(-9px) perspective(100px) rotateX(-22deg); }
}

@keyframes round-glow {
  0%, 100% { box-shadow: 0 0 10px rgba(0,220,255,0.12), inset 0 0 6px rgba(0,220,255,0.03); }
  50%       { box-shadow: 0 0 22px rgba(0,220,255,0.35), inset 0 0 12px rgba(0,220,255,0.08); }
}

@keyframes tier-glow {
  0%, 100% { filter: drop-shadow(0 0 4px rgba(255,200,0,0.35)); }
  50%       { filter: drop-shadow(0 0 12px rgba(255,200,0,0.75)); }
}

@keyframes blink {
  0%, 80%, 100% { opacity: 1; }
  40%           { opacity: 0.35; }
}

@keyframes phone-idle {
  0%, 100% { transform: rotate(0deg); }
  20%       { transform: rotate(-4deg) translateY(-2px); }
  60%       { transform: rotate(4deg) translateY(-2px); }
}

@keyframes phone-wiggle {
  0%, 50%, 100% { transform: rotate(0deg) scale(1);    filter: drop-shadow(0 0 0 rgba(255,0,0,0)); }
  10%, 30%      { transform: rotate(-10deg) scale(1.1); filter: drop-shadow(0 0 14px rgba(255,50,60,0.9)); }
  20%, 40%      { transform: rotate(10deg) scale(1.1);  filter: drop-shadow(0 0 14px rgba(255,50,60,0.9)); }
}

.phone-ringing {
  animation: phone-wiggle 0.48s infinite ease-in-out !important;
  filter: drop-shadow(0 0 18px rgba(255,50,60,0.7));
}
