﻿/* ===== BIẾN VÀ RESET ===== */
:root {
    --primary-color: #043d8a;
    --primary-light: #4e73df;
    --primary-dark: #224abe;
    --secondary-color: #f5d881;
    --text-dark: #333;
    --text-light: #666;
    --background-dark: #163051;
    --background-light: #f8f9fa;
    --success-color: #39ff14;
    --error-color: #ff4c4c;
    --white: #fff;
    --shadow-sm: 0 5px 15px rgba(0,0,0,0.08);
    --shadow-md: 0 10px 25px rgba(0,0,0,0.15);
    --border-radius-sm: 0.75rem;
    --border-radius-md: 12px;
    --transition-fast: 0.3s ease;
    --transition-medium: 0.5s ease;
}

/* Sửa đổi cho root element */
html, body {
    height: 100%;
    margin: 0;
    padding: 0;
    font-family: 'Segoe UI', sans-serif;
    overflow-x: hidden; /* Ngăn cuộn ngang */
}
main {
    min-height: 100vh;
}

body {
    display: flex;
    flex-direction: column;
    color: var(--text-dark);
    min-height: 100vh; /* Đảm bảo chiều cao tối thiểu là 100% viewport */
    width: 100%; /* Chiều rộng đầy đủ */
    overflow-y: auto; /* Cho phép cuộn dọc khi cần */
    overflow-x: hidden; /* Ngăn cuộn ngang */
}

/* Màu nền mặc định */
.set-background {
    background-image: url('../banner.svg');
    background-color: #f08650ba !important;
    background-repeat: no-repeat;
    background-position: right bottom;
    background-size: 800px;
}

/* ===== CONTAINER VÀ LAYOUT ===== */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
    box-sizing: border-box; /* Đảm bảo padding không gây tràn */
}

.wraper {
    /*background-image: url('../BG-DangNhap.jpg');
    background-size: cover;
    background-position: top;
    max-width: 700px !important;
    margin: auto;
    overflow: hidden;
    box-shadow: var(--shadow-md);*/
}

/* ===== FORMS ===== */
.form {
    padding: 24px;
    background-color: rgba(255, 255, 255, 0.9);
    max-width: 700px;
}

.form-center {
    display: flex;
    align-items: center;
    border-right: 1px solid #cccccc75;
    background: rgb(99 72 116 / 57%); /* semi-transparent white */
    backdrop-filter: blur(12px) saturate(180%);
    -webkit-backdrop-filter: blur(12px) saturate(180%);
    box-shadow: 3px 1px 32px 0 rgb(169 99 68);
    border-radius: var(--border-radius-md);
    color: var(--text-dark); /* Đảm bảo text rõ ràng */
}
.d-flex a {
    color: #fff !important;
}

.form .form-floating {
    padding: 0.5em;
}

        .form .form-floating .form-control {
            /*border-radius: var(--border-radius-sm);*/
            padding: 12px 15px;
            font-size: 1rem;
            background-color: #eaeaea;
            border-radius: 1px !important;
        }

            .form .form-floating .form-control:focus {

            }

        .form .form-floating:focus-within {
            z-index: 2;
        }

        .form .form-floating label {
            color: var(--text-light);
        }

    .form .inputs div:last-child input {
        margin-bottom: 20px;
    }

.validation-summary-errors ul {
    padding: 0;
    margin-bottom: 15px;
    list-style: none;
    background-color: rgba(255, 76, 76, 0.1);
    border-radius: var(--border-radius-sm);
    padding: 10px;
}

    .validation-summary-errors ul li {
        margin-bottom: 5px;
        color: #dc3545;
        font-size: 0.9rem;
    }

/* ===== LOGIN PAGE ===== */
.c-login {
    background-color: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    padding: 20px;
    box-shadow: var(--shadow-md);
}

.c-title {
    font-weight: 600;
    margin: 15px 0 25px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
    color: #fff;
}

.c-logo {
    width: 100%;
    height: 80px;
    background-image: url('../logo.png');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    margin-bottom: 80px;
}

/* Custom Buttons */
.c-btn-group {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    margin: 20px 0;
}
.text-decoration-none {
    color: #0f0f0f !important;
}

