@import url('https://fonts.cdnfonts.com/css/mairon');

body {
	font-family: 'Mairon', sans-serif;
    margin: 0;
    padding: 0;
    background-image: url(/card-arena/assets/img/images/bg10.gif);
    background-size: 100% 100%;
    background-position: center;
    background-repeat: no-repeat;                              
}
body:before {
	content: '';
	background: rgb(0,0,0,0.5);
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100vh;
	z-index: -1;
}
.container {
	z-index: 1;
	height: 100vh;
	display: flex;
	flex-direction: column;
	justify-content: center;
	align-items: center;
}
#controls {
	width: 100%;
	display: flex;
	justify-content: space-around;
	gap:10px;
}
.button {
    text-decoration: none;
}
#controls div, .button {
	width: 200px;
	text-align: center;
	background: #000;
	color: #FFF;
	padding: 10px;
	border-radius: 5px;
	border: 4px solid #BB9C61;
	cursor: pointer;
	transition: 0.5s;
	font-size: 18px;
}
#controls div:hover {
	background: #bb9c61;
}

#card {
	width: 300px;
	height: 460px;
	perspective: 1000px;
	position: relative;
	border: 4px solid #000;
	background: #000;
	border-radius: 5px;
	margin: 10px;
	overflow: hidden;
}
#card .top, #card .back {
	border-radius: 5px;
	position: absolute;
	width: 100%;
	height: 100%;
	backface-visibility: hidden;
	transition: transform 0.5s, opacity 0.5s;
}
#card .top {
	will-change: transform;
  	transform-style: preserve-3d;
	transform: rotateY(180deg);
	display: flex;
	gap: 5px;
	flex-direction: column;
	background: #000;
	background-image: url(/card-arena/assets/img/images/bg0.gif);
	background-size: 100% 100%;
	padding: 10px;
	box-sizing: border-box;
	z-index: 1;
}
.top::before {
	content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: url(/card-arena/assets/img/images/bg.png);
    background-size: 100% 100%;
    z-index: -1;
    opacity: 0.5;
    animation: bgAnimation 5s infinite;
}
@keyframes bgAnimation {
    0% {
        opacity: 0.4;
        background-size: 100% 100%;
    }
    50% {
        opacity: 0.4
        background-position: center;
        background-size: 102% 102%;
    }
    100% {
        opacity: 0.4;
        background-size: 100% 100%;
    }
}
.image {
	height: 270px;
	display: flex;
	justify-content: center;
	align-items: center;
}
.image img {
	width: 100%!important;
	height: 100%!important;
	height: auto;
	border-radius: 50px;
	transition: transform 0.5s;
	animation: moving 2s infinite;
	box-shadow: 0px 0px 5px 2px #FFF;
    z-index: 1;
    opacity: 0;
    object-fit: cover;
    object-position: center top;
}
@keyframes moving {
    0% {
        transform: rotateY(0deg);
    }
    50% {
        transform: rotateY(6deg);
    }
    100% {
        transform: rotateY(0deg);
    }
}
.race {
	font-size: 14px;
    text-align: center;
    height: 14px;
	background: linear-gradient(135deg, #9F2B56, #2E1824);
    border-radius: 5px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
	padding: 4px;
	border-radius: 5px;
	border: 1px solid #FFF;
	margin-bottom: 5px;
	color: #FFF;
    padding-left: 20px;
}
.description {
	font-size: 12px;
	text-align: center;
	background: linear-gradient(135deg, #9F2B56, #2E1824);
    border-radius: 5px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
	color: #FFF;
	height: 100%;
	display: flex;
	flex-direction: column;
	justify-content: center;
	gap: 5px;
	align-items: center;
	padding: 4px;
	border-radius: 5px;
	border: 1px solid #FFF;
}
#card .back {
	background: url(/card-arena/assets/img/images/back.png);
	background-size: 100% 100%;
	transform: rotateY(0deg);
	will-change: transform;
  	transform-style: preserve-3d;
	opacity: 1;
	z-index: 2;
}

#card:hover .top, #card:hover .top img {
	transform: rotateY(0deg);
	will-change: transform;
  	transform-style: preserve-3d;
	opacity: 1;
}
#card:hover .back {
	transform: rotateY(180deg);
	will-change: transform;
  	transform-style: preserve-3d;
	opacity: 0;
}
.hide {
	opacity: 0;
	transition: 0.5s;
}
.show {
	opacity: 1;
	transition: 0.5s;
}
.spin360 {
	transform: rotateY(360deg);
	will-change: transform;
  	transform-style: preserve-3d;
	transition: transform 0.5s;
}
.gameTitle {
	font-size: 22px;
	color: #FFF;
	text-align: center;
	text-shadow: 2px 2px 2px 2px #000;
}
.life {
	position: absolute;
	left: 0;
	top: 5px;
	display: flex;
	align-items: center;
	justify-content: center;
	color: #FFF;
	font-size: 22px;
    background: radial-gradient(circle at 30% 30%, #ffffff, #07b209, #07c60b);
    z-index: 2!important;
}
.damage {
	position: absolute;
	left: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	color: #FFF;
	font-size: 22px;
	top: 320px;
    background: radial-gradient(circle at 30% 30%, #ffffff, #ff0000, #ff0000);
    z-index: 2!important;
}
.sphere {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    z-index: 1;
    box-shadow: 
        inset -20px -20px 40px rgba(0, 0, 0, 0.5),
        inset 10px 10px 20px rgba(255, 255, 255, 0.5),
        0 0 30px rgba(255, 204, 0, 0.7),
        0 0 60px rgba(255, 204, 0, 0.5),
        0 0 100px rgba(255, 204, 0, 0.3);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 
            inset -20px -20px 40px rgba(0, 0, 0, 0.5),
            inset 10px 10px 20px rgba(255, 255, 255, 0.5),
            0 0 30px rgba(255, 204, 0, 0.7),
            0 0 60px rgba(255, 204, 0, 0.5),
            0 0 100px rgba(255, 204, 0, 0.3);
    }
    50% {
        transform: scale(1.05);
        box-shadow: 
            inset -20px -20px 40px rgba(0, 0, 0, 0.6),
            inset 15px 15px 25px rgba(255, 255, 255, 0.6),
            0 0 40px rgba(255, 204, 0, 0.8),
            0 0 70px rgba(255, 204, 0, 0.6),
            0 0 120px rgba(255, 204, 0, 0.4);
    }
}

.card-name-container {
    width: auto;
    padding: 2px;
    text-align: center;
    background: linear-gradient(135deg, #9F2B56, #2E1824);
    border-radius: 5px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
    border: 2px solid #FFF;
    position: relative;
    color: #fff;
    margin-bottom: 5px;
}

.card-name-container:before {
    content: "";
    position: absolute;
    top: -10px;
    left: -10px;
    right: -10px;
    bottom: -10px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 15px;
    box-shadow: 0 0 20px rgba(243, 156, 18, 0.5);
    pointer-events: none;
}

.card-name {
    font-size: 14px;
    height: 12px;
    padding: 10px;
    margin-left: 30px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 2px;
    text-shadow: 2px 2px 5px rgba(0, 0, 0, 0.3);
}
.modal {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100vh;
	z-index: 99;
	background: rgb(0,0,0,0.8);
	display: none;
	justify-content: center;
	padding: 20px;
	box-sizing: border-box;
	font-family: 'Arial';
}
.modal > div {
	overflow: auto;
	width: 50%;
	position: relative;
	height: auto;
	background: #FFF;
	color: #000;
	display: flex;
	flex-direction: column;
	padding: 20px;
	border-radius: 10px;
	border: 2px solid #c5c5c5;
}
.rules {
	height: 100%;
	display: none;
	flex-direction: column;
}
::-webkit-scrollbar {
    width: 6px;
}
::-webkit-scrollbar-thumb {
    background: #BB9C61;
    border-radius: 6px;
}
::-webkit-scrollbar-track {
    background: #f1f1f1;
}
::-webkit-scrollbar-corner {
    background: #f1f1f1;
}
.close {
	position: absolute;
	top: 20px;
	right: 20px;
	font-size: 20px;
	cursor: pointer;
	border-radius: 100px;
	width: 30px;
	height: 30px;
	display: flex;
	justify-content: center;
	align-items: center;
	border: 2px solid #c5c5c5;
	padding: 4px;
}
.header {
	display: flex;
	justify-content: center;
	align-items: center;
}
.header h1 {
	width: auto;
}
.fadeout {
	animation: fadeout 0.5s forwards;
   	display: none;
}
.fadein {
	animation: fadein 0.5s forwards;
   	display: flex;
}
@keyframes fadeout {
    from {
        opacity: 1;
    }
    to {
        opacity: 0;
    }
}

@keyframes fadein {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}
#config {
	position: absolute;
	top: 20px;
	left: 20px;
	width: 40px;
	height: 40px;
	background: #FFF;
	padding: 10px;
	border-radius: 100px;
	border: 4px solid #BB9C61;
	cursor: pointer;
	transition: 0.5s;
	cursor: pointer;
	z-index: 99;
}
#install {
	position: absolute;
	top: 100px;
	left: 20px;
	width: 40px;
	height: 40px;
	background: #FFF;
	padding: 10px;
	border-radius: 100px;
	border: 4px solid #BB9C61;
	cursor: pointer;
	transition: 0.5s;
	cursor: pointer;
	z-index: 99;
	display: none;
}
.decks h1 {
	font-family: 'Mairon', sans-serif;
	text-align: center;
}
#config img, #rules img, #install img {
	width: 100%;
}
#rules {
	position: absolute;
	top: 20px;
	right: 20px;
	width: 40px;
	height: 40px;
	background: #FFF;
	padding: 10px;
	border-radius: 100px;
	border: 4px solid #BB9C61;
	cursor: pointer;
	transition: 0.5s;
	cursor: pointer;
	z-index: 99;
}
.decks {
	width: 100%;
	display: flex;
	justify-content: center;
	flex-wrap: wrap;
	gap:10px;
}
.deck {
	width: 130px;
	text-align: center;
	font-family: 'Mairon', sans-serif;
	position: relative;
}
.deck img {
	display: block;
	border: 5px solid #000;
	border-radius: 10px;
	box-sizing: border-box;
	width: 100%;
	height: 180px;
	transition: 0.3s;
}
.deck img:hover {
	border: 0px solid #000;
	cursor: pointer;
}
.game {
	opacity: 0;
	display: none;
	flex-direction: column;
}
#decksize {
	text-align: center;
}
.backgrounds {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	justify-content: center;
}
.bg {
	width: 22%;
	border: 4px solid #b8995f;
	border-radius: 5px;
	cursor: pointer;
}
.bg:hover {
	border: 4px solid #00FF00;
}
.bg img {
	width: 100%;
	height: 100%;
}

