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


body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    font-size: 16px;
    background-color: whitesmoke;
    position: relative;
    align-items: center;
    text-align: center;
    justify-content: center;
}

body {
   font-family: 'Quicksand', sans-serif;
    font-weight: 400;
}

#mainContainer
{
    position: fixed;
    display: none; /* Ensure it is in the flex flow */
   
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    justify-content: space-around;
    align-items: center;
    display: flex;
    flex-direction: row; /* Center vertically and horizontally */
    background-color: rgba(0, 0, 0, 0.0); /* Semi-transparent black background */
    backdrop-filter: blur(5px); /* Apply blur effect to the background */
  
}

.adBlock{
    height: 100%;
    width: 15%;
    background-color: white;
    display: none;
}

@media (min-width: 769px) {
    .adBlock{
        display: block; /* Display the ad columns on wider screens */
    }
}

.overlay {
    display: none;
    position: fixed;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    justify-content: center;
    align-items: center;
    display: flex;
    flex-direction: column; /* Center vertically and horizontally */
    background-color: rgba(0, 0, 0, 0.7); /* Semi-transparent black background */
    backdrop-filter: blur(5px); /* Apply blur effect to the background */
    z-index: -100; /* Ensure the overlay is on top of other elements */
    opacity: 0;
}


.overlayOut {
    display: none;
    position: fixed;
    height:300px;
    width: 200px;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    justify-content: center;
    align-items: center;
    display: flex;
    flex-direction: column; /* Center vertically and horizontally */
    background-color: rgba(0, 0, 0, 0.7); /* Semi-transparent black background */
    backdrop-filter: blur(5px); /* Apply blur effect to the background */
    z-index: -100; /* Ensure the overlay is on top of other elements */
    opacity: 0;

}

.overlayCountdown{
    display: none;
    position: fixed;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    justify-content: center;
    align-items: center;
    display: flex;
    flex-direction: column; /* Center vertically and horizontally */
    background-color: rgba(0, 0, 0, 0.7); /* Semi-transparent black background */
    backdrop-filter: blur(5px); /* Apply blur effect to the background */
    z-index: -100;
    opacity: 0;
    
}


.overlayPause{
    display: none;
    position: fixed;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    justify-content: center;
    align-items: center;
    display: flex;
    flex-direction: column; /* Center vertically and horizontally */
    background-color: rgba(0, 0, 0, 0.7); /* Semi-transparent black background */
    backdrop-filter: blur(5px); /* Apply blur effect to the background */
    z-index: -100;
    opacity: 0%;
}

#overlayApp{
    
    position: fixed;
    z-index: 1000;
    opacity: 100%;
}



.centered-panel {
    position: relative;
    display:flex;
    flex-direction: column;
    height: 100%; /* 50% of the height of the overlay */
    max-height: 100%;
    width: 800px;
    background-color: white;
    text-align: center; /* Center text horizontally */
    padding: 5px; /* Example padding */
    justify-content: space-around;
    align-items: center;
    overflow: hidden;
    border-radius: 10px;
    
}

/* CSS for small screens (e.g., max-width: 768px) */
@media (max-width: 768px) {
    .centered-panel {
        width: 100%; /* Set the desired width for small screens */
        height: 100%;
    }
}


@media (min-width: 768px) {
    .centered-panel {
        width: 50%; 
        height: 80%;
    }
}

.bar-chart
{
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    width: 300px;
    height: 300px;
    border: 1px darkslateblue;
    border-radius: 13px;
}

.bar-inner{
    height: 40px;
    margin: 0 5px;
    transition: width 0.5s;
}


.countdown-panel {
    display:flex;
    position: fixed;
    flex-direction: column;
    height: 400px; /* 50% of the height of the overlay */
    width: 300px;
    background-color: white;
    text-align: center; /* Center text horizontally */
    padding: 10px; /* Example padding */
    justify-content: center;
    align-items: center;
    border-radius: 10px;
    
}



#outPanel{
    width: 80%; 
    height: 80%;
}

#intro-panel {
    background-color: white;
    width: 80%;
    height: 80%;
    box-sizing: border-box; /* Include padding and borders in width and height */
    padding: 20px; /* Example padding */
}


.header {
    /* Ensure it takes full width within its parent (.rowHolder) */
    width: 100%; 
    
    /* Set up as a Flex container to center its child item (the h1) */
    display: flex;
    
    /* CRITICAL: Centers the h1 element horizontally */
    justify-content: center; 
    
    /* Ensure vertical alignment is centered, if needed */
    align-items: center; 
    
    /* These properties were already in your CSS, keeping them */
    text-align: center; 
    min-width: 100px;
    padding: 0px;
    margin: auto;
}

h1 {
    color: #ccc;
    text-shadow: #ccc;
    font-size:40px;
    text-align: center;
}

@media (max-width: 767px) {
    h1 {
        
        font-size: 18px;
    }
}


/* Styles for medium screens (768px to 991px wide) */
@media (min-width: 768px) and (max-width: 991px) {
    h1 {
        
        font-size: 24px;
    }
}

/* Styles for medium screens (768px to 991px wide) */
@media (min-width: 992px) and (max-width: 1199px) {
    h1 {
       
        font-size: 32px;
      
    }
}

/* Styles for medium screens (768px to 991px wide) */
@media (min-width: 1200px) {
    h1 {
       
        font-size: 36px;
    }
}


h2 {
    color: darkslateblue;
    text-shadow: #ccc;
    font-size:32px;
    text-align: center;
    max-width: 80%;
}

@media (max-width: 992px) {
    h2 {
        font-size: 20px; /* Set the desired width for small screens */
    }
}

.horizontalButtonHolder {
    display: flex;
    flex-direction: row;
    margin: 6px;
    justify-content: space-evenly;
    align-items: center;
    width: 98%;
    height: 15%;
    min-height: 60px;
    min-width: 240px;

}


.actionButton{

    height: 40px;
    width: 60px;
    border: solid 3px darkgrey;
    border-radius: 10px;
    
    display: flex;
    align-items: center;
    text-align: center;
    justify-content: center;
    background-color:lightgrey;
    margin:auto;

    color: darkslateblue;
    font-size: 18px;
    font-weight: bold;
    font-family: Arial, Helvetica, sans-serif;
   
    text-align: center;
    padding:10px;


}

.heldButton{

    height: 40px;
    width: 100px;
    border: solid 3px darkgrey;
    border-radius: 10px;
    display: flex;
    align-items: center;
    text-align: center;
    justify-content: center;
    background-color:lightgrey;
    margin:auto;

    color: darkslateblue;
    font-size: 16px;
    font-weight: bold;
    font-family: Arial, Helvetica, sans-serif;
   
    text-align: center;
    padding:10px;
  

}



.curvedLabel
{
    pointer-events: none;
}


.countdown {
    width:90%;
    height: 90%;
}




#gameContainer {
    position: relative;
    z-Index:10;
    pointer-events: auto !important;
    width: 100%;
    height: 100%;
    left: 0%;
    top: 0%;
    justify-content: center; /* Distribute space evenly between items */
    align-items: center;
    display: flex;
    flex-direction: column; /* Center vertically and horizontally */
    padding: 0px;
    background-color: #2c094d;
    pointer-events: auto;
    
}

#adHolder
{
    background-color: #2c094d;
}

/* Styles for medium screens (768px to 991px wide) */

@media (min-width: 992px) {
    #gameContainer {
        width: 70%;
        padding: 30px;
        padding-bottom: 0px;
    }
}

@media (min-width: 1200px) and (orientation: landscape) {
    #gameContainer {
        width: 60%;
        padding: 30px;
        padding-bottom: 0px;
        max-width: 1000px;

    }
}
.rowHolder{
    height: 65px;
    width:100%;
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    margin: auto;
    background-color: #2c094d;
      
}

@media (min-width: 577px) {
    .rowHolder {
        width:90%;
        
    }
}

#header{
    text-align: center;
    align-items: center;
    display:flex;
    min-width: 100px;
    padding: 20px;
    margin: auto;
}

.mainHolder{
    
    width: 100%;
    height: 55%;
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    
}

#starRating {
    padding: 10px;
    margin: 10px;
    font-size: 24px;
    color: darkslateblue;
}

#adHolder{
    background-color:  #2c094d;
    width: 100%;
    margin-top: 10px;
    border: 2px solid lightSlateGrey;
    border-radius: 10px;
    border-width: 2px;
    
    bottom: 0;
    left: 0;
}