.c-btn-group .btn-custom {
    padding: 12px 20px;
    border: none;
    justify-content: center;
    font-weight: 500;
    transition: var(--transition-fast);
}

    .c-btn-group .btn-custom-80 {
        width: 70%;
        height: 50px;
        margin-right: 10px;
        background-color: var(--primary-color);
        color: var(--white);
        border-radius: var(--border-radius-sm);
        font-size: 1rem;
    }

        .c-btn-group .btn-custom-80:hover {
            background-color: var(--primary-dark);
            transform: translateY(-2px);
        }

    .c-btn-group .btn-custom-100 {
        width: 100%;
        height: 50px;
        background-color: var(--primary-color);
        color: var(--white);
        border-radius: var(--border-radius-sm);
        font-size: 1rem;
    }

        .c-btn-group .btn-custom-100:hover {
            background-color: var(--primary-dark);
            transform: translateY(-2px);
        }

    .c-btn-group .btn-custom-20 {
        width: 30%;
        height: 70px;
        margin-left: 10px;
        display: flex;
        justify-content: center;
        background-image: url('../playgame.png');
        background-size: contain;
        background-repeat: no-repeat;
        background-color: transparent;
        background-position-x: center;
        position: relative;
        border-radius: var(--border-radius-sm);
        transition: var(--transition-fast);
    }

        .c-btn-group .btn-custom-20:hover {
            transform: translateY(-3px) scale(1.03);
            filter: brightness(1.1);
        }

        .c-btn-group .btn-custom-20::after {
            content: "Chơi ngay";
            position: absolute;
            font-size: 0.9em;
            font-weight: 600;
            color: var(--white);
            bottom: 0.65em;
            text-shadow: 0 1px 3px rgba(0,0,0,0.5);
        }

/* Separator */
.login-separator {
    position: relative;
    text-align: center;
    width: 100%;
    margin: 8px 0;
}

    .login-separator span {
        color: var(--white);
        padding: 0 15px;
        position: relative;
        font-size: 0.9em;
        z-index: 1;
        /*background: rgba(22, 48, 81, 0.7);*/
    }

        .login-separator span::before {
            content: "";
            position: absolute;
            top: 50%;
            width: 80%;
            transform: translateY(-50%);
            height: 3px;
            background-color: #ccc;
            border-radius: 80% 0 0 80%;
            border-width: 8px;
            right: 100%;
        }


        .login-separator span::after {
            content: "";
            position: absolute;
            top: 50%;
            width: 80%;
            transform: translateY(-50%);
            height: 3px;
            background-color: #ccc;
            border-radius: 0 80% 80% 0;
            border-width: 8px;
            left: 100%;
        }

/* External Provider Icons */
.p-logo-wraper {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin: 20px 0;
}

.provider-icon {
    width: 80px;
    height: 80px;
    height: 80px;
    position: relative;
    border-radius: 50%;
    overflow: hidden;
    backdrop-filter: blur(5px);
    /*box-shadow: var(--shadow-sm);*/
    transition: var(--transition-fast);
}

    .provider-icon:hover {
        transform: scale(1.1);
        box-shadow: var(--shadow-md);
    }

.p-logo-wraper .logo-icon {
    display: block;
    width: 100%;
    height: 100%;
}

    .p-logo-wraper .logo-icon img {
        width: 60%;
        height: 60%;
        position: absolute;
        background-color: transparent;
        border: none;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
    }

/* Links */
.btn-wraper {
    display: flex;
    justify-content: space-between;
    margin: 20px 0;
}

    .btn-wraper a {
        color: var(--secondary-color);
        text-decoration: none;
        font-size: 0.95rem;
        transition: var(--transition-fast);
        padding: 5px;
    }

        .btn-wraper a:hover {
            color: #ffffff;
            text-decoration: underline;
        }

/* ===== ALERTS AND MESSAGES ===== */
.success-container, .error-container {
    display: flex;
    justify-content: center;
    align-items: center;
    color: var(--white);
    margin: 40px auto;
    max-width: 600px;
    padding: 30px;
    /*border-radius: var(--border-radius-md);*/
    box-shadow: var(--shadow-md);
}