@media(max-width: 400px) {
	#controls {
		flex-direction: column;
		align-items: center;
	}
	#config {
		top: 5px;
    	left: 5px;
    	width: 18px;
    	height: 18px;
	}
	#rules {
		top: 5px;
    	right: 5px;
    	width: 18px;
    	height: 18px;
	}
	.modal > div {
		width: 90%;
	}
	.deck img {
		width: 150px;
		height: 180px;
	}
}
h1, h2, h3, h4, h5 {
    font-family: 'Mairon';
    text-align: center;
    margin: 5px;
    width: 100%;
}
.youlose {
    display: none;
    flex-direction:column;
    align-items:center;
    justify-content:center;
    height:100vh;
}
.youlose h1 {
    font-size: 45px;
}
.youlose p {
    font-size: 20px;
    font-style: italic;
}
.icon-helth {
	width: 30px;
	height: 30px;
}
.icon-especial {
	width: 20px;
	height: 20px;
	padding-left:5px;
}
.description div {
	display: flex;
	gap: 5px;
	width: 100%;
	justify-content: space-between!importantm;
}
.text {
	font-style: italic;
	font-size: 11px;
}
.especial {
	width: 100%;
	font-size: 10px;
	background: rgb(0,0,0,0.2);
	padding: 2px;
	border-radius: 5px;
	display: flex;
	gap: 5px;
	justify-content: space-between!important;
}
.especial span {
	width: 95%;
	text-align: left;
}
.helth {
	font-size: 14px;
}
.text, .helth, .especial {
	display: flex;
	justify-content: center;
	align-items: center;
}
@media(max-width: 800px) {
	.deck {
		display: flex;
		flex-direction: column;
		justify-content: center;
		align-items: center;
	}
	.deck img {
		width: 130px;
		height: 170px;
	}
}
#menu {
	display: flex;
	gap: 10px;
}
#menu div {
	font-weight: bold;
	font-family: 'Mairon';
	text-shadow: 5px 5px 5px 5px #FFF;
	border: 1px solid #c5c5c5;
	padding: 5px;
	border-radius: 5px;
	cursor: pointer;
}