@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@300;400;500;600;700&display=swap');

:root {
	--dark-color: #1A1A1A;
	--light-color: #FFFFFF;
	--vh: 100%;
	--real-vh: 1vh;
}

/* Preloader styles */
.game-wrapper {
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.5s ease-out, visibility 0.5s ease-out;
	min-height: 100vh;
	min-height: calc(var(--real-vh, 1vh) * 100);
	height: 100vh;
	height: calc(var(--real-vh, 1vh) * 100);
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	padding: 8px 24px;
	gap: 32px;
	overflow: hidden;
}

#preloader {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	display: flex;
	justify-content: center;
	align-items: center;
	z-index: 9999;
	opacity: 1;
	visibility: visible;
	transition: opacity 0.3s ease-out, visibility 0.3s ease-out;
	background: linear-gradient(to top, #9D00B2 0%, #5700A2 100%);
}

body.loading #preloader {
	opacity: 1;
	visibility: visible;
}

body:not(.loading) #preloader {
	opacity: 0;
	visibility: hidden;
}

body:not(.loading) .game-wrapper {
	opacity: 1;
	visibility: visible;
}

.spinner {
	width: 50px;
	height: 50px;
	border: 5px solid rgba(255, 255, 255, 0.1);
	border-top-color: #FF00B5;
	border-radius: 50%;
	animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
	to {
		transform: rotate(360deg);
	}
}

html, body {
	min-height: 100vh;
	min-height: calc(var(--real-vh, 1vh) * 100);
	margin: 0;
	padding: 0;
	overflow: hidden;
	position: fixed;
	width: 100%;
	background: linear-gradient(to top, #9D00B2 0%, #5700A2 100%);
	box-sizing: border-box;
	-webkit-overflow-scrolling: touch;
}

* {
	box-sizing: border-box;
	margin: 0;
	padding: 0;
	font-family: 'Space Grotesk', sans-serif;
}

body {
	color: var(--light-color);
}

@media (hover: hover) {
	.main-button:hover {
		opacity:0.5;
		transition: .35s cubic-bezier(0.25, 1, 0.5, 1);
	}
}

a
{
	text-decoration: none;
}

.main-wrapper{
	height: 100vh;
	height: calc(var(--real-vh, 1vh) * 100);
	display: flex;
	flex-direction: column;
	justify-content: center;
	align-items: center;
	max-width: 300px;
	margin: 0 auto;
}

.set-hide{
	opacity: 0;
}

.container{
	width: 263px;
	display: block;
}

#title{
	display:flex;
	font-size: 56px;
	font-family: 'Space Grotesk', sans-serif;
	font-weight: 700;
	color:white;
	text-shadow: 0px 20px 36px rgba(157, 60, 114, 0.3);
}

#flames{
    position: absolute;
    width: 100%;
    height: 100%;
    background-image: url("assets/flames.svg");
	background-size: contain;
    background-position: bottom;
    background-repeat: no-repeat;
    top: 0;
    left: 0;
    z-index: -999;
}

.start{
	width: 75%;

	background: #FFFFFF;

	border-radius: 60px;

	font-size: 18px;
	font-weight: 700;
	color: #152934;
	text-transform: uppercase;
	text-align: center;
	line-height: 2.5;
	font-family: 'Space Grotesk', sans-serif;
	font-weight: 700;
	margin-top: 48px;

	cursor: pointer;
	overflow: hidden;
	
	box-shadow: 0px 20px 36px rgba(157, 60, 114, 0.3);
	transition: .4s cubic-bezier(0.4, 0.2, 0.2, 1);
}

.start:hover{
	transform : scale(1.1);
	transition: .4s cubic-bezier(0.4, 0.2, 0.2, 1);
}

.start:hover div{
	color: #152934;
	transition: .4s cubic-bezier(0.4, 0.2, 0.2, 1);
	transform : scale(0.65);
}

.start div{
	color: #152934;
	transition: .4s cubic-bezier(0.4, 0.2, 0.2, 1);
	transform : scale(1);
}

#block-title{
	transform: translateY(-50%) translateZ(60px);
	top: 50%;
	position: absolute;
	left: 0;
	font-weight: 700;
	font-size: 1.75rem;
	line-height: 2rem;
	width: 100%;
	padding: 1rem;
	-webkit-box-sizing: border-box;
	box-sizing: border-box;
	outline: 1px solid transparent;
	-webkit-perspective: inherit;
	perspective: inherit;
	z-index: 2;
	font-family: 'Space Grotesk', sans-serif;
}

.logo-container {
    width: min(220px, 60vw);
    height: min(144px, 40vw);
    flex: 0 1 auto;
    transform-style: preserve-3d;
    will-change: transform;
    background-image: url('assets/header-logo.png');
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
    margin: 0;
}

.logo {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transform: translateZ(20px);
    user-select: none;
    -webkit-user-select: none;
    -ms-user-select: none;
}

