/* style/login.css */

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

/* General page styles */
.page-login {
    font-family: 'Arial', sans-serif;
    line-height: 1.6;
    color: var(--hy88-text-main); /* Default text color for dark backgrounds */
    background-color: var(--hy88-bg-main); /* Default background for the main content area */
}

.page-login__dark-bg {
    background-color: var(--hy88-bg-main);
    color: var(--hy88-text-main);
}

.page-login__light-bg {
    background-color: #f0f0f0; /* A lighter background for contrast */
    color: #333333; /* Darker text for light backgrounds */
}

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

.page-login__section-title {
    font-size: clamp(28px, 4vw, 48px);
    font-weight: 700;
    color: var(--hy88-gold);
    text-align: center;
    margin-bottom: 20px;
    line-height: 1.2;
}

.page-login__section-description {
    font-size: 18px;
    color: var(--hy88-text-secondary);
    text-align: center;
    max-width: 800px;
    margin: 0 auto 40px auto;
}

/* Hero Section */
.page-login__hero-section {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 0;
    overflow: hidden;
    text-align: center;
    background-color: var(--hy88-bg-main);
}

.page-login__hero-image-wrapper {
    width: 100%;
    max-height: 500px; /* Limit height for hero image */
    overflow: hidden;
    margin-bottom: 40px;
}

.page-login__hero-image {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
    min-height: 200px; /* Ensure minimum size */
}

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

.page-login__main-title {
    font-size: clamp(32px, 5vw, 56px);
    font-weight: 800;
    color: var(--hy88-gold);
    margin-bottom: 20px;
    line-height: 1.2;
    text-shadow: 0 0 10px rgba(87, 227, 141, 0.5);
}

.page-login__tagline {
    font-size: 20px;
    color: var(--hy88-text-secondary);
    margin-bottom: 40px;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.page-login__login-form-wrapper {
    background-color: var(--hy88-bg-card);
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
    border: 1px solid var(--hy88-border);
    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;
    color: var(--hy88-text-main);
    font-weight: 600;
}

.page-login__form-input {
    width: 100%;
    padding: 14px 18px;
    border: 1px solid var(--hy88-border);
    border-radius: 8px;
    background-color: var(--hy88-deep-green);
    color: var(--hy88-text-main);
    font-size: 16px;
    box-sizing: border-box;
}

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

.page-login__form-input:focus {
    border-color: var(--hy88-secondary);
    outline: none;
    box-shadow: 0 0 0 3px rgba(34, 199, 104, 0.3);
}

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

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

.page-login__forgot-password:hover {
    color: var(--hy88-glow);
}

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

.page-login__checkbox {
    appearance: none;
    width: 18px;
    height: 18px;
    border: 1px solid var(--hy88-border);
    border-radius: 4px;
    background-color: var(--hy88-deep-green);
    cursor: pointer;
    position: relative;
}

.page-login__checkbox:checked {
    background-color: var(--hy88-secondary);
    border-color: var(--hy88-secondary);
}

.page-login__checkbox:checked::before {
    content: '✓';
    color: var(--hy88-text-main);
    font-size: 14px;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.page-login__checkbox-label {
    color: var(--hy88-text-secondary);
    cursor: pointer;
}

.page-login__btn-primary {
    display: inline-block;
    padding: 15px 30px;
    border-radius: 8px;
    font-size: 18px;
    font-weight: 700;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
    background: var(--hy88-btn-gradient);
    color: #ffffff; /* Ensure white text on button gradient */
    border: none;
    box-shadow: 0 4px 15px rgba(34, 199, 104, 0.4);
}

.page-login__btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(34, 199, 104, 0.6);
    opacity: 0.9;
}

.page-login__btn-secondary {
    display: inline-block;
    padding: 15px 30px;
    border-radius: 8px;
    font-size: 18px;
    font-weight: 700;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
    background-color: transparent;
    color: var(--hy88-secondary);
    border: 2px solid var(--hy88-secondary);
}

.page-login__btn-secondary:hover {
    background-color: var(--hy88-secondary);
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(34, 199, 104, 0.4);
}

.page-login__login-button {
    margin-top: 20px;
}

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

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

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

/* Benefits Section */
.page-login__benefits-section {
    padding: 80px 0;
    background-color: #f5f5f5; /* Light background for contrast */
    color: #333333;
}

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

.page-login__benefit-card {
    background-color: #ffffff;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    text-align: center;
    border: 1px solid #e0e0e0;
}

.page-login__benefit-icon {
    width: 100%;
    max-width: 250px;
    height: auto;
    margin-bottom: 20px;
    min-width: 200px;
    min-height: 200px;
    object-fit: cover;
}

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

.page-login__benefit-text {
    font-size: 16px;
    color: #555555;
}

.page-login__view-promos {
    display: block;
    width: fit-content;
    margin: 50px auto 0 auto;
}

/* Guide Section */
.page-login__guide-section {
    padding: 80px 0;
    background-color: var(--hy88-bg-main);
    color: var(--hy88-text-main);
}

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

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

.page-login__step-number {
    font-size: 48px;
    font-weight: 800;
    color: var(--hy88-gold);
    margin-bottom: 15px;
}

.page-login__step-title {
    font-size: 24px;
    font-weight: 700;
    color: var(--hy88-text-main);
    margin-bottom: 15px;
}

.page-login__step-text {
    font-size: 16px;
    color: var(--hy88-text-secondary);
}

.page-login__note-text {
    margin-top: 50px;
    font-size: 16px;
    color: var(--hy88-text-secondary);
    text-align: center;
}

/* Security Tips Section */
.page-login__security-tips-section {
    padding: 80px 0;
    background-color: #f5f5f5;
    color: #333333;
}

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

.page-login__tip-card {
    background-color: #ffffff;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    text-align: left;
    border: 1px solid #e0e0e0;
}

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

.page-login__tip-text {
    font-size: 16px;
    color: #555555;
}

.page-login__contact-support {
    display: block;
    width: fit-content;
    margin: 50px auto 0 auto;
}

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

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

.page-login__faq-item {
    background-color: var(--hy88-bg-card);
    border: 1px solid var(--hy88-border);
    border-radius: 10px;
    margin-bottom: 15px;
    overflow: hidden;
}

.page-login__faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    cursor: pointer;
    font-size: 18px;
    font-weight: 600;
    color: var(--hy88-text-main);
    background-color: var(--hy88-deep-green);
    transition: background-color 0.3s ease;
}

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

