@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700;800;900&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
}

body {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: url('bg.webp') no-repeat center center / cover;
    image-rendering: auto;
}

header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 20px 100px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 99;
}

.global-section {
    max-width: 900px;
    margin: 80px auto;
    padding: 0 20px;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.7;
    color: #333;
}

.global-section h1,
.global-section h2 {
    color: #2a2a2a;
    margin-bottom: 10px;
}

.global-section ul {
    list-style: none;
    padding-left: 0;
}

.global-section ul li {
    margin-bottom: 10px;
    padding-left: 20px;
    position: relative;
}

.global-section ul li::before {
    content: '✔';
    position: absolute;
    left: 0;
    color: #4CAF50;
}

.logo {
    font-size: 2em;
    color: #7a280f;
    user-select: none;
}

.navigation a {
    position: relative;
    font-size: 1.1em;
    color: #7a280f;
    text-decoration: none;
    font-weight: 500;
    margin-left: 40px;
}

.navigation a::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -6px;
    width: 100%;
    height: 3px;
    background: #fff;
    border-radius: 5px;
    transform-origin: right;
    transform: scale(0);
    transition: transform .5s;
}

.navigation a:hover::after {
    transform-origin: left;
    transform: scale(1);
}

.navigation .btnLogin-popup {
    width: 130px;
    height: 50px;
    background: #7a280f;
    border: 2px solid #fff;
    outline: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 1.1em;
    color: #fff;
    font-weight: 500;
    margin-left: 40px;
    transition: .5s;
}

.navigation .btnLogin-popup:hover {
    background: #fff;
    color: #eec596;
}

select#role {
    width: 100%;
    padding: 10px;
    font-size: 16px;
    border-radius: 8px;
    border: 1px solid #ccc;
    box-sizing: border-box;
    background-color: #fff;
    color: #000;
    appearance: none;
}

.select-box {
    position: relative;
    margin-bottom: 20px;
}

.select-box select {
    width: 100%;
    padding: 10px 35px 10px 40px;
    font-size: 16px;
    color: #000;
    background: transparent;
    border: none;
    border-bottom: 2px solid #ccc;
    outline: none;
    appearance: none;
    z-index: 1;
    position: relative;
}

.select-box label {
    position: absolute;
    top: 50%;
    left: 40px;
    color: #aaa;
    transform: translateY(-50%);
    pointer-events: none;
    transition: 0.3s ease;
}

.select-box select:focus+label,
.select-box select:not([value=""])+label {
    top: -10px;
    font-size: 12px;
    color: #162938;
}

.wrapper {
    position: relative;
    width: 400px;
    height: 440px;
    background: transparent;
    border: 2px solid rgba(255, 255, 255, 5);
    border-radius: 20px;
    backdrop-filter: blur(20px);
    box-shadow: 0 0 30px rgba(0, 0, 0, .5);
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    transform: scale(0);
    transition: transform .5s ease, height .2s ease;
}

.wrapper.active-popup {
    transform: scale(1);
}

.wrapper.active {
    height: 520px;
}

.wrapper .form-box {
    width: 100%;
    padding: 40px;
}

.wrapper .form-box.login {
    transition: transform .18s ease;
    transform: translateX(0);
}

.wrapper.active .form-box.login {
    transition: none;
    transform: translateX(-400px);
}

.wrapper .form-box.register {
    position: absolute;
    transition: none;
    transform: translateX(400px);
}

.wrapper.active .form-box.register {
    transition: transform .18s ease;
    transform: translateX(0);
}

.wrapper .icon-close {
    position: absolute;
    top: 0;
    right: 0;
    width: 45px;
    height: 45px;
    background: #162938;
    font-size: 2em;
    color: #fff;
    display: flex;
    justify-content: center;
    align-items: center;
    border-bottom-left-radius: 20px;
    cursor: pointer;
    z-index: 1;
}

.form-box h2 {
    font-size: 2em;
    color: #162938;
    text-align: center;
}

.input-box {
    position: relative;
    width: 100%;
    height: 50px;
    border-bottom: 2px solid #162938;
    margin: 30px 0;
}

.input-box label {
    position: absolute;
    top: 50%;
    left: 5px;
    transform: translateY(-50%);
    font-size: 1em;
    color: #162938;
    font-weight: 500;
    pointer-events: none;
    transition: .5s;
}

.wrapper.global-wrapper {
    transform: scale(1);
    width: 90%;
    max-width: 1000px;
    height: auto;
    margin: 100px auto;
    padding: 20px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    backdrop-filter: blur(20px);
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.5);
    background: rgba(255, 255, 255, 0.1);
}

.wrapper .form-box.global {
    padding: 30px;
    text-align: left;
}

.form-box.global h2,
.form-box.global h3 {
    color: #162938;
    margin-bottom: 10px;
}

.form-box.global p,
.form-box.global ul {
    font-size: 1em;
    color: #162938;
    line-height: 1.6;
    margin-bottom: 20px;
}

.form-box.global ul {
    padding-left: 20px;
}

.form-box.global ul li {
    margin-bottom: 10px;
    list-style-type: '✔ ';
    padding-left: 10px;
}

.input-box label {
    top: -5px;
    font-size: 0.9em;
    color: #162938;
}


.input-box input {
    width: 100%;
    height: 100%;
    background: transparent;
    border: none;
    outline: none;
    font-size: 1em;
    color: #162938;
    font-weight: 600;
    padding: 0 35px 0 35px;
}