.front {
    background: url('assets/bg-pattern.png'),linear-gradient(180deg, #FBFBFB 0%, #F8EDFC 100%);
    background-size: cover;
    background-position: center;
    color: var(--dark-color);
    transform: rotateY(0deg);
    z-index: 2;
}

.score-container {
    position: absolute;
    top: 16px;
    left: 0;
    right: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0 12px;
    z-index: 10;
}

.score {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 28px;
    font-weight: 700;
    margin-right: 10px;
}

.history-button {
    position: absolute;
    right: 16px;
    font-size: 20px;
    cursor: pointer;
    padding: 8px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s ease;
    border: none;
    color: var(--light-color);
}

.history-button:hover {
    transform: scale(1.1);
}

.timer-container {
    position: absolute;
    right: -12px;
    top: 40px;
    width: 34px;
    height: 224px;
    overflow: visible;
    z-index: 3;
    transform: translateZ(50px);
    backface-visibility: visible;
    filter: drop-shadow(0px 10px 18px rgba(64, 0, 115, 0.25));
}

.thermo-svg {
    width: 100%;
    height: 100%;
    transform-style: preserve-3d;
    pointer-events: none;
    position: relative;
    z-index: 1;
}

.thermo-svg svg {
    width: 100%;
    height: 100%;
    display: block;
}

.timer-bar {
    position: absolute;
    left: 13px;
    bottom: 28px;
    width: 8px;
    height: 0;
    border-radius: 24px 24px 0px 0px;
    background: linear-gradient(180deg, #FB0 0%, #FF0089 45.99%, #FF00B5 91.97%);
    transform-origin: bottom;
    z-index: 2;
    will-change: transform;
    visibility: visible;
}

.timer-text {
    position: absolute;
    width: 32px;
    text-align: center;
    background: #FF00B5;
    box-shadow: 0px 2px 3px 0px rgba(64, 0, 115, 0.10);
    color: var(--light-color);
    padding: 4px 4px;
    border-radius: 4px;
    font-weight: 900;
    font-size: 14px;
    z-index: 10;
    transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: max-content;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    backface-visibility: hidden;
    transform-style: preserve-3d;
    will-change: transform;
}



.display-answer {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 40px;
    text-align: center;
    line-height: 40px;
    cursor: pointer;
    transition: .15s cubic-bezier(0.4, 0.2, 0.2, 1);
    font-family: 'Space Grotesk', sans-serif;
    font-size: 16px;
    color: var(--light-color);
}

.modal-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.7);
    background: var(--light-color);
    color: var(--dark-color);
    width: 90%;
    max-width: 360px;
    border-radius: 16px;
    padding: 24px;
    opacity: 0;
    max-height: 80vh;
    overflow-y: auto;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/*@media all and (max-width: 1024px)

{
	.home-cta 
	{
		
	}
}

*/

/* Modal styles */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal.show {
    opacity: 1;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.modal-header h2 {
    font-size: 24px;
    font-weight: 700;
    margin: 0;
}

.close {
    font-size: 24px;
    cursor: pointer;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.1);
    transition: background 0.2s ease;
}

.close:hover {
    background: rgba(0, 0, 0, 0.2);
}

/* History items simplified */
.history-item {
    display: flex;
    align-items: center;
    padding: 12px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.history-item:last-child {
    border-bottom: none;
}

.history-number {
    width: 24px;
    height: 24px;
    background: rgba(0, 0, 0, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 14px;
}

.history-content {
    flex: 1;
    margin: 0 12px;
}

.history-category {
    font-size: 12px;
    text-transform: uppercase;
    opacity: 0.6;
    margin-bottom: 4px;
}

.history-question {
    font-size: 14px;
    line-height: 1.4;
}

/* Game over modal specific styles */
.final-score,
.spice-count {
    font-size: 24px;
    font-weight: 700;
    margin: 16px 0;
    text-align: center;
}

.timer {
    position: absolute;
    bottom: 8px;
    left: 50%;
    transform: translateX(-50%);
    width: 8px;
    height: 0%;
    background: linear-gradient(to top, #8A0742 0%, #EB0C70 100%);
    border-radius: 4px;
    transition: height 0.1s linear;
    max-height: calc(100% - 16px);
}

.timer::after {
    display: none;
}

.cardcont {
    flex: 0 0 min(320px, 85vh);
    width: min(263px, 70vw);
    perspective: 1000px;
    transform-style: preserve-3d;
    position: relative;
    margin: 0;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    cursor: pointer;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    display: flex;
    justify-content: center;
    align-items: center;
}

.card-style {
    width: 100%;
    height: 100%;
    box-shadow: 0px 20px 36px rgba(157, 60, 114, 0.3);
    position: relative;
    display: flex;
    flex-direction: column;
    transform-style: preserve-3d;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

.front,
.back {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    -webkit-backface-visibility: visible;
    backface-visibility: visible;
    transform-style: preserve-3d;
    border-radius: 16px;
    box-shadow: 0px 0px 0px 10px rgb(255 255 255 / 15%), 0px 20px 36px 0px rgba(64, 0, 115, 0.30);
    will-change: transform;
    visibility: visible;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}



.back {
    background: #152934 url('assets/back-background.png');
    background-size: cover;
    background-position: center;
    transform: rotateY(180deg);
    z-index: 1;
}

.back .inner {
    justify-content: center;
    align-items: center;
    padding: 0;
}

.back .inner::before {
    content: '';
    position: absolute;
    width: 200px;
    height: 166px;
    background-image: url('assets/mascotte.png');
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
}

/* Remove these elements from the back */
.back .category,
.back .tabasse-logo {
    display: none;
}

.inner {
    position: relative;
    z-index: 2;
    padding: 44px 32px 24px;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
    transform: translateZ(60px);
    transform-style: preserve-3d;
    -webkit-font-smoothing: subpixel-antialiased;
    -moz-osx-font-smoothing: auto;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

.card-logo {
    margin-bottom: 16px;
}

.front .card-logo svg path {
    fill: #15293438;
}

.back .card-logo svg path {
    fill: #ffffff3d;
}

.category {
    text-transform: uppercase;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    color: #FF2DAD;
    font-family: "Space Grotesk";
    font-size: 17px;
    font-style: normal;
    font-weight: 700;
    line-height: normal;
}

.question {
    text-rendering: optimizeLegibility;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    font-family: "Space Grotesk";
    font-size: 19px;
    font-style: normal;
    font-weight: 700;
    line-height: 21px;
    letter-spacing: -0.63px;
    margin: 0;
    white-space: pre-wrap;
}

.author {
    font-size: 13px;
    opacity: 1;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    margin: 0;
}

.back-isflipped{
	-webkit-transform: rotateY(0deg);
	transform: rotateY(0deg);
	-webkit-transform-style: preserve-3d;
	transform-style: preserve-3d;

}

.front-isflipped{
	-webkit-transform: rotateY(-180deg);
	transform: rotateY(-180deg);
	-webkit-transform-style: preserve-3d;
	transform-style: preserve-3d;

}

.shuffle-button {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0;
    cursor: pointer;
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), filter 0.2s ease;
    filter: drop-shadow(3px 8px 0px #FF00B5);
    user-select: none;
    -webkit-user-select: none;
    -ms-user-select: none;
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
    touch-action: manipulation;
}

.shuffle-button:hover {
    transform: scale(1.05);
}

.shuffle-button:active {
    transform: scale(0.95) !important;
    filter: drop-shadow(2px 4px 0px #FF00B5) !important;
}

.shuffle-button img {
    width: min(263px, 70vw);
    height: auto;
    pointer-events: none;
    user-select: none;
    -webkit-user-select: none;
    -ms-user-select: none;
    -webkit-touch-callout: none;
}

.main-button {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.main-button:hover {
    transform: scale(1.1);
}

.main-button img {
    width: 24px;
    height: 24px;
}

.button-close{
	width: 40px !important; 
	height: 40px;
	border-radius: 40px;
	background-color: #152934;
	transition: .35s cubic-bezier(0.4, 0.2, 0.2, 1);
	overflow: hidden;
}

.button-close::after{
	content: url(assets/icon_x_2.svg);
	color: #FFF;
	line-height: 55px;
	overflow: hidden;
}

.bottom-infos{
	width: 87%;
	margin: 24px 0 0 0;
}

#progress-counter{
	display: block;
	color: white;
	text-align: center;
	font-weight: 700;
	font-size:28px;
	line-height: 40px;
	width: 144px;
	user-select: none; -webkit-user-select: none; -ms-user-select: none;
}

#allEmojis{
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	width: 100%;
	backface-visibility: hidden;
	user-select: none; -webkit-user-select: none; -ms-user-select: none;
}

.emoji-box{
	padding: 0 8px; 
	text-align: center;
	font-size: 52px;
}

.emoji-wrapper{
	display: flex;
	height: 100%;
	align-items: center;
}

#block-emoji{
	width: 100%;
}

.main{
	margin: 0 auto;
	width: 500px;
	padding: 24px;
	background-color: grey;
	display: block;
	border-bottom-right-radius: 20px;
	border-bottom-left-radius: 20px;
	border-top-right-radius: 20px;
	border-top-left-radius: 20px;
}


#bar{
	width: 100%;
	height: 5px;
	border-radius: 50px;
	background :rgba(255, 255, 255, 0.2);
	overflow: hidden;
	margin-top: 16px;
}

#progressBar{
	height: 5px;
	background: #FFFFFF;
	border-radius: 50px;
	transition: 300ms;
	width: 0px;
}

.credit-line {
    font-size: 16px;
    font-weight: 500;
    text-align: center;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    opacity: 0.7;
    margin: 0;
    width: 100%;
}

.credit-line a {
    color: white;
    margin: none;
    text-decoration: none;
    transition: opacity 0.2s ease;
}

.credit-line a:hover {
    opacity: 0.8;
}

.credit-line span {
    margin: 0 12px;
}


