img {
	display: block;
}

body {
	background: #1a1d27;
	background: linear-gradient(180deg, rgba(26, 29, 39, 1) 0%, rgba(33, 40, 65, 1) 50%);
	height: 100vh;
}

.active {
	opacity: 1;
	display: flex;
}

.hidden {
	opacity: 0;
	visibility: hidden;
	display: none;
}

button,
input[type='submit'] {
	cursor: pointer;
	background-color: #e93232;
	border-radius: 5px;
	border: 0;
	padding: 10px;
	color: #fef8ec;
	font-family: 'Outfit', sans-serif;
	text-transform: uppercase;
	transition: background-color 0.5s ease-in-out;
	box-sizing: border-box;
}

button:hover,
button:active {
	background-color: #990000;
}

input[type='number'] {
	font-family: 'Outfit', sans-serif;
	background-color: #ecfefc;
	border-radius: 5%;
	border: 0;
	padding: 10px;
	width: 80px;
}

#settings-button {
	position: absolute;
	top: 0;
	right: 0;
	border-radius: 50%;
	border: 0;
	background-color: #ecfefc;
	aspect-ratio: 1;
	scale: 60%;
	z-index: 1;
}

h1,
h2,
h3 {
	font-family: 'League Gothic', sans-serif;
	text-transform: uppercase;
	font-weight: 400;
}

h1,
h2 {
	color: #ecfefc;
}

#house-total h3,
#player-total h3 {
	color: #2c2370;
	font-size: 36px;
	margin: 0;
}

h3 {
	color: #2c2370;
}

p,
span {
	color: #ecfefc;
	font-family: 'Outfit', sans-serif;
}

#bets span {
	font-size: 1.5em;
}

#money h3 {
	background-color: #ecfefc;
	border-radius: 5%;
	border: 0;
	padding: 7px;
	display: inline;
}

#close {
	border-radius: 50%;
	aspect-ratio: 1;
	width: 25px;
	padding: 0;
}

.modal {
	position: fixed;
	width: 100%;
	height: 100%;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background-color: rgba(0, 0, 0, 0.5);
	z-index: 2;
	justify-content: center;
	align-items: center;
}

.modal.active {
	display: flex;
}

.modal-container {
	background-color: #fef8ec;
	border-radius: 10px;
	padding: 20px;
	text-align: center;
	margin: auto;
	display: flex;
	flex-direction: column;
	align-items: center;
	position: relative;
	padding-bottom: 10px;
}

.modal #close {
	position: absolute;
	top: 0;
	right: 0;
	float: right;
}

.modal h2 {
	color: #2c2370;
	font-size: 2em;
	position: relative;
	text-align: center;
	width: fit-content;
}

.modal button {
	position: relative;
	top: -25px;
	margin: 5px;
	width: 200px;
}

.modal p {
	color: #2c2370;
	text-align: left;
}

#rules-popup .modal-container {
	width: 500px;
}

#start {
	flex-direction: column;
	gap: 15px;
	text-align: center;
	align-items: center;
}

#start img {
    position: absolute;
	width: 250px;
	z-index: 0;
    right: -220px;
    top: -50px;
}

#logo {
    position: relative;
    display: flex;
}

#start h1,
#start button {
	z-index: 1;
}

#start h1 {
    text-shadow: 1px 2px 5px #2c23706b;;
}

#bets img {
	position: absolute;
	top: 260px;
	right: 200px;
	width: 250px;
}

h1 {
	color: #fef8ec;
	font-size: 100px;
	margin: 0;
	text-align: center;
}

#start .rules {
	width: 300px;
}

.start-game {
	font-size: 50px;
	width: 500px;
}

#bets,
#start,
#end-screen {
	justify-content: center;
	align-items: center;
	flex-direction: column;
	text-align: center;
	height: 100vh;
}

#back {
	margin-top: 20px;
}