.sidePanel{
  
    height: 100%;
    width: 15%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    margin: 20px;
    margin-top:10px; 
    margin-bottom:10px;
    min-height: 100%;
    max-width: 200px;
    padding: 10px;
  
}


.categoryPanel{
    position:relative;
    height: 100%;
    width:100%;
    display: flex;
    flex-direction: column;
    justify-content: center;

    align-items: center;
    margin-top: 10px;
    margin-bottom: 10px;
    
    background:  radial-gradient(circle at center, #8b29d1 0%, #2c094d 100%);
    border-radius: 20px;
    /* Mahogany Wood Frame */
    border: 3px solid lightSlateGrey;
}



.canvasholder {
    /* This makes the holder position relative to the categoryPanel */
    position: absolute; 
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%); /* Centers the holder */
    
    /* Initially set to fill the container */
    width: 100%;
    max-width: 100%;
    height: 0; 
    
    /* Default aspect ratio (e.g., 90% for small portrait screens) */
    padding-top: 90%; 
    background-color: transparent;
    
}

/* --- Portrait Adjustments (As screen gets bigger, ratio shrinks) --- */

/* Small Screens (e.g., up to 576px wide): Tall Ratio (9:10) */
@media (max-width: 576px) and (orientation: portrait) {
    .canvasholder {
        padding-top: 90%; /* Square or Taller Ratio */
    }
}

/* Medium Screens (e.g., 768px+ wide): Medium Ratio (3:4) */
@media (min-width: 577px) and (orientation: portrait) {
    .canvasholder {
        padding-top: 85%; /* 4:3 Aspect Ratio */
    }
}

/* Large Screens (e.g., 992px+ wide): Wide Ratio (2:3) */
@media (min-width: 992px) and (orientation: portrait) {
    .canvasholder {
       
        padding-top: 75%; /* 3:2 Aspect Ratio */
    }
}

@media (orientation: landscape) or (min-width: 1025px) {
    .canvasholder {
        max-width: 70%;
        max-width: 580px;
       
        max-height:45%;
        padding-top: 55%; /* 3:2 Aspect Ratio */
    }
}

#canvasGame {
    /* Must stay absolute to fill the calculated space */
    position: absolute;
    top: 0;
    left: 0;
    width: 100%; 
    height: 100%; 
    pointer-events: none; /* THIS IS THE FIX */
}



#candidateHolder{
    min-height: 30px;
    width: 100%;
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    background:  radial-gradient(circle at center, #8b29d1 0%, #2c094d 100%);
    border: 3px solid lightSlateGrey;
    border-radius: 10px;
    margin-top: 10px;
    
    
}


.candidatePanel {
    width:100%;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 20px;
    margin-top: 10px;
    margin-bottom: 10px;
    min-height: 60px;
 
  

}

@media (max-width: 768px) {
    .candidatePanel {
        width: 100%; /* Set the desired width for small screens */
    
    }
}

.dropZone {
    /* ... your existing styles ... */
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}


.candidate, .miniCandidate {
    
    /* Base styling for the circular "Chip" tiles */

    /* Maintain existing size but force circular */
    width: 40px;  /* Keep your original width */
    height: 40px; /* Keep your original height */
    border-radius: 50%;
    aspect-ratio: 1 / 1;
    box-sizing: border-box;
    flex-shrink: 0; /* Prevents the tile from squishing */
    /* Layout */
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1.4rem;
    color: whitesmoke;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
    
    /* The "Chip" Aesthetic */
    border: 4px dashed rgba(255, 255, 255, 0.7);
    box-shadow: 0 4px 8px rgba(0,0,0,0.4), inset 0 0 10px rgba(255,255,255,0.2);
    cursor: grab;
    touch-action: none;
    transition: transform 0.2s, box-shadow 0.2s;
    position: relative;
    overflow: hidden;
    margin: 5px;
}

