/* style/login.css */
:root {
    --primary-color: #017439;
    --secondary-color: #FFFFFF;
    --button-login-bg: #C30808;
    --button-login-text: #FFFF00;
    --dark-bg-body: #1a1a2e;
    --dark-section-bg: #0d0d1e; /* Slightly darker than body for distinction */
    --light-section-bg: #ffffff;
    --dark-text-on-light: #333333;
    --light-text-on-dark: #ffffff;
}

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

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

.page-login__hero-section {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 70vh;
    background: linear-gradient(135deg, var(--primary-color) 0%, #004d27 100%);
    color: var(--light-text-on-dark);
    padding: 60px 20px;
    padding-top: var(--header-offset, 120px); /* Ensures content is not hidden by fixed header */
    box-sizing: border-box;
    overflow: hidden;
}

.page-login__hero-content {
    flex: 1;
    max-width: 500px;
    margin-right: 40px;
    text-align: left;
    z-index: 1;
}

.page-login__main-title {
    font-size: 3.2em;
    margin-bottom: 20px;
    font-weight: bold;
    line-height: 1.2;
    color: var(--secondary-color);
}

.page-login__hero-description {
    font-size: 1.1em;
    margin-bottom: 30px;
    opacity: 0.9;
}

.page-login__form {
    background: rgba(0, 0, 0, 0.4);
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

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

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

.page-login__form-input {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 5px;
    background: rgba(255, 255, 255, 0.1);
    color: var(--secondary-color);
    font-size: 1em;
    box-sizing: border-box;
}

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

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

.page-login__form-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

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

.page-login__forgot-password:hover {
    color: var(--button-login-text);
}

.page-login__btn-login {
    background-color: var(--button-login-bg);
    color: var(--button-login-text);
    padding: 12px 25px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1.1em;
    font-weight: bold;
    transition: background-color 0.3s ease, transform 0.2s ease;
}

.page-login__btn-login:hover {
    background-color: #a30606;
    transform: translateY(-2px);
}

.page-login__register-text {
    text-align: center;
    font-size: 0.95em;
}

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

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

.page-login__hero-image-container {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
}

.page-login__hero-image {
    max-width: 100%;
    height: auto;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    min-width: 200px; /* Minimum size requirement */
    min-height: 200px; /* Minimum size requirement */
}

/* General Section Styles */
.page-login__section-title {
    font-size: 2.5em;
    text-align: center;
    margin-bottom: 20px;
    font-weight: bold;
    color: var(--secondary-color);
}

.page-login__section-description {
    font-size: 1.1em;
    text-align: center;
    max-width: 800px;
    margin: 0 auto 40px auto;
    opacity: 0.9;
}

/* Benefits Section */
.page-login__benefits-section {
    padding: 80px 0;
    background-color: var(--dark-section-bg);
    color: var(--light-text-on-dark);
}

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

.page-login__benefit-card {
    background: rgba(255, 255, 255, 0.08);
    padding: 30px;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.page-login__benefit-card:hover {
    transform: translateY(-5px);
}

.page-login__benefit-icon {
    width: 80px;
    height: 80px;
    margin-bottom: 20px;
    min-width: 200px;
    min-height: 200px;
    max-width: 100%;
    height: auto;
    border-radius: 5px;
}

.page-login__benefit-title {
    font-size: 1.5em;
    margin-bottom: 15px;
    color: var(--secondary-color);
}

.page-login__benefit-text {
    font-size: 1em;
    opacity: 0.85;
}

/* Game Preview Section */
.page-login__game-preview-section {
    padding: 80px 0;
    background-color: var(--dark-bg-body);
    color: var(--light-text-on-dark);
}

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

.page-login__game-card {
    background: rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.page-login__game-card:hover {
    transform: translateY(-5px);
}

.page-login__game-image {
    width: 100%;
    height: 200px; /* Fixed height for consistency, will be responsive */
    object-fit: cover;
    display: block;
    min-width: 200px;
    min-height: 200px;
}

.page-login__game-title {
    font-size: 1.4em;
    padding: 15px;
    color: var(--secondary-color);
    font-weight: bold;
}

.page-login__game-title a {
    color: var(--secondary-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

.page-login__game-title a:hover {
    color: var(--primary-color);
}

.page-login__game-text {
    padding: 0 15px 20px;
    font-size: 0.95em;
    opacity: 0.85;
}

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

.page-login__btn-primary,
.page-login__btn-secondary {
    display: inline-block;
    padding: 15px 30px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: bold;
    font-size: 1.1em;
    transition: background-color 0.3s ease, transform 0.2s ease, color 0.3s ease;
    box-sizing: border-box;
    white-space: normal;
    word-wrap: break-word;
    max-width: 100%;
}

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

.page-login__btn-primary:hover {
    background-color: #a30606;
    transform: translateY(-2px);
}

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

.page-login__btn-secondary:hover {
    background-color: var(--primary-color);
    color: var(--secondary-color);
    transform: translateY(-2px);
}

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

.page-login__faq-section .page-login__section-title {
    color: var(--dark-text-on-light);
}

.page-login__faq-section .page-login__section-description {
    color: var(--dark-text-on-light);
}

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

.page-login__faq-item {
    background: #f9f9f9;
    border-radius: 8px;
    margin-bottom: 15px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    overflow: hidden;
}

.page-login__faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    cursor: pointer;
    font-size: 1.2em;
    font-weight: bold;
    color: var(--dark-text-on-light);
    background-color: #f0f0f0;
    transition: background-color 0.3s ease;
}

.page-login__faq-question:hover {
    background-color: #e0e0e0;
}

.page-login__faq-question h3 {
    margin: 0;
    color: var(--dark-text-on-light);
}

.page-login__faq-toggle {
    font-size: 1.5em;
    line-height: 1;
    transition: transform 0.3s ease;
    color: var(--primary-color);
}

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

.page-login__faq-answer {
    max-height: 0;
    overflow: hidden;
    padding: 0 25px;
    transition: max-height 0.3s ease, padding 0.3s ease;
    color: #555;
}

.page-login__faq-item.active .page-login__faq-answer {
    max-height: 1000px !important; /* Sufficiently large to show content */
    padding: 15px 25px 25px;
}

.page-login__faq-answer p {
    margin: 0;
    font-size: 1em;
    line-height: 1.8;
    color: var(--dark-text-on-light);
}

.page-login__faq-answer a {
    color: var(--primary-color);
    text-decoration: underline;
}

/* Responsive Design */
@media (max-width: 992px) {
    .page-login__hero-section {
        flex-direction: column;
        text-align: center;
        min-height: auto;
    }

    .page-login__hero-content {
        margin-right: 0;
        margin-bottom: 40px;
        max-width: 100%;
    }

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

    .page-login__hero-image-container {
        max-width: 80%;
    }

    .page-login__benefits-grid,
    .page-login__game-gallery {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    }

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

@media (max-width: 768px) {
    .page-login__hero-section {
        padding: 40px 15px;
        padding-top: var(--header-offset, 120px) !important; /* Ensure header offset on mobile */
    }

    .page-login__hero-content {
        margin-bottom: 30px;
    }

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

    .page-login__hero-description {
        font-size: 1em;
    }

    .page-login__form {
        padding: 25px;
    }

    .page-login__btn-login,
    .page-login__btn-primary,
    .page-login__btn-secondary {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        white-space: normal !important;
        word-wrap: break-word !important;
        padding: 12px 15px;
    }

    .page-login__form-actions {
        flex-direction: column;
        gap: 15px;
    }

    .page-login__forgot-password {
        order: 2;
    }

    .page-login__btn-login {
        order: 1;
    }

    .page-login__cta-buttons {
        flex-direction: column;
        gap: 15px;
        padding: 0 15px; /* Add padding to prevent overflow */
    }

    .page-login__container,
    .page-login__benefits-section,
    .page-login__game-preview-section,
    .page-login__faq-section {
        padding-left: 15px !important;
        padding-right: 15px !important;
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        overflow-x: hidden !important;
    }

    .page-login img {
        max-width: 100% !important;
        height: auto !important;
        display: block !important;
        min-width: 200px !important;
        min-height: 200px !important;
    }

    .page-login__benefit-icon {
        width: 100% !important;
        height: auto !important;
    }

    .page-login__game-image {
        height: auto !important;
    }

    .page-login__faq-question {
        padding: 15px 20px;
        font-size: 1.1em;
    }

    .page-login__faq-answer {
        padding: 0 20px;
    }

    .page-login__faq-item.active .page-login__faq-answer {
        padding: 10px 20px 20px;
    }

    .page-login__faq-toggle {
        font-size: 1.3em;
    }
}

@media (max-width: 480px) {
    .page-login__main-title {
        font-size: 1.8em;
    }

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

    .page-login__hero-image-container {
        max-width: 100%;
    }
}