/* Reset */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  background-color: #f5f6fa;
  height: auto;
  overflow-y: auto;
}

.login-wrapper {
  display: flex;
  height: 100vh;
  flex-wrap: wrap;
}

/* Left Panel (Hidden on mobile) */
.left-panel {
  flex: 1;
  background: #1e1e2f;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  padding: 2rem;
  overflow: hidden;
}

.background-img {
  position: absolute;
  bottom: -50%;
  left: 0;
  width: 100%;
  height: 150%;
  background:
    linear-gradient(to top, #ff0000, rgba(159, 9, 32, 0.33)),
    url('https://bundlr.ottplay.com/images/login/logleft.png') no-repeat center bottom;
  background-size: cover;
  z-index: 0;
}

.slider {
  position: relative;
  z-index: 1;
  max-width: 400px;
  text-align: center;
}

.slider img {
  max-width: 100%;
  height: auto;
  margin-bottom: 1rem;
}

.slider p {
  font-size: 1rem;
  line-height: 1.5;
}

/* Right Panel */
.right-panel {
  flex: 1;
  background: linear-gradient(45deg, rgba(255, 230, 230, 0.6), rgba(230, 204, 255, 0.6));
  background-size: 400% 400%;
  animation: gradientAnimation 6s ease infinite;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  transition: all 0.3s ease;
}

.right-panel:hover {
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
  transform: translateY(-5px);
  animation: none;
}

.form-container {
  width: 100%;
  max-width: 400px;
  text-align: center;
  animation: fadeIn 0.6s ease-out;
}

.logo img {
  height: 80px;
  margin-bottom: 1rem;
}

h2 {
  margin-bottom: 1.5rem;
}

form input[type="text"],
form input[type="password"] {
  width: 100%;
  padding: 12px;
  margin-bottom: 1rem;
  border: 1px solid #ccc;
  border-radius: 6px;
  text-align: center;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

form input[type="text"]:focus,
form input[type="password"]:focus {
  border-color: #8e44ad;
  box-shadow: 0 0 8px rgba(142, 68, 173, 0.6);
}

.fancy-button {
  width: 100%;
  padding: 12px;
  background: linear-gradient(45deg, #ff6f61, #8e44ad);
  color: white;
  border: none;
  border-radius: 6px;
  font-weight: bold;
  cursor: pointer;
  transition: background 0.3s ease, transform 0.2s ease;
  font-size: 1rem;
  text-align: center;
}

.fancy-button:hover {
  background: linear-gradient(45deg, #8e44ad, #ff6f61);
  transform: translateY(-3px);
}

.fancy-button:focus {
  outline: none;
  box-shadow: 0 0 0 2px rgba(46, 134, 222, 0.5);
}

/* Face Recognition Panels */
#faceLoginSection,
#faceRegisterSection {
  margin-top: 2rem;
  background-color: rgba(255, 255, 255, 0.85);
  padding: 1.5rem;
  border-radius: 8px;
  box-shadow: 0 0 8px rgba(0, 0, 0, 0.1);
}

#faceLoginSection h2,
#faceRegisterSection h2 {
  margin-bottom: 1rem;
  color: #333;
}

video {
  width: 100%;
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  border: 2px solid #ccc;
  margin: 1rem auto;
  display: block;
}

button[type="button"] {
  width: 100%;
  padding: 12px;
  margin-top: 1rem;
  background: linear-gradient(45deg, #6a11cb, #2575fc);
  color: white;
  font-weight: bold;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 1rem;
  z-index: 10;
  position: relative;
}

button[type="button"]:hover {
  background: linear-gradient(45deg, #2575fc, #6a11cb);
}

/* Message Boxes */
.message-box,
.message.success {
  transition: opacity 0.5s ease;
  padding: 10px 20px;
  border-radius: 6px;
  text-align: center;
  font-weight: normal;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.message-box {
  background-color: #ffe0e0;
  color: #a00;
  position: relative;
  margin-bottom: 20px;
}

.message.success {
  background-color: #d4edda;
  color: #155724;
}

.message.success p {
  font-size: 1.2rem;
  font-weight: bold;
}

.close-btn {
  position: absolute;
  top: 5px;
  right: 10px;
  cursor: pointer;
  font-size: 18px;
  font-weight: bold;
  color: #a00;
  background: transparent;
  border: none;
}

.close-btn:hover {
  color: #721c24;
}

/* Login Methods Section */
.login-method-buttons {
  display: flex;
  gap: 10px;
  justify-content: center;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}

.method-btn {
  flex: 1;
  min-width: 45%;
}

.login-section {
  background-color: rgba(255, 255, 255, 0.95);
  padding: 1.5rem;
  border-radius: 10px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05);
  margin-top: 1rem;
}

.login-section h3 {
  margin-bottom: 1rem;
  color: #333;
  font-size: 1.2rem;
}

/* OTP and links */
.otp-links {
  display: flex;
  justify-content: space-between;
  margin-top: 10px;
}

.otp-links a {
  color: #2e86de;
  font-size: 0.85rem;
  text-decoration: underline;
  cursor: pointer;
}

/* Status Messages */
.status-msg {
  margin-top: 10px;
  font-weight: bold;
}

.status-msg.success {
  color: green;
}

.status-msg.error {
  color: red;
}

/* Gradient animation for background */
@keyframes gradientAnimation {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

/* Mobile Responsive Fixes */
@media screen and (max-width: 768px) {
  .left-panel {
    display: none;
  }

  .login-wrapper {
    flex-direction: column;
    height: auto;
  }

  .right-panel {
    flex: 1;
    width: 100vw;
    border-radius: 0;
    box-shadow: none;
    padding: 1.5rem;
    animation: none;
  }

  .form-container {
    max-width: 100%;
  }

  video {
    width: 100%;
    max-height: 200px;
    max-width: 100%;
    margin-bottom: 1rem;
    object-fit: cover
  }

  button[type="button"] {
    font-size: 1rem;
    padding: 12px;
  }

  .message-box,
  .message.success {
    font-size: 0.9rem;
    padding: 10px;
  }

  .close-btn {
    font-size: 16px;
  }
}