.success-container {
    background: linear-gradient(135deg, #43a047, #2e7d32);
}

.error-container {
    background: linear-gradient(135deg, #e53935, #c62828);
}

.success-message {
    text-align: center;
    animation: float 3s ease-in-out infinite;
}

    .success-message h1, .success-message p {
        transition: transform 0.3s, color 0.3s;
    }

        .success-message h1:hover, .success-message p:hover {
            transform: scale(1.1);
            color: var(--success-color);
            animation: neon 1.5s infinite alternate;
        }

.error-message {
    text-align: center;
    animation: shake 3s ease-in-out infinite;
}

    .error-message h1, .error-message p {
        transition: transform 0.3s, color 0.3s;
    }

        .error-message h1:hover, .error-message p:hover {
            transform: scale(1.1);
            color: var(--error-color);
            animation: glow 3s infinite alternate;
        }

/* ===== LOADING OVERLAY ===== */
#loadingOverlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--background-dark);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    opacity: 1;
    visibility: visible;
    transition: opacity 1s ease, visibility 0.5s ease;
}

    #loadingOverlay.hidden {
        opacity: 0;
        visibility: hidden;
        transition: opacity 1s ease, visibility 1s ease;
    }

.hidden-spinner {
    display: none !important;
}

.spinner {
    border: 4px solid rgba(255, 255, 255, 0.2);
    border-top: 4px solid var(--primary-light);
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
    margin-bottom: 20px;
}

.spinner-text {
    color: var(--white);
    font-size: 1.4em;
    font-weight: bold;
    animation: fadeInOut 2s infinite;
    letter-spacing: 2px;
}

/* ===== LANDING PAGE ===== */
.landing-page {
    font-family: 'Segoe UI', sans-serif;
    width: 100%;
    max-width: 100vw; /* Giới hạn chiều rộng không vượt quá viewport */
    margin: 0 auto;
    background-color: var(--white);
    color: var(--text-dark);
    overflow-x: hidden; /* Ngăn cuộn ngang */
    box-sizing: border-box; /* Đảm bảo padding không gây tràn */
}
/* Điều chỉnh các section có thể gây tràn */
.landing-header,
.features-section,
.about-section,
.landing-footer {
    width: 100%;
    box-sizing: border-box;
    overflow-x: hidden;
}

.landing-header {
    background: linear-gradient(135deg, var(--primary-light), var(--primary-dark));
    color: var(--white);
    padding: 100px 0 70px;
    position: relative;
    overflow: hidden;
}

    .landing-header::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: url('../header-pattern.png');
        background-size: cover;
        opacity: 0.1;
    }

    .landing-header h1 {
        font-weight: 700;
        margin-bottom: 20px;
        font-size: 3rem;
        text-shadow: 0 2px 10px rgba(0,0,0,0.2);
    }

    .landing-header p {
        font-size: 1.2rem;
        max-width: 700px;
        margin: 0 auto 30px;
    }

.features-section {
    padding: 80px 0;
}

    .features-section .bi {
        font-size: 3rem;
        color: var(--primary-color);
        margin-bottom: 20px;
        transition: var(--transition-medium);
    }

    .features-section .col-md-4:hover .bi {
        transform: translateY(-10px) scale(1.1);
    }

    .features-section h4 {
        font-weight: 600;
        margin-bottom: 15px;
        color: var(--text-dark);
    }

    .features-section p {
        color: var(--text-light);
        font-size: 1rem;
        line-height: 1.6;
    }

.about-section {
    padding: 70px 0;
    background-color: var(--background-light);
    position: relative;
}

    .about-section h2 {
        margin-bottom: 30px;
    }

    .about-section p {
        color: var(--text-light);
        font-size: 1.1rem;
        line-height: 1.8;
        max-width: 800px;
        margin: 0 auto;
    }

.landing-footer {
    background-color: #343a40;
    color: var(--white);
    padding: 20px 0;
}

    .landing-footer p {
        margin: 0;
        font-size: 0.9rem;
    }

/* ===== DỰ ÁN NỔI BẬT SECTION ===== */
.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 2rem;
    text-align: center;
    color: var(--text-dark);
    position: relative;
    padding-bottom: 15px;
}

    .section-title:after {
        content: '';
        position: absolute;
        bottom: 0;
        left: 50%;
        transform: translateX(-50%);
        width: 80px;
        height: 4px;
        background: linear-gradient(to right, var(--primary-light), var(--primary-dark));
        border-radius: 2px;
    }

