/* ============================================================
   LOGIN PAGE — resources/css/login.css
   ============================================================ */

/* ── Keyframe Animations ─────────────────────────────────── */
@keyframes gradientShift {
    0%   { background-position: 0% 50%; }
    50%  { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

@keyframes float {
    0%, 100% { transform: translateY(0px) rotate(0deg); opacity: 0.7; }
    50%       { transform: translateY(-20px) rotate(180deg); opacity: 0.3; }
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(40px) scale(0.97); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes logoPulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(59, 130, 246, 0.5); }
    50%       { box-shadow: 0 0 0 14px rgba(59, 130, 246, 0); }
}

@keyframes shimmer {
    0%   { background-position: -200% center; }
    100% { background-position: 200% center; }
}

@keyframes inputGlow {
    0%, 100% { box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2); }
    50%       { box-shadow: 0 0 0 5px rgba(59, 130, 246, 0.4); }
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    20%       { transform: translateX(-6px); }
    40%       { transform: translateX(6px); }
    60%       { transform: translateX(-4px); }
    80%       { transform: translateX(4px); }
}

/* ── Body / Background ───────────────────────────────────── */
body {
    background: linear-gradient(-45deg, #1e3a8a, #1d4ed8, #0ea5e9, #1e40af, #312e81);
    background-size: 400% 400%;
    animation: gradientShift 8s ease infinite;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

/* ── Floating Blobs ──────────────────────────────────────── */
.blob {
    position: fixed;
    border-radius: 50%;
    filter: blur(60px);
    opacity: 0.15;
    pointer-events: none;
}

.blob-1 {
    width: 400px;
    height: 400px;
    background: #60a5fa;
    top: -100px;
    left: -100px;
    animation: float 7s ease-in-out infinite;
}

.blob-2 {
    width: 300px;
    height: 300px;
    background: #818cf8;
    bottom: -80px;
    right: -80px;
    animation: float 9s ease-in-out infinite reverse;
}

.blob-3 {
    width: 200px;
    height: 200px;
    background: #38bdf8;
    top: 50%;
    left: 60%;
    animation: float 6s ease-in-out infinite 2s;
}

/* ── Floating Particles ──────────────────────────────────── */
.particle {
    position: fixed;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.4);
    pointer-events: none;
    animation: float var(--dur) ease-in-out infinite var(--delay);
}

/* ── Login Card ──────────────────────────────────────────── */
.login-card {
    animation: slideUp 0.7s cubic-bezier(0.22, 1, 0.36, 1) both;
    backdrop-filter: blur(10px);
    background: rgba(255, 255, 255, 0.97);
    border: 1px solid rgba(255, 255, 255, 0.3);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.login-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 32px 64px rgba(0, 0, 0, 0.25);
}

/* ── Logo ────────────────────────────────────────────────── */
.logo-wrap {
    animation: logoPulse 2.5s ease-in-out infinite;
    transition: transform 0.3s ease;
}

.logo-wrap:hover {
    transform: scale(1.08) rotate(3deg);
}

/* ── Input Fields ────────────────────────────────────────── */
.input-field {
    transition: border-color 0.3s, box-shadow 0.3s, transform 0.2s;
}

.input-field:focus {
    border-color: #3b82f6;
    animation: inputGlow 1.5s ease-in-out infinite;
    transform: scale(1.01);
}

.input-field:hover:not(:focus) {
    border-color: #93c5fd;
    box-shadow: 0 0 0 3px rgba(147, 197, 253, 0.2);
}

/* ── Input Icon ──────────────────────────────────────────── */
.input-icon {
    transition: color 0.3s, transform 0.3s;
}

.input-wrapper:focus-within .input-icon {
    color: #3b82f6;
    transform: scale(1.2);
}

/* ── Submit Button ───────────────────────────────────────── */
.btn-login {
    background: linear-gradient(135deg, #2563eb, #1d4ed8, #3b82f6, #2563eb);
    background-size: 300% auto;
    transition: background-position 0.5s, transform 0.2s, box-shadow 0.3s;
    position: relative;
    overflow: hidden;
}

.btn-login:hover {
    background-position: right center;
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(37, 99, 235, 0.5);
}

.btn-login:active {
    transform: translateY(0px) scale(0.98);
}

.btn-login::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    background-size: 200% auto;
    animation: shimmer 2.5s linear infinite;
}

/* ── Form Label ──────────────────────────────────────────── */
.form-label {
    transition: color 0.3s;
}

.input-wrapper:focus-within + .form-label,
.input-wrapper:focus-within ~ .form-label {
    color: #2563eb;
}

/* ── Error Box ───────────────────────────────────────────── */
.error-box {
    animation: shake 0.5s ease;
}

/* ── Checkbox ────────────────────────────────────────────── */
#remember {
    transition: transform 0.2s;
    cursor: pointer;
}

#remember:hover {
    transform: scale(1.2);
}

/* ── Copyright ───────────────────────────────────────────── */
.copyright {
    opacity: 0;
    animation: slideUp 1s ease 0.5s forwards;
}
