﻿@import url('https://fonts.googleapis.com/css2?family=Exo+2:wght@700;800&family=Rajdhani:wght@500;600;700&display=swap');

:root {
    --bg-dark: #0f0f1a;
    --card-dark: #1a1a2e;
    --neon-cyan: #00f7ff;
    --neon-purple: #bc13fe;
    --text-main: #e0e0e0;
    --input-bg: #0b0b14;
    --border-color: #333355;
}

* {
    box-sizing: border-box;
    font-family: 'Rajdhani', sans-serif;
}

/* --- 2. CẤU TRÚC NỀN & BODY --- */
body {
    background: radial-gradient(circle at center, #242444 0%, #0a0a12 100%);
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    height: 100vh;
    margin: 0;
    color: var(--text-main);
}

/* --- 3. TIÊU ĐỀ & CHỮ --- */
h1 {
    font-weight: bold;
    margin: 0;
    color: var(--neon-cyan);
    text-transform: uppercase;
    font-family: 'Exo 2', sans-serif;
    letter-spacing: 2px;
    text-shadow: 0 0 10px rgba(0, 247, 255, 0.5);
}

p {
    font-size: 14px;
    font-weight: 500;
    line-height: 20px;
    letter-spacing: 0.5px;
    margin: 20px 0 30px;
    color: #a0a0b0;
}

span {
    font-size: 12px;
    color: #a0a0b0;
    margin-top: 10px;
}

a {
    color: var(--neon-cyan);
    font-size: 14px;
    text-decoration: none;
    margin: 15px 0;
    transition: 0.3s;
    font-weight: 600;
}

    a:hover {
        text-shadow: 0 0 8px var(--neon-cyan);
        letter-spacing: 1px;
    }

/* --- 4. CÁC NÚT BẤM (BUTTON) --- */
button {
    border-radius: 0;
    border: none;
    background: linear-gradient(45deg, var(--neon-cyan), var(--neon-purple));
    color: #000;
    font-size: 15px;
    font-weight: 800;
    padding: 12px 45px;
    letter-spacing: 1px;
    text-transform: uppercase;
    transition: transform 0.2s ease-in, box-shadow 0.2s;
    cursor: pointer;
    font-family: 'Exo 2', sans-serif;
    clip-path: polygon(0 0, 90% 0, 100% 30%, 100% 100%, 10% 100%, 0 70%);
}

    button:active {
        transform: scale(0.95);
    }

    button:focus {
        outline: none;
    }

    button:hover {
        box-shadow: 0 0 20px rgba(0, 247, 255, 0.6);
    }

    button:disabled {
        cursor: not-allowed;
        background: #555;
        box-shadow: none;
        opacity: 0.6;
    }

    /* Ghost Button */
    button.ghost {
        background: transparent;
        border: 2px solid var(--neon-cyan);
        color: var(--neon-cyan);
        clip-path: polygon(10% 0, 100% 0, 100% 70%, 90% 100%, 0 100%, 0 30%);
    }

        button.ghost:hover {
            background: var(--neon-cyan);
            color: #000;
            box-shadow: 0 0 20px var(--neon-cyan);
        }

/* --- 5. FORM & INPUT --- */
form {
    background-color: var(--card-dark);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    padding: 0 50px;
    height: 100%;
    text-align: center;
}

input {
    background-color: var(--input-bg);
    border: 1px solid var(--border-color);
    padding: 12px 15px;
    margin: 8px 0;
    width: 100%;
    color: var(--neon-cyan);
    font-family: 'Rajdhani', sans-serif;
    font-weight: 600;
    font-size: 16px;
    transition: 0.3s;
}

    input::placeholder {
        color: #555577;
    }

    input:focus {
        outline: none;
        border-color: var(--neon-cyan);
        box-shadow: 0 0 10px rgba(0, 247, 255, 0.2);
    }

/* --- 6. CONTAINER CHÍNH --- */
.container {
    background-color: var(--card-dark);
    border-radius: 10px;
    box-shadow: 0 0 30px rgba(0, 247, 255, 0.15);
    position: relative;
    overflow: hidden;
    width: 768px;
    max-width: 100%;
    min-height: 520px; /* Tăng chiều cao lên chút để chứa thanh đo không bị chật */
    border: 1px solid var(--border-color);
}

.form-container {
    position: absolute;
    top: 0;
    height: 100%;
    transition: all 0.6s ease-in-out;
}

.sign-in-container {
    left: 0;
    width: 50%;
    z-index: 2;
}

.sign-up-container {
    left: 0;
    width: 50%;
    opacity: 0;
    z-index: 1;
}

/* Hiệu ứng chuyển đổi */
.container.right-panel-active .sign-in-container {
    transform: translateX(100%);
}

.container.right-panel-active .sign-up-container {
    transform: translateX(100%);
    opacity: 1;
    z-index: 5;
    animation: show 0.6s;
}

@keyframes show {
    0%, 49.99% {
        opacity: 0;
        z-index: 1;
    }

    50%, 100% {
        opacity: 1;
        z-index: 5;
    }
}

/* --- 7. OVERLAY --- */
.overlay-container {
    position: absolute;
    top: 0;
    left: 50%;
    width: 50%;
    height: 100%;
    overflow: hidden;
    transition: transform 0.6s ease-in-out;
    z-index: 100;
}

.container.right-panel-active .overlay-container {
    transform: translateX(-100%);
}

.overlay {
    background: linear-gradient(to right, #0f0f1a, #242444);
    color: #FFFFFF;
    position: relative;
    left: -100%;
    height: 100%;
    width: 200%;
    transform: translateX(0);
    transition: transform 0.6s ease-in-out;
    border-left: 2px solid var(--neon-purple);
    border-right: 2px solid var(--neon-cyan);
}

.container.right-panel-active .overlay {
    transform: translateX(50%);
}

.overlay-panel {
    position: absolute;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    padding: 0 40px;
    text-align: center;
    top: 0;
    height: 100%;
    width: 50%;
    transform: translateX(0);
    transition: transform 0.6s ease-in-out;
}

.overlay-left {
    transform: translateX(-20%);
}

.container.right-panel-active .overlay-left {
    transform: translateX(0);
}

.overlay-right {
    right: 0;
    transform: translateX(0);
}

.container.right-panel-active .overlay-right {
    transform: translateX(20%);
}

/* --- 8. SOCIAL ICONS --- */
.social-container {
    margin: 15px 0;
}

    .social-container a {
        border: 1px solid var(--border-color);
        border-radius: 50%;
        display: inline-flex;
        justify-content: center;
        align-items: center;
        margin: 0 5px;
        height: 40px;
        width: 40px;
        background: var(--input-bg);
        color: var(--neon-cyan);
        transition: 0.3s;
    }

        .social-container a:hover {
            background: var(--neon-cyan);
            color: #000;
            box-shadow: 0 0 15px var(--neon-cyan);
        }

/* --- 9. PASSWORD WRAPPER & ICON --- */
.password-wrapper {
    position: relative;
    width: 100%;
    margin: 8px 0;
}

    .password-wrapper input {
        width: 100%;
        padding-right: 40px !important;
        margin: 0;
    }

.toggle-password {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    z-index: 100;
    color: var(--neon-cyan);
    transition: 0.3s;
}

    .toggle-password:hover {
        color: var(--neon-purple);
        text-shadow: 0 0 10px var(--neon-purple);
    }

/* --- 10. THANH ĐO ĐỘ MẠNH MẬT KHẨU (NEW - 4 SEGMENTS) --- */
.strength-meter-container {
    display: flex;
    gap: 5px;
    margin-top: 10px;
    margin-bottom: 15px; /* Thêm khoảng cách dưới để không dính vào input tiếp theo */
    padding: 0 2px;
    width: 100%;
    /* Mặc định ẩn */
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s;
}

    .strength-meter-container.visible {
        opacity: 1;
        visibility: visible;
    }

/* Vạch cơ bản */
.strength-segment {
    flex: 1;
    height: 5px;
    background-color: #2d3436; /* Màu xám tối */
    border-radius: 3px;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

    /* Mức 1: Yếu (Đỏ) */
    .strength-segment.weak {
        background-color: #ff4757;
        box-shadow: 0 0 8px rgba(255, 71, 87, 0.6);
    }

    /* Mức 2: Trung bình (Cam) */
    .strength-segment.medium {
        background-color: #ffa502;
        box-shadow: 0 0 8px rgba(255, 165, 2, 0.6);
    }

    /* Mức 3: Khá (Xanh lá) */
    .strength-segment.good {
        background-color: #2ed573;
        box-shadow: 0 0 8px rgba(46, 213, 115, 0.6);
    }

    /* Mức 4: Mạnh (Xanh Neon) */
    .strength-segment.strong {
        background-color: #00b894;
        box-shadow: 0 0 12px rgba(0, 184, 148, 0.9);
    }
