:root {
    --primary-color: #FFD700; /* Gold */
    --secondary-color: #000080; /* Dark Blue */
    --text-color-dark: #333333;
    --text-color-light: #ffffff;
    --border-color: #e0e0e0;
    --background-light: #f4f4f4; /* Body background */
    --background-dark: #000080;
}

.page-login {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-color-dark); /* Default text color for light body background */
    background-color: var(--background-light); /* Ensure consistency if body background changes */
}

/* Fixed header offset */
.page-login__hero-section {
    padding-top: var(--header-offset, 120px); /* Apply header offset */
}

/* HERO Section */
.page-login__hero-section {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding-bottom: 60px; /* Adjust padding-top as it's handled by var(--header-offset) */
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: var(--text-color-light);
}

.page-login__hero-container {
    position: relative;
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 0 20px;
    box-sizing: border-box;
}

.page-login__hero-image {
    width: 100%;
    margin-bottom: 30px;
    border-radius: 8px; /* Added border-radius for image */
    overflow: hidden; /* Ensure border-radius applies to image */
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

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

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

.page-login__hero-content h1 {
    font-size: 3.2em;
    margin-bottom: 20px;
    line-height: 1.2;
    color: var(--text-color-light);
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.4);
}

.page-login__hero-description {
    font-size: 1.1em;
    margin-bottom: 30px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    color: rgba(255, 255, 255, 0.9);
}

.page-login__cta-button {
    display: inline-block;
    padding: 15px 40px;
    background: var(--primary-color);
    color: var(--secondary-color); /* Gold button with dark blue text for contrast */
    text-decoration: none;
    border-radius: 8px;
    font-size: 1.2em;
    font-weight: bold;
    margin-top: 20px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    border: 2px solid var(--primary-color);
}

.page-login__cta-button:hover {
    background: var(--text-color-light); /* White background on hover */
    color: var(--secondary-color); /* Dark blue text on hover */
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

/* General Section Styling */
.page-login__container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 40px 20px;
    box-sizing: border-box;
}

.page-login__section-title {
    font-size: 2.2em;
    text-align: center;
    margin-bottom: 15px;
    color: var(--secondary-color);
    font-weight: 700;
}

.page-login__section-description {
    font-size: 1.1em;
    text-align: center;
    margin-bottom: 40px;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
    color: var(--text-color-dark);
}

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

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

.page-login__dark-bg .page-login__section-title,
.page-login__dark-bg .page-login__section-description {
    color: var(--text-color-light);
}

/* Login Form Section */
.page-login__form-section {
    padding: 60px 0;
}

.page-login__login-form {
    background: var(--text-color-light);
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    max-width: 500px;
    margin: 0 auto;
}

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

.page-login__form-label {
    display: block;
    margin-bottom: 10px;
    font-weight: 600;
    color: var(--text-color-dark);
    font-size: 1.05em;
}

