@font-face {
    font-family: "Rabar_038";
    src: url("../Rabar_038/Rabar_038.eot");
    src:
        url("../Rabar_038/Rabar_038.eot?#iefix") format("embedded-opentype"),
        url("../Rabar_038/Rabar_038.ttf") format("truetype"),
        url("../Rabar_038/Rabar_038.woff") format("woff");
    font-weight: normal;
    font-style: normal;
}

:root {
    --primary: #4f46e5;
    --primary-light: #818cf8;
    --text-dark: #1e293b;
    --text-light: #64748b;
    --white-glass: rgba(255, 255, 255, 0.7);
    --input-bg: rgba(255, 255, 255, 0.5);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Rabar_038', system-ui, -apple-system, sans-serif;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    /* Rich Deep Tech Gradient */
    background: linear-gradient(-45deg, #0f0c29, #302b63, #24243e, #4f46e5, #ec4899);
    background-size: 400% 400%;
    animation: gradientBG 20s ease infinite;
    color: var(--text-dark);
    overflow: hidden;
}

@keyframes gradientBG {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Floating Shapes for Depth */
.background-shapes::before,
.background-shapes::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    filter: blur(60px);
    z-index: -1;
    animation: floatShape 10s infinite alternate;
}

.background-shapes::before {
    width: 300px;
    height: 300px;
    background: rgba(255, 255, 255, 0.3);
    top: 10%;
    left: 20%;
}

.background-shapes::after {
    width: 250px;
    height: 250px;
    background: rgba(255, 255, 255, 0.2);
    bottom: 10%;
    right: 20%;
    animation-delay: -5s;
}

@keyframes floatShape {
    0% { transform: translate(0, 0); }
    100% { transform: translate(30px, 50px); }
}

/* Floating Background Icons */
.background-icons {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 0;
    pointer-events: none;
}

.background-icons i {
    position: absolute;
    color: rgba(255, 255, 255, 0.3);
    animation: floatIcon 20s infinite linear;
    bottom: -150px; /* Start below screen */
}

/* Individual Icon Styles (Randomized positions and sizes) */
.background-icons i:nth-child(1) { left: 10%; font-size: 80px; animation-duration: 25s; animation-delay: 0s; }
.background-icons i:nth-child(2) { left: 20%; font-size: 40px; animation-duration: 15s; animation-delay: 2s; }
.background-icons i:nth-child(3) { left: 80%; font-size: 60px; animation-duration: 20s; animation-delay: 4s; }
.background-icons i:nth-child(4) { left: 40%; font-size: 50px; animation-duration: 18s; animation-delay: 1s; }
.background-icons i:nth-child(5) { left: 70%; font-size: 90px; animation-duration: 30s; animation-delay: 5s; }
.background-icons i:nth-child(6) { left: 30%; font-size: 35px; animation-duration: 22s; animation-delay: 3s; }
.background-icons i:nth-child(7) { left: 90%; font-size: 70px; animation-duration: 28s; animation-delay: 6s; }
.background-icons i:nth-child(8) { left: 50%; font-size: 45px; animation-duration: 16s; animation-delay: 2s; }
.background-icons i:nth-child(9) { left: 15%; font-size: 55px; animation-duration: 24s; animation-delay: 7s; }
.background-icons i:nth-child(10) { left: 60%; font-size: 65px; animation-duration: 26s; animation-delay: 4s; }

@keyframes floatIcon {
    0% {
        transform: translateY(0) rotate(0deg);
        opacity: 0;
    }
    10% {
        opacity: 0.3;
    }
    90% {
        opacity: 0.3;
    }
    100% {
        transform: translateY(-120vh) rotate(360deg);
        opacity: 0;
    }
}

/* Login Container */
.login-container {
    width: 100%;
    max-width: 500px;
    padding: 20px;
    perspective: 1000px;
    z-index: 10; /* Ensure above icons */
    position: relative;
}

.login-card {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 30px;
    border: 1px solid rgba(255, 255, 255, 0.5);
    box-shadow: 
        0 25px 50px -12px rgba(0, 0, 0, 0.25),
        0 0 0 1px rgba(255, 255, 255, 0.2) inset;
    padding: 40px 30px;
    text-align: center;
    transform-style: preserve-3d;
    animation: cardEntry 1s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
    opacity: 0;
    transform: translateY(30px) scale(0.95);
}

@keyframes cardEntry {
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Header */
.login-header {
    margin-bottom: 30px;
}

.logo-container {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #4f46e5, #ec4899);
    border-radius: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    color: white;
    font-size: 32px;
    box-shadow: 0 10px 20px rgba(79, 70, 229, 0.3);
    animation: logoPulse 3s infinite ease-in-out;
}

@keyframes logoPulse {
    0%, 100% { transform: scale(1); box-shadow: 0 10px 20px rgba(79, 70, 229, 0.3); }
    50% { transform: scale(1.05); box-shadow: 0 15px 30px rgba(236, 72, 153, 0.4); }
}

.app-name {
    font-size: 28px;
    font-weight: 800;
    margin-bottom: 5px;
    background: linear-gradient(to right, #4f46e5, #ec4899);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.app-subtitle {
    font-size: 14px;
    color: var(--text-light);
}

/* Inputs */
.input-group {
    position: relative;
    margin-bottom: 20px;
    text-align: right;
}

.input-field {
    width: 100%;
    padding: 16px 50px 16px 20px;
    background: var(--input-bg);
    border: 2px solid transparent;
    border-radius: 16px;
    font-size: 16px;
    color: var(--text-dark);
    font-family: inherit;
    transition: all 0.3s ease;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.02);
}

.input-field:focus {
    background: white;
    border-color: var(--primary);
    outline: none;
    box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.1);
    transform: translateY(-2px);
}

.input-icon {
    position: absolute;
    top: 50%;
    right: 20px;
    transform: translateY(-50%);
    color: #9ca3af;
    font-size: 18px;
    transition: 0.3s;
}

.input-field:focus + .input-icon {
    color: var(--primary);
    transform: translateY(-50%) scale(1.1);
}

.input-label {
    position: absolute;
    right: 50px;
    top: 50%;
    transform: translateY(-50%);
    color: #9ca3af;
    pointer-events: none;
    transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: transparent;
    padding: 0 5px;
}

.input-field:focus ~ .input-label,
.input-field:not(:placeholder-shown) ~ .input-label,
.input-field.has-content ~ .input-label {
    top: 0;
    right: 15px;
    font-size: 12px;
    color: var(--primary);
    background: white;
    border-radius: 4px;
    font-weight: 600;
}

/* Button */
.login-btn {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, #4f46e5, #ec4899);
    color: white;
    border: none;
    border-radius: 16px;
    font-size: 18px;
    font-weight: 700;
    cursor: pointer;
    transition: 0.3s;
    font-family: inherit;
    position: relative;
    overflow: hidden;
    margin-top: 10px;
    box-shadow: 0 10px 20px rgba(79, 70, 229, 0.3);
}

.login-btn:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 15px 30px rgba(236, 72, 153, 0.4);
}

.login-btn:active {
    transform: translateY(-1px);
}

.login-btn span {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

/* Ripple */
.ripple {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.4);
    transform: scale(0);
    animation: ripple 0.6s linear;
    pointer-events: none;
}

@keyframes ripple {
    to { transform: scale(4); opacity: 0; }
}

/* Error */
.error-msg {
    background: #fee2e2;
    color: #b91c1c;
    padding: 12px;
    border-radius: 12px;
    font-size: 14px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    animation: shake 0.4s ease-in-out;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

/* Footer */
.card-footer {
    margin-top: 30px;
    font-size: 13px;
    color: var(--text-light);
    opacity: 0.8;
}
