/* http://meyerweb.com/eric/tools/css/reset/ 
   v2.0 | 20110126
   License: none (public domain)
*/

html,
body,
div,
span,
applet,
object,
iframe,
h1,
h2,
h3,
h4,
h5,
h6,
p,
blockquote,
pre,
a,
abbr,
acronym,
address,
big,
cite,
code,
del,
dfn,
em,
img,
ins,
kbd,
q,
s,
samp,
small,
strike,
strong,
sub,
sup,
tt,
var,
b,
u,
i,
center,
dl,
dt,
dd,
ol,
ul,
li,
fieldset,
form,
label,
legend,
table,
caption,
tbody,
tfoot,
thead,
tr,
th,
td,
article,
aside,
canvas,
details,
embed,
figure,
figcaption,
footer,
header,
hgroup,
menu,
nav,
output,
ruby,
section,
summary,
time,
mark,
audio,
video {
  margin: 0;
  padding: 0;
  border: 0;
  font-size: 100%;
  font: inherit;
  vertical-align: baseline;
}
/* HTML5 display-role reset for older browsers */
article,
aside,
details,
figcaption,
figure,
footer,
header,
hgroup,
menu,
nav,
section {
  display: block;
}
body {
  line-height: 1;
}
ol,
ul {
  list-style: none;
}
blockquote,
q {
  quotes: none;
}
blockquote:before,
blockquote:after,
q:before,
q:after {
  content: '';
  content: none;
}
table {
  border-collapse: collapse;
  border-spacing: 0;
}

html {
  font-family: sans-serif;
  box-sizing: border-box;
  font-size: 62.5%;
  padding: 0;
  margin: 0;
}

body {
  font-size: 1.6rem;
  background-image: linear-gradient(to right, #434343 0%, black 100%);
  color: #f7f7f7;
}

main {
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  margin-block: 4rem;
  max-width: 1200px;
}

.title {
  font-size: 4rem;
}

.intro {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2rem;
}

.subtitle {
  font-size: 2rem;
}

.winning-message {
  font-size: 3rem;
  text-align: center;
  /* margin-top: 2rem; */
}

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

.card-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-gap: 0.5rem;
  max-width: 350px;
  justify-items: center;
  margin: 4rem auto;
}

.card-container {
  width: 80px;
  height: 90px;
  perspective: 1000px;
  cursor: pointer;
  border: none;
  background: none;
  padding: 0;
}

.card {
  position: relative;
  width: 100%;
  height: 100%;
  transition: transform 0.6s;
  transform-style: preserve-3d;
}

.front,
.back {
  position: absolute;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
  display: flex;
  justify-content: center;
  align-items: center;
  border-radius: 10px;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
}

.front {
  background-color: #f7f7f7;
}

.back {
  background-color: transparent;
  border: 1px solid pink;
  transform: rotateY(180deg);
  font-size: 3.5rem;
}

.card-container:disabled {
  cursor: not-allowed;
}

.card-container.flipped .card {
  transform: rotateY(180deg);
}

.game-scores {
  display: flex;
  gap: 4rem;
  font-size: 2rem;
}

.reset-button {
  margin: 0 auto;
  padding: 1rem 2rem;
  background-color: transparent;
  color: #f7f7f7;
  border: 1px solid #f7f7f7;
  border-radius: 0.5rem;
  font-size: 1.6rem;
  cursor: pointer;
  margin-top: 2rem;
}
