:root {
  --red: #e60026;
  --green: #12DF38;
  --blue: #3b82f6;
  --purple: #a855f7;
  --yellow: #eab308;
  --bg-darker: #1B1C1D;
  --bg-dark: #1B1C1D;
  --bg-med: #262626;
  --bg-light: #2a2a2a;
  --text-primary: #fff;
  --text-secondary: #888;
  --border-color: #333;
}

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

html, body {
  width: 100%; height: 100%;
  background: #000; color: var(--text-primary);
  font-family: 'Inter', sans-serif;
  overflow-x: hidden;
}

/* Loader Styles */
.loader-container {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  background: #000;
  z-index: 9999;
  opacity: 1;
  transition: opacity 0.5s ease;
}

.loader-container.fade-out {
  opacity: 0;
  pointer-events: none;
}

.loader {
  text-align: center;
}
.loader .powered {
  font-size: 0.5rem;
  letter-spacing: 0.15em;
  opacity: 0.8;
  margin-bottom: 0.4rem;
  font-weight: 400;
}
.loader .logo {
  font-family: 'Oswald', sans-serif;
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  display: inline-block;
  padding-bottom: 0.2rem;
  border-bottom: 1px solid var(--text-primary);
  margin-bottom: 0.8rem;
}
.loader .dots {
  display: flex;
  justify-content: center;
  gap: 0.3rem;
}
.loader .dot {
  width: 0.4rem;
  height: 0.4rem;
  background: var(--red);
  border-radius: 50%;
  opacity: 0.4;
  animation: blink 1.4s infinite ease-in-out both;
}
.loader .dot:nth-child(1) { animation-delay: -0.32s; }
.loader .dot:nth-child(2) { animation-delay: -0.16s; }
.loader .dot:nth-child(3) { animation-delay: 0s; }

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

/* Main Game Interface */
.game-container {
  width: 100%; height: 100vh;
  background: var(--bg-darker);
  display: flex;
  flex-direction: column;
  opacity: 0;
  transition: opacity 0.5s ease;
}

.game-container.show {
  opacity: 1;
}

.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 1.5rem;
  background: var(--bg-light);
  border-bottom: 1px solid var(--border-color);
  position: relative;
  z-index: 10;
}

.header .logo {
  font-family: 'Oswald', sans-serif;
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--red);
  font-style: italic;
  text-shadow: 0 0 5px rgba(230,0,38,0.5);
}

.header .balance {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: 1rem;
  font-weight: 600;
}

.balance .amount {
  color: rgb(18, 223, 56);
}

.menu-icon {
  width: 24px;
  height: 18px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  cursor: pointer;
}
.menu-icon span {
  display: block;
  height: 2px;
  width: 100%;
  background-color: var(--text-primary);
  border-radius: 2px;
}

.main-content {
  display: flex;
  flex: 1;
  overflow: hidden;
}

.sidebar {
  width: 320px;
  background: var(--bg-med);
  border-right: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  transition: transform 0.3s ease-in-out;
}
.sidebar.open {
  transform: translateX(0);
}

.chat-sidebar {
  width: 280px;
  background: var(--bg-med);
  border-left: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.chat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem;
  border-bottom: 1px solid var(--border-color);
  background: var(--bg-dark);
}

.chat-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-primary);
}

.chat-count {
  color: var(--green);
  font-weight: 700;
}

.chat-close {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 1.2rem;
  padding: 0.2rem;
}

.chat-close:hover {
  color: var(--text-primary);
}

.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 0.5rem;
  scrollbar-width: thin;
  scrollbar-color: #555 #333;
}

.chat-messages::-webkit-scrollbar {
  width: 6px;
}
.chat-messages::-webkit-scrollbar-track {
  background: #333;
}
.chat-messages::-webkit-scrollbar-thumb {
  background-color: #555;
  border-radius: 3px;
}

.chat-message {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  padding: 0.5rem;
  margin-bottom: 0.3rem;
  background: var(--bg-dark);
  border-radius: 6px;
  font-size: 0.8rem;
}

.chat-message .avatar {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #444;
  background-size: cover;
  flex-shrink: 0;
}

.chat-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.chat-username {
  color: var(--text-primary);
  font-weight: 600;
  font-size: 0.75rem;
}

.chat-text {
  color: var(--text-secondary);
  line-height: 1.3;
}

.chat-reactions {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  margin-left: auto;
  flex-shrink: 0;
}

