@import url("https://fonts.googleapis.com/css?family=Montserrat:400,800");

* {
  box-sizing: border-box;
}

body {
  font-family: "Montserrat", sans-serif;
  background: #f6f5f7;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  height: 100vh;
  margin: -20px 0 50px;
  margin-top: 20px;
}

h1 {
  font-weight: bold;
  margin: 0;
}

p {
  font-size: 14px;
  font-weight: 100;
  line-height: 20px;
  letter-spacing: 0.5px;
  margin: 20px 0 30px;
}

span {
  font-size: 12px;
}

.container {
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 14px 28px rgba(0, 0, 0, 0.2), 0 10px 10px rgba(0, 0, 0, 0.2);
  position: relative;
  overflow: hidden;
  width: 768px;
  max-width: 100%;
  min-height: 480px;
}

.form-container form {
  background: #fff;
  display: flex;
  flex-direction: column;
  padding: 0 50px;
  height: 100%;
  justify-content: center;
  align-items: center;
  text-align: center;
}

.form-container input {
  background: #eee;
  border: none;
  padding: 12px 15px;
  margin: 8px 0;
  width: 100%;
}

button {
  border-radius: 8px;
  border: none;
  background-color: #3a3a3a;
  color: #fff;
  font-size: 12px;
  font-weight: bold;
  padding: 12px 45px;
  letter-spacing: 1px;
  text-transform: uppercase;
  transition: background-color 0.3s ease;
}

button:hover {
  background-color: #2a2a2a;
}

.form-container {
  position: absolute;
  top: 0;
  height: 100%;
  left: 50%;
  width: 50%;
  z-index: 2;
}

.overlay-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 50%;
  height: 100%;
  z-index: 100;
}

.overlay {
  background: linear-gradient(to bottom, red, black);
  color: #fff;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
  position: relative;
  height: 100%;
  width: 100%;
}

.overlay-panel {
  position: absolute;
  top: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 0 40px;
  height: 100%;
  width: 100%;
  text-align: center;
}

@media (max-width: 768px) {
  .container {
    width: 100%;
    min-height: auto;
    height: auto;
    flex-direction: column;
    box-shadow: none;
  }

  .form-container {
    position: relative;
    width: 100%;
    left: 0;
    height: auto;
    z-index: 2;
  }

  .overlay-container {
    position: relative;
    width: 100%;
    height: 300px; /* atau sesuaikan tinggi sesuai kebutuhan */
    z-index: 1;
  }

  .overlay {
    height: 100%;
    width: 100%;
    position: absolute;
  }

  .overlay-panel {
    padding: 20px;
  }

  body {
    height: auto;
    margin: 0;
    padding: 20px;
  }
}