.input-box .icon {
    position: absolute;
    left: 8px;
    font-size: 1.2em;
    color: #162938;
    top: 50%;
    transform: translateY(-50%);
}

.input-box .toggle-eye {
    position: absolute;
    right: 8px;
    font-size: 1.2em;
    color: #162938;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
}


.remember-forgot {
    font-size: .9em;
    color: #162938;
    font-weight: 500;
    margin: -15px 0 15px;
    display: flex;
    justify-content: space-between;
}

.remember-forgot label input {
    accent-color: #162938;
    margin-right: 3px;
}

.remember-forgot a {
    color: #162938;
    text-decoration: none;
}

.remember-forgot a:hover {
    text-decoration: underline;
}

.btn {
    width: 100%;
    height: 45px;
    background: #2c3e50;
    ;
    border: none;
    outline: none;
    border-radius: 6px;
    cursor: pointer;
    color: #fff;
    font-weight: 500;
}

.login-register {
    font-size: .9em;
    color: #162938;
    text-align: center;
    font-weight: 500;
    margin: 25px 0 10px;
}

.login-register p a {
    color: #162938;
    text-decoration: none;
    font-weight: 600;
}

.login-register p a:hover {
    text-decoration: underline;
}

.toggle-eye {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    font-size: 1.2em;
    color: #555;
}

.input-box {
    position: relative;
}

#forgot-password-modal {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #fff;
    border-radius: 10px;
    padding: 25px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    z-index: 9999;
    width: 90%;
    max-width: 400px;
}

#forgot-password-modal h3 {
    margin-bottom: 15px;
    color: #333;
    font-size: 20px;
    text-align: center;
}

#forgot-password-modal input {
    width: 100%;
    padding: 10px;
    margin-bottom: 15px;
    border: 1px solid #ccc;
    border-radius: 8px;
    font-size: 16px;
}

#forgot-password-modal button {
    padding: 10px 16px;
    margin-right: 10px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
}

#forgot-password-modal button:first-of-type {
    background-color: #4CAF50;
    color: white;
}

#forgot-password-modal button:last-of-type {
    background-color: #ccc;
    color: #333;
}

.input-box select option {
    padding: 10px;
    font-size: 16px;
}

.input-box select {
    width: 100%;
    height: 100%;
    background: transparent;
    border: none;
    outline: none;
    font-size: 1em;
    color: #162938;
    font-weight: 600;
    padding: 0 35px 0 35px;
    appearance: none;
    cursor: pointer;
}

.input-box select {
    border-bottom: 2px solid #162938;
}

.input-box select {
    padding-top: 8px;
}

.input-box select:focus+label,
.input-box select:valid+label {
    top: -5px;
    font-size: 0.9em;
    color: #162938;
}


/* ========== TERMS MODAL DESIGN ========== */
.terms-modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 1000;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.terms-modal.active {
    display: flex;
}

.terms-content {
    background: #fff;
    border-radius: 12px;
    max-width: 650px;
    width: 100%;
    max-height: 80vh;
    overflow: hidden;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
    animation: fadeIn 0.3s ease;
}

.terms-content h2 {
    text-align: center;
    color: #333;
    font-weight: 600;
    padding: 15px 20px;
    border-bottom: 1px solid #ddd;
}

.terms-scroll {
    padding: 20px;
    overflow-y: auto;
    flex: 1;
    color: #444;
    font-size: 15px;
    line-height: 1.6;
}

.terms-scroll::-webkit-scrollbar {
    width: 8px;
}

.terms-scroll::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 5px;
}

.terms-scroll::-webkit-scrollbar-thumb:hover {
    background: #555;
}

.terms-actions {
    text-align: center;
    border-top: 1px solid #ddd;
    padding: 10px 0 15px;
    background: #fafafa;
}

.btn-close {
    background: #0056d2;
    color: #fff;
    border: none;
    padding: 8px 18px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    transition: 0.2s;
}

.btn-close:hover {
    background: #003f99;
}

/* Smooth fade-in effect */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: scale(0.96);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* =====================
   RESPONSIVE DESIGN
   ===================== */

/* Large screens (default) */
.wrapper.global-wrapper {
    width: 90%;
    max-width: 1000px;
}

/* Medium screens - Tablets */
@media (max-width: 992px) {
    header {
        padding: 15px 40px;
    }

    .wrapper.global-wrapper {
        width: 95%;
        padding: 15px;
    }

    .form-box.global {
        padding: 20px;
    }

    .global-section {
        padding: 0 15px;
        font-size: 0.95em;
    }
}

/* Small screens - Phones */
@media (max-width: 768px) {
    header {
        flex-direction: column;
        align-items: flex-start;
        padding: 10px 20px;
    }

    .logo {
        font-size: 1.6em;
    }

    .navigation a,
    .navigation .btnLogin-popup {
        margin: 10px 0;
        font-size: 1em;
    }

    .wrapper.global-wrapper {
        width: 100%;
        margin: 80px 10px;
        padding: 20px;
        border-radius: 12px;
    }

    .form-box.global {
        padding: 15px;
    }

    .input-box {
        margin: 20px 0;
    }
}

/* Very small devices - narrow phones */
@media (max-width: 480px) {
    .wrapper.global-wrapper {
        margin: 60px 10px;
        padding: 15px;
    }

    .form-box.global h2 {
        font-size: 1.5em;
    }

    .input-box input {
        font-size: 0.9em;
    }

    .btn {
        height: 40px;
        font-size: 0.9em;
    }
}