/* styles.css */

@font-face {
    font-family: Ans;
    font-style: normal;
    src: url('../Assets/fonts/ProtestRevolution-Regular.ttf');
}
*{
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
body {
    /* background-color: aquamarine; */
    margin: 0;
    /* padding: 20px; */
    font-family: Arial, sans-serif;
    /* background-image: url('../Assets/images/bg1.png'); */
    background-repeat: no-repeat;
	background-size:100% 100%;	
    /* overflow: hidden; */
}

#main{
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.abacus {

    width: 95%;
   transform: scale(0.99);
    max-width: 1000px;
    margin: 10px auto;
    padding: 10px;
    background-color: #659287;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    display: none;

}
.abacus.game-active {
    display: block; /* Show when game is active */
}

.front-page + .main-container {
    display: none;
}
.front-page {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    text-align: center;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url('../Assets/images/bg1.png');
    background-repeat: no-repeat;
    background-size: 100% 100%;
    z-index: -2;
}

.front-page h1 {
    
    font-size: 3em;
    color: #2c3e50;
    margin-bottom: 30px;
}

.gameTitle{
    backdrop-filter: blur(16px) saturate(180%);
    -webkit-backdrop-filter: blur(16px) saturate(180%);
    background-color: rgba(255, 255, 255, 0.75);
    border-radius: 12px;
    border: 1px solid rgba(209, 213, 219, 0.3);
    padding: 2%;
    font-family: ans;
}

.start-button {
    padding: 15px 30px;
    font-size: 1.5em;
    background-color: #2ecc71;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.start-button:hover {
    background-color: #27ae60;
}

/* End Page Styles */
.end-page {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    width: 100vw;
    text-align: center;
    position: fixed; /* Added */
    top: 0; /* Added */
    left: 0; /* Added */
    right: 0; /* Added */
    bottom: 0; /* Added */
    background-color: slategrey;
    z-index: 99
}

.end-page h1 {
    font-size: 3em;
    color: #2c3e50;
    margin-bottom: 20px;
}

.end-page h2 {
    font-size: 2em;
    color: #34495e;
    margin-bottom: 30px;
}

.replay-button {
    padding: 15px 30px;
    font-size: 1.5em;
    background-color: #3498db;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.replay-button:hover {
    background-color: #2980b9;
}

/* Game Interface Styles */
.main-container {
    
    display: flex;
    flex-direction: column;
    gap: 8px;
}



.question-box {
    
    padding: 8px;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    font-size: 1.4em;
    text-align: center;
}

.status-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 19px;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.lifelines-container {
    display: flex;
    gap: 10px;
}

.lifeline-heart {
    width: 30px;
    height: 30px;
}

.score-display {
    font-size: 1.2em;
    font-weight: bold;
    color: #2c3e50;
}

.game-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
}

.labels-container {
    display: flex;
    justify-content: space-evenly;
    width: 100%;
    /* padding: 10px 0; */
    /* margin-bottom: 10px; */
}

.column-label {
    width: 80px;
    text-align: center;
    font-size: 1.5em;
    font-weight: bold;
    color: #333;
    padding: 5px;
    background: #fff;
    border-radius: 5px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}


.abacus-frame{
    position: relative;
    background: #FFF8E8;
    padding: 9px;
    border-radius: 8px;
    display: flex
;
    justify-content: space-around;
    min-height: 600px;
    margin: 6px 0;
    overflow: hidden;
    width: 80%;
}

.column {
    width: 90px;
    height: 600px;
    position: relative;
    display: flex;
    flex-direction: column-reverse;
    align-items: center;
    margin: 0 10px;
}

.pole {
    position: absolute;
    width: 8px;
    height: 600px;
    background: #7f8fa6;
    border-radius: 4px;
    z-index: 1;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
}

.bead {
    position: relative;
    width: 60px;
    height: 30px;
    border-radius: 5px;
    cursor: pointer;
    transition: transform 0.3s ease;
    z-index: 2;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    margin: 3px 0;
}

.bead[data-active="true"] {
    transform: translateY(-265px);
}

.bead:hover {
    filter: brightness(1.1);
    transform: scale(1.05);
}

.bead[data-active="true"]:hover {
    transform: translateY(-265px) scale(1.05);
}

.value-container {
    display: flex;
    justify-content: space-around;
    width: 80%;
    padding: 6px 0;
    /* margin-top: 10px; */
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.column-value {
    text-align: center;
    font-size: 2.3em;
    font-weight: bold;
}

.game-controls {
    display: flex;
   
    margin-top: 15px;
}

.check-button {
    padding: 12px 25px;
    font-size: 1.3em;
    background-color: rgb(3, 78, 107);
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s;
    opacity: 0.5;
    letter-spacing: .08em;
	text-transform: uppercase;
}

.check-button:hover {
    background-color: #048197;
}


.gameName{
    font-size: 2rem;
    font-family: Ans, sans-serif;
}

.confetti-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    overflow: hidden;
    z-index: 9999;
}

