/* style/login.css */
:root {
  --primary-color: #FFD700; /* Gold */
  --secondary-color: #8B0000; /* Dark Red */
  --text-light: #ffffff;
  --text-dark: #333333;
  --bg-dark: #000000;
  --bg-light: #f8f9fa;
  --border-color: #444444;
  --card-bg-dark: rgba(255, 255, 255, 0.1);
}

.page-login {
  font-family: 'Arial', sans-serif;
  color: var(--text-light); /* Body is dark, so text is light */
  background-color: var(--bg-dark); /* Inherited from shared.css body */
  line-height: 1.6;
}

/* Ensure content is not hidden by fixed header */
.page-login__hero-section {
  padding-top: 120px; /* Desktop: Adjust based on actual header height */
  padding-bottom: 60px;
  background: linear-gradient(135deg, rgba(0,0,0,0.9) 0%, rgba(139,0,0,0.7) 100%);
  text-align: center;
  position: relative;
  overflow: hidden;
}

.page-login__container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  position: relative;
  z-index: 1;
}

.page-login__main-title {
  font-size: 3.2em;
  color: var(--primary-color);
  margin-bottom: 20px;
  font-weight: bold;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.page-login__description {
  font-size: 1.2em;
  color: var(--text-light);
  margin-bottom: 40px;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

.page-login__login-card {
  background: var(--card-bg-dark);
  padding: 40px;
  border-radius: 10px;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
  max-width: 500px;
  margin: 0 auto;
  border: 1px solid var(--border-color);
}

.page-login__card-title {
  font-size: 2em;
  color: var(--primary-color);
  margin-bottom: 30px;
  font-weight: 600;
}

.page-login__login-form {
  text-align: left;
}

.page-login__form-group {
  margin-bottom: 20px;
}

.page-login__form-label {
  display: block;
  margin-bottom: 8px;
  color: var(--text-light);
  font-weight: 500;
}

.page-login__form-input {
  width: calc(100% - 20px);
  padding: 12px 10px;
  border: 1px solid var(--border-color);
  border-radius: 5px;
  background-color: rgba(255, 255, 255, 0.05);
  color: var(--text-light);
  font-size: 1em;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.page-login__form-input::placeholder {
  color: rgba(255, 255, 255, 0.5);
}

.page-login__form-input:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(255, 215, 0, 0.3);
  outline: none;
}

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

.page-login__remember-me {
  display: flex;
  align-items: center;
}

.page-login__checkbox {
  margin-right: 8px;
  accent-color: var(--primary-color);
}

.page-login__checkbox-label {
  color: var(--text-light);
}

.page-login__forgot-password-link {
  color: var(--primary-color);
  text-decoration: none;
  transition: color 0.3s ease;
}

.page-login__forgot-password-link:hover {
  color: #fff;
  text-decoration: underline;
}

.page-login__submit-button {
  width: 100%;
  padding: 15px 20px;
  background-color: var(--primary-color);
  color: var(--text-dark);
  border: none;
  border-radius: 5px;
  font-size: 1.1em;
  font-weight: bold;
  cursor: pointer;
  transition: background-color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
  box-shadow: 0 4px 10px rgba(255, 215, 0, 0.3);
}

.page-login__submit-button:hover {
  background-color: #e6c200;
  transform: translateY(-2px);
  box-shadow: 0 6px 15px rgba(255, 215, 0, 0.4);
}

.page-login__submit-button:active {
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(255, 215, 0, 0.2);
}

.page-login__register-prompt {
  margin-top: 30px;
  font-size: 1em;
  color: var(--text-light);
}

.page-login__register-link {
  color: var(--primary-color);
  text-decoration: none;
  font-weight: bold;
  transition: color 0.3s ease;
}

.page-login__register-link:hover {
  color: #fff;
  text-decoration: underline;
}

.page-login__benefits-section,
.page-login__platform-overview-section,
.page-login__guide-section,
.page-login__faq-section {
  padding: 60px 0;
  background-color: var(--bg-dark);
}

.page-login__benefits-section {
  background-color: rgba(139, 0, 0, 0.1);
}

.page-login__section-title {
  font-size: 2.5em;
  color: var(--primary-color);
  margin-bottom: 20px;
  text-align: center;
  font-weight: bold;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
}

.page-login__section-description {
  font-size: 1.1em;
  color: rgba(255, 255, 255, 0.8);
  margin-bottom: 50px;
  text-align: center;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}

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

.page-login__benefit-item {
  background: var(--card-bg-dark);
  padding: 30px;
  border-radius: 10px;
  text-align: center;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
  border: 1px solid var(--border-color);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.page-login__benefit-icon {
  width: 80px;
  height: 80px;
  margin-bottom: 20px;
  object-fit: contain;
  filter: drop-shadow(0 0 5px rgba(255, 215, 0, 0.5));
}

.page-login__benefit-title {
  font-size: 1.4em;
  color: var(--primary-color);
  margin-bottom: 15px;
  font-weight: 600;
}

.page-login__benefit-text {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.95em;
}

.page-login__platform-overview-section {
  background-color: rgba(0, 0, 0, 0.8);
}

.page-login__overview-content {
  display: flex;
  gap: 40px;
  align-items: center;
  flex-wrap: wrap;
}

.page-login__overview-text {
  flex: 2;
  min-width: 300px;
  text-align: left;
}

.page-login__overview-image-wrapper {
  flex: 1;
  min-width: 300px;
  text-align: center;
}

.page-login__overview-image {
  max-width: 100%;
  height: auto;
  border-radius: 10px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
  border: 1px solid var(--border-color);
}

.page-login__overview-subtitle {
  font-size: 1.8em;
  color: var(--primary-color);
  margin-top: 30px;
  margin-bottom: 15px;
  font-weight: 600;
}

.page-login__overview-text p {
  color: rgba(255, 255, 255, 0.75);
  margin-bottom: 15px;
}

.page-login__game-list {
  list-style-type: disc;
  padding-left: 25px;
  color: rgba(255, 255, 255, 0.75);
  margin-bottom: 20px;
}

.page-login__game-list li {
  margin-bottom: 8px;
  font-size: 1em;
}

.page-login__game-list strong {
  color: var(--primary-color);
}

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

.page-login__cta-button {
  display: inline-block;
  padding: 15px 35px;
  background-color: var(--primary-color);
  color: var(--text-dark);
  text-decoration: none;
  border-radius: 5px;
  font-size: 1.1em;
  font-weight: bold;
  transition: background-color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
  box-shadow: 0 4px 10px rgba(255, 215, 0, 0.3);
  border: none;
  cursor: pointer;
}

.page-login__cta-button:hover {
  background-color: #e6c200;
  transform: translateY(-2px);
  box-shadow: 0 6px 15px rgba(255, 215, 0, 0.4);
}

.page-login__cta-button--secondary {
  background-color: var(--secondary-color);
  color: var(--text-light);
  box-shadow: 0 4px 10px rgba(139, 0, 0, 0.3);
}

.page-login__cta-button--secondary:hover {
  background-color: #6a0000;
  box-shadow: 0 6px 15px rgba(139, 0, 0, 0.4);
}

.page-login__guide-section {
  background-color: rgba(139, 0, 0, 0.2);
}

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

.page-login__step-item {
  background: var(--card-bg-dark);
  padding: 30px;
  border-radius: 10px;
  text-align: center;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
  border: 1px solid var(--border-color);
}

.page-login__step-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background-color: var(--primary-color);
  color: var(--text-dark);
  font-size: 2em;
  font-weight: bold;
  margin-bottom: 20px;
  box-shadow: 0 2px 8px rgba(255, 215, 0, 0.4);
}

.page-login__step-title {
  font-size: 1.5em;
  color: var(--primary-color);
  margin-bottom: 15px;
  font-weight: 600;
}

.page-login__step-text {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.95em;
}

.page-login__guide-final-cta {
  margin-top: 50px;
  text-align: center;
  font-size: 1.2em;
  color: var(--text-light);
}

.page-login__guide-link {
  color: var(--primary-color);
  text-decoration: none;
  font-weight: bold;
  transition: color 0.3s ease;
}

.page-login__guide-link:hover {
  color: #fff;
  text-decoration: underline;
}

.page-login__faq-section {
  background-color: var(--bg-dark);
  padding-bottom: 80px;
}

.page-login__faq-list {
  margin-top: 40px;
}

/* FAQ容器样式 */
.page-login__faq-item {
  margin-bottom: 15px;
  border-radius: 5px;
  overflow: hidden;
  border: 1px solid var(--border-color);
}

/* FAQ默认状态 - 答案隐藏 */
.page-login__faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1), padding 0.4s ease, opacity 0.4s ease;
  padding: 0 15px;
  opacity: 0;
  background: rgba(255, 255, 255, 0.05);
  color: rgba(255, 255, 255, 0.7);
}