/* Điều chỉnh project cards để tránh tràn */
.project-cards {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 30px;
    padding: 20px 0;
    width: 100%;
    box-sizing: border-box;
}
.project-card {
    box-sizing: border-box; /* Đảm bảo padding không gây tràn */
}
.project-card {
    background: var(--white);
    border-radius: var(--border-radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    flex: 1 1 300px;
    max-width: 100%;
    transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

    .project-card:hover {
        transform: translateY(-5px);
        box-shadow: var(--shadow-md);
    }

.card-image {
    height: 200px;
    overflow: hidden;
}

    .card-image img {
        width: 100%;
        height: 100%;
        object-fit: fill;
        transition: transform var(--transition-medium);
    }

.project-card:hover .card-image img {
    transform: scale(1.05);
}

.card-content {
    padding: 25px;
}

    .card-content h3 {
        font-size: 1.4rem;
        font-weight: 600;
        margin-bottom: 15px;
        color: var(--text-dark);
        position: relative;
        display: inline-block;
    }

        .card-content h3:after {
            content: '';
            position: absolute;
            width: 40%;
            height: 3px;
            background: linear-gradient(to right, var(--primary-light), var(--primary-dark));
            bottom: -5px;
            left: 0;
            border-radius: 2px;
        }

    .card-content p {
        color: var(--text-light);
        margin-bottom: 25px;
        line-height: 1.6;
        text-align: left;
    }

.btn-access {
    display: inline-block;
    padding: 10px 24px;
    background: var(--primary-light);
    color: var(--white);
    text-decoration: none;
    border-radius: var(--border-radius-sm);
    font-weight: 500;
    transition: all var(--transition-fast);
    border: none;
    cursor: pointer;
}

    .btn-access:hover {
        background: var(--primary-dark);
        color: var(--white);
        transform: translateY(-2px);
        box-shadow: 0 5px 15px rgba(78, 115, 223, 0.3);
    }

/* ===== ANIMATIONS ===== */
@keyframes neon {
    from {
        text-shadow: 0 0 10px var(--success-color), 0 0 20px var(--success-color), 0 0 30px var(--success-color);
    }

    to {
        text-shadow: 0 0 20px var(--success-color), 0 0 40px var(--success-color), 0 0 60px var(--success-color);
    }
}

@keyframes glow {
    from {
        text-shadow: 0 0 10px var(--error-color), 0 0 20px var(--error-color), 0 0 30px var(--error-color);
    }

    to {
        text-shadow: 0 0 20px var(--error-color), 0 0 40px var(--error-color), 0 0 60px var(--error-color);
    }
}

@keyframes float {
    0% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }

    100% {
        transform: translateY(0);
    }
}

@keyframes shake {
    0% {
        transform: translateX(0);
    }

    25% {
        transform: translateX(-5px);
    }

    50% {
        transform: translateX(5px);
    }

    75% {
        transform: translateX(-5px);
    }

    100% {
        transform: translateX(0);
    }
}

@keyframes fadeInOut {
    0%, 100% {
        opacity: 0.4;
    }

    50% {
        opacity: 1;
    }
}

@keyframes spin {
    0% {
        transform: rotate(-360deg);
    }

    100% {
        transform: rotate(720deg);
    }
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 992px) {
    .landing-header h1 {
        font-size: 2.5rem;
    }

    .section-title {
        font-size: 2rem;
    }
}

@media (max-width: 768px) {
    .project-cards {
        flex-direction: column;
    }

    .project-card {
        max-width: 100%;
    }

    .c-btn-group {
        flex-direction: column;
    }

        .c-btn-group .btn-custom-80,
        .c-btn-group .btn-custom-20 {
            width: 100%;
            margin: 5px 0;
        }

    .landing-header h1 {
        font-size: 2rem;
    }

    .section-title {
        font-size: 1.8rem;
    }
    .form-center {
        border: none;
    }
   /* .btn-wraper {
        flex-direction: column;
        align-items: center;
        gap: 15px;
    }*/
}

@media (max-width: 576px) {
    .form {
        padding: 15px;
    }

    .c-logo {
        margin-bottom: 40px;
    }
}


/* ===== PRIVACY POLICY STYLES ===== */
.privacy-policy-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    background-color: var(--background-light);
    color: var(--text-dark);
    border-radius: var(--border-radius-md);
    box-shadow: var(--shadow-sm);
    font-family: 'Segoe UI', sans-serif;
    line-height: 1.6;
}

.privacy-policy-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 20px;
    text-align: center;
}

.privacy-policy-section-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--primary-dark);
    margin-top: 30px;
    margin-bottom: 15px;
}

.privacy-policy-list {
    list-style: disc;
    padding-left: 20px;
    margin-bottom: 20px;
}

    .privacy-policy-list li {
        margin-bottom: 10px;
        color: var(--text-light);
    }
