/* Reset & Base */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #89f7fe 0%, #66a6ff 100%);
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.header {
    text-align: center;
    padding: 20px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid rgba(255,255,255,0.2);
}

.logo {
    width: 80px;
    height: auto;
    margin-bottom: 10px;
}

h1 {
    color: #fff;
    font-weight: 700;
}
.header {
    text-align: center;
    padding: 80px 20px;  /* lớn ban đầu */
    transition: all 0.8s ease;
}

.header .logo {
    width: 120px; /* lớn ban đầu */
    height: auto;
    margin-bottom: 15px;
    transition: all 0.8s ease;
}

.header h1 {
    color: #fff;
    font-size: 2.5em;  /* lớn ban đầu */
    transition: all 0.8s ease;
}

/* Khi thu nhỏ */
.header.shrink {
    padding: 20px 10px;
}

.header.shrink .logo {
    width: 60px;
}

.header.shrink h1 {
    font-size: 1.5em;
}
/* Main */
.login-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    position: relative;
    padding-top: 150px; /* Đủ để icon ko đè header */

    
}

/* User Icon */
.user-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 120px;
    height: 120px;
    margin: -60px 0 0 -60px;
    opacity: 1;
    transition: all 1s ease;
}

.user-icon img {
    width: 100%;
    height: auto;
    border-radius: 50%;
    border: 3px solid rgba(255,255,255,0.6);
    background: rgba(255,255,255,0.2);
    backdrop-filter: blur(8px);
    padding: 5px;
}

.user-icon.move-up {
    top: 110px;
    transform: scale(0.8);
    opacity: 1;
}

/* Switch Buttons */
.login-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 200px;
    opacity: 0;
    transition: opacity 1s ease;
}

.login-buttons.show {
    opacity: 1;
}

.btn-switch {
    padding: 12px 24px;
    border: 2px solid #fff;
    background: rgba(255,255,255,0.15);
    color: #fff;
    border-radius: 8px;
    font-size: 1.1em;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(6px);
}

.btn-switch:hover {
    background: rgba(255,255,255,0.3);
}

.btn-switch.active {
    background: rgba(255,255,255,0.4);
    color: #333;
    font-weight: bold;
}

/* Form Modules */
.form-module {
    display: none;
    max-width: 400px;
    width: 90%;
    margin-top: 30px;
    padding: 30px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    backdrop-filter: blur(10px);
    box-shadow: 0 8px 32px rgba(0,0,0,0.1);
    border: 1px solid rgba(255,255,255,0.2);
    color: #fff;
    text-align: left;
    animation: fadeIn 0.8s ease forwards;
}

.form-module.active {
    display: block;
}

.form-module h2 {
    text-align: center;
    color: #fff;
    margin-bottom: 20px;
}

.form-module form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.form-module input {
    padding: 12px;
    border-radius: 8px;
    border: 1px solid rgba(255,255,255,0.4);
    background: rgba(255,255,255,0.1);
    color: #fff;
    font-size: 1em;
    outline: none;
    transition: background 0.3s ease;
}

.form-module input::placeholder {
    color: rgba(255,255,255,0.7);
}

.form-module input:focus {
    background: rgba(255,255,255,0.2);
}

/* Buttons */
.btn-submit {
    padding: 12px;
    background: #3a86ff;
    color: #fff;
    font-size: 1.1em;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.3s ease;
}

.btn-submit:hover {
    background: #265fc4;
}

.btn-google {
    display: block; /* THÊM */
    padding: 4px;
    background: none;
    color: #fff;
    font-size: 1.1em;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.3s ease;
    margin: 1rem auto;
}

.btn-google:hover {
    background: rgba(255, 255, 255, 0.15);
}

/* Links */
.form-links {
    text-align: center;
    margin-top: 15px;
    font-size: 0.95em;
}

.form-links a {
    color: #fff;
    text-decoration: none;
}

.form-links a:hover {
    text-decoration: underline;
}

/* Password check */
.password-check {
    font-size: 0.85em;
    color: #ffea00;
    margin-top: -8px;
}

/* Checkbox terms */
.terms-checkbox {
    font-size: 0.9em;
}

.terms-checkbox input {
    margin-right: 8px;
}

.terms-checkbox a {
    color: #ffd166;
    text-decoration: underline;
}

/* Or separator */
.or-separator {
    text-align: center;
    margin: 15px 0;
    color: #fff;
    font-size: 0.95em;
}

/* Email check message */
.email-check-msg {
    margin-top: 15px;
    color: #06d6a0;
    font-weight: bold;
    text-align: center;
    font-size: 1.05em;
}

/* Footer */
.footer {
    text-align: center;
    padding: 15px;
    font-size: 0.9em;
    color: #fff;
    background: rgba(0,0,0,0.2);
    margin-top: 40px;
}

/* Animation */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}
.user-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 320px;
    height: 320px;
    margin: -160px 0 0 -160px;
    opacity: 1;
    transition: all 1s ease;
}

.user-icon img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 4px solid rgba(255,255,255,0.6);
    background: rgba(255,255,255,0.2);
    backdrop-filter: blur(8px);
    padding: 5px;
    object-fit: cover;
    box-sizing: border-box;
}

.user-icon .halo {
    position: absolute;
    top: 0; left: 0;
    width: 100%;
    height: 100%;
    border: 4px solid rgba(255,255,255,0.6);
    border-radius: 50%;
    opacity: 0;
    transform: scale(1);
    pointer-events: none;
    box-sizing: border-box;
}

