 * {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 500;
}

.container {
  display: flex;
  width: 100%;
  min-height: 100vh;
}

/* Sidebar */
.side-bar {
  width: 400px;
  background-image: url(./images/bg-main-desktop.png);
  background-size: cover;
  background-position: center;
  padding: 2rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 2rem;
  position: relative;
}

/* Front Card */
.card {
  position: relative;
  left: 120px;
  background-image: url(./images/bg-card-front.png);
  background-size: cover;
  border-radius: 10px;
  padding: 20px;
  color: white;
  width: 100%;
  max-width: 350px;
  height: 200px;
  z-index: 2;
}

.card h3 {
  letter-spacing: 2px;
  font-weight: 100;
  
}

.card img {
  width: 60px;
}

.values {
  display: flex;
  justify-content: space-between;
  margin-top: 20px;
  font-size: 0.9rem;
}

/* Back Card */
.card2 {
  position: relative;
  left: 200px;
  background-image: url(./images/bg-card-back.png);
  background-size: cover;
  border-radius: 10px;
  width: 300px;
  height: 170px;
  color: white;
}

.card2 img {
  display: none; 
}

.cvc {
  position: absolute;
  top: 50%;
  right: 2rem;
  transform: translateY(-50%);
  font-size: 0.85rem;
  letter-spacing: 2px;
  color: white;
}

/* Main Form */
.main-form {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: hsl(0, 0%, 100%);
  padding: 2rem;
}

form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  width: 100%;
  max-width: 400px;
}

label {
  font-size: 0.8rem;
  letter-spacing: 1px;
  color: hsl(278, 68%, 11%);
  margin-bottom: -0.5rem;
}

input {
  padding: 0.8rem;
  border: 1px solid hsl(270, 3%, 87%);
  border-radius: 8px;
  font-family: 'Space Grotesk', sans-serif;
}

input:focus {
  outline: none;
  border-color: hsl(278, 94%, 30%);
}




button {
  background-color: hsl(278, 68%, 11%);
  color: white;
  padding: 1rem;
  border: none;
  border-radius: 8px;
  font-family: 'Space Grotesk', sans-serif;
  cursor: pointer;
  margin-top: 1rem;
}
.label{
  display: flex;
  gap: 3rem;
}

.inputs{
  display: flex;
 gap: 1rem;
}
#exp, #expp{
  width: 20%;
}

#cvc-inp{
  width:60%;
}

.error {
    color: red;
    font-size: 0.9em;
    margin-top: 2px;
    display: block;
}

.msg {
  display: none;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 2rem;
  
  font-size: 1.2em;
  text-align: center;
}
.msg h2 {
  color: hsl(278, 68%, 11%);
  letter-spacing: 3px;
  font-weight: 400;
}
.msg p{
  color: hsl(0, 0%, 81%);
  font-size: 0.9em;
}
.msg button{
  width: 100%;
}
/* Responsive Layout */
@media (max-width: 900px) {
  .container {
  flex-direction: column;
  }

  .side-bar {
    width: 100%;
    min-height: 240px;
    background-image: url(./images/bg-main-mobile.png);
    flex-direction: row;
    justify-content: center;
    padding-top: 100px;
    gap: 0;
  }

  .card {
  position: absolute;
  left: 20px;
  top: 130px;
  z-index: 2;
  }

.card2 {
  position: absolute;
  left: 170px;
  top: 30px;
}

.main-form {
  padding-top: 80px;
  padding-bottom: 40px;
}
    }

@media (max-width: 480px) {
.card,
.card2 {
  transform: scale(0.85);
}
.card {
  left: 10px;
  top: 100px;
}
.card2 {
  left: 170px;
  top: 20px;
}
}
