:root {
  --primary-color: #11A84E;
  --secondary-color: #22C768;
  --button-gradient: linear-gradient(180deg, #2AD16F 0%, #13994A 100%);
  --card-bg: #11271B;
  --bg-color: #08160F;
  --text-main: #F2FFF6;
  --text-secondary: #A7D9B8;
  --border-color: #2E7A4E;
  --glow: #57E38D;
  --gold: #F2C14E;
  --divider: #1E3A2A;
  --deep-green: #0A4B2C;
}

/* style/login.css */

/* Base styles for the page login scope */
.page-login {
  font-family: Arial, sans-serif;
  color: var(--text-main); /* Default text color for the page */
  background-color: var(--bg-color); /* From custom palette: #08160F */
  line-height: 1.6;
}

.page-login__container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  box-sizing: border-box;
}

.page-login__section-title {
  font-size: 2.5em;
  font-weight: bold;
  text-align: center;
  margin-bottom: 20px;
  color: var(--text-main); /* #F2FFF6 */
  line-height: 1.2;
}

.page-login__section-description {
  font-size: 1.1em;
  text-align: center;
  max-width: 800px;
  margin: 0 auto 40px auto;
  color: var(--text-secondary); /* #A7D9B8 */
  line-height: 1.6;
}

/* Hero Section */
.page-login__hero-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  overflow: hidden;
  padding: 60px 0;
  padding-top: 10px; /* Small top padding for the first section, body handles --header-offset */
  background: linear-gradient(180deg, #08160F 0%, #11271B 100%);
  color: var(--text-main);
}

.page-login__hero-image-wrapper {
  width: 100%;
  max-width: 1200px; /* Constrain image width */
  margin-bottom: 40px;
}

.page-login__hero-image {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 10px;
  box-shadow: 0 0 30px rgba(0, 0, 0, 0.5);
}

.page-login__hero-content {
  position: relative;
  z-index: 1;
  text-align: center;
  max-width: 800px;
  padding: 0 20px;
  box-sizing: border-box;
}

.page-login__main-title {
  font-size: clamp(2em, 5vw, 3.5em); /* Responsive font size */
  font-weight: 700;
  color: var(--gold); /* Use gold for prominence */
  margin-bottom: 15px;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.page-login__subtitle {
  font-size: 1.15em;
  color: var(--text-secondary);
  margin-bottom: 30px;
  line-height: 1.6;
}

.page-login__login-form-wrapper {
  background: var(--card-bg); /* #11271B */
  border-radius: 15px;
  padding: 40px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.4);
  max-width: 450px;
  margin: 0 auto;
  border: 1px solid var(--border-color); /* #2E7A4E */
}

.page-login__form-title {
  font-size: 1.8em;
  color: var(--text-main);
  margin-bottom: 25px;
  text-align: center;
  font-weight: 600;
}

.page-login__input-group {
  margin-bottom: 20px;
  text-align: left;
}

.page-login__label {
  display: block;
  margin-bottom: 8px;
  color: var(--text-secondary);
  font-size: 0.95em;
}

.page-login__input {
  width: 100%;
  padding: 12px 15px;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  background-color: rgba(0, 0, 0, 0.3);
  color: var(--text-main);
  font-size: 1em;
  box-sizing: border-box;
  transition: border-color 0.3s ease;
}

.page-login__input::placeholder {
  color: var(--text-secondary);
  opacity: 0.7;
}

.page-login__input:focus {
  border-color: var(--glow); /* #57E38D */
  outline: none;
}

.page-login__options {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 25px;
  font-size: 0.9em;
}

.page-login__remember-me {
  color: var(--text-secondary);
  display: flex;
  align-items: center;
}

.page-login__remember-me input {
  margin-right: 8px;
  accent-color: var(--primary-color); /* #11A84E */
}

.page-login__forgot-password {
  color: var(--primary-color); /* #11A84E */
  text-decoration: none;
  transition: color 0.3s ease;
}