/* Individual Color Variants (High Contrast) */
.tile-color-1 { background: radial-gradient(circle at 30% 30%, #00FFFF, #008B8B); } /* Cyan */
.tile-color-2 { background: radial-gradient(circle at 30% 30%, #FFFF00, #B8860B); } /* Yellow */
.tile-color-3 { background: radial-gradient(circle at 30% 30%, #FF00FF, #8B008B); } /* Magenta */
.tile-color-4 { background: radial-gradient(circle at 30% 30%, #32CD32, #006400); } /* Lime */
.tile-color-5 { background: radial-gradient(circle at 30% 30%, #FF8C00, #CC5500); } /* Orange */
.tile-color-6 { background: radial-gradient(circle at 30% 30%, #1b1364, #11033f);} /* Silver */
.tile-color-7 { background: radial-gradient(circle at 30% 30%, #00BFFF, #00008B); } /* Sky */
.tile-color-8 { background: radial-gradient(circle at 30% 30%, #FF4500, #8B0000); } /* Red */

/* The "Selector Chip" Shine Effect */
.candidate::after {
    content: "";
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: linear-gradient(135deg, rgba(255,255,255,0.4) 0%, rgba(255,255,255,0) 50%);
    pointer-events: none;
}

/* Hover/Active states */
.candidate:active { transform: scale(1.1); cursor: grabbing; }
.candidate-selected {
    box-shadow: 0 0 20px lightgrey !important;
    border: 3px solid lightgrey !important;
}

.candidate {
    cursor: pointer;
    touch-action: none;
    /* Ensure the tile doesn't block the zone's click event if needed */
    pointer-events: auto; 
}

.candidate-selected {
    box-shadow: 0 0 20px gold !important;
    transform: scale(1.1);
    z-index: 100;
}
.candidate:active {
    cursor: grabbing;
}

/* High-visibility state for the currently selected tile */
.candidate-selected {
    z-index: 1001;
    box-shadow: 0 0 15px #FFD700, 0 0 5px #FFFFFF !important;
    transform: scale(1.15);
    border: 2px dashed lightslategray !important;
}
/* The "In-Play" state */
.candidate-tile.dealt {
    opacity: 1;
    transform: translateY(0) rotate(0deg);
}

/* Give silver tiles a "Chrome" shine when hovered or moved */
.candidate-tile:hover {
    background: linear-gradient(145deg, #ffffff 0%, #d1d1d1 50%, #bdc3c7 100%);
    transform: translateY(-2px);
}


/* 1. Disable the shine animation when the tile is inside a DropZone */
.dropZone .candidate::after {
    animation: none !important;
    display: none !important;
    content: none !important;
}

/* 2. Optional: Give placed tiles a slight inner shadow instead to look 'seated' */
.dropZone .candidate {
    box-shadow: inset 0 2px 5px rgba(0,0,0,0.3) !important;
}

.scorePopUp
{
    display: none;
    color: #ccc;
    text-shadow: #ccc;
    font-size:32px;
    font-weight: 700;
    text-align: center;
    max-width: 80%;
}

@media (max-width: 576px) {
   
    .candidate {
        height: 40px;
        width: 40px; 
       

    }
    .scorePopUp
    {
        font-size: 20px;
    }
}

@media (min-width: 577px) and (max-width: 767px) {
    .candidate {
        height: 40px;
        width: 40px;
        margin: 10px;
      
    }
    .scorePopUp
    {
        font-size: 22px;
    }
}

@media (min-width: 768px) and (max-width: 991px) {
    .candidate {
        height: 60px;
        width: 60px;
        margin: 10px;
        font-size: 26px;
    }
    .scorePopUp
    {
        font-size: 24px;
    }
}

@media (min-width: 992px) and (max-width: 1199px) {
    .candidate {
        height: 65px;
        width: 65px;
        margin: 10px;
        font-size: 28px;
    }
    .scorePopUp
    {
        font-size: 26px;
    }
}

@media (min-width: 1200px) {
    .candidate {
        height: 65px;
        width: 65px;
        margin: 10px;
        font-size: 32px;
    }
    .scorePopUp
    {
        font-size: 28px;
    }
}


.candidate-selected {
  /* A silver/platinum glow that looks like the tile is backlit by moonlight */
    box-shadow: 
        0 0 15px rgba(229, 228, 226, 0.7), 
        0 0 5px rgba(229, 228, 226, 0.5) !important;
        
    transform: scale(1.05); /* Slight lift to show it's picked up */
    z-index: 100;
    
    /* Optional: adds a slight "pulse" if you want it to feel alive */
    animation: pulse-silver 2s infinite;
}

@keyframes pulse-silver {
    0% { box-shadow: 0 0 5px rgba(229, 228, 226, 0.4); }
    50% { box-shadow: 0 0 20px rgba(229, 228, 226, 0.9); }
    100% { box-shadow: 0 0 5px rgba(229, 228, 226, 0.4); }
}

.ratingTile {
    height: 25%;
    width: 90%;
    border: none;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 5px;
    background-color: whitesmoke;
    font-size: 24px;
    font-weight: bold;
    font-family: Arial, Helvetica, sans-serif;
    text-align: center;
    color: darkslateblue;
}


#dotHolder
{
    height: 15%;
    width: 100%;
    border: none;
    display: flex;
    justify-content: space-around;
    align-items: center;
    margin: 5px;
    
}


.gameDot
{
    height: 15px;
    width: 30%;
    border-radius: 50%;
    padding: 10px;


    background-color: darkslateblue;
}

@media (max-width: 767px) {
    .gameDot {
        
        height: 10px;
        width: 10px;
        padding: 5px;
    }
}

@media (max-width: 767px) {
    .ratingTile {
        
        font-size: 20px;
    }
}


/* Styles for medium screens (768px to 991px wide) */
@media (min-width: 768px) and (max-width: 991px) {
    .ratingTile {
        
        font-size: 24px;
    }
}

/* Styles for medium screens (768px to 991px wide) */
@media (min-width: 992px) and (max-width: 1199px) {
    .ratingTile {
       
        font-size: 24px;
      
    }
}

.holder{

    text-align: center;
    justify-content: center;
    font-size: 16px;
    color: darkslateblue;
    font-weight: bold;
    font-family: Arial, Helvetica, sans-serif;
   
}


/* Styles for medium screens (768px to 991px wide) */
@media (max-width: 992px) {
    .holder {
        
        font-size: 14px;
    }
}
.scoreHolder{
    width:100px;
    height: 70%;
    width:80%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    margin: auto;
   
  
}


@media (max-width: 991px) {
    .scoreHolder {
        width: 90%; /* Set the desired width for small screens */
    }
}

.casinoTile, .scoreTile {
    position: relative;
    height: 50px;
    width: 70px;
    background: linear-gradient(145deg, #f5f5f5 0%, #acacac 50%, #708090 100%);
    color: darkslateblue; /* Deep green text looks great on gold */
    font-size: 12px;
    font-weight: bold;
    font-weight: bold;
    border-radius: 8px;
    padding: 10px;
    border: 1px solid lightSlateGrey;
    position: relative;
    overflow: hidden; /* Keeps the shine inside the tile */
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    box-shadow: 0 4px 6px rgba(0,0,0,0.2);
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10;
}



.scoreTile.active {
    border-color: rgba(72, 61, 139, 0.6);
    animation: slatePulse 4s infinite ease-in-out;
}

@keyframes slatePulse {
    0% { box-shadow: 0 0 5px rgba(72, 61, 139, 0.2); }
    50% { box-shadow: 0 0 20px rgba(72, 61, 139, 0.6); }
    100% { box-shadow: 0 0 5px rgba(72, 61, 139, 0.2); }
}

/* Styles for medium screens (768px to 991px wide) */

@media (min-width: 768px) and (max-width: 991px) {
    .scoreTile, .casinoTile {
       
        width: 80px;
        height:60px;
        font-size: 14px;
    }
}

@media (min-width: 992px) and (max-width: 1199px) {
    .scoreTile, .casinoTile {
       
        width: 100px;
        height:60px;
        font-size: 16px;
    }
}

@media (min-width: 1200px) {
    .scoreTile, .casinoTile {
       
        width: 100px;
        height:60px;
        font-size: 18px;
    }
}



#startButton {
    position: absolute;
    right: 0; /* Adjust the right value as needed */
    bottom: 0;
    
    font-size: 14px;
}


    
.dropZone {
    /* Ensure the zone has a rigid size that matches your tiles */
    width: 60px; 
    height: 60px;
    
    /* Center children (the tiles) perfectly */
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    
    /* Prevent the zone from moving when a tile enters */
    flex-shrink: 0;
    position: relative; 
    overflow: visible; /* Allows the tile's glow to show */
    
    /* Ensure no padding is pushing the tile away from center */
    padding: 0 !important;

}

#droptile8{
    position: absolute;
    bottom:  50px;
    right: 50px;
    background-color: darkslateblue;

}

.panel-hidden {
    display: none !important;
}

.horizontalScoreHolder{
    height: 60px;
    width:300px;
    max-width: 80%;
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    margin: 5px;
   
    background-color:transparent !important;
  
}

.horizontalScoreTile {
    height: 40px;
    width: 40px;
    border: dashed 3px silver;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 5px;
    background-color: silver;
    font-size: 24px;
    color: white;
    font-weight: bold;
    font-family: Arial, Helvetica, sans-serif;
    text-align: center;
    position: relative; /* Required for the shine layer */
    overflow: hidden;    /* Clips the shine to the circle */
 
}

/* The Shine Layer */
.horizontalScoreTile::after {
    content: "";
    position: absolute;
    top: -50%;
    left: -150%;
    width: 50%;
    height: 200%;
    background: rgba(255, 255, 255, 0.6); /* The bright white light */
    transform: rotate(30deg);
    animation: tileShine 3s infinite;
}

/* The Movement Logic */
@keyframes tileShine {
    0% { left: -150%; }
    20% { left: 150%; } /* Movement is fast (0.6 seconds) */
    100% { left: 150%; } /* Long pause before the next shine */
}



#puzzleName{
 
    text-align: center;
    justify-content: center;
    font-size: 24px;
    color: darkslateblue;
    font-weight: bold;
    font-family: Arial, Helvetica, sans-serif;
   }


.miniTileHolder {
    height: 60px;
    width: 95%;
    
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
  
    background-position: 0px, 0px;
    background-position: left;
  

}

@media (max-width: 992px) {
    .miniTileHolder{
        height: 32px;
     
    }

  }


.miniCandidate {
    height: 30px;
    width: 30px;
    border: dashed 2px darkgrey;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    background-color: whitesmoke;
    font-size: 18px;
    font-weight: bold;
    font-family: Arial, Helvetica, sans-serif;
    text-align: center;
    opacity: 0.5;
    transition: opacity 0.3s;
    color: whitesmoke;
}


@media (max-width: 992px) {
    .miniCandidate{
        height: 30px;
        width: 30px;
        font-size: 16px;
    }

  }
/* Ensure these color classes are defined in your CSS */
.star-green {
    color: #4CAF50; 
}

.star-orange {
    color: #FF9800; 
}

.star-red {
    color: #F44336;
}



  
.ultraMiniCandidate {
    position: relative;
    height: 35px;
    width: 50px;
    border: solid 1.5px darkgrey;
    border-radius: 5px;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 7px;
    background-color: whitesmoke;
    font-size: 12px;
    font-weight: bold;
    font-family: Arial, Helvetica, sans-serif;
    text-align: center;
    opacity: 0.5;
    transition: opacity 0.3s;
}




#landscapeMessage {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    color: white;
    text-align: center;
    z-index: 9999;
}

#landscapeMessage p {
    font-size: 24px;
    margin: 20% 0;
}




.numberTile {
    position: relative;
    width: 30px;
    height: 30px;
    opacity: 0.2;
    transition: opacity 0.3s;
    color: lightSlateGrey;
    font-weight: bold;
}


.opaque {
    opacity: 1;
}
    


#canvasGame{
    font-size: 20px;
}


.hide {
    display: none;
}


.panel-container {
   
    width: 70px;
    height: 70px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border: solid 3px darkslateblue;
    border-radius: 10px;
    background-color: whitesmoke;
  }


  @media (max-width: 767px) {
    .panel-container {
        
        height: 60px;
        width: 60px;
    }

  }
/* Styles for medium screens (768px to 991px wide) */
@media (min-width: 768px) and (max-width: 991px) {
    .panel-container {
        
        width: 70px;
        height: 70px;
    }
}

/* Styles for medium screens (768px to 991px wide) */
@media (min-width: 992px) and (max-width: 1199px) {
    .panel-container {
       
        width: 70px;
        height:70px;
      
    }
}

.holder{
    font-size: 12px;
}

@media (min-width: 768px)  {
    .holder {
       
        font-size: 14px;
        
    }
}
  .countdown-timer {
    text-align: center;
    position: relative;
  }
  

  #timer-circle {
    fill: transparent;
    stroke: darkslateblue; /* Change the color of the timer circle */
    stroke-width: 8;
    stroke-dasharray: 220; /* 2 * pi * r (circumference of a circle with r=45) */
    stroke-dashoffset: 0;
    animation: countdown 35s  forwards paused;
   
  }
  
#pausePanel
{
    
    max-width: 90%;
    height: 600px;
}


  .countdown-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 18px;
    font-weight: bold;
  }
  
  @keyframes countdown {
    from {
      stroke-dashoffset: 0;
    }
    to {
      stroke-dashoffset: -220; /* Set this to 0 to have a full countdown */
    }
  }


  #pauseHolder {
    display: flex;
    flex-direction: row;
    justify-content: space-around;
    align-items: center;
    width: 300px;
    width: 100%;
    height: 20%;
    min-height: 100px;

}
  
#quoteContainer {
    display: flex;
    flex-direction: column;
    align-items: center;
}



  .quoteBox{
    position: relative;
    max-width: 400px;
    height: 20px;
    font-size: 18px;
    margin: 10px;
    color: lightSlateGrey;
    font-weight: bold;
  }
  
  .quoterBox{
    position:relative;
    width: 170px;
    height: 20px;
   font-size: 12px;
   color: lightSlateGrey;

  }
  

 .introBin
 {
     
    position: relative;
    margin: 5px;
    height: 200px;
    width: 300px;

 }

 #introBin2
 {
    height: 200px;
 }
  
/* CSS to style the countdown div */
#dailyCountdown {
    font-size: 16px;
    color: lightSlateGrey;
    font-weight: bold;
    text-align: center;
    margin-top: 10px;
  }
  
  coloredBlock {
    width: 50px;
    height: 50px;
    display: inline-block;
    margin: 5px;
    text-align: center;
    line-height: 50px;
    font-size: 24px;
}

.silver {
    background-color: silver;
    color: black;
}

.grey {
    background-color: grey;
    color: black;
}

.green {
    background-color: green;
    color: white;
}
 
.close-icon {
    position: absolute;
    top: 5px;
    right: 5px;
    cursor: pointer;
    font-weight: bold;
    font-size: 22px;
    color: darkslateblue;
    
}

.close-icon:hover {
    color: #f00; /* Change color on hover */
}

.content {
    padding: 10px;
}


.footer {
    
    width: 100% !important; /* Ensure it takes full width */
    color: #fff;
    padding: 20px !important;
    text-align: center;
    
    /* --- CRITICAL FLEX PROPERTIES --- */
    display: flex !important; /* Force Flexbox */
    flex-direction: row !important; /* Force Horizontal alignment */
    justify-content: space-between !important; 
    align-items: center !important; /* Force vertical centering */
}
/* Add this new block to ensure the items start and end cleanly */
.footer a, .footer button {
    margin: 0; 
    padding: 0;
    /* This is critical for space-between to work cleanly */
    flex-shrink: 0; 
    flex-grow: 0;
    
   

}
    
.footer a
{
    color: grey;
    font-size: 12px;
}
.footer a:hover{
    color: darkslateblue;
}
#targetTime
{
    font-size: 22px;
}

.myCounter
{
    position: absolute;
    bottom: 5px;
    right: 5px;
    font-weight: bold;
    font-size: 16px;
    color: whitesmoke;
    opacity: 0.6;

}


/* Outer bar container */
.fill-bar {
    position: relative;
   
    width: 80%;
    height: 32px;
    border: 4px solid purple;
    border-radius: 8px;
    background: RGBA(255,255,255,0.3);
    overflow: hidden;
    margin-top: 20px;
    margin-bottom: 20px;
  
  }
  
  /* Inner colored bar */
  .fill {
    height: 100%;
    width: 0%;
    background: green;
    transition: width 0.3s ease, background-color 0.3s ease;
  }
  
  .fill-segment {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 0%;
    transition: width 0.1s linear;
  }
  
  .green  { background: green; }
  .amber  { background: orange; }
  .red    { background: red; }
  .purple { background: purple; }
  
  /* Centered percentage text */
  .fill-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-family: sans-serif;
    font-weight: bold;
    color: black;
    font-size: 1.2em;
    pointer-events: none;
  }
  

  .statsPanel {
    min-height: 360px;
    min-height: 50vh;        /* or whatever fixed height you want */
    width: 100%;
    height:100%;
    position: relative;
    overflow-y: scroll;   /* allow vertical scrolling */
    overflow-x: hidden;   /* prevent sideways scroll */

    -ms-overflow-style: none;  /* hide scrollbar on IE and Edge */
    scrollbar-width: none;     /* hide scrollbar on Firefox */
    align-items: center;
    margin: 0px auto;
    flex-direction: column;
    max-width: 800px;
  
}

.statsPanel::-webkit-scrollbar {
    display: none;        /* hide scrollbar on Chrome, Safari, Opera */
}

#puzzlesPanel{

    overflow-y: auto;
}


#resultsContainer {
max-height: 70vh;        
  overflow-y: auto;         /* enable vertical scrolling */
  border: 4px solid lightSlateGrey;
  border-radius: 10px;
  padding: 10px;
  background-color: white;
  gap: 8px;  
display: flex;            /* required for centering */
flex-direction: column;   /* stack child boxes vertically */
justify-content: space-between;  /* center vertically (within container height) */
align-items: center;      /* center horizontally */
font-size: 12px;
color: lightSlateGrey;
}


/* Define column widths (adjust as needed) */
.col-title {
    
    min-width: 170px; 

}
.col-difficulty,
.col-score,
.col-time {
    flex: 1; /* Equal space for the rest */
    text-align: center;
    min-width: 60px;
}


@media (min-width: 769px) {
    #resultsContainer
    {
        font-size: 16px;
    }
    .col-title
    {
        min-width: 250px;
    }
    .col-difficulty,.col-score, .col-time {
        min-width:80px;
    }
}

  /* Set up the row display using Flexbox or Grid */
.results-header-row,
.results-data-row {
    display: flex;
    justify-content: space-between; /* Spreads out columns */
    padding: 4px 0;
    border-bottom: 1px solid #eee;
}

.clickable-row {
    cursor: pointer;
}
.clickable-row:hover {
    background: rgba(255, 255, 255, 0.08);
}
.puzzle-replay-link {
    color: #9fd6ff;
    font-weight: 700;
    text-decoration: underline;
    text-underline-offset: 2px;
}
.puzzle-replay-link:hover {
    color: #dff1ff;
}










.victory-jump {
    animation: jump 0.5s ease;
}

.error-shake {
    animation: shake 0.4s linear;
}

@keyframes jump {
    0%, 100% { transform: translate(-15%, -15%) scale(1); }
    50% { transform: translate(-15%, -40%) scale(1.1); }
}

@keyframes shake {
    0%, 100% { transform: translate(-15%, -15%); }
    25% { transform: translate(-20%, -15%); }
    75% { transform: translate(-10%, -15%); }
}

/* 1. The "Off" State (Light Grey) */
#PauseButton:disabled, 
#SubmitButton:disabled, 
#HintButton:disabled, 
#RerackButton:disabled, 
#PractiseButton:disabled,
#statsButton:disabled,
#selectButton:disabled {
    opacity: 0.5; 
    cursor: default;
}


/* When the button is ON (not disabled) */
#PauseButton:not(:disabled), 
#SubmitButton:not(:disabled), 
#HintButton:not(:disabled), 
#RerackButton:not(:disabled), 
#PractiseButton:not(:disabled),
#statsButton:not(:disabled),
#selectButton:not(:disabled) {
    opacity: 1;
    transform: translateY(-1px); /* Very subtle lift */
    text-shadow: 0 0.5px 1px rgba(0,0,0,0.1);
    cursor: pointer;
}

/* When the user actually presses it */
#SubmitButton:active:not(:disabled) {
    transform: translateY(1px); /* Sinks into the page */
    filter: brightness(0.9); /* Gets slightly darker */
}

#SubmitButton {
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    letter-spacing: 0px;
}

