/* style/login.css */

/* Base styles for the page content */
.page-login {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    color: #333333; /* Dark text for light background */
    background-color: #FFFFFF; /* Default body background */
}

.page-login__container {
    max-width: 1150px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Hero Section / Login Form */
.page-login__hero-section {
    padding-top: 10px; /* Small top padding, shared.css handles body padding-top */
    padding-bottom: 40px;
    text-align: center;
    background-color: #FFFFFF;
}

.page-login__main-title {
    font-size: 2.8em;
    font-weight: bold;
    color: #017439; /* Brand color for main title */
    margin-bottom: 20px;
    line-height: 1.2;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

.page-login__description {
    font-size: 1.1em;
    margin-bottom: 30px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.page-login__login-form-wrapper {
    background-color: #f9f9f9;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    max-width: 450px;
    margin: 0 auto 30px auto;
}

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

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

.page-login__form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
    color: #333333;
}

.page-login__form-input {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 1em;
    box-sizing: border-box;
}

.page-login__forgot-password-link {
    text-align: right;
    font-size: 0.9em;
    color: #017439;
    text-decoration: none;
    transition: color 0.3s ease;
}

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

.page-login__btn-login {
    background-color: #C30808; /* Custom login color */
    color: #FFFF00; /* Custom login font color */
    padding: 14px 25px;
    border: none;
    border-radius: 5px;
    font-size: 1.1em;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s ease;
    max-width: 100%; /* Ensure responsiveness */
    box-sizing: border-box;
    white-space: normal;
    word-wrap: break-word;
}

.page-login__btn-login:hover {
    background-color: #a00606;
}

.page-login__register-prompt {
    margin-top: 20px;
    font-size: 1em;
    color: #555555;
}

.page-login__btn-register {
    color: #C30808; /* Custom register color */
    text-decoration: none;
    font-weight: bold;
    transition: color 0.3s ease;
    max-width: 100%; /* Ensure responsiveness */
    box-sizing: border-box;
    white-space: normal;
    word-wrap: break-word;
}

.page-login__btn-register:hover {
    color: #a00606;
}

/* General Section Styles */
.page-login__section {
    padding: 60px 0;
}

.page-login__section-title {
    font-size: 2.2em;
    font-weight: bold;
    color: #017439;
    text-align: center;
    margin-bottom: 30px;
    line-height: 1.3;
}

.page-login__section-title--dark {
    color: #FFFFFF; /* White text for dark background sections */
}

.page-login__text-block {
    font-size: 1.05em;
    text-align: center;
    max-width: 900px;
    margin: 0 auto 40px auto;
    color: #333333;
}

.page-login__text-block--dark {
    color: #f0f0f0; /* Light text for dark background sections */
}

/* Why Choose Section */
.page-login__why-choose {
    background-color: #f5f5f5;
}

.page-login__features {
    display: flex;
    justify-content: center;
    gap: 30px;
    flex-wrap: wrap;
    margin-top: 40px;
}

.page-login__feature-item {
    background-color: #FFFFFF;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    max-width: 350px;
    text-align: left;
    transition: transform 0.3s ease;
}

.page-login__feature-item:hover {
    transform: translateY(-5px);
}

.page-login__feature-title {
    font-size: 1.4em;
    color: #017439;
    margin-bottom: 10px;
}

.page-login__feature-description {
    font-size: 0.95em;
    color: #555555;
}

/* Guide Section */
.page-login__guide-section {
    background-color: #FFFFFF;
}

.page-login__step-by-step {
    display: flex;
    flex-direction: column;
    gap: 40px;
    max-width: 900px;
    margin: 0 auto;
}

.page-login__step-item {
    background-color: #f9f9f9;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    text-align: left;
}

.page-login__step-title {
    font-size: 1.6em;
    color: #017439;
    margin-bottom: 15px;
}

.page-login__step-description {
    font-size: 1em;
    color: #555555;
}

.page-login__link-text {
    color: #017439;
    text-decoration: underline;
}

.page-login__link-text:hover {
    color: #005f2e;
}

/* Image Styles */
.page-login__image-container {
    margin: 30px auto;
    text-align: center;
    max-width: 100%;
    overflow: hidden;
    box-sizing: border-box;
}

.page-login img {
    max-width: 100%;
    height: auto;
    display: block;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    margin: 0 auto;
}

.page-login__image-caption {
    font-size: 0.9em;
    color: #777777;
    margin-top: 10px;
}

.page-login__image-caption--dark {
    color: #cccccc;
}

/* Troubleshoot Section */
.page-login__troubleshoot-section {
    background-color: #017439; /* Brand primary color for dark background */
    color: #FFFFFF;
}

.page-login__troubleshoot-cards {
    display: flex;
    justify-content: center;
    gap: 30px;
    flex-wrap: wrap;
    margin-top: 40px;
}

.page-login__card--troubleshoot {
    background-color: #FFFFFF;
    color: #333333;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
    max-width: 350px;
    text-align: left;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.page-login__card-title {
    font-size: 1.4em;
    color: #017439;
    margin-bottom: 15px;
}

.page-login__card-description {
    font-size: 0.95em;
    color: #555555;
    margin-bottom: 20px;
    flex-grow: 1;
}

.page-login__btn-secondary {
    background-color: #FFFFFF;
    color: #017439;
    border: 2px solid #017439;
    padding: 10px 20px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: bold;
    display: inline-block;
    transition: background-color 0.3s ease, color 0.3s ease;
    max-width: 100%; /* Ensure responsiveness */
    box-sizing: border-box;
    white-space: normal;
    word-wrap: break-word;
    text-align: center;
}

.page-login__btn-secondary:hover {
    background-color: #017439;
    color: #FFFFFF;
}

/* Security Tips Section */
.page-login__security-tips {
    background-color: #f5f5f5;
}

.page-login__security-list {
    list-style: none;
    padding: 0;
    max-width: 900px;
    margin: 40px auto 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 30px;
}

.page-login__security-list-item {
    background-color: #FFFFFF;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    text-align: left;
}

.page-login__list-item-title {
    font-size: 1.4em;
    color: #017439;
    margin-bottom: 10px;
}

.page-login__list-item-description {
    font-size: 0.95em;
    color: #555555;
}

/* Explore Games Section */
.page-login__explore-games {
    background-color: #FFFFFF;
}

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

.page-login__game-card {
    background-color: #f9f9f9;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    text-align: center;
    text-decoration: none;
    color: #333333;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.page-login__game-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.1);
}

.page-login__game-title {
    font-size: 1.3em;
    color: #017439;
    margin-bottom: 10px;
}

.page-login__game-description {
    font-size: 0.9em;
    color: #555555;
}

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

.page-login__btn-primary {
    background-color: #017439;
    color: #FFFFFF;
    padding: 14px 30px;
    border: none;
    border-radius: 5px;
    font-size: 1.1em;
    font-weight: bold;
    cursor: pointer;
    text-decoration: none;
    transition: background-color 0.3s ease;
    max-width: 100%; /* Ensure responsiveness */
    box-sizing: border-box;
    white-space: normal;
    word-wrap: break-word;
    text-align: center;
}

.page-login__btn-primary:hover {
    background-color: #005f2e;
}

/* Support Section */
.page-login__support-section {
    background-color: #017439;
    color: #FFFFFF;
}

/* Conclusion Section */
.page-login__conclusion-section {
    padding-bottom: 80px;
    background-color: #f5f5f5;
}

.page-login__cta-buttons--final {
    margin-top: 60px;
}


/* --- Responsive Styles --- */

/* Mobile: max-width: 768px */
@media (max-width: 768px) {
    .page-login {
        font-size: 16px;
        line-height: 1.6;
    }

    /* 1. Top section (title + CTA) padding/spacing/stacking */
    .page-login__hero-section {
        padding-top: 10px !important; /* Small top padding, shared.css handles body padding-top */
        padding-bottom: 30px;
    }

    .page-login__main-title {
        font-size: 2em;
        margin-bottom: 15px;
        padding: 0 15px; /* Add horizontal padding for titles */
    }

    .page-login__description {
        font-size: 1em;
        margin-bottom: 20px;
        padding: 0 15px;
    }

    .page-login__login-form-wrapper {
        padding: 20px;
        margin: 0 15px 20px 15px;
    }

    .page-login__form-input {
        padding: 10px;
    }

    /* 2. Single-column long text container padding, font size, max-width:100% */
    .page-login__section {
        padding: 40px 0;
    }

    .page-login__container {
        padding: 0 15px !important; /* Ensure content is within screen bounds */
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }

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

    .page-login__text-block {
        font-size: 0.95em;
        margin-bottom: 30px;
        padding: 0 10px;
    }

    .page-login__features {
        flex-direction: column;
        gap: 20px;
    }

    .page-login__feature-item {
        max-width: 100%;
        padding: 20px;
    }

    .page-login__step-by-step {
        gap: 30px;
    }

    .page-login__step-item {
        padding: 20px;
    }

    .page-login__step-title {
        font-size: 1.4em;
    }

    .page-login__security-list {
        grid-template-columns: 1fr;
        gap: 20px;
        margin: 30px auto 0 auto;
    }

    .page-login__security-list-item {
        padding: 20px;
    }

    .page-login__game-categories {
        grid-template-columns: 1fr;
        gap: 15px;
        margin-top: 30px;
    }

    .page-login__game-card {
        padding: 20px;
    }

    /* 3. General images and figures */
    .page-login img {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
        box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1); /* Smaller shadow for mobile */
    }
    
    .page-login__image-container {
        margin: 20px auto;
        padding: 0 15px !important; /* Ensure image containers also have padding */
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
        overflow: hidden !important; /* Prevent image overflow */
    }

    /* 4. Buttons and button containers */
    .page-login__btn-login,
    .page-login__btn-secondary,
    .page-login__btn-primary,
    .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: 12px 15px !important; /* Adjust padding for mobile buttons */
        font-size: 1em !important;
        margin-left: auto;
        margin-right: auto;
    }
    
    .page-login__cta-buttons,
    .page-login__button-group,
    .page-login__btn-container {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding-left: 15px;
        padding-right: 15px;
        flex-direction: column !important; /* Stack buttons vertically */
        gap: 15px !important; /* Adjust gap for stacked buttons */
        margin-top: 30px;
    }

    .page-login__troubleshoot-cards {
        flex-direction: column;
        gap: 20px;
    }

    .page-login__card--troubleshoot {
        max-width: 100%;
        padding: 25px;
    }
}