.chat-like-count {
  color: var(--text-secondary);
  font-size: 0.7rem;
  font-weight: 500;
}

.chat-like-btn {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 0.7rem;
  padding: 0.1rem 0.3rem;
  border-radius: 3px;
  transition: all 0.2s;
}

.chat-like-btn:hover {
  background: var(--bg-light);
  color: var(--text-primary);
}

.tabs {
  display: flex;
  background: var(--bg-dark);
  border-radius: 8px;
  margin: 0.5rem;
  padding: 0.3rem;
}

.tab {
  flex: 1;
  padding: 0.6rem;
  text-align: center;
  font-size: 0.85rem;
  background: transparent;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  border-radius: 6px;
  font-weight: 500;
  transition: all 0.2s ease;
}
.tab:hover {
    color: var(--text-primary);
}
.tab.active {
  color: var(--text-primary);
  background: var(--bg-med);
  font-weight: 600;
}

.main-column {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.multipliers {
  display: flex;
  align-items: center;
  gap: 1.2rem;
  padding: 0.6rem 1.5rem;
  overflow-x: auto;
  background: var(--bg-dark);
  border-bottom: 1px solid var(--border-color);
  scrollbar-width: none; /* Firefox */
}
.multipliers::-webkit-scrollbar {
  display: none; /* Safari and Chrome */
}

.multiplier {
  font-size: 0.8rem;
  font-weight: 500;
  white-space: nowrap;
  color: var(--text-secondary);
  cursor: pointer;
  transition: color 0.2s ease;
}
.multiplier:hover {
    color: var(--text-primary);
}

.multiplier-more {
    color: var(--text-secondary);
    cursor: pointer;
    font-weight: 700;
}

.multiplier.red { color: var(--red); }
.multiplier.blue { color: var(--blue); }
.multiplier.green { color: var(--green); }
.multiplier.purple { color: var(--purple); }
.multiplier.yellow { color: var(--yellow); }

.stats {
  padding: 1rem;
  border-bottom: 1px solid var(--border-color);
}

.stats-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.stats-info {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.stats-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.stats-icons .avatar {
    width: 20px;
    height: 20px;
    margin-left: -8px;
    border: 1px solid var(--bg-med);
}
.stats-icons .avatar:first-child {
    margin-left: 0;
}

.stats-text {
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin-bottom: 0.3rem;
  transition: color 0.3s ease;
}

.stats-text:hover {
  color: var(--text-primary);
}

.stats-progress {
    width: 100%;
    height: 4px;
    background-color: var(--border-color);
    border-radius: 2px;
    margin-top: 0.5rem;
    overflow: hidden;
}
.stats-progress-inner {
    height: 100%;
    background: linear-gradient(90deg, var(--green), #00ff88, var(--green));
    background-size: 200% 100%;
    border-radius: 2px;
    transition: width 0.3s ease-out;
    animation: progressShimmer 2s ease-in-out infinite;
    box-shadow: 0 0 10px rgba(18, 223, 56, 0.3);
}

@keyframes progressShimmer {
  0% { background-position: 200% 0; }
  50% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

.stats-win {
    text-align: right;
}

.stats-number {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--green);
  animation: numberPulse 3s ease-in-out infinite;
}

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

.bets-header {
    display: grid;
    grid-template-columns: 1fr auto auto auto;
    gap: 0.5rem 1rem;
    padding: 0.5rem 1rem;
    font-size: 0.75rem;
    color: var(--text-secondary);
    font-weight: 500;
}
.bets-header span:not(:first-child) {
    justify-self: end;
}
.bets-header span:nth-child(3) {
    padding-right: 0.5rem;
}


.bets-list {
  flex: 1;
  overflow-y: auto;
  padding: 0.5rem 1rem;
  scrollbar-width: thin;
  scrollbar-color: #555 #333;
}
.bets-list::-webkit-scrollbar {
  width: 6px;
}
.bets-list::-webkit-scrollbar-track {
  background: #333;
}
.bets-list::-webkit-scrollbar-thumb {
  background-color: #555;
  border-radius: 3px;
}

.bet-item {
  display: grid;
  grid-template-columns: 1fr auto auto auto;
  align-items: center;
  gap: 0.5rem 1rem;
  padding: 0.8rem 1rem;
  font-size: 0.85rem;
  background-color: var(--bg-dark);
  border-radius: 8px;
  margin-bottom: 0.5rem;
}
.bet-item.won {
    background-color: #0a2e1d;
    border: 1px solid #135c38;
}
.bet-item.won .bet-player span, .bet-item.won .bet-amount {
    color: var(--text-primary);
}
.bet-item.won .bet-multiplier {
    color: var(--green);
}

.bet-player {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.avatar {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background-color: #444;
  background-size: cover;
}

.bet-amount {
  color: var(--text-secondary);
  font-weight: 500;
  justify-self: end;
}

.bet-multiplier {
  font-weight: 700;
  font-size: 0.8rem;
  justify-self: end;
}

.bet-multiplier.green { color: var(--green); }
.bet-multiplier.blue { color: var(--blue); }
.bet-multiplier.red { color: var(--red); }

.bet-win {
  color: var(--green);
  font-weight: 600;
  justify-self: end;
}

.sidebar-footer {
    padding: 1rem;
    font-size: 0.8rem;
    color: var(--text-secondary);
    border-top: 1px solid var(--border-color);
}

.provably-fair {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
    cursor: pointer;
}
.provably-fair:hover {
    color: var(--text-primary);
}
.provably-fair svg {
    width: 16px;
    height: 16px;
    fill: currentColor;
}

.powered-by {
    font-size: 0.75rem;
    opacity: 0.6;
}

.powered-by span {
    font-weight: 700;
    letter-spacing: 0.05em;
}

.game-area {
  flex: 1;
  position: relative;
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  overflow: hidden;
}

.game-area::before {
    content: '';
    position: absolute;
    width: 200vmax;
    height: 200vmax;
    left: 0%;
    top: 100%;
    transform: translate(-50%, -50%);
    background: 
        repeating-conic-gradient(
            from 0deg at center,
            rgba(255, 255, 255, 0.08) 0deg,
            rgba(255, 255, 255, 0.08) 5deg,
            transparent 5deg,
            transparent 8deg
        );
    animation: rotateBackground 80s linear infinite;
    z-index: 1;
}

@keyframes rotateBackground {
    from { transform: translate(-50%, -50%) rotate(0deg); }
    to { transform: translate(-50%, -50%) rotate(360deg); }
}

.game-area::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    left: 0;
    top: 0;
    background: radial-gradient(circle at center, 
        rgba(138, 43, 226, 0.3) 0%,
        rgba(75, 0, 130, 0.2) 25%,
        rgba(25, 25, 112, 0.1) 50%,
        rgba(0, 0, 0, 0.7) 100%
    );
    animation: colorShift 8s ease-in-out infinite;
    z-index: 2;
}

@keyframes colorShift {
    0% { 
        background: radial-gradient(circle at center, 
            rgba(138, 43, 226, 0.3) 0%,
            rgba(75, 0, 130, 0.2) 25%,
            rgba(25, 25, 112, 0.1) 50%,
            rgba(0, 0, 0, 0.7) 100%
        );
    }
    25% { 
        background: radial-gradient(circle at center, 
            rgba(255, 20, 147, 0.3) 0%,
            rgba(199, 21, 133, 0.2) 25%,
            rgba(139, 69, 19, 0.1) 50%,
            rgba(0, 0, 0, 0.7) 100%
        );
    }
    50% { 
        background: radial-gradient(circle at center, 
            rgba(255, 165, 0, 0.3) 0%,
            rgba(255, 140, 0, 0.2) 25%,
            rgba(255, 69, 0, 0.1) 50%,
            rgba(0, 0, 0, 0.7) 100%
        );
    }
    75% { 
        background: radial-gradient(circle at center, 
            rgba(50, 205, 50, 0.3) 0%,
            rgba(34, 139, 34, 0.2) 25%,
            rgba(0, 100, 0, 0.1) 50%,
            rgba(0, 0, 0, 0.7) 100%
        );
    }
    100% { 
        background: radial-gradient(circle at center, 
            rgba(138, 43, 226, 0.3) 0%,
            rgba(75, 0, 130, 0.2) 25%,
            rgba(25, 25, 112, 0.1) 50%,
            rgba(0, 0, 0, 0.7) 100%
        );
    }
}

.dark-overlay {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(0, 0, 0, 0.7);
  z-index: 3;
  opacity: 0;
  transition: opacity 1s ease-in-out;
  pointer-events: none;
}

.game-area.flew-away-state .dark-overlay {
  opacity: 1;
}

.flying-phase {
  opacity: 0;
  transition: opacity 0.5s ease;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 100%;
  text-align: center;
  z-index: 10;
}

.ufc-phase {
  opacity: 0;
  transition: opacity 0.5s ease;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 10;
}

.flying-phase.active {
  opacity: 1;
}

.ufc-phase.active {
  opacity: 1;
}

.multiplier-display {
  font-size: 6rem;
  font-weight: 900;
  color: #fff;
  font-family: 'Oswald', sans-serif;
  text-shadow: 0 0 30px rgba(255, 255, 255, 0.5);
  margin: 0;
  transition: color 0.3s ease, text-shadow 0.3s ease;
}

.multiplier-display.is-finished {
  color: var(--red);
  text-shadow: 0 0 20px rgba(230, 0, 38, 0.3);
}

.flew-away {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 1rem;
  letter-spacing: 0.1em;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.flew-away.show {
  opacity: 1;
}

.ufc-content {
  text-align: center;
  color: #fff;
}

.ufc-logo {
  font-size: 4rem;
  font-weight: 900;
  color: var(--red);
  font-family: 'Oswald', sans-serif;
  margin-bottom: 0.5rem;
}

.aviator-logo {
  font-size: 2.5rem;
  font-weight: 700;
  color: #ff6b35;
  font-family: 'Oswald', sans-serif;
  font-style: italic;
  margin-left: 1rem;
}

.official-partners {
  font-size: 1.2rem;
  font-weight: 600;
  color: #fff;
  margin: 1rem 0;
  letter-spacing: 0.1em;
}

.spribe-badge {
  background: #2d4a2b;
  border: 2px solid #4ade80;
  border-radius: 8px;
  padding: 0.5rem 1rem;
  display: inline-block;
  margin-top: 1rem;
}

.spribe-badge .spribe-text {
  color: #7EC623;
  font-weight: 700;
  font-size: 1rem;
  margin-bottom: 0.2rem;
}

.spribe-badge .official-game {
  color: #888;
  font-size: 0.7rem;
}

.spribe-badge .since {
  color: var(--text-secondary);
  font-size: 0.7rem;
}

.bottom-panel {
  width: 100%;
  background: var(--bg-dark);
  border-top: 1px solid var(--border-color);
  padding: 1rem 0;
  display: flex;
  gap: 2rem;
  justify-content: center;
  align-items: flex-start;
}

.bet-panel-card {
  background: var(--bg-med);
  border-radius: 24px;
  padding: 2rem 2.5rem 2rem 2.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  max-width: 520px;
  width: 100%;
  min-width: 350px;
  box-shadow: 0 2px 12px 0 rgba(0,0,0,0.12);
  border: none;
  position: relative;
}

.bet-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: transparent;
  border-radius: 12px;
  padding: 0;
  width: 100%;
  margin-bottom: 0.5rem;
}

.bet-tabs {
  display: flex;
  flex-grow: 1;
  background: #232323;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 1px 2px 0 rgba(0,0,0,0.08);
}

.bet-tab {
  padding: 0.5rem 2.2rem;
  background: transparent;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 1.1rem;
  font-weight: 500;
  border-radius: 20px;
  transition: background 0.2s, color 0.2s;
}

.bet-tab.active {
  background: var(--bg-dark);
  color: var(--text-primary);
  font-weight: 700;
}

.bet-panel-header .history-icon {
  background: #232323;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 0.4rem 0.5rem;
  border-radius: 8px;
  margin-left: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  transition: background 0.2s;
}
.bet-panel-header .history-icon:hover {
  background: var(--bg-dark);
  color: var(--text-primary);
}

.bet-panel-header .history-icon svg {
  width: 22px;
  height: 22px;
  fill: currentColor;
}

.bet-panel-body {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 2rem;
  width: 100%;
  justify-content: flex-start;
}

.bet-actions {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  min-width: 120px;
}

.bet-input-container {
  display: flex;
  align-items: center;
  background: #232323;
  border-radius: 12px;
  overflow: hidden;
  flex-grow: 1;
  margin-bottom: 0.2rem;
  box-shadow: 0 1px 2px 0 rgba(0,0,0,0.08);
}

.bet-button {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  padding: 0.7rem 1.1rem;
  cursor: pointer;
  font-size: 1.5rem;
  font-weight: 700;
  transition: background-color 0.2s, color 0.2s;
  border-radius: 8px;
}
.bet-button:hover {
  background: var(--bg-dark);
  color: var(--text-primary);
}

.bet-input {
  background: transparent;
  border: none;
  color: var(--text-primary);
  padding: 0.7rem 0.5rem;
  font-size: 1.3rem;
  font-weight: 700;
  text-align: center;
  width: 60px;
  min-width: 60px;
  outline: none;
}

.quick-amounts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem 0.7rem;
  width: 100%;
}

.quick-amount {
  background: #232323;
  border: none;
  color: var(--text-secondary);
  padding: 0.4rem 0.7rem;
  cursor: pointer;
  font-size: 1rem;
  font-weight: 600;
  border-radius: 8px;
  transition: background 0.2s, color 0.2s;
  text-align: center;
}
.quick-amount:hover {
  color: var(--text-primary);
  background: var(--bg-dark);
}

.quick-bet:hover {
  background: #505050;
  color: #fff;
}

.quick-bet.selected {
  background: #313131 !important;
  color: #fff !important;
}

.quick-bet.selected:hover {
  background: #3d3d3d !important;
  color: #fff !important;
}

.main-bet-button {
  max-width: 180px;
  width: 100%;
  margin-left: auto;
  margin-right: 0;
  background: #12DF38;
  border: 2px solid #fff;
  color: #fff;
  font-size: 2rem;
  font-weight: 700;
  padding: 0.6rem 1.2rem !important;
  min-height: 56px !important;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  line-height: 1.2;
}
.main-bet-button:hover {
  background: #8ad633;
  color: #fff;
  border: 2px solid #12DF38;
}

.main-bet-button .bet-amount-currency {
  font-size: 1.2rem;
  font-weight: 500;
  margin-top: 0.2rem;

}

.players-indicator {
  position: absolute;
  bottom: 2rem;
  right: 2rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(0, 0, 0, 0.7);
  padding: 0.5rem 0.8rem;
  border-radius: 20px;
  backdrop-filter: blur(10px);
  z-index: 10;
}

.players-indicator span {
  color: var(--text-primary);
  font-weight: 600;
  font-size: 0.9rem;
  transition: color 0.3s ease;
}

.players-icon {
    display: flex;
}
.players-icon .avatar {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background-size: cover;
    background-position: center;
    border: 2px solid var(--bg-med);
    transition: all 0.6s ease-out;
}
.players-icon .avatar:first-child {
    margin-right: -8px;
}

.game-plane {
  position: absolute;
  width: 180px;
  height: auto;
  z-index: 5;
  display: none;
  transform-origin: center;
  transform: translate(-50%, -50%);
}

.game-plane.is-waiting-next-round {
  display: block;
  left: 20px;
  bottom: 20px;
  transform: none;
}

/* Ensure canvas is visible for plane animation */
#gameCanvas {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 3;
  width: 100%;
  height: 100%;
  border-radius: 24px;
}

/* Desktop/Tablet UFC sizing */
.ufc-phase-logo {
  width: 200px;
  height: auto;
  margin-bottom: 15px;
}

.spribe-phase-logo {
  width: 150px;
  height: auto;
}

.ufc-progress-container {
  width: 200px;
  height: 6px;
  background: rgba(255,255,255,0.2);
  border-radius: 3px;
  margin-bottom: 15px;
  overflow: hidden;
}

.ufc-progress-bar {
  width: 100%;
  height: 100%;
  background: #e60026;
  border-radius: 3px;
  transition: width 0.1s linear;
}

/* Responsive Design */
@media (max-width: 1400px) {
    .chat-sidebar {
        display: none;
    }
}

@media (max-width: 1200px) {
    .bottom-panel {
        flex-direction: column;
        gap: 1.5rem;
        align-items: center;
    }
    .bet-panel-card {
        max-width: 100%;
        min-width: 0;
        width: 100%;
        padding: 1.2rem 1rem;
    }
    .bet-panel-body {
        flex-direction: column;
        gap: 1.2rem;
        align-items: stretch;
    }
}

@media (max-width: 1024px) {
    .game-container {
      height: auto;
    }
    .main-content {
        flex-direction: column;
        flex: initial;
        overflow: visible;
    }
    .main-column {
        width: 100%;
        order: 1;
        flex: none;
        overflow: visible;
    }
    .game-area {
      flex: none;
      width: 100%;
      aspect-ratio: 16 / 9;
    }
    .sidebar {
        width: 100%;
        order: 2;
        border-right: none;
        border-top: 1px solid var(--border-color);
    }
    .sidebar .bets-list {
        flex: none;
        max-height: 40vh;
    }
    .chat-sidebar {
        display: flex;
        width: 100%;
        order: 3;
        border-left: none;
        border-top: 1px solid var(--border-color);
    }
    .chat-messages {
      max-height: 40vh;
    }
    .flew-away {
        font-size: 1.5rem;
    }
    .multiplier-display {
        font-size: 3.5rem;
    }
    .flying-phase {
      top: 45%;
    }
    .ufc-content {
      display: flex;
      flex-direction: column;
      align-items: center;
    }
    .ufc-phase-logo {
      width: 120px;
      height: auto;
      margin-bottom: 12px;
    }
    .spribe-phase-logo {
      width: 90px;
      height: auto;
    }
    .ufc-progress-container {
      width: 120px;
      height: 8px;
      background: rgba(255,255,255,0.2);
      border-radius: 4px;
      margin-bottom: 12px;
      overflow: hidden;
    }
    .ufc-progress-bar {
      width: 100%;
      height: 100%;
      background: #e60026;
      border-radius: 4px;
      transition: width 0.1s linear;
    }
    .bottom-panel {
        padding: 0.5rem;
        gap: 0.5rem;
    }
    .bet-panel-card {
        padding: 0.5rem;
    }
    .game-plane {
      width: 100px;
    }
    .game-plane.is-waiting-next-round {
      left: 10px;
      bottom: 10px;
    }
    .players-indicator {
      bottom: 0.5rem;
      right: 0.5rem;
      padding: 0.2rem 0.5rem;
      font-size: 0.8rem;
    }
    .players-icon .avatar {
      width: 16px;
      height: 16px;
    }
    .bet-panel-body {
      display: flex !important;
      flex-direction: row !important;
      align-items: center !important;
      gap: 2rem !important;
      width: 100%;
      justify-content: flex-start;
    }
    .bet-actions {
      display: flex !important;
      flex-direction: column !important;
      gap: 0.7rem !important;
      min-width: 120px !important;
    }
    .quick-amounts {
      display: grid !important;
      grid-template-columns: 1fr 1fr !important;
      gap: 0.5rem 0.7rem !important;
      width: 100%;
      justify-content: flex-start;
    }
    .quick-amount {
      border-radius: 999px !important;
      padding: 0.5rem 1.2rem !important;
      font-size: 1rem !important;
      font-weight: 600 !important;
      background: #232323 !important;
      color: var(--text-secondary) !important;
      border: none !important;
      transition: background 0.2s, color 0.2s;
      text-align: center;
      display: flex;
      align-items: center;
      justify-content: center;
    }
    .quick-amount.selected, .quick-amount.active {
      background: var(--green) !important;
      color: #fff !important;
    }
    .main-bet-button {
      max-width: 220px !important;
      width: 100% !important;
      margin-left: auto !important;
      margin-right: 0 !important;
    }
}

@media (max-width: 768px) {
    .header {
        padding: 0.5rem 1rem;
    }
    .header .logo {
        font-size: 1.5rem;
    }
    .flew-away {
        font-size: 1.5rem;
    }
    .multiplier-display {
        font-size: 3rem;
    }
    .bottom-panel {
        padding: 0.5rem;
        gap: 0.5rem;
    }
    .bet-panel-card {
        padding: 0.5rem;
    }
}

/* Button.html Integration Styles */
.panels-wrapper {
  display: flex;
  gap: 32px;
  flex-wrap: wrap;
  justify-content: center;
  width: 100%;
  max-width: 900px;
  padding: 20px;
  margin: 0 auto;
}

.betting-panel {
  background: #272727;
  border-radius: 16px;
  padding: 16px 20px;
  width: 100%;
  max-width: 400px;
}

/* header */
.betting-panel .header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.tab-container {
  display: flex;
  background: #1f1f1f;
  border-radius: 25px;
  padding: 4px;
  align-items: center;
  justify-content: center;
}

.tab {
  flex: 1;
  text-align: center;
  padding: 6px 16px;
  cursor: pointer;
  font-size: 8px;
  border-radius: 20px;
  transition: background .2s;
  background: transparent;
  border: none;
  color: #777;
  justify-content: center;
  align-items: center;
}

.tab.active {
  background: #3a3a3a;
  color: #fff;
}

.tab.inactive {
  color: #777;
}

.restore-icon {
  width: 32px;
  height: 32px;
  background: #1f1f1f;
  border: 1px solid #3a3a3a;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.restore-icon::before {
  content: '⧉';
  font-size: 14px;
  color: #777;
}

.restore-icon svg {
  width: 16px;
  height: 16px;
  fill: #777;
}

/* main content */
.betting-panel .main-content {
  display: flex;
  align-items: center;
  gap: 24px;
}

/* left section */
.left-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.bet-control {
  display: flex;
  align-items: center;
  
}

.control-btn {
  width: 18px;
  height: 18px;
  background: #3a3a3a;
  border: none;
  border-radius: 50%;
  color: #fff;
  font-size: 18px;
  line-height: 0;
  cursor: pointer;
  transition: background .2s;
}

.control-btn:hover {
  background: #505050;
}

.control-btn:active {
  background: #666 !important;
  transform: scale(0.95) !important;
}

.bet-amount {
  font-size: 14px;
  font-weight: bold;
  min-width: 60px;
  text-align: center;
  color: #fff;
}

/* quick-bets as 2x2 grid */
.quick-bets {
  display: grid;
  grid-template-columns: repeat(2, auto);
  gap: 8px;
  justify-items: center;
  border-radius: 0;
}

.quick-bet {
  border-radius: 999px !important;
  background: #3a3a3a;
  border: none;
  border-radius: 10;
  padding: 6px 12px;
  font-size: 8px;
  color: #777;
  cursor: pointer;
  transition: background .2s, color .2s;
}

.quick-bet:hover {
  background: #505050;
  color: #fff;
}

/* main Bet button */
.main-bet-btn {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  width: 150px !important;
  height: 60px !important;
  background: linear-gradient(135deg, #12DF38, #12DF38) !important;
  border: 1px solid #f5f5f5 !important;
  border-radius: 12px !important;
  cursor: pointer !important;
  transition: background .2s, transform .1s !important;
  max-width: 180px !important;
  margin-left: auto !important;
  margin-right: 0 !important;
  color: #fff !important;
  font-size: 12px !important;
  font-weight: 700 !important;
  padding: 0 !important;
  min-height: 80px !important;
  line-height: 1.2 !important;
}

.main-bet-btn:hover {
  background: linear-gradient(135deg, #12DF38, #12DF38) !important;
  transform: translateY(-1px) !important;
  color: #fff !important;
  border: none !important;
}

/* Button state classes */
.main-bet-btn.pending {
  background: linear-gradient(135deg, #e60026, #ff4444) !important;
}

.main-bet-btn.pending:hover {
  background: linear-gradient(135deg, #cc0022, #e63939) !important;
}

.main-bet-btn.cashout {
  background: linear-gradient(135deg, #f59e0b, #d97706) !important;
}

.main-bet-btn.cashout:hover {
  background: linear-gradient(135deg, #d97706, #b45309) !important;
}

.main-bet-btn.cashedout {
  background: linear-gradient(135deg, #12DF38, #12DF38) !important;
}

.main-bet-btn.cashedout:hover {
  background: linear-gradient(135deg, #12DF38, #12DF38) !important;
}

.main-bet-btn.lost {
  background: linear-gradient(135deg, #666, #555) !important;
}

.main-bet-btn.lost:hover {
  background: linear-gradient(135deg, #555, #444) !important;
}

.main-bet-btn.queued {
  background: linear-gradient(135deg, #e60026, #ff4444) !important;
}

.main-bet-btn.queued:hover {
  background: linear-gradient(135deg, #cc0022, #e63939) !important;
}

.bet-btn-text {
  font-size: 15px !important;
  color: #fff !important;
  font-family: 'Arial', sans-serif !important;
  font-weight: bold !important;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8) !important;
}

.bet-btn-amount {
  font-size: 18px !important;
  color: #fff !important;
  font-family: 'Arial', sans-serif !important;
  font-weight: bold !important;
  margin-top: 0.2rem !important;
  letter-spacing: 0.02em !important;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8) !important;
}

/* responsive: stack panels vertically on small screens */
@media (max-width: 600px) {
  .panels-wrapper {
    flex-direction: column;
    gap: 24px;
    padding: 16px;
  }
  
  .betting-panel .main-content {
    flex-direction: column;
    gap: 16px;
  }
  
  .main-bet-btn {
    width: 100%;
  }
}

/* Override existing bottom-panel styles to use new structure */
.bottom-panel {
  width: 100%;
  background: var(--bg-dark);
  border-top: 1px solid var(--border-color);
  padding: 0;
  display: flex;
  justify-content: center;
  align-items: center;
}

/* Ensure the new panels work within the existing layout */
.main-column .panels-wrapper {
  margin: 0;
  padding: 1rem;
}

/* Responsive adjustments for the new button structure */
@media (max-width: 1200px) {
  .panels-wrapper {
    flex-direction: column;
    gap: 1.5rem;
    align-items: center;
  }
  
  .betting-panel {
    max-width: 100%;
    min-width: 0;
    width: 100%;
  }
}

@media (max-width: 1024px) {
  .panels-wrapper {
    padding: 0.5rem;
    gap: 0.5rem;
  }
  
  .betting-panel {
    padding: 0.5rem;
  }
  
  .betting-panel .main-content {
    flex-direction: row !important;
    align-items: center !important;
    gap: 2rem !important;
    width: 100%;
    justify-content: flex-start;
  }
  
  .left-section {
    display: flex !important;
    flex-direction: column !important;
    gap: 0.7rem !important;
    min-width: 120px !important;
  }
  
  .quick-bets {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 0.2rem 0.2rem !important;
    width: 100%;
    max-width: 100%;
    justify-content: flex-start;
  }
  
  .quick-bet {
    border-radius: 999px !important;
    padding: 0.5rem 0.5rem !important;
    font-size: 0.8rem !important;
    font-weight: 600 !important;
    background: #232323 !important;
    color: var(--text-secondary) !important;
    border: none !important;
    transition: background 0.2s, color 0.2s;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  
  .quick-bet.selected, .quick-bet.active {
    background: #3a3a3a !important;
    color: #fff !important;
  }
  
  .main-bet-btn {
    max-width: 220px !important;
    width: 100% !important;
    margin-left: auto !important;
    margin-right: 0 !important;
  }
}

.main-bet-btn.queued .bet-btn-amount {
  font-size: 0.20em;
}

#notification {
  position: fixed;
  top: -200px;
  left: 50%;
  transform: translateX(-50%);
  width: 95vw;
  max-width: 400px;
  background: #1A350B;
  border: 2.5px solid #7be34a;
  border-radius: 32px;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #fff;
  z-index: 9999;
  height: 70px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  opacity: 0;
  transition: top 0.5s cubic-bezier(.4,1.4,.6,1), opacity 0.4s;
  padding: 0;
}
#notification.show {
  top: 20px;
  opacity: 1;
}
.notification__left {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  min-width: 120px;
  text-align: center;
  margin-left: 28px;
}
.notification__left .title {
  font-size: 0.8rem;
  font-weight: 800;
  margin-bottom: 2px;
  color: #fff;
  line-height: 1.1;
}
.notification__left .multiplier {
  font-size: 1.1rem;
  font-weight: 400;
  color: #fff;
  line-height: 1.1;
  letter-spacing: 0.01em;
  text-align: center;
}
.notification__pill {
  position: relative;
  background: #7be34a;
  border-radius: 40px;
  padding: 6px 24px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 60px;
  margin: 0 -8px;
  height: 40px;
  justify-content: center;
  box-shadow: 0 0 0 4px #1A350B;
  z-index: 2;
}
.notification__pill .label {
  font-size: 0.7rem;
  color: #fff;
  margin-bottom: 2px;
  font-weight: 700;
  letter-spacing: 0.01em;
  text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}
.notification__pill .win {
  font-size: 1.0rem;
  font-weight: 800;
  color: #fff;
  line-height: 1.1;
  letter-spacing: 0.01em;
  text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}
.notification__pill .stars {
  position: absolute;
  top: 0; left: 0; width: 100%; height: 100%;
  pointer-events: none;
  opacity: 0.13;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.2rem;
  color: #fff;
  z-index: 0;
}
.notification__close {
  font-size: 2rem;
  cursor: pointer;
  line-height: 1;
  margin-right: 28px;
  color: #fff;
  opacity: 0.8;
  transition: opacity 0.2s;
  user-select: none;
  display: flex;
  align-items: center;
  height: 100%;
}
.notification__close:hover {
  opacity: 1;
}