#SubmitButton:not(:disabled) {
    letter-spacing: 0.5px; /* Subtle expansion */
    font-weight: 600;
}

@keyframes activePing {
    0% { box-shadow: 0 0 0 0 rgba(72, 61, 139, 0.4); }
    100% { box-shadow: 0 0 0 10px rgba(72, 61, 139, 0); }
}

.button-just-activated {
    animation: activePing 0.6s ease-out;
}

#SubmitButton:not(:disabled) {
   
    color: #1b5e20; /* Shifts to a 'brighter' blue */
    text-shadow: 0px 0px 10px rgba(105, 105, 105, 0.3);
}

/* 1. Default state: Tiles in the candidate tray have a border */
#candidatePanel .candidate {
    border: 2px solid #bcbcbc; /* Light grey border */
    border-radius: 8px; /* Optional: matches tile shape */
    transition: border 0.2s ease;
}

.dropZone .candidate {
    
    /* This creates a subtle light on the top edge */
    box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.3), 
                0 4px 10px rgba(0, 0, 0, 0.5);
}

/* 3. Selected state: Keep your gold highlight regardless of location */
.candidate.candidate-selected {
    border: 2px solid gold !important;
    outline: none;
}
/* This styles the 'empty' slot on your board */
.dropZone:empty {
    background: rgba(255, 255, 255, 0.05); /* Very subtle white tint */
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.3); /* Creates the 'hole' effect */
    border-radius: 12px;
}
/* Once a tile is inside, the border above disappears automatically.
   Now we style the tile sitting inside it. */