#betting {
	margin-top: 20px;
	scale: 200%;
}

#end-screen {
	text-align: center;
}

.quit {
	margin-top: 10px;
}

#money {
	position: absolute;
	bottom: 50px;
	left: 40px;
	scale: 150%;
}

#money p {
	margin: 10px 0 0 0;
	padding: 0 0 20px 0;
}

#player-total,
#house-total {
	background-color: #ecfefc;
	aspect-ratio: 1;
	border-radius: 50%;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	text-align: center;
	width: 75px;
	padding: 10px;
	z-index: 2;
	box-shadow: 1px 2px 5px #2c23706b;
}

#player-total {
	position: absolute;
	bottom: 50px;
}

#house-total {
	position: absolute;
	top: 200px;
}

#player-total span,
#house-total span {
	font-family: 'League Gothic', sans-serif;
	text-transform: uppercase;
	color: #7b76af;
}

#actions {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 15px;
	scale: 200%;
}

#actions button {
	display: flex;
	justify-content: center;
	align-items: center;
	gap: 10px;
}

#actions img {
	max-width: 15px;
}

#main-actions {
	display: flex;
	gap: 30px;
}

#main-actions button {
	width: 150px;
}

#split {
	scale: 75%;
	color: #2c2370;
	background-color: #ecfefc;
	transition:
		background-color 0.5s ease-in-out,
		color 0.5s ease-in-out;
}

#split:hover,
#split:active {
	color: #ffffff;
	background-color: #4e41b5;
}

#house,
#cards {
	display: flex;
	justify-content: center;
	align-items: center;
}

#house {
	flex-direction: column;
}

#cards {
	display: flex;
	justify-content: center;
	align-items: center;
}

#table {
	position: absolute;
	width: 70%;
	height: 100%;
	background-image: url(images/table.svg);
	background-repeat: no-repeat;
	background-position: center top;
	background-size: contain;
	z-index: -1;
}

#game {
	width: 100%;
	min-height: 100vh;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 80px;
	position: relative;
}

/* The flip card container - set the width and height to whatever you want. We have added the border property to demonstrate that the flip itself goes out of the box on hover (remove perspective if you don't want the 3D effect */
.flip-card {
	background-color: transparent;
	width: 150px;
	height: 200px;
	perspective: 1000px; /* Remove this if you don't want the 3D effect */
}

/* This container is needed to position the front and back side */
.flip-card-inner {
	position: relative;
	width: 100%;
	height: 100%;
	text-align: center;
	transition: transform 0.8s;
	transform-style: preserve-3d;
}

/* Do an horizontal flip when you move the mouse over the flip box container */
.flip-card:hover .flip-card-inner {
	transform: rotateY(180deg);
}

/* Position the front and back side */
.flip-card-front,
.flip-card-back {
	position: absolute;
	width: 100%;
	height: 100%;
	-webkit-backface-visibility: hidden; /* Safari */
	backface-visibility: hidden;
}

/* Style the front side (fallback if image is missing) */
.flip-card-front {
	background-color: #fef8ec;
	color: black;
	border-radius: 5px;
	border: 5px solid #e93232;
	display: flex;
	justify-content: center;
	align-items: center;
}

/* Style the back side */
.flip-card-back {
	background-color: #e93232;
	color: white;
	transform: rotateY(180deg);
	border-radius: 5px;
	border: 5px solid #fef8ec;
}

#house-cards {
	display: flex;
	gap: 30px;
	z-index: 1;
}

#player-cards {
	display: flex;
	gap: 30px;
	z-index: 1;
	scale: 110%;
}

.card-number {
	color: #2f2c2c;
	position: absolute;
	top: 10px;
	left: 10px;
	font-size: 36px;
	font-family: 'League Gothic', sans-serif;
	margin: 0;
	text-transform: uppercase;
}

.red {
	color: #e93232;
}

.black {
	color: #2f2c2c;
}