.page-login__forgot-password:hover {
  color: var(--glow); /* #57E38D */
  text-decoration: underline;
}

.page-login__login-btn {
  width: 100%;
  padding: 14px 20px;
  border: none;
  border-radius: 8px;
  background: var(--button-gradient); /* linear-gradient(180deg, #2AD16F 0%, #13994A 100%) */
  color: #ffffff;
  font-size: 1.1em;
  font-weight: bold;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  box-shadow: 0 4px 15px rgba(17, 168, 78, 0.4);
  box-sizing: border-box; /* Crucial for responsive buttons */
  white-space: normal; /* Allow text to wrap */
  word-wrap: break-word; /* Break long words */
  max-width: 100%; /* Ensure button doesn't overflow */
}

.page-login__login-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(17, 168, 78, 0.6);
}

.page-login__register-prompt {
  text-align: center;
  margin-top: 25px;
  color: var(--text-secondary);
  font-size: 0.95em;
}

.page-login__register-link {
  color: var(--gold); /* #F2C14E */
  text-decoration: none;
  font-weight: bold;
  transition: color 0.3s ease;
}

.page-login__register-link:hover {
  color: var(--glow); /* #57E38D */
  text-decoration: underline;
}

/* Why Choose Section */
.page-login__why-choose-section {
  padding: 80px 0;
  background-color: var(--deep-green); /* #0A4B2C */
  color: var(--text-main);
  text-align: center;
}

.page-login__features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 30px;
  margin-top: 50px;
}

.page-login__feature-item {
  background: var(--card-bg); /* #11271B */
  padding: 30px;
  border-radius: 15px;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.3);
  border: 1px solid var(--divider); /* #1E3A2A */
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.page-login__feature-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
}

.page-login__feature-icon {
  width: 60px;
  height: 60px;
  margin-bottom: 20px;
  display: block;
  margin-left: auto;
  margin-right: auto;
  filter: drop-shadow(0 0 8px var(--primary-color)); /* Glow effect, not color change */
}

.page-login__feature-title {
  font-size: 1.4em;
  color: var(--gold);
  margin-bottom: 10px;
  font-weight: 600;
}

.page-login__feature-text {
  font-size: 0.95em;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* Game Showcase Section */
.page-login__game-showcase-section {
  padding: 80px 0;
  background-color: var(--bg-color); /* #08160F */
  color: var(--text-main);
}

.page-login__game-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 30px;
  margin-top: 50px;
}

.page-login__game-card {
  background: var(--card-bg); /* #11271B */
  border-radius: 15px;
  overflow: hidden;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.3);
  border: 1px solid var(--divider);
  display: flex;
  flex-direction: column;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.page-login__game-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
}

.page-login__game-card-image {
  width: 100%;
  height: 200px; /* Fixed height for consistency */
  object-fit: cover;
  display: block;
}

.page-login__game-card-title {
  font-size: 1.5em;
  color: var(--gold);
  padding: 15px 20px 5px;
  font-weight: 600;
}

.page-login__game-card-text {
  font-size: 0.9em;
  color: var(--text-secondary);
  padding: 0 20px 15px;
  flex-grow: 1; /* Ensures text takes available space */
  line-height: 1.5;
}

.page-login__game-card-btn {
  display: block;
  text-align: center;
  padding: 12px 20px;
  background: var(--button-gradient);
  color: #ffffff;
  text-decoration: none;
  font-weight: bold;
  border-radius: 0 0 15px 15px;
  transition: background 0.3s ease;
  box-sizing: border-box; /* Crucial for responsive buttons */
  white-space: normal; /* Allow text to wrap */
  word-wrap: break-word; /* Break long words */
  max-width: 100%; /* Ensure button doesn't overflow */
}

.page-login__game-card-btn:hover {
  background: linear-gradient(180deg, #13994A 0%, #2AD16F 100%); /* Slight inverse for hover */
}

/* Promotions Section */
.page-login__promotions-section {
  padding: 80px 0;
  background-color: var(--deep-green); /* #0A4B2C */
  color: var(--text-main);
  text-align: center;
}

.page-login__promo-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
  margin-top: 50px;
}

