.main {
  min-height: calc(100vh - 160px);
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 10px;
}
@media (max-height: 1000px) {
    .main {
        align-items: flex-start;
    }
}
.app-container {
    width: 100%;
    max-width: 1150px;
    height: 100%;    
    display: flex;
    flex-direction: column;
    gap: 10px;
    background-color: #1e293b;
    border-radius: 12px;
    overflow: hidden;
    border: rgba(225, 225, 225, 0.3) 1px solid;    
}

.main-container {
  padding: 20px;
  display: flex;
  flex: 1;
  align-items: stretch;
  flex-direction: row;
  gap: 10px;
  background-color: #1e293b;
}
.game-area,
.sidebar {
  height: auto;
}
.game-area {
  width: 70%;
  background-color: #1e293b;
  border-radius: 8px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  border: rgba(225, 225, 225, 0.3) 1px solid; 
  max-width: 800px;
}
.top-side {
  flex: 1;
  display: flex;
  flex-direction: row;
  gap: 10px;
}
.bottom-side {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.animation {
  border: rgba(225, 225, 225, 0.3) 1px solid; 
  width: 100%;
  max-width: 390px;
  border-radius: 10px;
  min-height: 200px;
  position: relative; 
  overflow: hidden; 
}
.bet-area {
  border: rgba(225, 225, 225, 0.3) 1px solid; 
  width: 100%;
  max-width: 390px;
  border-radius: 10px;
  min-height: 200px;
}

.previous-games {
  border: rgba(225, 225, 225, 0.3) 1px solid; 
  width: 100%;
  border-radius: 10px;
  min-height: 200px;
  padding: 15px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.sidebar {
  width: 30%;
  background-color: #1e293b;
  border-radius: 8px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  border: rgba(225, 225, 225, 0.3) 1px solid; 
  height: 100%;
}

/* Your original styles... (keep everything you have) */

/* ================ CONTAINED AVIATOR PLANE ANIMATION ================ */

.animation #game-canvas {
    position: relative;
    min-width: 320px;
    width: 100%;
    height: 100%;
    background-color: #1e293b;
    border-radius: 10px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    border: seashell 1px solid;
    z-index: 10;
}
#graph-layer {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(to right, rgba(255,255,255,0.08) 1px, transparent 1px),
        linear-gradient(to top, rgba(255,255,255,0.08) 1px, transparent 1px);
    background-size: 40px 40px;
    background-position: 0 0;
    z-index: 1;
    pointer-events: none;
}

.animation #multiplier-display {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    max-width: 90%;
    text-align: center;
    line-height: 1.1;
    font-size: clamp(24px, 6vw, 60px);
    font-weight: bold;
    color: #ffffff;
    white-space: normal;
    word-break: break-word;
    z-index: 10;
}
.crash-value {
    font-size: clamp(5px);
    margin-top: 6px;
    color: #ff4444;
}



.animation #crash-effect {
    display: none;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 10px; /* Smaller to fit */
    font-weight: bold;
    color: #ff4444;
    z-index: 20;
    text-shadow: 0 0 20px #ff0000;

}
.crash-label {
    font-size: clamp(12px, 3vw, 24px);
    color: #ff0000;
    margin-bottom: 4px;
}

/* Plane styling with image */

#plane {
    position: absolute;
    left: 0;
    bottom: 0;
    transform-origin: center;
    z-index: 5;
    will-change: transform;
    width: 120px;
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
}

#plane img {
    width: 100%;
    height: 100%;
    transition: transform 0.1s ease-out;
    filter: drop-shadow(0 0 5px rgba(0, 255, 255, 0.5));
}

/* Crash effect for image */
#plane.crashed img {
    filter: brightness(0) saturate(100%) invert(20%) sepia(100%) saturate(10000%) hue-rotate(0deg);
    animation: explode 0.5s ease-out;
}

@keyframes explode {
    0% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.5); opacity: 0.7; }
    100% { transform: scale(0); opacity: 0; }
}
/* Previous games badges (unchanged) */
.middle-strip {
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(15, 23, 42, 0.6);
    border-radius: 10px;
    height: 42px;
    padding: 0 12px;
    overflow: hidden;
    position: relative;
}

.history-badges {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    gap: 16px;
    align-items: center;
    height: 100%;
    padding: 0 4px;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
}

/* Hide scrollbar completely for cleaner game-like look */
.history-badges::-webkit-scrollbar {
    display: none;
}

.history-badges {
    -ms-overflow-style: none;       /* IE and Edge */
    scrollbar-width: none;          /* Firefox */
}

/* The individual multiplier items — now very minimal */
.history-badges > div {
    flex: 0 0 auto;
    min-width: 54px;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.4px;
    text-align: center;
    color: white;
    background: #7f1d1d;
    white-space: nowrap;
}