.page-login__faq-item[open] > .page-login__faq-question {
    background-color: var(--hy88-primary);
    color: #ffffff;
}

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

.page-login__faq-toggle {
    font-size: 24px;
    font-weight: bold;
    margin-left: 15px;
    color: var(--hy88-gold);
}

.page-login__faq-item[open] > .page-login__faq-question .page-login__faq-toggle {
    color: #ffffff;
}

.page-login__faq-answer {
    padding: 20px 25px;
    font-size: 16px;
    color: var(--hy88-text-secondary);
    border-top: 1px solid var(--hy88-divider);
    background-color: var(--hy88-bg-card);
}

/* CTA Section */
.page-login__cta-section {
    padding: 80px 0;
    text-align: center;
    background-color: #f5f5f5;
    color: #333333;
}

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

.page-login__action-button {
    min-width: 200px;
}

/* Responsive Styles */
@media (max-width: 1024px) {
    .page-login__hero-image-wrapper {
        max-height: 400px;
    }
}

@media (max-width: 768px) {
    .page-login__hero-section {
        padding: 40px 0;
    }
    .page-login__hero-image-wrapper {
        max-height: 300px;
        margin-bottom: 20px;
    }
    .page-login__hero-image {
        min-width: 200px !important;
        min-height: 200px !important;
    }
    .page-login__main-title {
        font-size: clamp(28px, 6vw, 40px);
    }
    .page-login__tagline {
        font-size: 16px;
        margin-bottom: 30px;
    }
    .page-login__login-form-wrapper {
        padding: 30px 20px;
    }
    .page-login__form-group {
        margin-bottom: 15px;
    }
    .page-login__form-options {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    .page-login__btn-primary,
    .page-login__btn-secondary {
        font-size: 16px;
        padding: 12px 25px;
    }
    .page-login__register-text {
        font-size: 14px;
    }

    .page-login__section-title {
        font-size: clamp(24px, 5vw, 36px);
    }
    .page-login__section-description {
        font-size: 16px;
        margin-bottom: 30px;
    }
    .page-login__benefits-section,
    .page-login__guide-section,
    .page-login__security-tips-section,
    .page-login__faq-section,
    .page-login__cta-section {
        padding: 50px 0;
    }
    .page-login__benefits-grid,
    .page-login__guide-steps,
    .page-login__tips-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    .page-login__benefit-title,
    .page-login__step-title,
    .page-login__tip-title {
        font-size: 20px;
    }
    .page-login__benefit-text,
    .page-login__step-text,
    .page-login__tip-text {
        font-size: 15px;
    }
    .page-login__faq-question {
        font-size: 16px;
        padding: 15px 20px;
    }
    .page-login__faq-answer {
        font-size: 15px;
        padding: 15px 20px;
    }
    .page-login__cta-buttons {
        flex-direction: column;
        gap: 15px;
    }
    .page-login__action-button {
        width: 100% !important;
        max-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__container {
        padding-left: 15px;
        padding-right: 15px;
    }
    /* Ensure all images are responsive */
    .page-login img {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
        display: block !important;
        box-sizing: border-box !important;
    }
    .page-login__hero-image {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
        min-width: 200px !important;
        min-height: 200px !important;
    }
    /* Ensure content containers don't overflow */
    .page-login__hero-section,
    .page-login__benefits-section,
    .page-login__guide-section,
    .page-login__security-tips-section,
    .page-login__faq-section,
    .page-login__cta-section {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        overflow-x: hidden;
    }
    .page-login__faq-toggle {
        font-size: 20px;
    }
}

/* Contrast Fixes (Emergency) */
.page-login__contrast-fix {
    background: #ffffff !important;
    color: #333333 !important;
    border: 1px solid #e0e0e0 !important;
}

.page-login__text-contrast-fix {
    color: #333333 !important;
    text-shadow: none !important;
}