.page-login__promo-card {
  background: var(--card-bg); /* #11271B */
  border-radius: 15px;
  overflow: hidden;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.3);
  border: 1px solid var(--divider);
  display: flex;
  flex-direction: column;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.page-login__promo-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
}

.page-login__promo-card-image {
  width: 100%;
  height: 220px;
  object-fit: cover;
  display: block;
}

.page-login__promo-card-title {
  font-size: 1.4em;
  color: var(--gold);
  padding: 15px 20px 5px;
  font-weight: 600;
}

.page-login__promo-card-text {
  font-size: 0.9em;
  color: var(--text-secondary);
  padding: 0 20px 20px;
  flex-grow: 1;
  line-height: 1.5;
}

/* App Section */
.page-login__app-section {
  padding: 80px 0;
  background-color: var(--bg-color); /* #08160F */
  color: var(--text-main);
}

.page-login__app-layout {
  display: flex;
  align-items: center;
  gap: 50px;
}

.page-login__app-content {
  flex: 1;
  text-align: left;
}

.page-login__app-content .page-login__section-title,
.page-login__app-content .page-login__section-description {
  text-align: left;
}

.page-login__download-options {
  display: flex;
  align-items: center;
  gap: 30px;
  margin-top: 40px;
}

.page-login__qr-code {
  width: 200px;
  height: 200px;
  border-radius: 10px;
  box-shadow: 0 0 15px rgba(0, 0, 0, 0.3);
  border: 1px solid var(--border-color);
  object-fit: contain; /* Ensure QR code is fully visible */
}

.page-login__download-buttons {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.page-login__app-image-wrapper {
  flex: 1;
  text-align: center;
}

.page-login__app-image {
  max-width: 100%;
  height: auto;
  border-radius: 15px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  border: 1px solid var(--border-color);
}

/* FAQ Section */
.page-login__faq-section {
  padding: 80px 0;
  background-color: var(--deep-green); /* #0A4B2C */
  color: var(--text-main);
}

.page-login__faq-list {
  max-width: 900px;
  margin: 50px auto 0 auto;
}

.page-login__faq-item {
  background: var(--card-bg); /* #11271B */
  border: 1px solid var(--divider); /* #1E3A2A */
  border-radius: 10px;
  margin-bottom: 20px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.page-login__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 25px;
  font-size: 1.2em;
  font-weight: 600;
  color: var(--text-main);
  cursor: pointer;
  background-color: rgba(0, 0, 0, 0.2);
  transition: background-color 0.3s ease;
  list-style: none; /* For details/summary */
}

.page-login__faq-question::-webkit-details-marker {
  display: none;
}

.page-login__faq-item[open] .page-login__faq-question {
  background-color: rgba(0, 0, 0, 0.3);
  color: var(--gold);
}

.page-login__faq-qtext {
  flex-grow: 1;
}

.page-login__faq-toggle {
  font-size: 1.5em;
  font-weight: bold;
  color: var(--primary-color);
  margin-left: 15px;
  transition: transform 0.3s ease;
}

.page-login__faq-item[open] .page-login__faq-toggle {
  transform: rotate(45deg);
  color: var(--gold);
}

.page-login__faq-answer {
  padding: 0 25px 20px;
  font-size: 1em;
  color: var(--text-secondary);
  line-height: 1.6;
}

.page-login__faq-answer p {
  margin-bottom: 0;
}

/* CTA Section */
.page-login__cta-section {
  padding: 80px 0;
  background-color: var(--bg-color); /* #08160F */
  color: var(--text-main);
  text-align: center;
}

.page-login__cta-buttons {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-top: 50px;
}

.page-login__btn-primary,
.page-login__btn-secondary {
  display: inline-block;
  padding: 14px 30px;
  border-radius: 8px;
  font-size: 1.1em;
  font-weight: bold;
  text-decoration: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  box-sizing: border-box; /* Crucial for responsive buttons */
  white-space: normal; /* Allow text to wrap */
  word-wrap: break-word; /* Break long words */
  max-width: 100%; /* Ensure button doesn't overflow */
}

.page-login__btn-primary {
  background: var(--button-gradient);
  color: #ffffff;
  box-shadow: 0 4px 15px rgba(17, 168, 78, 0.4);
  border: 2px solid transparent;
}

.page-login__btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(17, 168, 78, 0.6);
}

