/* style/login.css */

/* Root variables for colors and spacing (if not already in shared.css) */
:root {
    --jili-primary: #F2C14E;
    --jili-secondary: #FFD36B;
    --jili-card-bg: #111111;
    --jili-background: #0A0A0A;
    --jili-text-main: #FFF6D6;
    --jili-border: #3A2A12;
    --jili-glow: #FFD36B;
    --button-gradient: linear-gradient(180deg, #FFD86A 0%, #DDA11D 100%);
}

/* Base styles for the login page content */
.page-login {
    background-color: var(--jili-background); /* Dark background from shared.css */
    color: var(--jili-text-main); /* Light text for dark background */
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; /* Example font */
    line-height: 1.6;
    padding-bottom: 40px; /* General padding for the bottom */
}

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

/* Hero Section */
.page-login__hero-section {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-top: 10px; /* Small top padding, body handles header offset */
    padding-bottom: 60px;
    text-align: center;
    overflow: hidden; /* Ensure no overflow */
}

.page-login__hero-image {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
    max-height: 500px; /* Limit height for aesthetic */
    margin-bottom: 40px; /* Space between image and content */
}

.page-login__hero-content {
    position: relative; /* Ensure content is above image */
    z-index: 1;
    max-width: 800px;
    width: 100%;
    padding: 0 20px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.page-login__main-title {
    font-size: clamp(2em, 4vw, 3.5em); /* Responsive font size */
    color: var(--jili-secondary);
    margin-bottom: 20px;
    font-weight: bold;
    line-height: 1.2;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.page-login__hero-description {
    font-size: 1.1em;
    color: var(--jili-text-main);
    margin-bottom: 40px;
    max-width: 700px;
}

.page-login__login-card {
    background-color: var(--jili-card-bg);
    border: 1px solid var(--jili-border);
    border-radius: 10px;
    padding: 40px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
    width: 100%;
    max-width: 450px;
    box-sizing: border-box;
}

.page-login__card-title {
    font-size: 1.8em;
    color: var(--jili-secondary);
    margin-bottom: 30px;
    font-weight: bold;
}

.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(--jili-text-main);
    font-size: 0.95em;
}

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

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

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

.page-login__checkbox-container {
    display: block;
    position: relative;
    padding-left: 25px;
    cursor: pointer;
    user-select: none;
    color: var(--jili-text-main);
}

.page-login__checkbox-container input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.page-login__checkmark {
    position: absolute;
    top: 0;
    left: 0;
    height: 18px;
    width: 18px;
    background-color: rgba(255, 255, 255, 0.1);
    border: 1px solid var(--jili-border);
    border-radius: 3px;
}

.page-login__checkbox-container input:checked ~ .page-login__checkmark {
    background-color: var(--jili-primary);
    border-color: var(--jili-primary);
}

.page-login__checkmark:after {
    content: "";
    position: absolute;
    display: none;
    left: 6px;
    top: 2px;
    width: 5px;
    height: 10px;
    border: solid var(--jili-card-bg); /* Use dark background for checkmark */
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.page-login__checkbox-container input:checked ~ .page-login__checkmark:after {
    display: block;
}

.page-login__forgot-password-link {
    color: var(--jili-secondary);
    text-decoration: none;
}

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

.page-login__btn-primary {
    background: var(--button-gradient);
    color: #ffffff; /* White text for buttons */
    padding: 14px 25px;
    border: none;
    border-radius: 5px;
    font-size: 1.1em;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease;
    text-decoration: none;
    display: inline-block;
    text-align: center;
    max-width: 100%;
    box-sizing: border-box;
    white-space: normal;
    word-wrap: break-word;
}

.page-login__btn-primary:hover {
    filter: brightness(1.1);
    transform: translateY(-2px);
}

.page-login__register-text {
    color: var(--jili-text-main);
    margin-top: 25px;
    font-size: 0.95em;
}

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

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

.page-login__app-download {
    margin-top: 30px;
    border-top: 1px solid var(--jili-border);
    padding-top: 25px;
}

.page-login__app-download p {
    margin-bottom: 15px;
    color: var(--jili-text-main);
}

.page-login__btn-secondary {
    background-color: transparent;
    color: var(--jili-primary);
    border: 2px solid var(--jili-primary);
    padding: 12px 25px;
    border-radius: 5px;
    font-size: 1.1em;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s ease, color 0.3s ease, transform 0.2s ease;
    text-decoration: none;
    display: inline-block;
    text-align: center;
    max-width: 100%;
    box-sizing: border-box;
    white-space: normal;
    word-wrap: break-word;
}

.page-login__btn-secondary:hover {
    background-color: var(--jili-primary);
    color: var(--jili-card-bg); /* Dark text on primary hover */
    transform: translateY(-2px);
}

.page-login__inline-link {
    color: var(--jili-secondary);
    text-decoration: none;
    font-weight: bold;
}

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

/* General Section Styles */
.page-login__section-title {
    font-size: 2.5em;
    color: var(--jili-secondary);
    text-align: center;
    margin-bottom: 20px;
    font-weight: bold;
    line-height: 1.2;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.4);
}

.page-login__section-description {
    font-size: 1.1em;
    color: var(--jili-text-main);
    text-align: center;
    max-width: 900px;
    margin: 0 auto 50px auto;
}

.page-login__sub-title {
    font-size: 1.6em;
    color: var(--jili-primary);
    margin-top: 30px;
    margin-bottom: 15px;
    font-weight: bold;
}

/* Benefits Section */
.page-login__benefits-section,
.page-login__games-section,
.page-login__security-section,
.page-login__support-section,
.page-login__faq-section,
.page-login__cta-section {
    padding: 60px 0;
}

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

.page-login__benefit-card {
    background-color: var(--jili-card-bg);
    border: 1px solid var(--jili-border);
    border-radius: 10px;
    padding: 30px;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.page-login__benefit-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
}

.page-login__benefit-image {
    width: 100%;
    height: 200px; /* Fixed height for consistency */
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 20px;
}

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

.page-login__benefit-text {
    color: var(--jili-text-main);
    font-size: 0.95em;
}

/* Games Section */
.page-login__games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.page-login__game-card {
    background-color: var(--jili-card-bg);
    border: 1px solid var(--jili-border);
    border-radius: 10px;
    overflow: hidden;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    text-decoration: none; /* Remove underline for link card */
    display: flex;
    flex-direction: column;
}

.page-login__game-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
}

.page-login__game-image {
    width: 100%;
    height: 200px; /* Fixed height for consistency */
    object-fit: cover;
}

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

.page-login__game-text {
    color: var(--jili-text-main);
    font-size: 0.9em;
    padding: 0 15px 20px;
    flex-grow: 1; /* Make text block fill available space */
}

/* Security and Support Sections */
.page-login__security-content,
.page-login__support-content {
    display: flex;
    align-items: center;
    gap: 50px;
    margin-top: 40px;
}

.page-login__security-content {
    flex-direction: row;
}

.page-login__support-content {
    flex-direction: row-reverse;
}

.page-login__security-text-block,
.page-login__support-text-block {
    flex: 1;
}

.page-login__security-image-wrapper,
.page-login__support-image-wrapper {
    flex: 1;
    text-align: center;
}

.page-login__security-image,
.page-login__support-image {
    width: 100%;
    height: auto;
    max-width: 600px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.page-login__security-text-block ul {
    list-style: disc;
    margin-left: 25px;
    color: var(--jili-text-main);
}

.page-login__security-text-block li {
    margin-bottom: 10px;
    font-size: 0.95em;
}

.page-login__btn-contact {
    margin-top: 20px;
}

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

.page-login__faq-item {
    background-color: var(--jili-card-bg);
    border: 1px solid var(--jili-border);
    border-radius: 8px;
    margin-bottom: 15px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.page-login__faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    cursor: pointer;
    background-color: rgba(255, 255, 255, 0.05); /* Slightly lighter background for question */
    transition: background-color 0.3s ease;
}

.page-login__faq-question:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.page-login__faq-question h3 {
    font-size: 1.2em;
    color: var(--jili-secondary);
    margin: 0;
    font-weight: bold;
}

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

.page-login__faq-item.active .page-login__faq-toggle {
    transform: rotate(45deg); /* Plus sign rotates to minus */
}

.page-login__faq-answer {
    max-height: 0;
    overflow: hidden;
    padding: 0 25px;
    transition: max-height 0.3s ease, padding 0.3s ease;
    color: var(--jili-text-main);
}

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

.page-login__faq-answer p {
    margin: 0;
    font-size: 0.95em;
}

/* CTA Section */
.page-login__cta-section {
    text-align: center;
}

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

/* --- Responsive Design --- */

/* Tablet and Mobile */
@media (max-width: 1024px) {
    .page-login__main-title {
        font-size: clamp(2em, 5vw, 3em);
    }

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

    .page-login__hero-image {
        max-height: 400px;
    }

    .page-login__security-content,
    .page-login__support-content {
        flex-direction: column;
        text-align: center;
    }

    .page-login__security-text-block,
    .page-login__support-text-block {
        order: 2; /* Text after image on mobile */
    }
    .page-login__security-image-wrapper,
    .page-login__support-image-wrapper {
        order: 1;
        margin-bottom: 30px;
    }
    .page-login__security-text-block ul {
        margin-left: 0;
        text-align: left; /* Keep list items left aligned */
    }
}

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

    .page-login__hero-section {
        padding-bottom: 40px;
    }

    .page-login__hero-image {
        max-height: 250px;
        margin-bottom: 20px;
    }

    .page-login__hero-content {
        padding: 0 15px;
    }

    .page-login__main-title {
        font-size: clamp(1.8em, 7vw, 2.5em);
        margin-bottom: 15px;
    }

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

    .page-login__login-card {
        padding: 30px 20px;
    }

    .page-login__card-title {
        font-size: 1.5em;
        margin-bottom: 20px;
    }

    .page-login__form-options {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .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 {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding-left: 15px;
        padding-right: 15px;
        flex-wrap: wrap !important;
        gap: 15px;
    }

    .page-login__cta-buttons {
        flex-direction: column;
    }

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

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

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

    .page-login__benefits-grid,
    .page-login__games-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

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

    .page-login__benefit-image,
    .page-login__game-image {
        height: 180px;
    }

    .page-login__security-content,
    .page-login__support-content {
        gap: 30px;
    }
    
    .page-login__security-image,
    .page-login__support-image {
        max-width: 100%;
    }

    .page-login__faq-question {
        padding: 15px 20px;
    }

    .page-login__faq-question h3 {
        font-size: 1.1em;
    }

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

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

    /* All images responsive */
    .page-login img {
        max-width: 100% !important;
        height: auto !important;
        display: block !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 no video section, but if it were, this would apply */
    .page-login__video-section {
        padding-top: 10px !important; /* Not var(--header-offset) */
    }
}