/* FAQ展开状态 - 🚨 Sử dụng !important và đủ lớn max-height để đảm bảo mở rộng */
.page-login__faq-item.active .page-login__faq-answer {
  max-height: 2000px !important; /* 🚨 Sử dụng !important đảm bảo ưu tiên, giá trị đủ lớn để chứa mọi nội dung */
  padding: 20px 15px !important;
  opacity: 1;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 0 0 5px 5px;
}

/* Vấn đề kiểu dáng */
.page-login__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 20px;
  background: var(--card-bg-dark);
  border-radius: 5px;
  cursor: pointer;
  user-select: none;
  transition: background-color 0.3s ease, border-color 0.3s ease;
  position: relative;
  border-bottom: 1px solid transparent; /* default state */
}

.page-login__faq-item.active .page-login__faq-question {
  border-bottom-color: var(--border-color); /* Separator when active */
  border-radius: 5px 5px 0 0;
}

.page-login__faq-question:hover {
  background: rgba(255, 255, 255, 0.15);
}

.page-login__faq-question:active {
  background: rgba(255, 255, 255, 0.2);
}

/* Vấn đề tiêu đề kiểu dáng */
.page-login__faq-question h3 {
  margin: 0;
  padding: 0;
  flex: 1;
  font-size: 1.1em;
  font-weight: 600;
  line-height: 1.5;
  pointer-events: none; /* Ngăn chặn thẻ h3 chặn sự kiện nhấp */
  color: var(--primary-color);
}