.user-icon .halo.active {
    animation: halo-spin 1s ease forwards;
}

@keyframes halo-spin {
    0% {
        opacity: 1;
        transform: scale(1) rotate(0deg);
    }
    100% {
        opacity: 0;
        transform: scale(1.5) rotate(360deg);
    }
}

/* Responsive: thu nhỏ ở width < 768px */
@media (max-width: 768px) {
    .user-icon {
        width: 200px;
        height: 200px;
        margin: -100px 0 0 -100px;
    }
}

.user-icon.open-form {
    top: 90px; /* cao hơn nữa */
    transform: scale(0.5); /* nhỏ hơn nữa */
    transition: all 0.8s ease;
}
/* Canvas */
#bg-canvas {
    position: fixed;
    top: 0;
    left: 0;
    z-index: -2;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
}

/* Radial light effect */
body::before {
    content: "";
    position: fixed;
    top: 0; left: 0;
    width: 100vw; height: 100vh;
    background: radial-gradient(circle at center, rgba(255,255,255,0.15), transparent 70%);
    z-index: -1;
    pointer-events: none;
}

/* Question icons */
.bg-question {
    position: fixed;
    top: 0; left: 0;
    width: 100vw; height: 100vh;
    z-index: -1;
    pointer-events: none;
}

.q-icon {
    position: absolute;
    opacity: 0.2;
    width: 100px;
    height: 100px;
    animation: spin 8s infinite ease-in-out alternate;
}

.q1 { top: 10%; left: 20%; animation-delay: 0s; }
.q2 { top: 50%; left: 70%; animation-delay: 1s; }
.q3 { top: 80%; left: 40%; animation-delay: 2s; }

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



.input-group {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    padding: 6px 10px;
    margin: 0.5rem 0;
    border: 1px solid rgba(255,255,255,0.15);
}

.input-icon {
    margin-right: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
}

.input-group input {
    flex: 1;
    background: none;
    border: none;
    outline: none;
    color: #fff;
    font-size: 1em;
}



.password-check {
    margin-top: 5px;
}

.strength-bar {
    width: 100%;
    height: 6px;
    background-color: #ccc;
    border-radius: 4px;
    margin-bottom: 4px;
    transition: background-color 0.3s ease, width 0.3s ease;
}

.strength-text {
    font-size: 0.9em;
    color: #fff;
}



input[type="checkbox"] {
    scale: 1.5;
    cursor: pointer;
}
.hidden {
    display: none !important;
}



.post-login-options {
    /* max-width: 420px; */
    margin: 100px auto!important;
    padding: 30px;
    background: rgba(255, 255, 255, 0.12);
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(16px) saturate(180%);
    -webkit-backdrop-filter: blur(16px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.3);
    text-align: center;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
    color: #fff;
}

.post-login-options .buttons button {
    margin: 10px;
    padding: 12px 24px;
    font-size: 16px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    cursor: pointer;
    transition: all 0.2s ease;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.post-login-options .buttons button:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.4);
}
/* Style chung cho select */
select, select[name="nation"], select#nationality {
    width: 300px;
    padding: 8px 10px;
    border: 1px solid #ccc;
    border-radius: 8px;
    background-color: rgba(255, 255, 255, 0.9);
    color: #333;
    font-size: 16px;
    appearance: none; /* Ẩn arrow mặc định (nếu muốn custom sau) */
    -webkit-appearance: none;
    -moz-appearance: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

/* Khi hover */
select:hover {
    border-color: #888;
}

/* Khi focus */
select:focus {
    border-color: #4f9dde;
    box-shadow: 0 0 0 2px rgba(79, 157, 222, 0.2);
    outline: none;
}

#signup-birthday.flatpickr-input {
    background: white url('/assets/icons/calendar.svg') no-repeat right 10px center;
    background-size: 18px;
    padding-right: 36px;
    border: 1px solid #ccc;
    border-radius: 8px;
    height: 40px;
    font-size: 15px;
}

#signup-birthday:hover {
    border-color: #7b68ee;
    background-color: #f8f8fc;
}

#birthday-age {
    color: #999;
    font-style: italic;
}



#reset-password-form {
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(8px);
    border-radius: 12px;
    padding: 25px 30px;
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
    max-width: 360px;
    margin: 20px auto;
    text-align: center;
    color: #f2f2f2;
}

#reset-password-form h3 {
    font-size: 20px;
    margin-bottom: 15px;
    color: #fff;
}

#reset-password-form input[type="password"] {
    width: 100%;
    padding: 10px 14px;
    margin: 10px 0;
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 8px;
    background: rgba(255,255,255,0.05);
    color: #fff;
    font-size: 15px;
    outline: none;
    transition: border-color 0.3s ease, background-color 0.3s ease;
}

#reset-password-form input:focus {
    border-color: #66ccff;
    background: rgba(255,255,255,0.1);
}

#reset-password-form button[type="submit"] {
    display: inline-block;
    width: 100%;
    padding: 12px 0;
    margin-top: 15px;
    background: linear-gradient(90deg, #66ccff, #3399ff);
    border: none;
    border-radius: 8px;
    color: #fff;
    font-size: 16px;
    cursor: pointer;
    transition: background 0.3s ease, transform 0.2s ease;
}

#reset-password-form button[type="submit"]:hover {
    background: linear-gradient(90deg, #3399ff, #66ccff);
    transform: translateY(-1px);
}