/* style/login.css */
:root {
    --primary-color: #017439;
    --secondary-color: #FFFFFF;
    --button-login-bg: #C30808;
    --button-login-text: #FFFFFF; /* Adjusted for WCAG AA contrast, original #FFFF00 had poor contrast with #C30808 */
    --text-dark: #333333;
    --text-light: #ffffff;
    --background-light: #f9f9f9;
    --border-color: #e0e0e0;
}

.page-login {
    font-family: 'Arial', sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background-color: var(--secondary-color); /* Default light background */
}

.page-login__dark-bg {
    background-color: var(--primary-color);
    color: var(--text-light);
}

.page-login__light-bg {
    background-color: var(--secondary-color);
    color: var(--text-dark);
}

/* Fixed Header Offset */
.page-login__hero-section {
    padding-top: var(--header-offset, 120px); /* Ensures content is not hidden by fixed header */
    padding-bottom: 60px;
}

.page-login__section {
    padding: 60px 20px;
    text-align: center;
}

.page-login__container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

.page-login__section-title {
    font-size: 38px;
    font-weight: bold;
    margin-bottom: 20px;
    color: inherit; /* Inherit color from parent section */
}

.page-login__section-description {
    font-size: 18px;
    margin-bottom: 40px;
    line-height: 1.8;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    color: inherit;
}

/* HERO Section (Login Specific) */
.page-login__hero-section {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    background-color: var(--primary-color);
    color: var(--text-light);
}

.page-login__hero-container {
    position: relative;
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 30px;
}

.page-login__hero-image {
    width: 100%;
    margin-bottom: 30px;
}

.page-login__hero-image img {
    width: 100%;
    height: auto;
    max-width: 100%;
    display: block;
    border-radius: 8px;
    object-fit: cover;
}

.page-login__hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    width: 100%;
    max-width: 600px;
}

.page-login__main-heading {
    font-size: 44px;
    margin-bottom: 20px;
    line-height: 1.2;
    color: var(--text-light);
}

.page-login__intro-text {
    font-size: 20px;
    margin-bottom: 30px;
    color: var(--text-light);
}

.page-login__login-form-wrapper {
    background: rgba(255, 255, 255, 0.15);
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2);
    width: 100%;
    max-width: 450px;
    margin: 0 auto;
}

.page-login__login-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.page-login__form-group {
    text-align: left;
}

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

.page-login__form-input {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 6px;
    background-color: rgba(0, 0, 0, 0.2);
    color: var(--text-light);
    font-size: 16px;
    outline: none;
    transition: border-color 0.3s ease, background-color 0.3s ease;
}

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

.page-login__form-input:focus {
    border-color: var(--secondary-color);
    background-color: rgba(0, 0, 0, 0.3);
}

.page-login__form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
}

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

.page-login__forgot-password-link:hover {
    color: #ffd700;
}

.page-login__remember-me {
    color: var(--text-light);
    display: flex;
    align-items: center;
    gap: 5px;
}

.page-login__remember-me input[type="checkbox"] {
    accent-color: var(--primary-color);
}

.page-login__submit-button {
    display: inline-block;
    padding: 15px 40px;
    background-color: var(--button-login-bg);
    color: var(--button-login-text);
    text-decoration: none;
    border: none;
    border-radius: 8px;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
    width: 100%;
    box-sizing: border-box;
}

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

.page-login__register-text {
    margin-top: 25px;
    font-size: 16px;
    color: var(--text-light);
}

.page-login__register-link {
    color: #ffd700; /* Highlighted color for register link */
    text-decoration: none;
    font-weight: bold;
    transition: color 0.3s ease;
}

.page-login__register-link:hover {
    color: var(--secondary-color);
}

/* Why Choose Us Section */
.page-login__why-choose-us .page-login__section-title, 
.page-login__why-choose-us .page-login__section-description {
    color: var(--text-dark);
}

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

.page-login__feature-item {
    background: #ffffff;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid var(--border-color);
}

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

.page-login__feature-item img {
    width: 100%;
    max-width: 250px;
    height: auto;
    margin-bottom: 20px;
    border-radius: 8px;
    object-fit: cover;
}

.page-login__feature-title {
    font-size: 24px;
    font-weight: bold;
    margin-bottom: 15px;
    color: var(--primary-color);
}

.page-login__feature-text {
    font-size: 16px;
    color: var(--text-dark);
}

/* Guide Section */
.page-login__guide .page-login__section-title, 
.page-login__guide .page-login__section-description {
    color: var(--text-light);
}

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