.dropZone .candidate-tile {
    border: none !important; /* No border when placed */
    box-shadow: 0 4px 8px rgba(0,0,0,0.1); /* Optional: makes it look 'lifted' */
}

.drop-ripple {
    position: absolute;
    border: 2px solid darkslateblue;
    border-radius: 50%;
    animation: rippleEffect 0.4s ease-out;
    pointer-events: none;
}

@keyframes rippleEffect {
    0% { transform: scale(0.8); opacity: 1; }
    100% { transform: scale(1.5); opacity: 0; }
}

 .candidate::after {
   
    content: ""; /* Remove "TEST" and leave empty quotes */
    position: absolute;
    top: 0;
    left: -150%; /* Starts off-stage to the left */
    width: 100%;  /* Increased width for visibility */
    height: 100%;
    z-index: -1;
    pointer-events: none !important;
    touch-action: none;

    /* FIXED GRADIENT: White in the middle, transparent on the edges */
    background: linear-gradient(
        to right, 
        rgba(255, 255, 255, 0) 0%, 
        rgba(255, 255, 255, 0.9) 50%, 
        rgba(255, 255, 255, 0) 100%
    );
    
    transform: skewX(-25deg);
    
    /* Ensure the animation name matches the @keyframes name below exactly */
    animation: slideShine 3s infinite ease-in-out;
}

/* THE ANIMATION */
@keyframes slideShine {
    0% {
        left: -150%;
    }
    30% {
        left: 150%; /* The shine zips across the tile in 1 second */
    }
    100% {
        left: 150%; /* It stays off-stage for the remaining 2 seconds */
    }
}

 .dropZone, .candidate-tile {
    /* Smaller shadow makes it look closer to the surface */
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
  
}
#perfect-banner {
    position: fixed;
    top: 50%;
    left: 50%;
    /* Start small and invisible */
    transform: translate(-50%, -50%) scale(0);
    
    /* Transparent Background */
    background: none; 
    
    /* Style the Text */
    color: silver; /* Silver */
    font-size: 12vw; /* Make it bigger since there is no box */
    font-weight: 900;
    text-align: center;
    white-space: nowrap;
    
  /* These replace 'display: none' */
    opacity: 0;
    visibility: hidden; 
    pointer-events: none;

    /* Professional 'Floating' Shadow */
    /* This makes the gold pop against light backgrounds */
    text-shadow: 
        2px 2px 0px #483D8B; /* Darkslateblue outline shadow */
       
    
    z-index: 9999;
    pointer-events: none;
    opacity: 0;
    
    /* Smooth 'Pop' timing */
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);


}

    /* The 'Win' State */
#perfect-banner.activated {
    visibility: visible;
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.2);
}

#perfect-banner.show {
    transform: translate(-50%, -50%) scale(1.2); /* Pop it slightly larger */
    opacity: 1;
}

@keyframes textPulse {
    0% { transform: translate(-50%, -50%) scale(1.2); }
    50% { transform: translate(-50%, -50%) scale(1.3); }
    100% { transform: translate(-50%, -50%) scale(1.2); }
}

/* 1. The Main Modal Container */
#statsModal,#statsPanel,#resultsContainer,#intPanel,#countdownPanel, #outPanel, #pausePanel {
    
    
    /* Casino Green Felt Background */
    background:  radial-gradient(circle at center, #8b29d1 0%, #2c094d 100%);
  
    padding: 30px;
    border-radius: 4px;
    box-shadow: 
        inset 0 0 30px rgba(0,0,0,0.7), 
        0 20px 50px rgba(0,0,0,0.6);
    
    color: whitesmoke;
    z-index: 100;
    font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}
#statsModal,#statsPanel{
position: fixed;
    display: none;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    
    pointer-events: none;
}
#statsModal{
  
    /* Mahogany Wood Frame */
    border: 7px solid #3d2b1f;
    border-image: repeating-linear-gradient(
        45deg,
        #3d2b1f,
        #3d2b1f 10px,
        #4a3526 10px,
        #4a3526 20px
    ) 14;
}

#intPanel,#overlay1, #overlayC
{
    pointer-events: all;
}
/* 2. Grid Layout for Stats */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-top: 20px;
}

/* 3. The Brass Stat Plaques */
.stat-card {
    background: linear-gradient(145deg, #ffd700, #daa520);
    border: 1px solid #b8860b;
    border-radius: 3px;
    padding: 15px 10px;
    text-align: center;
    box-shadow: 2px 4px 8px rgba(0,0,0,0.4);
    transition: transform 0.2s;
}

.stat-card:hover {
    transform: scale(1.03);
}

/* 4. Text Styling inside Cards */
.stat-label {
    display: block;
    color: #4b3621; /* Deep Espresso Brown */
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 5px;
}

.stat-value {
    display: block;
    color: #1b5e20; /* Deep Casino Green etched look */
    font-size: 2rem;
    font-weight: 900;
    text-shadow: 1px 1px 0px rgba(255, 255, 255, 0.4);
}

/* 5. The Stats Header */
#statsModal h2 {
    text-align: center;
    color: #FFD700;
    font-size: 2.5rem;
    margin-top: 0;
    text-transform: uppercase;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
    letter-spacing: 2px;
}


#statsModal.activated , #statsPanel.activated{
    /* THE FIX: This turns clicks back on so you can use the stats cards */
    display: flex !important;
    pointer-events: auto !important; 
    opacity: 1 !important;
    visibility: visible !important;
    z-index: 10050 !important;
}

/* 6. Close Button (The Poker Chip) */
.close-stats-btn {
    display: block;
    margin: 30px auto 0;
    padding: 10px 25px;
    background: #c62828; /* Poker chip red */
    color: white;
    border: 3px dashed rgba(255,255,255,0.4); /* Chip ridges */
    border-radius: 50px;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 4px 0 #8e0000;
    transition: all 0.1s;
}

.close-stats-btn:active {
    transform: translateY(3px);
    box-shadow: 0 1px 0 #8e0000;
}

#statsIcon {
    /* This combination shifts blue to a gold/yellow hue */
    filter: brightness(0) saturate(100%) invert(84%) sepia(29%) saturate(3357%) hue-rotate(352deg) brightness(109%) contrast(106%);
}

#statsPanel
{
    min-width: 100%;
    margin:5px;
    padding: 0px;
    z-index: 100001;
    pointer-events: all;
    height:100%;
}
/* The Animated Shine Effect */
.casinoTile::after {
 
    position: relative;
    overflow: hidden; /* Crucial: Keeps the shine inside the tile */
}

.casinoTile::after {
    content: "";
    position: absolute;
    top: -50%;
    left: -150%; /* Start well off-screen to the left */
    width: 50%;
    height: 200%;
    background: linear-gradient(
        to right, 
        rgba(255, 255, 255, 0) 0%, 
        rgba(255, 255, 255, 0.6) 50%, 
        rgba(255, 255, 255, 0) 100%
    );
    transform: rotate(25deg);
    /* Run the shine animation every 3 seconds infinitely */
    animation: sweep 3s infinite;
}

