/* assets/css/login_styles.css */

@import url('https://fonts.googleapis.com/css2?family=Roboto+Mono:wght@300;400;500;700&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@400;500;700&display=swap');

:root {
    --bg-dark: #00020d;
    --primary-glow: #00eaff;
    --secondary-glow: rgba(0, 234, 255, 0.7);
    --border-color: rgba(0, 234, 255, 0.4);
    --surface-color: rgba(0, 15, 30, 0.2);
    --text-light: #e0f7fa;
    --text-muted: #a7d9de;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Roboto Mono', monospace;
    background-color: var(--bg-dark);
    color: var(--text-light);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    overflow: hidden;
    position: relative;
}

.background-animation {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -2;
    background-image: 
        linear-gradient(rgba(0, 234, 255, 0.08) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 234, 255, 0.08) 1px, transparent 1px);
    background-size: 50px 50px;
    animation: move-grid 25s linear infinite;
    filter: brightness(0.8);
}

.star-field {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    pointer-events: none;
}
.star-field span {
    position: absolute;
    background-color: var(--primary-glow);
    border-radius: 50%;
    opacity: 0;
    animation: twinkle 10s infinite;
    box-shadow: 0 0 5px var(--primary-glow);
}
.star-field span:nth-child(1) { width: 3px; height: 3px; top: 15%; left: 20%; animation-delay: 0s; }
.star-field span:nth-child(2) { width: 2px; height: 2px; top: 40%; left: 70%; animation-delay: 1.5s; }
.star-field span:nth-child(3) { width: 4px; height: 4px; top: 70%; left: 30%; animation-delay: 3s; }
.star-field span:nth-child(4) { width: 2px; height: 2px; top: 85%; left: 55%; animation-delay: 4.5s; }
.star-field span:nth-child(5) { width: 3px; height: 3px; top: 5%; left: 80%; animation-delay: 6s; }
.star-field span:nth-child(6) { width: 2px; height: 2px; top: 25%; left: 10%; animation-delay: 7.5s; }


.circuit-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    pointer-events: none;
    background-image: url('data:image/svg+xml;utf8,<svg width="100%" height="100%" xmlns="http://www.w3.org/2000/svg"><defs><pattern id="grid" width="100" height="100" patternUnits="userSpaceOnUse"><path d="M 100 0 L 0 0 0 100" fill="none" stroke="rgba(0, 234, 255, 0.05)" stroke-width="1"/></pattern></defs><rect width="100%" height="100%" fill="url(#grid)" /></svg>');
    opacity: 0.3;
    animation: circuit-flow 30s linear infinite;
    transform: scale(1.2);
}

@keyframes move-grid {
    from { background-position: 0 0; }
    to { background-position: 500px 500px; }
}

@keyframes twinkle {
    0%, 100% { opacity: 0; transform: scale(0.5); }
    50% { opacity: 0.8; transform: scale(1); }
}

@keyframes circuit-flow {
    0% { background-position: 0 0; }
    100% { background-position: 1000px 1000px; }
}


.login-container {
    width: 100%;
    max-width: 480px;
    padding: 40px;
    background-color: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: 15px;
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    box-shadow: 0 0 40px rgba(0, 234, 255, 0.2), inset 0 0 15px rgba(0, 234, 255, 0.15);
    animation: fade-in 1s ease-out;
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
}