.page-login__btn-secondary {
  background: none;
  color: var(--primary-color); /* #11A84E */
  border: 2px solid var(--primary-color);
  box-shadow: 0 4px 15px rgba(17, 168, 78, 0.2);
}

.page-login__btn-secondary:hover {
  transform: translateY(-2px);
  background-color: rgba(17, 168, 78, 0.1);
  box-shadow: 0 6px 20px rgba(17, 168, 78, 0.3);
}

/* Responsive Styles */
@media (max-width: 1024px) {
  .page-login__hero-section {
    padding-top: 10px;
  }

  .page-login__app-layout {
    flex-direction: column;
    gap: 30px;
  }

  .page-login__app-content {
    text-align: center;
  }

  .page-login__app-content .page-login__section-title,
  .page-login__app-content .page-login__section-description {
    text-align: center;
  }

  .page-login__download-options {
    justify-content: center;
  }
}

@media (max-width: 768px) {
  .page-login__hero-section {
    padding: 40px 0;
    padding-top: 10px !important; /* Small top padding for the first section */
  }

  .page-login__main-title {
    font-size: 2em;
  }

  .page-login__subtitle {
    font-size: 1em;
  }

  .page-login__login-form-wrapper {
    padding: 30px;
    max-width: 100%;
    margin: 0 15px; /* Add horizontal margin */
  }

  .page-login__section-title {
    font-size: 1.8em;
  }

  .page-login__section-description {
    font-size: 0.95em;
    padding: 0 15px;
  }

  .page-login__why-choose-section,
  .page-login__game-showcase-section,
  .page-login__promotions-section,
  .page-login__app-section,
  .page-login__faq-section,
  .page-login__cta-section {
    padding: 50px 0;
  }

  .page-login__features-grid,
  .page-login__game-cards-grid,
  .page-login__promo-cards-grid {
    grid-template-columns: 1fr;
    gap: 25px;
  }

  .page-login__feature-item,
  .page-login__game-card,
  .page-login__promo-card {
    margin: 0 15px;
  }

  /* Mobile image responsiveness */
  .page-login img {
    max-width: 100% !important;
    height: auto !important;
    display: block !important;
  }
  
  .page-login__hero-image-wrapper,
  .page-login__app-image-wrapper,
  .page-login__qr-code,
  .page-login__game-card-image,
  .page-login__promo-card-image {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
  }

  /* Mobile button responsiveness */
  .page-login__login-btn,
  .page-login__game-card-btn,
  .page-login__btn-primary,
  .page-login__btn-secondary,
  .page-login a[class*="button"],
  .page-login a[class*="btn"] {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    white-space: normal !important;
    word-wrap: break-word !important;
    padding-left: 15px;
    padding-right: 15px;
  }

  .page-login__cta-buttons,
  .page-login__download-buttons {
    flex-direction: column;
    gap: 15px;
    margin: 30px 15px 0 15px; /* Add horizontal margin */
  }

  .page-login__download-options {
    flex-direction: column;
    gap: 20px;
    margin-top: 30px;
  }

  .page-login__faq-list {
    margin-top: 30px;
    margin: 30px 15px 0 15px; /* Add horizontal margin */
  }

  .page-login__faq-question {
    font-size: 1.1em;
    padding: 15px 20px;
  }

  .page-login__faq-answer {
    padding: 0 20px 15px;
  }

  .page-login__container {
    padding: 0 15px; /* Adjust container padding for mobile */
  }
}