@keyframes sweep {
    0% { left: -150%; }
    30% { left: 150%; } /* Move across quickly */
    100% { left: 150%; } /* Stay off-screen for the remainder of the 3s */
}

/* Selected State: Elevate and Underline */
.casinoTile.selected {
    transform: translateY(-8px); /* Elevate up */
    background: linear-gradient(145deg, #ffe066, #daa520); /* Slightly brighter */
    box-shadow: 
        0 10px 20px rgba(0,0,0,0.3), /* Depth shadow on the table */
        0 4px 0px #8b4513; /* The "Underline" - looks like a dark wood/brass base */
    border-bottom: 4px solid #5d4617; /* Stronger visual underline */
}

/* Shine animation on hover or selection */
.casinoTile:hover::after, .casinoTile.selected::after {
    left: 100%;
    top: 100%;
    pointer-events: none; /* The light should never block a click */
}

#closeIconStart {
    pointer-events: auto !important;
    z-index: 10001 !important;
    cursor: pointer;
    opacity: 1 !important;
    visibility: visible !important;
}
/*
*:hover {
    outline: 1px solid rgba(255, 0, 0, 0.3) !important;
}*/



#panel {
    /* 1. Ensure the panel itself is centered in its parent */
    margin: 0 auto; 
    
    /* 2. Make it a flex container so ITS children (puzzlesPanel) center */
    display: flex;
    flex-direction: column;
    justify-content: center; 
    align-items: center;
    
    /* 3. Ensure it has enough space to actually "center" things */
    width: 100%;
    min-height: 100%; 
    
    /* 4. Remove these if they exist in your current .panel CSS */
    float: none !important;
    position: relative; 
}

.statsPanel {
    display: flex;
    flex-direction: column;
    align-items: center ;
    justify-content: center;
}
/* The 'Dealt' Animation */
.dealt {
    animation: dealTile 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
    opacity: 0;
}

@keyframes dealTile {
    0% {
        opacity: 0;
        transform: translateY(-200px) rotate(-15deg) scale(0.5);
    }
    100% {
        opacity: 1;
        transform: translateY(0) rotate(0) scale(1);
    }
}