.page-login__form-input {
    width: 100%;
    padding: 14px 18px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 1em;
    box-sizing: border-box;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

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

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

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

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

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

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

.page-login__forgot-password-link:hover {
    color: var(--primary-color);
    text-decoration: underline;
}

.page-login__btn-submit {
    width: 100%;
    padding: 16px;
    background: var(--primary-color);
    color: var(--secondary-color); /* Gold button with dark blue text for contrast */
    border: none;
    border-radius: 8px;
    font-size: 1.2em;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    display: block; /* Ensure button takes full width */
    text-align: center; /* Center text within button */
    position: relative; /* For link overlay */
}

.page-login__btn-submit:hover {
    background: var(--text-color-light); /* White background on hover */
    color: var(--secondary-color); /* Dark blue text on hover */
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

/* Link inside button needs to cover the whole button area */
.page-login__btn-submit-link {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: inherit; /* Inherit color from parent button */
    text-decoration: none;
}

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

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

.page-login__register-link:hover {
    color: var(--primary-color);
    text-decoration: underline;
}

/* Security Section */
.page-login__security-section {
    padding: 60px 0;
}

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

.page-login__feature-item {
    background: rgba(255, 255, 255, 0.1);
    padding: 30px;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.page-login__feature-icon {
    width: 100px;
    height: 100px;
    object-fit: contain;
    margin-bottom: 20px;
    border-radius: 50%; /* Make icons circular */
    background-color: rgba(255, 255, 255, 0.2);
    padding: 15px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

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

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


/* FAQ Section */
.page-login__faq-section {
    padding: 60px 0;
}

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

/* FAQ容器样式 */
.page-login__faq-item {
  margin-bottom: 15px;
  border-radius: 8px; /* Slightly larger radius */
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}

/* 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 20px; /* Adjusted padding */
  opacity: 0;
}

/* FAQ展开状态 - 🚨 使用!important和足够大的max-height确保一定能展开 */
.page-login__faq-item.active .page-login__faq-answer {
  max-height: 2000px !important; /* 🚨 Use !important to ensure priority, value large enough for any content */
  padding: 20px !important; /* Adjusted padding */
  opacity: 1;
  background: #fdfdfd; /* Slightly off-white for distinction */
  border-top: 1px solid var(--border-color);
  border-radius: 0 0 8px 8px;
}

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

.page-login__faq-question:hover {
  background: #f5f5f5;
  border-color: #d0d0d0;
}

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

/* 问题标题样式 */
.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; /* Prevent h3 from blocking click event */
  color: var(--secondary-color); /* Dark blue for question title */
}

/* 切换图标 */
.page-login__faq-toggle {
  font-size: 28px; /* Slightly larger toggle */
  font-weight: bold;
  line-height: 1;
  color: var(--primary-color); /* Gold color for toggle */
  transition: transform 0.3s ease, color 0.3s ease;
  flex-shrink: 0;
  margin-left: 15px;
  pointer-events: none; /* Prevent icon from blocking click event */
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px; /* Slightly larger */
  height: 32px; /* Slightly larger */
}

.page-login__faq-item.active .page-login__faq-toggle {
  color: var(--secondary-color); /* Dark blue when active */
  transform: rotate(180deg); /* Rotate for minus sign */
}

.page-login__support-cta {
    text-align: center;
    margin-top: 40px;
    font-size: 1.1em;
    color: var(--text-color-dark);
}

.page-login__support-link {
    color: var(--secondary-color);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

.page-login__support-link:hover {
    color: var(--primary-color);
    text-decoration: underline;
}

/* CTA Download Section */
.page-login__cta-download {
    padding: 60px 0;
    text-align: center;
}

.page-login__download-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 40px;
    flex-wrap: wrap; /* Allow wrapping for mobile */
}

.page-login__btn-download {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 15px 30px;
    border-radius: 8px;
    font-size: 1.1em;
    font-weight: bold;
    text-decoration: none;
    transition: all 0.3s ease;
    min-width: 200px; /* Ensure buttons are not too small */
    box-sizing: border-box;
    max-width: 100%; /* For mobile responsiveness */
}

.page-login__btn-primary {
    background: var(--primary-color);
    color: var(--secondary-color);
    border: 2px solid var(--primary-color);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.page-login__btn-primary:hover {
    background: var(--text-color-light);
    color: var(--secondary-color);
    border-color: var(--secondary-color);
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.page-login__btn-secondary {
    background: var(--secondary-color);
    color: var(--primary-color);
    border: 2px solid var(--secondary-color);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.page-login__btn-secondary:hover {
    background: var(--primary-color);
    color: var(--secondary-color);
    border-color: var(--primary-color);
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

/* Responsive Design for Mobile */
@media (max-width: 768px) {
    .page-login {
        font-size: 15px;
        line-height: 1.55;
    }

    /* Hero Section */
    .page-login__hero-section {
        padding-top: var(--header-offset, 120px) !important; /* Mobile header offset */
        padding-bottom: 40px;
    }

    .page-login__hero-content h1 {
        font-size: 2.2em;
        margin-bottom: 15px;
    }

    .page-login__hero-description {
        font-size: 1em;
        margin-bottom: 25px;
        padding: 0 10px;
    }

    .page-login__cta-button {
        padding: 12px 30px;
        font-size: 1.1em;
        max-width: 90%;
        width: 100%;
        box-sizing: border-box;
    }

    /* General Sections */
    .page-login__container {
        padding: 30px 15px;
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }

    .page-login__section-title {
        font-size: 1.8em;
        margin-bottom: 10px;
    }

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

    /* Login Form */
    .page-login__login-form {
        padding: 30px 20px;
    }

    .page-login__form-input {
        padding: 12px 15px;
    }

    .page-login__btn-submit {
        padding: 14px;
        font-size: 1.1em;
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        white-space: normal !important;
        word-wrap: break-word !important;
    }

    /* Security Features */
    .page-login__security-features {
        grid-template-columns: 1fr;
        gap: 25px;
    }

    .page-login__feature-icon {
        width: 80px;
        height: 80px;
        padding: 10px;
    }

    .page-login__feature-title {
        font-size: 1.2em;
    }

    /* FAQ Section */
    .page-login__faq-question {
        padding: 15px;
        flex-wrap: wrap;
    }

    .page-login__faq-question h3 {
        font-size: 1em;
        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;
    }

    /* Download Buttons */
    .page-login__download-buttons {
        flex-direction: column;
        gap: 15px;
    }

    .page-login__btn-download {
        padding: 12px 20px;
        font-size: 1em;
        min-width: unset;
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
        white-space: normal !important;
        word-wrap: break-word !important;
    }

    /* Image responsiveness */
    .page-login img {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
    }

    .page-login__section,
    .page-login__card,
    .page-login__container {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding-left: 15px;
        padding-right: 15px;
    }
}

/* Ensure all links within buttons are full size for clickability */
.page-login__btn-submit-link,
.page-login__btn-download {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}