.page-login__step-item {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 30px;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.page-login__step-icon {
    width: 60px;
    height: 60px;
    background: var(--secondary-color);
    color: var(--primary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    font-weight: bold;
    margin: 0 auto 20px auto;
}

.page-login__step-title {
    font-size: 22px;
    font-weight: bold;
    margin-bottom: 10px;
    color: var(--text-light);
}

.page-login__step-text {
    font-size: 16px;
    color: rgba(255, 255, 255, 0.8);
}

.page-login__troubleshooting {
    margin-top: 60px;
    padding: 30px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.page-login__troubleshooting-title {
    font-size: 26px;
    font-weight: bold;
    margin-bottom: 15px;
    color: var(--text-light);
}

.page-login__troubleshooting-text {
    font-size: 18px;
    margin-bottom: 30px;
    color: rgba(255, 255, 255, 0.9);
}

/* Games Access Section */
.page-login__games-access .page-login__section-title, 
.page-login__games-access .page-login__section-description {
    color: var(--text-dark);
}

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

.page-login__game-card {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid var(--border-color);
}

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

.page-login__game-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
}

.page-login__game-title {
    font-size: 22px;
    font-weight: bold;
    margin: 20px 15px 10px 15px;
    color: var(--primary-color);
}

.page-login__game-title a {
    color: var(--primary-color);
    text-decoration: none;
}

.page-login__game-title a:hover {
    text-decoration: underline;
}

.page-login__game-description {
    font-size: 16px;
    color: var(--text-dark);
    padding: 0 15px 20px 15px;
}

/* Promotions Section */
.page-login__promotions .page-login__section-title, 
.page-login__promotions .page-login__section-description {
    color: var(--text-light);
}

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

.page-login__promotion-card {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    overflow: hidden;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.page-login__promotion-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.page-login__promotion-card img {
    width: 100%;
    
    object-fit: cover;
    display: block;
}

.page-login__promotion-title {
    font-size: 22px;
    font-weight: bold;
    margin: 20px 15px 10px 15px;
    color: var(--text-light);
}

.page-login__promotion-text {
    font-size: 16px;
    color: rgba(255, 255, 255, 0.8);
    padding: 0 15px 15px 15px;
}

.page-login__promotion-link {
    display: inline-block;
    padding: 10px 20px;
    background: var(--secondary-color);
    color: var(--primary-color);
    text-decoration: none;
    border-radius: 6px;
    font-weight: bold;
    margin-bottom: 20px;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.page-login__promotion-link:hover {
    background: #ffd700;
    color: var(--primary-color);
}

/* Security & Support Section */
.page-login__security-support .page-login__section-title, 
.page-login__security-support .page-login__section-description {
    color: var(--text-dark);
}

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

.page-login__security-item {
    background: #ffffff;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    text-align: center;
    border: 1px solid var(--border-color);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.page-login__security-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.page-login__security-item img {
    width: 100%;
    max-width: 200px;
    height: auto;
    margin-bottom: 20px;
    border-radius: 8px;
    object-fit: cover;
}

.page-login__security-title {
    font-size: 22px;
    font-weight: bold;
    margin-bottom: 15px;
    color: var(--primary-color);
}

.page-login__security-text {
    font-size: 16px;
    color: var(--text-dark);
}

/* FAQ Section */
.page-login__faq-section .page-login__section-title, 
.page-login__faq-section .page-login__section-description {
    color: var(--text-dark);
}

.page-login__faq-list {
    margin-top: 40px;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

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

/* 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;
}

/* FAQ展开状态 - 🚨 使用!important和足够大的max-height确保一定能展开 */
.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: var(--background-light);
  border-radius: 0 0 5px 5px;
}

/* 问题样式 */
.page-login__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 20px;
  background: #fff;
  border: 1px solid var(--border-color);
  border-radius: 5px;
  cursor: pointer;
  user-select: none;
  transition: background-color 0.3s ease, border-color 0.3s ease;
  position: relative;
}

.page-login__faq-question:hover {
  background: var(--background-light);
  border-color: #d0d0d0;
}

.page-login__faq-question:active {
  background: #eeeeee;
}

/* 问题标题样式 */
.page-login__faq-question h3 {
  margin: 0;
  padding: 0;
  flex: 1;
  font-size: 18px;
  font-weight: 600;
  line-height: 1.5;
  pointer-events: none; /* 防止h3标签阻止点击事件 */
  color: var(--text-dark);
}

/* 切换图标 */
.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; /* 防止图标阻止点击事件 */
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
}

.page-login__faq-item.active .page-login__faq-toggle {
  color: var(--primary-color);
  transform: rotate(45deg); /* Optional: rotate for 'x' effect */
}

/* Latest News Section */
.page-login__latest-news .page-login__section-title, 
.page-login__latest-news .page-login__section-description {
    color: var(--text-light);
}

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

.page-login__news-card {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    overflow: hidden;
    text-align: left;
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.page-login__news-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.page-login__news-card img {
    width: 100%;
    
    object-fit: cover;
    display: block;
}

.page-login__news-title {
    font-size: 20px;
    font-weight: bold;
    margin: 20px 15px 10px 15px;
}

.page-login__news-title a {
    color: var(--text-light);
    text-decoration: none;
}

.page-login__news-title a:hover {
    text-decoration: underline;
}

.page-login__news-summary {
    font-size: 15px;
    color: rgba(255, 255, 255, 0.8);
    padding: 0 15px;
    margin-bottom: 15px;
}

.page-login__news-date {
    display: block;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.6);
    padding: 0 15px 20px 15px;
}

/* CTA Buttons */
.page-login__cta-buttons {
    margin-top: 50px;
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    overflow: hidden;
}

.page-login__btn-primary,
.page-login__btn-secondary,
.page-login__troubleshooting-button {
    display: inline-block;
    padding: 15px 35px;
    text-decoration: none;
    border-radius: 8px;
    font-size: 18px;
    font-weight: bold;
    transition: all 0.3s ease;
    box-sizing: border-box;
    max-width: 100%;
    white-space: normal;
    word-wrap: break-word;
}

.page-login__btn-primary {
    background: var(--button-login-bg);
    color: var(--button-login-text);
    border: 2px solid var(--button-login-bg);
}

.page-login__btn-primary:hover {
    background: #a30606;
    border-color: #a30606;
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.2);
}

.page-login__btn-secondary,
.page-login__troubleshooting-button {
    background: var(--secondary-color);
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.page-login__btn-secondary:hover,
.page-login__troubleshooting-button:hover {
    background: var(--primary-color);
    color: var(--secondary-color);
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.2);
}

/* Responsive Design */
@media (max-width: 1024px) {
    .page-login__main-heading {
        font-size: 38px;
    }
    .page-login__intro-text {
        font-size: 18px;
    }
    .page-login__section-title {
        font-size: 32px;
    }
    .page-login__section-description {
        font-size: 16px;
    }
}

@media (max-width: 768px) {
    .page-login__hero-section {
        padding-top: var(--header-offset, 120px) !important;
        padding-bottom: 40px;
        padding-left: 15px;
        padding-right: 15px;
    }

    .page-login__main-heading {
        font-size: 32px;
        margin-bottom: 15px;
    }
    .page-login__intro-text {
        font-size: 16px;
        margin-bottom: 25px;
    }

    .page-login__login-form-wrapper {
        padding: 30px 20px;
    }
    
    .page-login__submit-button,
    .page-login__btn-primary,
    .page-login__btn-secondary,
    .page-login__troubleshooting-button {
        padding: 12px 25px;
        font-size: 16px;
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        white-space: normal !important;
        word-wrap: break-word !important;
    }

    .page-login__cta-buttons {
        flex-direction: column;
        gap: 15px;
        padding-left: 15px;
        padding-right: 15px;
    }

    .page-login__section {
        padding: 40px 15px;
    }

    .page-login__section-title {
        font-size: 28px;
        margin-bottom: 15px;
    }

    .page-login__section-description {
        font-size: 15px;
        margin-bottom: 30px;
    }

    /* Images responsive */
    .page-login img {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
    }
    .page-login__section,
    .page-login__card,
    .page-login__container,
    .page-login__feature-item,
    .page-login__step-item,
    .page-login__game-card,
    .page-login__promotion-card,
    .page-login__security-item,
    .page-login__news-card {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding-left: 15px;
        padding-right: 15px;
    }

    .page-login__feature-item img,
    .page-login__security-item img {
        
    }

    .page-login__game-card img,
    .page-login__promotion-card img,
    .page-login__news-card img {
        
    }

    .page-login__faq-question {
        padding: 15px;
        flex-wrap: wrap;
    }
    
    .page-login__faq-question h3 {
        font-size: 15px;
        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;
    }
}