/* BET30 Login & Register Modal Redesign */

/* Backdrop */
.login-modal {
  background: rgba(0, 0, 0, 0.85); /* Darker backdrop */
  backdrop-filter: blur(8px);
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 2147483647 !important; /* Max z-index to ensure it covers everything */
  display: none; /* Hidden by default */
  align-items: center;
  justify-content: center;
}

.login-modal.open {
  display: flex;
}

/* Modal Content Container */
.login-modal .login-content {
  background: #030f2f;
  background-size: cover;
  border-radius: 12px;
  box-shadow: 0 0 50px rgba(0, 0, 0, 0.9), inset 0 0 100px rgba(0, 0, 0, 0.6);
  padding: 35px 25px 25px; /* Reduced padding for compactness */
  width: 400px;
  max-width: 95vw;
  max-height: 95vh; /* Ensure it fits in viewport */
  overflow-y: auto; /* Allow scrolling on small screens */
  color: #fff;
  /* overflow: visible;  Removed to allow scrolling, decoration needs handling */
  position: relative;
  display: flex;
  flex-direction: column;
  scrollbar-width: thin;
  scrollbar-color: #cfaa56 #2a0538;
}

/* Custom Scrollbar */
.login-modal .login-content::-webkit-scrollbar {
  width: 4px;
}
.login-modal .login-content::-webkit-scrollbar-track {
  background: transparent;
}
.login-modal .login-content::-webkit-scrollbar-thumb {
  background-color: #cfaa56;
  border-radius: 3px;
}

/* Liana Decoration (Top) - Adjusted to stay visible or be inside */
.modal-decoration-top {
  position: absolute;
  top: 0; /* Moved inside visually */
  left: 0;
  width: 100%;
  height: 40px; /* Reduced height */
  background-size: 100% auto;
  z-index: 15;
  pointer-events: none;
  opacity: 0.8;
}

/* Close Button */
.login-close {
  position: absolute;
  top: 10px; /* Moved inside */
  right: 10px; /* Moved inside */
  background: #a90000;
  border: 2px solid #fff;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.5);
  z-index: 20;
  border-radius: 50%;
  width: 28px; /* Smaller */
  height: 28px; /* Smaller */
  font-size: 18px;
  line-height: 24px;
  text-align: center;
  color: #fff;
  cursor: pointer;
  transition: transform 0.2s;
}

.login-close:hover {
  background: #d40000;
  transform: scale(1.1);
}

/* Logo */
.login-modal .login-logo img {
  display: block;
  margin: 10px auto 10px; /* Reduced margins */
  max-width: 120px; /* Reduced size */
  height: auto;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.6));
  position: relative;
  z-index: 16;
}

/* Title */
.login-modal .login-title {
  font-family: "Oswald", sans-serif;
  color: #ffd700;
  text-align: center;
  font-size: 22px; /* Reduced size */
  margin-bottom: 15px;
  padding: 0;
  text-transform: uppercase;
  letter-spacing: 1px;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8);
}

/* Form Inputs */
.login-modal .login-label {
  color: #e0e0e0;
  text-shadow: 0 1px 2px #000;
  font-family: "Oswald", sans-serif;
  letter-spacing: 1px;
  font-size: 13px; /* Slightly smaller */
  margin-bottom: 4px;
  display: block;
}

.login-modal .form-input {
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid #6b5c38;
  border-radius: 6px;
  color: #ffd700;
  font-family: "Inter", sans-serif;
  padding: 10px; /* Compact padding */
  margin-bottom: 12px; /* Compact margin */
  width: 100%;
  box-sizing: border-box;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.5);
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
  font-size: 14px;
}

.login-modal .form-input:focus {
  outline: none;
  border-color: #ffd700;
  background: rgba(0, 0, 0, 0.6);
  box-shadow: 0 0 8px rgba(255, 215, 0, 0.3), inset 0 2px 4px rgba(0, 0, 0, 0.5);
}

.login-modal .form-input::placeholder {
  color: rgba(255, 255, 255, 0.3);
}

/* Custom Button (BET30 Style) */
.btn-login-custom {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 12px; /* Reduced padding */
  background: linear-gradient(to bottom, #ffd700 0%, #ff8c00 100%);
  border: 1px solid #ffd700;
  border-bottom: 4px solid #b86e00;
  border-radius: 8px;
  color: #3e1f00;
  font-family: "Oswald", sans-serif;
  font-weight: 700;
  font-size: 16px; /* Reduced font size */
  text-transform: uppercase;
  cursor: pointer;
  margin-top: 10px; /* Reduced margin */
  transition: transform 0.1s, filter 0.2s, border-bottom-width 0.1s,
    margin-top 0.1s;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.4);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);
}

.btn-login-custom:hover {
  filter: brightness(1.1);
  transform: translateY(-2px);
}

.btn-login-custom:active {
  transform: translateY(2px);
  border-bottom-width: 0;
  margin-top: 14px; /* Compensate for border loss (10 + 4) */
  box-shadow: none;
}

/* Helper elements within button - kept for structure compatibility but hidden if using CSS only */
.btn-login-custom .btn-l,
.btn-login-custom .btn-r {
  display: none;
}
.btn-login-custom .btn-c {
  background: none;
  width: auto;
  flex-grow: 0;
}

/* Meta Links */
.login-modal .login-meta {
  color: #bbb;
  font-size: 12px; /* Slightly smaller */
  margin-bottom: 10px; /* Reduced margin */
  text-align: center;
}

.login-modal .login-meta a {
  color: #ffd700;
  text-decoration: none;
  font-weight: 700;
}

.login-modal .login-meta a:hover {
  text-decoration: underline;
}

/* Password Toggle */
.login-modal .password-wrap {
  position: relative;
  width: 100%;
}
.login-modal .password-toggle {
  position: absolute;
  right: 10px;
  top: 12px;
  background: none;
  border: none;
  color: #cfaa56;
  cursor: pointer;
  font-size: 1.2em;
}

/* Checkbox Style Override */
.login-modal input[type="checkbox"] {
  accent-color: #ffd700;
}