.confetti {
    position: absolute;
    opacity: 1;
    animation: fall-animation linear forwards;
    animation-duration: var(--fall-duration, 3s);
    animation-delay: var(--fall-delay, 0s);
}

@keyframes fall-animation {
    from {
        transform: 
            translateY(0) 
            translateX(0) 
            rotate(0deg);
        opacity: 1;
    }
    to {
        transform: 
            translateY(100vh) 
            translateX(var(--horizontal-travel, 0px)) 
            rotate(var(--rotation, 360deg));
        opacity: 0;
    }
}

.success-message {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: rgba(46, 204, 113, 0.9);
    color: white;
    padding: 20px 40px;
    border-radius: 10px;
    font-size: 1.5em;
    z-index: 1001;
    animation: fadeIn 0.3s ease-in;
}


.placeVal{
   
    width: 340px;
    height: 340px;
    
    background-image: url('../Assets/images/board.png');
    object-fit: fill;
    background-repeat: no-repeat;
    background-size: 100% 100%;
    border-radius: 10px;
    z-index: 5; 
    display: flex;
    justify-content: center;
    align-items: center;
}
.place-value-display{
    font-size: 2.7rem;
    font-weight: 700;
    position: relative;
    top: 40px;
    color: #2b425a;
}

.qTxtBg{
    position: absolute;
    top: 100px;
    /* left:1200px; */
    right: -400px;
    width: 300px;
    height: 300px;
    background: rgb(255, 255, 255);
    border-radius: 10px;
    z-index: 5; 
}


.bead {
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    cursor: pointer;
}

.bead.touching {
    opacity: 0.8;
    transform: scale(0.95);
}

button {
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    min-height: 44px;
    min-width: 44px;
    padding: 12px 20px;
}


@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translate(-50%, -60%);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%);
    }
}



@media only screen and  (max-width: 1400px) and (min-width: 1200px) {

    body {
        overflow: hidden; /*[to unlock scroll:overflow: visible;]*/
    }
    .abacus {
        width: 77%;
        transform: scale(0.89);
        margin: -45px auto;
    }

    .placeVal{
        right: -351px;
    }
}

@media only screen and (max-width: 1199px) and (min-width: 992px) {
    
    body {
        overflow: hidden; /*[to unlock scroll:overflow: visible;]*/
    }
    .abacus {
        width: 71%;
        transform: scale(0.83);
        margin: -45px auto;
        
    }
    
    
}

@media only screen and (max-width: 991px) and  (min-width: 768px){
    body {
        overflow: auto; /*[to unlock scroll:overflow: visible;]*/
    }
   
    .abacus {
       /* display: flex !important; */
       flex-direction: column-reverse;
       transform: scale(0.8);
        
    }
    .front-page h1 {
        font-size: 2.5em;
    }
}

@media only screen and (max-width: 767px) and  (min-width: 600px){
    body {
        overflow: auto; 
    }
   
    .abacus {
       /* display: flex !important; */
       flex-direction: column-reverse;
       transform: scale(0.82);

        
    }
    
    #main{
        flex-direction: column-reverse;
        

    }
    .front-page h1 {
        font-size: 2.3em;
    }
}
@media only screen and (max-width: 599px){
    body {
        overflow: auto; 
    }
   
    .abacus {
       /* display: flex !important; */
       flex-direction: column-reverse;
       transform: scale(0.9);
        
       margin: 0 auto;
    }
    .placeVal{
        width: 200px;
        height: 200px;
    }
    .place-value-display{
        font-size: 1.4rem;
        top: 30px;

    }
    #main{
        flex-direction: column-reverse;
        justify-content: center;
        align-items:center ;
    }
    .bead{
        width: 40px;
        height: 30px;
    }
    .gameName{
        font-size: 1.5rem;
    }
    .column-label {
        width: 50px;
    }
    .front-page h1 {
        font-size: 2em;
    }
    .start-button {
        padding: 10px 20px;
        font-size: 1.5em;
    }
}

#timerObj{
	position:absolute;
	/* width:200px; */
	height:37px;
    /* top: 10px; */
	font-size:20px;
	font-weight:bold;
	border:#9c9205 solid 2px;
	color:#000;
	text-align:center;
	padding:5px;
	font-family: Rubric;
	line-height:25px;
	background:white;
}