/* High multipliers */
.history-badges > div.high {
    background: linear-gradient(90deg, #15803d, #22c55e);
    color: white;
    box-shadow: 0 1px 6px rgba(34, 197, 94, 0.4);
}

/* Optional: very low ones can be darker */
.history-badges > div.low {
    background: #991b1b;
}
.previous-games {
  border: rgba(225, 225, 225, 0.3) 1px solid;
  border-radius: 10px;
  padding: 15px;
  background: #1e293b;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.history-table-container {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  max-height: 280px;           /* adjust based on your layout */
  width: 100%;
}

.history-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  color: #e2e8f0;
}

.history-table th,
.history-table td {
  padding: 8px 10px;
  text-align: center;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.history-table th {
  background: rgba(30, 41, 59, 0.7);
  color: #94a3b8;
  font-weight: 600;
  position: sticky;
  top: 0;
  z-index: 1;
}

.history-table td {
  color: #cbd5e1;
}

.history-table .odd {
  font-weight: bold;
}

.history-table .odd.high {
  color: #22c55e;
}

.history-table .odd.low {
  color: #ef4444;
}

.history-table .won {
  color: #22c55e;
  font-weight: 600;
}

.history-table .lost {
  color: #ef4444;
}

.history-table .amount {
  font-weight: 500;
}

.history-table::-webkit-scrollbar {
  width: 5px;
}

.history-table::-webkit-scrollbar-track {
  background: rgba(255,255,255,0.05);
}

.history-table::-webkit-scrollbar-thumb {
  background: rgba(139, 92, 246, 0.4);
  border-radius: 10px;
}
@media (max-width: 860px) {
  .main-container {
    flex-direction: column;
    gap: 12px;
    padding: 12px 10px;
  }

  .game-area,
  .sidebar {
    width: 100%;
    max-width: 100%;
    padding: 12px;
  }

  .top-side {
    flex-direction: column;
  }

  /* Animation takes priority on mobile */
  .animation {
    width: 100%;
    aspect-ratio: 5 / 3.2;          /* little wider feel */
    min-height: 240px;
    max-height: 45vh;               /* prevent taking all screen */
  }


  /* Multiplier - very important for mobile */
  #multiplier-display {
    font-size: clamp(3rem, 13vw, 6.5rem) !important;
    font-weight: 900;
    letter-spacing: -1px;
  }


  /* Crash text also bigger */
  .crash-label {
    font-size: 1.3rem !important;
  }
  .crash-value {
    font-size: 3.2rem !important;
  }
}

/*Bet area*/
  .bet-area {
    min-height: 160px;
    display: flex;
    flex-direction: column;
    -ms-flex-align: center;
    gap: 10px 20px;

  }

.input-field{
  display: flex;
  flex-direction: row;
  gap: 10px;
  margin: 10px 20px;
}
.input-field input{
  border: #d3d3d3 10px solid;
  padding: 5px;
  background:#314361;
  color: #ffffff;
  border: #ffffff8f 0.5px solid;
  border-radius: 20px;
  width: 100%;
  font-weight: bold;
  margin-left: 5px;
  align-items: center;
  text-align: center;
}

.buttons{
display: flex;
flex-direction: row;
margin: 0px 30px;
}

.buttons button{
  padding: 10px 20px;
  border-radius: 15px;
  width: 100%;
  color: rgb(255, 255, 255);
  font-weight: bold;
  background: linear-gradient(to right, #6b46c1, #a855f7);
  margin: 0px 10px;
}
 .buttons button:hover{
  background: #bf8eec;
  color: #111;
 }
 /* Add these styles to your index.css file */

/* Balance Display */
.balance-display {
    margin-bottom: 15px;
    animation: pulseBalance 2s infinite;
}

@keyframes pulseBalance {
    0% { opacity: 1; }
    50% { opacity: 0.8; }
    100% { opacity: 1; }
}

/* Bet button states */
.bet[data-state="cashout"] {
    background: linear-gradient(to right, #22c55e, #16a34a) !important;
    animation: pulseCashout 1s infinite !important;
}

.bet[data-state="bet"] {
    background: linear-gradient(to right, #6b46c1, #a855f7) !important;
}

@keyframes pulseCashout {
    0% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.7); }
    70% { box-shadow: 0 0 0 10px rgba(34, 197, 94, 0); }
    100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0); }
}

/* Bet inputs focus states */
.input-field input:focus {
    outline: none;
    border-color: #a855f7 !important;
    box-shadow: 0 0 0 2px rgba(168, 85, 247, 0.3);
}

/* Active bet indicator */
.active-bet-indicator {
    position: absolute;
    top: 10px;
    right: 10px;
    background: #22c55e;
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: bold;
}

/* Winnings animation */
@keyframes celebrate {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

.won {
    animation: celebrate 0.5s ease 3;
}

/* Mobile responsiveness for betting area */
@media (max-width: 860px) {
    .bet-area {
        min-height: 180px;
    }
    
    .input-field {
        flex-direction: column;
        margin: 10px;
    }
    
    .buttons {
        margin: 10px;
    }
    
    .buttons button {
        margin: 0;
        padding: 12px;
        font-size: 16px;
    }
}
/* Add to index.css */