.silver-completer {
    font-family: 'Quicksand', sans-serif;
    font-weight: 900;
    font-size: 80px;
    
    /* Silver Chrome Gradient: Dark -> Bright White -> Polished Silver -> Dark */
    background: linear-gradient(to bottom, #707070 0%, #ffffff 25%, #c0c0c0 50%, #707070 100%);
    
    -webkit-background-clip: text; 
    background-clip: text; 
    
    -webkit-text-fill-color: transparent;
    
    /* Chrome Depth Shadow: Swapped brown for a deep Midnight-Slate (#2f4f4f) */
    filter: drop-shadow(2px 2px 0px #2f4f4f) 
            drop-shadow(4px 4px 10px rgba(0,0,0,0.6));
            
    animation: slotMachinePop 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
    display: none;
    opacity: 0;
    z-index: 10001;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.gold-completer {
    font-family: 'Quicksand', sans-serif;
    font-weight: 900;
    font-size: 80px;
    
    background: linear-gradient(to bottom, dimgrey 0%, lightgrey 25%, silver 50%, whitesmoke 100%);
    
    /* Add both to satisfy the compiler and all browsers */
    -webkit-background-clip: text; 
    background-clip: text; 
    
    -webkit-text-fill-color: transparent;
    
    /* Slot Machine Depth Shadow */
    filter: drop-shadow(2px 2px 0px #8b4513) 
            drop-shadow(4px 4px 10px rgba(0,0,0,0.5));
            
    animation: slotMachinePop 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
    display: none;
    opacity: 0;
    z-index: 10001;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

@keyframes slotMachinePop {
    0% { transform: translate(-50%, -50%) scale(0); opacity: 0; }
    70% { transform: translate(-50%, -50%) scale(1.2); opacity: 1; }
    100% { transform: translate(-50%, -50%) scale(1); opacity: 1; }
}

/* The 'Vanish' animation */
.gold-completer.vanish {
    transition: opacity 0.8s ease, transform 0.8s ease;
    opacity: 0;
    transform: translate(-50%, -50%) scale(2); /* Zoom out towards user */
    pointer-events: none;
}

/* New class to trigger the appearance */
.gold-completer.show {
    display: block;
    animation: slotMachinePop 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

.gold-completer {
    display: flex; /* Align slots horizontally */
    gap: 5px;
    align-items: center;
}

.slot {
    height: 90px; /* Match your font size */
    width: 60px;
    overflow: hidden; /* Only show one number at a time */
    position: relative;
    background:transparent !important; 
    border-radius: 5px;
}

.reel {
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: transform 2.5s cubic-bezier(0.45, 0.05, 0.55, 0.95); /* The "Rolling" feel */
    font-size: 80px;
    line-height: 90px; /* Must match .slot height exactly */
}

/* Ensure the gold gradient applies to the rolling numbers */
.reel {
    background: linear-gradient(to bottom, dimgrey 0%, lightgrey 25%, silver 50%, whitesmoke 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.reel {
    /* This specific bezier curve has a slight 'overshoot' (the 1.1 at the end) 
       to make the reel look like it bounces into its slot */
    transition: transform 1.2s cubic-bezier(0.175, 0.885, 0.32, 1.1);
    
    /* Ensure the gold gradient is locked in */
    background: linear-gradient(to bottom, dimgrey 0%, lightgrey 25%, silver 50%, whitesmoke 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 900;
}

.exclamation {
    font-size: 80px;
    font-weight: 900;
    line-height: 90px;
    margin-left: 10px;
    
    /* Gold Gradient */
    background: linear-gradient(to bottom, dimgrey 0%, lightslategray 25%,silver 50%, whitesmoke 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    
    /* Start hidden and small */
    opacity: 0;
    transform: scale(0);
    transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* This class is added by JS at the end of the roll */
.exclamation.pop {
    opacity: 1 !important;
    transform: scale(1.2) !important;
}

/* This class handles the smooth sliding motion */
.sliding {
    transition: transform 0.3s cubic-bezier(0.165, 0.84, 0.44, 1), 
                left 0.3s ease-out, 
                top 0.3s ease-out !important;
}

/* Ensure the initial deal is ONLY for the start of the game */
.init-deal {
    animation: dealFromTop 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

/* 1. The Main Container Box */
#streakDisplay {
    position: fixed;
    top: 50%; 
    left: 50%;
    /* Start centered but slightly smaller for the pop-in effect */
    transform: translate(-50%, -50%) scale(0.5); 
    
    /* Layout: Forces everything onto one horizontal line */
    width: max-content;
    display: block;
    text-align: center;
    justify-content: center;

    /* Sizing */
    height: 90px;
    padding: 0 50px;
    white-space: nowrap;    
    

    /* Visibility & Animation */
    opacity: 0;
    visibility: hidden;
    z-index: 99999;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    pointer-events: none;
}

/* Triggered by JS */
#streakDisplay.active {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, -50%) scale(1.1);
    
    
}

/* 2. The Gold Text */
#streakText {
    font-family: 'Quicksand', sans-serif; /* Replace with your game's font */
    font-weight: 900;
    font-size: 45px;
    text-transform: uppercase;
    letter-spacing: 1px;
    
    /* Gold Gradient Effect */
    background: linear-gradient(to bottom, dimgrey 0%, lightgrey 25%, silver 50%, whitesmoke 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    
    display: flex;
    align-items: center;
}

/* 3. The Animated Flame */
.premium-flame {
    display: inline-block;
    font-size: 65px; 
    margin-right: 10px;
    flex-shrink: 0;
    
    /* Glowing Aura */
    filter: drop-shadow(0 0 10px #ff4500) drop-shadow(0 0 20px #ff8c00);
    
    /* Flickering Animation */
    animation: flameFlicker 0.6s infinite alternate ease-in-out;
}

/* --- ANIMATIONS --- */

/* Flame pulsing, scaling, and rotating */
@keyframes flameFlicker {
    0% {
        transform: scale(1) rotate(-3deg);
        filter: drop-shadow(0 0 5px #ff4500) brightness(1);
    }
    100% {
        transform: scale(1.15) rotate(3deg);
        filter: drop-shadow(0 0 20px #ff8c00) brightness(1.4);
    }
}

/* Subtle vibration for the whole box */
@keyframes boxVibration {
    0% { transform: translate(-50.5%, -50%) scale(1.1); }
    100% { transform: translate(-49.5%, -50.5%) scale(1.1); }
}

/* --- CASINO CHIP STACK STYLING --- */

:root {
   /* This ensures the square container NEVER shows a background for any chip color */
.chip-stack.chip-gold, 
.chip-stack.chip-silver, 
.chip-stack.chip-slate, 
.chip-stack.chip-grey {
    background: transparent !important;
    background-color: transparent !important;
}
}

/* --- RESTORED 3D CHIP STACKS --- */

CSS

#chartCanvasHolder {
    position: relative;
    width: 95%;
    /* Remove absolute positioning so the parent can see the content */
    display: flex; 
    flex-direction: column;
    /* Force the height to be significant */
    height: 300px; 
    max-height: 300px; 
    margin: 10px auto;
    overflow: visible; /* Prevent chips from being cut off at the top */
}


#overallStatsArea {
    /* Change from absolute to flex */
    position: relative; 
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    height: 350px; /* Now it takes up the full 380px of the holder */
    padding: 10px;

    border-radius: 12px;
}



.overall-header {
    font-family: 'Arial Black', sans-serif;
    color: silver;
    font-size: 1.2rem;
    letter-spacing: 2px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.5);
}



#totalScoreText {
    /* Copy these from your 'overall bankroll' label style */
    font-family: inherit; /* Or specify the exact font name you use */
    color: lightSlateGrey;       /* Standard gold, or change to match your label color */
    font-weight: 800;
    font-size: 2.2rem;    /* Makes the number nice and readable */
    text-align: center;
    text-transform: uppercase;
    
    /* Optional: Adding a subtle text-shadow gives it that premium 'UI' feel */
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    
    margin-top: 15px;
    letter-spacing: 2px;
}

/* If you want the label and the score to share the exact same look: */
.statLabel, #totalScoreText {
    color: lightSlateGrey; /* Ensure they both use the same color */
    font-family: 'Arial Black', sans-serif; /* Example font */
}
#chipDisplay {
    display: flex;
    flex-direction: row-reverse;
    justify-content: center;
    align-items: flex-end;
    gap: 12px; /* Horizontal space between stacks */
    height: 150px;
    overflow: visible;
}

.stack-column {
    display: flex;
    flex-direction: column-reverse; /* Builds upward as you liked */
    align-items: center;
    gap: 0; /* Ensures no extra browser-added space between chips */
    width: 59px;
    overflow: visible;
}

.chip-stack {
    width: 54px;
    height: 54px;
    position: relative;
    /* This ensures no bottom margin pushes the next chip away */
    margin-bottom: 0 !important; 
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;

}

.chip-content {
    width: 100%;
    height: 100%;
    border-radius: 50%; /* This makes it a circle */
    display: flex;
    align-items: center;
    justify-content: center;
    border: 4px dashed rgba(255, 255, 255, 0.4);
    box-sizing: border-box;
}

/* 3D Color Blocks */
.chip-gold .chip-content {
    background: linear-gradient(145deg, #ffdb58, #ffd700);
    color: #444;
    box-shadow: 0 2px 0 #b8860b, 0 4px 0 #b8860b, 0 6px 0 #996515;
}

.chip-silver .chip-content {
    background: linear-gradient(145deg, #e6e6e6, #c0c0c0);
    color: #333;
    box-shadow: 0 2px 0 #888, 0 4px 0 #888, 0 6px 0 #888;
}

.chip-slate .chip-content {
    background-color: #483d8b;
    color: white;
    box-shadow: 0 2px 0 #2a2452, 0 4px 0 #2a2452, 0 6px 0 #221d42;
}

.chip-grey .chip-content {
    background-color: #808080;
    color: white;
    /* Fixed the shadow typo here (added the 6px depth) */
    /*box-shadow: 0 2px 0 #555, 0 4px 0 #555, 0 6px 0 #333;*/
}
/* --- ANIMATIONS & INTERACTION --- */

/* When the chips "clatter" in */
@keyframes chipDrop {
    0% { transform: translateY(-150px) rotateX(45deg); opacity: 0; }
    60% { transform: translateY(10px) rotateX(0deg); opacity: 1; }
    100% { transform: translateY(0); }
}

.animate-drop {
    animation: chipDrop 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

/* Click effect for the top chip */
.chip-stack:active .chip-content {
    top: 0;
    box-shadow: none;
}

/* Score Highlight under the stacks */
.score-highlight {
    font-size: 2.2rem;
    font-weight: bold;
    color: var(--chip-silver);
    text-shadow: 0 0 15px rgba(229, 228, 226, 0.7); 
    text-align: center;
    margin-top: 15px;
    font-family: 'Courier New', Courier, monospace;
}


/* Container should respect spaces */
#scorePopUp {
    display: inline-block;
    white-space: pre; 
    font-weight: bold;
}

/* The "Pop" effect for letters */
.char-pop {
    display: inline-block;
    opacity: 0;
    animation: letterPop 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

@keyframes letterPop {
    0% { transform: scale(0); opacity: 0; }
    70% { transform: scale(1.3); }
    100% { transform: scale(1); opacity: 1; }
}

/* The Green Checkmark */
.tick-mark-fade {
    color: #2ecc71;
    display: inline-block;
    animation: tickIn 0.4s ease-out forwards;
}

/* The Red Cross */
.cross-mark-fade {
    color: #8e0000;
    display: inline-block;
    animation: tickIn 0.4s ease-out forwards;
}


@keyframes tickIn {
    0% { transform: scale(0) rotate(-20deg); opacity: 0; }
    100% { transform: scale(1.2) rotate(0deg); opacity: 1; }
}

.reward-overlay {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 10000; /* Ensure it's above everything */
    pointer-events: none;
}

.chip-3d-reward {
    width: 108px;
    height: 108px;
    perspective: 1000px;
}

.chip-inner-rotate {
    width: 100%;
    height: 100%;
    position: relative;
    transform-style: preserve-3d;
    animation: fullRotation 2.5s infinite linear;
}

.chip-face {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    border-radius: 50%;
    
    /* Solid Interior */
    background-color: silver; 
    border: 8px dashed #ffffff; /* White "poker chip" edge */
    box-shadow: inset 0 0 15px rgba(0,0,0,0.2), 0 5px 15px rgba(0,0,0,0.4);
    
    /* White Text Styling */
    color: darkslateblue;
    font-size: 29px;
    font-weight: 900;
    display: flex;
    align-items: center;
    justify-content: center;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.face-back {
    transform: rotateY(180deg);
}

@keyframes fullRotation {
    0% { transform: rotateY(0deg); }
    100% { transform: rotateY(360deg); }
}

/* The Grid: Horizontal on Desktop, Vertical on Mobile */
.variant-grid {
    display: flex;
    flex-direction: column; /* Stack by default (Mobile First) */
    gap: 15px;
    width: 100%;
    align-items: center;
    margin-top: 15px;
}

/* Media Query for larger screens (Tablets/Desktops) */
@media (min-width: 600px) {
    .variant-grid {
        flex-direction: row; /* Switch to side-by-side */
        justify-content: center;
    }
    
    .variant-card {
        width: 120px;
    }
}

/* The Base Chip Design */
.variant-card {
    width: 140px;
    height: 140px;
    border-radius: 50%; /* Makes it circular */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    cursor: pointer;
    text-align: center;
    
    /* The "Dashed" Border - using a pseudo-element for better control */
    border: 6px dashed rgba(255, 255, 255, 0.8);
    
    /* 3D Depth Shadow */
    box-shadow: 
        0 8px 0 rgba(0,0,0,0.3), /* Thickness of the chip */
        0 15px 20px rgba(0,0,0,0.4); /* Floor shadow */
    
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

/* Individual Metallic Gradients */
.chip-gold {
    background: radial-gradient(circle at 30% 30%, #ffd700, #b8860b);
}

.chip-silver {
    background: radial-gradient(circle at 30% 30%, #e0e0e0, #808080);
}

.chip-slate {
    background: radial-gradient(circle at 30% 30%, #6a5acd, #2f2f4f);
}

/* 3. Metallic Color Tiers */
.chip-emerald {
    background: radial-gradient(circle at 35% 35%, #2ecc71, #004d26);
    box-shadow: 0 8px 0 #003319, 0 15px 20px rgba(0,0,0,0.5);
}

.chip-gold {
    background: radial-gradient(circle at 35% 35%, #ffd700, #b8860b);
    box-shadow: 0 8px 0 #8b6508, 0 15px 20px rgba(0,0,0,0.5);
}

.chip-crimson {
    background: radial-gradient(circle at 35% 35%, #ff4d4d, #800000);
    box-shadow: 0 8px 0 #5a0000, 0 15px 20px rgba(0,0,0,0.5);
}

/* Hover Effect: Pressing the chip down */
.variant-card:active {
    transform: translateY(4px);
    box-shadow: 
        0 4px 0 rgba(0,0,0,0.3),
        0 5px 10px rgba(0,0,0,0.4);
}



.variant-icon {
    font-size: 30px;    /* Slightly smaller icon */
    margin-bottom: 5px;
}

.variant-card:hover:not(.locked) {
    transform: scale(1.05);
    box-shadow: 0 0 15px #ffd700;
}

.variant-card.locked {
    filter: grayscale(0.8);
    opacity: 0.7;
    cursor: default;
    border-color: #555;
}

.variant-name {
    font-family: 'Montserrat', sans-serif;
    font-weight: 900;
    color: white;
    text-transform: uppercase;
    font-size: 0.9rem;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
    z-index: 2;
}

.variant-status {
    font-family: 'Orbitron', sans-serif;
    color: white;
    font-size: 0.7rem;
    opacity: 0.9;
    margin-top: 5px;
    z-index: 2;
}


.variant-icon {
    font-size: 30px;
    margin-bottom: 15px;
}

.price-tag {
    display: inline-block;
    background: #daa520;
    color: lightSlateGrey;
    padding: 2px 10px;
    border-radius: 10px;
    font-size: 0.8em;
    margin-top: 10px;
}

#variantSelector {
    /* 1. Positioning */
    position:fixed;
    
    transform: translate(-50%, -50%); /* The "Secret Sauce" for perfect centering */
    color: whitesmoke;
    /* 2. Layout */
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    
    /* 3. Sizing & Layering */
    width: 90%;
    max-width: 700px; /* Prevents it from getting too wide on desktop */
    z-index: 2000;    /* Ensure it stays above the game board */
    
    /* 4. Casino Aesthetics */
    background:  radial-gradient(circle at center, #8b29d1 0%, #2c094d 100%);
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 0 50px rgba(0, 0, 0, 0.8), 0 0 20px rgba(218, 165, 32, 0.4);
}


#variantSelector.active,
#variantSelector:not(.panel-hidden) {
    /* The "Visible" State */
    position: fixed;
    top: 50%;
    left: 50%;
    visibility: visible !important;
    pointer-events: auto !important;
    width: 90%;
    max-width: 700px; /* Prevents it from getting too wide on desktop */
    z-index: 2000;    /* Ensure it stays above the game board */
    transform: translate(-50%, -50%); /* The "Secret Sauce" for perfect centering */
    opacity: 1 !important;
    display: flex !important;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background:  radial-gradient(circle at center, #8b29d1 0%, #2c094d 100%);
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 0 50px rgba(0, 0, 0, 0.8), 0 0 20px rgba(218, 165, 32, 0.4);
    backdrop-filter: blur(10px);
   
}
/* Ensure that when the panel is hidden, it doesn't block clicks */
#variantSelector.panel-hidden,
.panel-hidden {
    display: none !important;
    pointer-events: none !important;
}

.silver-text {
    color: whitesmoke !important;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-weight: 800;
    
    /* Keep the "Gold" vibe using a glow/shadow instead of text color */
    text-shadow: 
    0 0 10px rgba(229, 228, 226, 0.7), /* Platinum Glow */
    2px 2px 4px rgba(0, 0, 0, 0.8);    /* Deep Depth Shadow */
    margin-bottom: 20px;
}

/* Container for the persistent bank display */
.variant-bank-display {
    position: absolute;
    top: 20px;
    right: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
}

/* Reusing your 3D rotation logic for a static element */
.static-chip-3d {
    width: 54px;
    height: 54px;
    perspective: 1000px;
}

.bank-chip-inner {
    width: 100%;
    height: 100%;
    position: relative;
    transform-style: preserve-3d;
    animation: fullRotation 4s infinite linear; /* Slower, elegant rotation */
}

.bank-chip-face {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 3px dashed rgba(255, 255, 255, 0.4);
    box-shadow: inset 0 0 10px rgba(0,0,0,0.5);
    font-weight: bold;
    color: darkslateblue;
    font-size: 1.2rem;
}

/* Front and Back of the chip */
.bank-face-front { background-color: silver; }
.bank-face-back { 
    background-color: silver; 
    transform: rotateY(180deg); 
}

/* Smaller header on mobile */
@media (max-width: 600px) {
    .silver-text {
        font-size: 0.80rem !important;
        margin-bottom: 10px;
    }
    
    .variant-bank-display {
        top: -5px;
        right: -5px;
        transform: scale(0.7); /* Shrinks the bank display by 20% */
    }
}

/* This blurs the content of the tile */
.blurred-tile {
    filter: blur(5px);
    transition: filter 1s ease; /* Smooth transition if you decide to unblur it */
          /* Optional: prevent interaction while blurred */
}

.reveal-flash {
    z-index: 1000;
    /* Change 1.0s to 3.0s to keep the "Pop" and "Glow" active for the whole wait */
    animation: revealSequence 3.0s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes revealSequence {
    0% { filter: blur(8px); transform: scale(1); }
    /* Adjust keyframes so the "Pop" lasts longer */
    20%, 80% { 
        filter: blur(0px); 
        transform: scale(1.3); 
        box-shadow: 0 0 30px #daa520, 0 0 10px #ffffff;
        background-color: whitesmoke; 
    }
    100% { filter: blur(0px); transform: scale(1); box-shadow: none; }
}

/* Ensure the chip container clips the shine */
.variant-card.premium-shine {
    position: relative;
    overflow: hidden; /* CRITICAL: This keeps the shine inside the circle */
}

/* The Animated Light Beam */
.variant-card.premium-shine::after {
    content: "";
    position: absolute;
    top: -50%;
    left: -150%; /* Starts far to the left */
    width: 50%;
    height: 200%;
    background: linear-gradient(
        to right, 
        rgba(255, 255, 255, 0) 0%, 
        rgba(255, 255, 255, 0.4) 50%, 
        rgba(255, 255, 255, 0) 100%
    );
    transform: rotate(25deg);
    animation: autoShine 3.5s infinite ease-in-out;
    pointer-events: none; /* Prevents the shine from blocking clicks */
}

/* The Sweep Animation */
@keyframes autoShine {
    0% {
        left: -150%;
    }
    30% {
        left: 150%; /* Rapidly sweeps across */
    }
    100% {
        left: 150%; /* Stays hidden for the remainder of the 3.5s to create a "pause" */
    }
}
/* This is what you append via JS */
.focus-tile {
    transition: opacity 0.8s ease-in-out;
    animation: alternatingFocus 20s infinite;
}

/* This creates the 10-second offset */
.pair-2 {
    animation-delay: -10s; 
}

@keyframes alternatingFocus {
    0%, 45% { opacity: 1; }
    50%, 95% { opacity: 0.3; }
    100% { opacity: 1; }
}

/* Ensure the overlay is hidden and centered globally */
.reveal-overlay {
    display: none; /* Keeps it hidden during normal play */
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background:  radial-gradient(circle at center, #8b29d1 0%, #2c094d 100%); /* Darken the game background */
    z-index: 5000; /* Sits on top of everything */
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(8px);
}

/* The Panel Appearance */
.reveal-panel {
    background:  radial-gradient(circle at center, #8b29d1 0%, #2c094d 100%);
    padding: 40px 60px;
    border-radius: 30px;
    border: 4px solid #daa520; /* Gold Border */
    box-shadow: 0 0 50px rgba(218, 165, 32, 0.4);
    text-align: center;
    transform: scale(0.8);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.reveal-overlay.active {
    display: flex; /* Shown only when 'active' class is added via JS */
}

.reveal-overlay.active .reveal-panel {
    transform: scale(1);
}

#revealText {
    color: whitesmoke;
    font-size: 2rem;
    font-weight: 800;
    margin: 0;
    text-shadow:#ccc;
}