/* Biểu tượng chuyển đổi */
.page-login__faq-toggle {
  font-size: 24px;
  font-weight: bold;
  line-height: 1;
  color: var(--primary-color);
  transition: transform 0.3s ease, color 0.3s ease;
  flex-shrink: 0;
  margin-left: 15px;
  pointer-events: none; /* Ngăn chặn biểu tượng chặn sự kiện nhấp */
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
}

.page-login__faq-item.active .page-login__faq-toggle {
  color: #fff;
  transform: rotate(45deg); /* Change to X or rotate for active state */
}

/* Responsive Design */
@media (max-width: 1024px) {
  .page-login__main-title {
    font-size: 2.8em;
  }
  .page-login__section-title {
    font-size: 2.2em;
  }
  .page-login__overview-content {
    flex-direction: column;
  }
  .page-login__overview-text, .page-login__overview-image-wrapper {
    min-width: unset;
    width: 100%;
  }
}

@media (max-width: 768px) {
  .page-login__hero-section {
    padding-top: 100px !important; /* Mobile: Adjust based on actual header height */
    padding-bottom: 40px;
    padding-left: 15px;
    padding-right: 15px;
  }
  .page-login__container {
    padding: 0 15px;
  }
  .page-login__main-title {
    font-size: 2.2em;
  }
  .page-login__description {
    font-size: 1em;
    margin-bottom: 30px;
  }
  .page-login__login-card {
    padding: 30px 20px;
  }
  .page-login__card-title {
    font-size: 1.8em;
    margin-bottom: 20px;
  }
  .page-login__form-input {
    width: calc(100% - 20px) !important;
  }
  .page-login__submit-button {
    font-size: 1em;
    padding: 12px 15px;
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    white-space: normal !important;
    word-wrap: break-word !important;
  }
  .page-login__register-prompt {
    margin-top: 20px;
  }

  .page-login__benefits-section, .page-login__platform-overview-section, .page-login__guide-section, .page-login__faq-section {
    padding: 40px 0;
  }
  .page-login__section-title {
    font-size: 1.8em;
    margin-bottom: 15px;
  }
  .page-login__section-description {
    font-size: 0.95em;
    margin-bottom: 30px;
  }
  .page-login__benefits-grid {
    grid-template-columns: 1fr;
  }
  .page-login__benefit-item {
    padding: 25px;
  }
  .page-login__benefit-icon {
    width: 60px;
    height: 60px;
  }
  .page-login__benefit-title {
    font-size: 1.2em;
  }
  .page-login__cta-buttons {
    flex-direction: column;
    gap: 15px;
  }
  .page-login__cta-button {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    white-space: normal !important;
    word-wrap: break-word !important;
    padding: 12px 25px;
    font-size: 1em;
  }
  .page-login__guide-steps {
    grid-template-columns: 1fr;
  }
  .page-login__step-item {
    padding: 25px;
  }
  .page-login__step-number {
    width: 50px;
    height: 50px;
    font-size: 1.8em;
  }
  .page-login__step-title {
    font-size: 1.3em;
  }
  .page-login__guide-final-cta {
    font-size: 1em;
  }

  /* FAQ mobile responsive */
  .page-login__faq-question {
    padding: 15px;
    flex-wrap: wrap;
  }
  .page-login__faq-question h3 {
    font-size: 1em;
    margin-bottom: 0;
    width: calc(100% - 40px);
  }
  .page-login__faq-toggle {
    margin-left: 10px;
    width: 24px;
    height: 24px;
    font-size: 20px;
  }
  .page-login__faq-answer {
    padding: 0 15px;
  }
  .page-login__faq-item.active .page-login__faq-answer {
    padding: 15px !important;
  }

  /* Image responsive */
  .page-login img {
    max-width: 100% !important;
    height: auto !important;
    display: block !important;
  }
  .page-login__section, .page-login__card, .page-login__container, .page-login__login-card, .page-login__overview-image-wrapper {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
    overflow: hidden !important;
  }
}