@keyframes fade-in {
    from { opacity: 0; transform: translateY(20px) scale(0.9); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.gif-container {
    margin-bottom: 25px;
    width: 150px;
    height: 150px;
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid var(--primary-glow);
    box-shadow: 0 0 25px var(--primary-glow);
    animation: pulse-glow 2s infinite alternate;
}
.gif-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

@keyframes pulse-glow {
    from { box-shadow: 0 0 20px var(--primary-glow); transform: scale(1); }
    to { box-shadow: 0 0 40px var(--primary-glow), 0 0 60px rgba(0, 234, 255, 0.4); transform: scale(1.02); }
}


.login-form-section h2 {
    font-family: 'Orbitron', sans-serif;
    color: var(--primary-glow);
    text-align: center;
    margin-bottom: 15px;
    font-size: 1.6rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    overflow: hidden;
    border-right: 3px solid var(--secondary-glow);
    max-width: fit-content;
    margin-left: auto;
    margin-right: auto;
    text-shadow: 0 0 12px var(--primary-glow);
    animation: reveal-text 3s steps(24, end) forwards, blink-caret .75s step-end infinite; 
}


@keyframes reveal-text {
    from { clip-path: inset(0 100% 0 0); }
    to { clip-path: inset(0 0 0 0); }
}
@keyframes blink-caret {
    from, to { border-color: transparent }
    50% { border-color: var(--secondary-glow); }
}

.login-form-section .subtitle {
    text-align: center;
    margin-bottom: 30px;
    color: var(--text-muted);
    font-size: 0.95rem;
}

.alert-danger {
    background-color: rgba(255, 59, 48, 0.2);
    border: 1px solid rgba(255, 59, 48, 0.7);
    color: #ff8a80;
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 20px;
    text-align: center;
    font-size: 0.9rem;
    box-shadow: 0 0 10px rgba(255, 59, 48, 0.2);
}

.form-group {
    position: relative;
    margin-bottom: 25px;
}

.form-group .icon {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--secondary-glow);
    font-size: 1.1rem;
    z-index: 2; /* THÊM DÒNG NÀY ĐỂ SỬA LỖI */
}

.form-group input {
    width: 100%;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(0, 234, 255, 0.2);
    border-radius: 8px;
    padding: 12px 12px 12px 45px;
    color: var(--text-light);
    font-size: 1rem;
    font-family: 'Roboto Mono', monospace;
    transition: border-color 0.3s, box-shadow 0.3s, background-color 0.3s;
}

.form-group input::placeholder {
    color: #6a8286;
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary-glow);
    box-shadow: 0 0 15px rgba(0, 234, 255, 0.4), inset 0 0 6px rgba(0, 234, 255, 0.2);
    background: rgba(255,255,255,0.1);
}

.options-group {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
    margin-bottom: 30px;
}

.checkbox-remember {
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
}
.checkbox-remember input {
    appearance: none;
    width: 18px;
    height: 18px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    margin-right: 10px;
    background-color: rgba(0, 234, 255, 0.1);
    display: grid;
    place-content: center;
    transition: all 0.2s ease;
    cursor: pointer;
}
.checkbox-remember input::before {
    content: "\2713";
    font-size: 1.1em;
    color: transparent;
    transform: scale(0);
    transition: transform 0.2s ease, color 0.2s ease;
    filter: drop-shadow(0 0 5px var(--primary-glow));
}
.checkbox-remember input:checked {
    background-color: var(--primary-glow);
    border-color: var(--primary-glow);
    box-shadow: 0 0 10px rgba(0, 234, 255, 0.5);
}
.checkbox-remember input:checked::before {
    transform: scale(1);
    color: var(--bg-dark);
}

button[type="submit"] {
    width: 100%;
    padding: 15px;
    border: none;
    border-radius: 10px;
    background: linear-gradient(90deg, #00eaff 0%, #00b9ff 100%);
    color: #000;
    font-size: 1rem;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    transition: box-shadow 0.3s ease, transform 0.2s ease, filter 0.3s;
    box-shadow: 0 0 20px rgba(0, 234, 255, 0.4);
}

button[type="submit"]:hover {
    box-shadow: 0 0 30px var(--primary-glow), 0 0 50px rgba(0, 185, 255, 0.6);
    transform: translateY(-2px);
    filter: brightness(1.1);
}

.register-link {
    text-align: center;
    margin-top: 25px;
    font-size: 0.9rem;
}

.register-link a {
    color: var(--primary-glow);
    text-decoration: none;
    font-weight: bold;
    transition: text-shadow 0.3s;
}

.register-link a:hover {
    text-shadow: 0 0 10px var(--secondary-glow);
}

@media (max-width: 500px) {
    .login-container {
        max-width: 90%;
        padding: 30px;
    }
    .login-form-section h2 {
        font-size: 1.4rem;
        letter-spacing: 1px;
    }
    .gif-container {
        width: 100px;
        height: 100px;
    }
}