/* style/login.css */
/* Base styles for the page-login scope */
.page-login {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-main, #F2FFF6); /* Default text color, will be adjusted by smart contrast */
    background: var(--background-color, #08160F); /* Default background color */
}

/* Smart contrast adjustments */
.page-login__dark-bg {
    background: var(--card-bg, #11271B); /* Card BG color */
    color: var(--text-main, #F2FFF6);
}

.page-login__light-bg {
    background: #ffffff; /* Example light background */
    color: #333333;
}

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

/* Section styling */
.page-login__hero-section {
    position: relative;
    display: flex;
    flex-direction: column; /* Default to column for mobile first */
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    padding-top: 10px; /* Small top padding, body handles header offset */
    background: var(--background-color, #08160F);
    color: var(--text-main, #F2FFF6);
    text-align: center;
    overflow: hidden; /* Ensure no overflow */
}

.page-login__hero-content {
    z-index: 1;
    max-width: 800px;
    margin-bottom: 40px;
}

.page-login__hero-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.2; /* Subtle background image */
    z-index: 0;
}

.page-login__main-title {
    font-size: clamp(2em, 5vw, 3.5em); /* Responsive font size for H1, no fixed large value */
    font-weight: bold;
    line-height: 1.2;
    margin-bottom: 20px;
    color: var(--text-main, #F2FFF6);
}

.page-login__description {
    font-size: 1.1em;
    margin-bottom: 30px;
    color: var(--text-secondary, #A7D9B8);
}

.page-login__form-wrapper {
    background: var(--card-bg, #11271B);
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    max-width: 400px;
    width: 100%;
    box-sizing: border-box;
    margin: 0 auto;
    z-index: 1;
}

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

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

.page-login__form-input {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid var(--border-color, #2E7A4E);
    border-radius: 5px;
    background: var(--background-color, #08160F);
    color: var(--text-main, #F2FFF6);
    box-sizing: border-box;
}

.page-login__form-input::placeholder {
    color: var(--text-secondary, #A7D9B8);
}

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

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

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

.page-login__checkbox-label {
    color: var(--text-secondary, #A7D9B8);
}

.page-login__forgot-password {
    color: var(--text-secondary, #A7D9B8);
    text-decoration: none;
}

.page-login__forgot-password:hover {
    color: var(--primary-color, #11A84E);
    text-decoration: underline;
}

.page-login__btn-primary {
    display: block;
    width: 100%;
    padding: 12px 20px;
    border: none;
    border-radius: 5px;
    background: linear-gradient(180deg, #2AD16F 0%, #13994A 100%);
    color: #ffffff;
    font-size: 1.1em;
    font-weight: bold;
    cursor: pointer;
    text-align: center;
    text-decoration: none;
    transition: background 0.3s ease;
    box-sizing: border-box;
}

.page-login__btn-primary:hover {
    background: linear-gradient(180deg, #13994A 0%, #2AD16F 100%);
}

.page-login__register-text {
    margin-top: 20px;
    color: var(--text-secondary, #A7D9B8);
    font-size: 0.9em;
}

.page-login__register-link {
    color: var(--primary-color, #11A84E);
    text-decoration: none;
    font-weight: bold;
}

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

.page-login__section-title {
    font-size: 2.5em;
    font-weight: bold;
    margin-bottom: 20px;
    text-align: center;
    color: var(--text-main, #F2FFF6);
}

.page-login__section-description {
    font-size: 1.1em;
    text-align: center;
    margin-bottom: 40px;
    color: var(--text-secondary, #A7D9B8);
}

/* Benefits Section */
.page-login__benefits-section {
    padding: 80px 20px;
    background: var(--card-bg, #11271B); /* Dark background for this section */
    color: var(--text-main, #F2FFF6);
}

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

.page-login__benefit-card {
    background: var(--background-color, #08160F);
    padding: 30px;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    border: 1px solid var(--border-color, #2E7A4E);
}

.page-login__benefit-icon {
    width: 200px; /* Min size */
    height: 200px;
    object-fit: contain;
    margin: 0 auto 20px auto;
    border-radius: 5px; /* Added for general images */
}

.page-login__benefit-title {
    font-size: 1.4em;
    font-weight: bold;
    margin-bottom: 10px;
    color: var(--text-main, #F2FFF6);
}

.page-login__benefit-text {
    font-size: 0.95em;
    color: var(--text-secondary, #A7D9B8);
}

/* Games Section */
.page-login__games-section {
    padding: 80px 20px;
    background: var(--background-color, #08160F);
    color: var(--text-main, #F2FFF6);
}

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

.page-login__game-card {
    background: var(--card-bg, #11271B);
    border-radius: 10px;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    border: 1px solid var(--border-color, #2E7A4E);
}

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

.page-login__game-image {
    width: 100%;
    height: 180px;
    object-fit: cover;
}

.page-login__game-title {
    font-size: 1.2em;
    font-weight: bold;
    margin: 15px 15px 5px;
    color: var(--text-main, #F2FFF6);
}

.page-login__game-text {
    font-size: 0.9em;
    margin: 0 15px 15px;
    color: var(--text-secondary, #A7D9B8);
    flex-grow: 1; /* Ensure text takes up available space */
}

.page-login__games-cta {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
}

.page-login__btn-secondary {
    display: inline-block;
    padding: 12px 25px;
    border: 2px solid var(--primary-color, #11A84E);
    border-radius: 5px;
    background: transparent;
    color: var(--primary-color, #11A84E);
    font-size: 1em;
    font-weight: bold;
    cursor: pointer;
    text-align: center;
    text-decoration: none;
    transition: background 0.3s ease, color 0.3s ease;
    box-sizing: border-box;
}

.page-login__btn-secondary:hover {
    background: var(--primary-color, #11A84E);
    color: #ffffff;
}

/* App Download Section */
.page-login__app-download-section {
    padding: 80px 20px;
    background: var(--background-color, #08160F);
    color: var(--text-main, #F2FFF6);
}

.page-login__app-container {
    display: flex;
    flex-direction: column; /* Default to column */
    align-items: center;
    gap: 40px;
    text-align: center;
}

.page-login__app-image {
    width: 100%;
    max-width: 400px;
    height: auto;
    object-fit: contain;
    border-radius: 10px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.4);
}

.page-login__app-content {
    max-width: 600px;
}

.page-login__app-features {
    list-style: none;
    padding: 0;
    margin-top: 30px;
    text-align: left;
}

.page-login__app-feature-item {
    background: var(--card-bg, #11271B);
    padding: 20px;
    margin-bottom: 15px;
    border-radius: 8px;
    border: 1px solid var(--border-color, #2E7A4E);
}

.page-login__app-feature-title {
    font-size: 1.3em;
    font-weight: bold;
    margin-bottom: 10px;
    color: var(--text-main, #F2FFF6);
}

.page-login__app-feature-item p {
    color: var(--text-secondary, #A7D9B8);
}

.page-login__app-download-btn {
    margin-top: 30px;
}

/* Security Section */
.page-login__security-section {
    padding: 80px 20px;
    background: var(--card-bg, #11271B); /* Dark background for this section */
    color: var(--text-main, #F2FFF6);
}

.page-login__security-main-content {
    display: flex;
    flex-direction: column; /* Default to column */
    align-items: center;
    gap: 40px;
    text-align: center;
}

.page-login__security-content {
    max-width: 700px;
}

.page-login__security-list {
    list-style: none;
    padding: 0;
    margin-top: 30px;
    text-align: left;
}

.page-login__security-item {
    background: var(--background-color, #08160F);
    padding: 20px;
    margin-bottom: 15px;
    border-radius: 8px;
    border: 1px solid var(--border-color, #2E7A4E);
}

.page-login__security-subtitle {
    font-size: 1.3em;
    font-weight: bold;
    margin-bottom: 10px;
    color: var(--text-main, #F2FFF6);
}

.page-login__security-item p {
    color: var(--text-secondary, #A7D9B8);
}

.page-login__security-image {
    width: 100%;
    max-width: 400px;
    height: auto;
    object-fit: contain;
    border-radius: 10px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.4);
}

/* FAQ Section */
.page-login__faq-section {
    padding: 80px 20px;
    background: var(--background-color, #08160F);
    color: var(--text-main, #F2FFF6);
}

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

.page-login__faq-item {
    background: var(--card-bg, #11271B);
    margin-bottom: 15px;
    border-radius: 8px;
    border: 1px solid var(--border-color, #2E7A4E);
    overflow: hidden; /* For details tag */
}

.page-login__faq-item summary {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    cursor: pointer;
    font-weight: bold;
    font-size: 1.1em;
    color: var(--text-main, #F2FFF6);
    list-style: none; /* Hide default marker */
}

.page-login__faq-item summary::-webkit-details-marker {
    display: none; /* Hide default marker for webkit browsers */
}

.page-login__faq-question:hover {
    background: rgba(var(--primary-color-rgb, 17, 168, 78), 0.1);
}

.page-login__faq-toggle {
    font-size: 1.5em;
    line-height: 1;
    margin-left: 10px;
    transition: transform 0.3s ease;
    color: var(--primary-color, #11A84E);
}

.page-login__faq-item[open] .page-login__faq-toggle {
    transform: rotate(45deg);
}

.page-login__faq-answer {
    padding: 0 20px 20px;
    color: var(--text-secondary, #A7D9B8);
    font-size: 0.95em;
}

/* Call to Action Section */
.page-login__cta-section {
    padding: 80px 20px;
    background: var(--background-color, #08160F);
    color: var(--text-main, #F2FFF6);
    text-align: center;
}

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

/* Responsive Design */
@media (min-width: 769px) {
    .page-login__hero-section {
        flex-direction: row-reverse; /* Image on right, content on left */
        text-align: left;
        padding: 100px 20px;
    }

    .page-login__hero-content {
        margin-right: 60px;
        margin-bottom: 0;
    }

    .page-login__hero-image {
        position: relative;
        width: 50%;
        height: auto;
        opacity: 1;
        object-fit: contain;
    }
    
    .page-login__app-container,
    .page-login__security-main-content {
        flex-direction: row;
        text-align: left;
    }

    .page-login__app-container:nth-of-type(odd) {
        flex-direction: row-reverse; /* Image on right for first app section */
    }

    .page-login__app-image,
    .page-login__security-image {
        width: 45%;
        max-width: none; /* Override max-width for desktop flex */
    }

    .page-login__app-content,
    .page-login__security-content {
        width: 50%;
    }
}

/* Mobile Responsive Adapters (MUST be present and use !important for critical styles) */
@media (max-width: 768px) {
    .page-login__hero-section {
        padding: 40px 15px;
        padding-top: 10px !important; /* body already handles header offset */
    }

    .page-login__hero-image {
        position: relative;
        width: 100% !important;
        height: auto !important;
        opacity: 0.3 !important; /* Keep it subtle on smaller screens */
    }

    .page-login__main-title {
        font-size: 2em;
    }

    .page-login__description {
        font-size: 1em;
    }

    .page-login__section-title {
        font-size: 1.8em;
    }

    .page-login__section-description {
        font-size: 0.95em;
    }

    /* Images */
    .page-login img {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
        display: block !important;
    }
    
    .page-login__section,
    .page-login__card,
    .page-login__container,
    .page-login__form-wrapper,
    .page-login__app-container,
    .page-login__security-main-content {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding-left: 15px;
        padding-right: 15px;
        overflow: hidden !important; /* Prevent horizontal scroll */
    }

    /* Buttons */
    .page-login__btn-primary,
    .page-login__btn-secondary,
    .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-left: 15px;
        padding-right: 15px;
    }
    
    .page-login__cta-buttons,
    .page-login__button-group,
    .page-login__btn-container,
    .page-login__games-cta {
        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: 10px !important;
        overflow: hidden !important;
    }

    /* Videos - if any, but this page doesn't have explicit video */
    .page-login video,
    .page-login__video {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
        display: block !important;
    }
    
    .page-login__video-section,
    .page-login__video-container,
    .page-login__video-wrapper {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding-left: 15px;
        padding-right: 15px;
        overflow: hidden !important;
    }
}