:root {
    --primary-color: #00d2ff;
    --secondary-color: #3a7bd5;
    --bg-color: #0f0c29;
    --card-bg: rgba(255, 255, 255, 0.1);
    --text-color: #ffffff;
    --error-color: #ff4b4b;
    --glass-border: 1px solid rgba(255, 255, 255, 0.2);
    --font-family: 'Inter', sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: var(--font-family);
}

body {
    background: linear-gradient(135deg, #0f0c29, #302b63, #24243e);
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

.container {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 100%;
    position: relative;
}

/* Background Animation Elements */
.circle {
    position: absolute;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    filter: blur(80px);
    opacity: 0.4;
    animation: float 10s infinite ease-in-out;
}

.circle-1 {
    width: 300px;
    height: 300px;
    top: -50px;
    left: -50px;
}

.circle-2 {
    width: 400px;
    height: 400px;
    bottom: -100px;
    right: -100px;
    animation-delay: 2s;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0); }
    50% { transform: translate(30px, 50px); }
}

/* Login Card */
.login-card {
    background: var(--card-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: var(--glass-border);
    border-radius: 20px;
    padding: 40px;
    width: 900px;
    height: 550px;
    display: flex;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.5);
    overflow: hidden;
    position: relative;
    z-index: 10;
}

.image-section {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    padding-right: 20px;
    border-right: 1px solid rgba(255, 255, 255, 0.1);
}

.image-section img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 15px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
    transition: transform 0.5s ease;
}

.image-section img:hover {
    transform: scale(1.02);
}

.form-section {
    flex: 1;
    padding-left: 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.form-section h2 {
    color: var(--text-color);
    font-size: 2rem;
    margin-bottom: 10px;
    font-weight: 700;
}

.form-section p {
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 30px;
    font-size: 0.9rem;
}

.input-group {
    position: relative;
    margin-bottom: 25px;
}

.input-group input {
    width: 100%;
    padding: 15px 45px 15px 15px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    color: var(--text-color);
    font-size: 1rem;
    outline: none;
    transition: all 0.3s ease;
}

.input-group input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 10px rgba(0, 210, 255, 0.3);
    background: rgba(255, 255, 255, 0.1);
}

.input-group label {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: rgba(255, 255, 255, 0.5);
    pointer-events: none;
    transition: all 0.3s ease;
}

.input-group input:focus ~ label,
.input-group input:valid ~ label {
    top: -10px;
    left: 10px;
    font-size: 0.8rem;
    background: var(--bg-color); /* Fallback if needed, but better transparent */
    background: #24243e; /* Match gradient approx or use a pill */
    padding: 0 5px;
    color: var(--primary-color);
    border-radius: 4px;
}

.input-group .icon {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: color 0.3s;
}

.input-group .icon:hover {
    color: var(--text-color);
}

.btn-login {
    width: 100%;
    padding: 15px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    border: none;
    border-radius: 10px;
    color: white;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    margin-top: 10px;
}

.btn-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 210, 255, 0.4);
}

.btn-login:active {
    transform: translateY(0);
}

.error-msg {
    color: var(--error-color);
    font-size: 0.85rem;
    margin-top: 15px;
    text-align: center;
    min-height: 20px;
    opacity: 0;
    transition: opacity 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
}

.error-msg.visible {
    opacity: 1;
}

/* Responsive */
@media (max-width: 950px) {
    .login-card {
        width: 90%;
        height: auto;
        flex-direction: column;
        padding: 30px;
    }
    
    .image-section {
        border-right: none;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        padding-right: 0;
        padding-bottom: 20px;
        margin-bottom: 20px;
        height: 200px;
    }
    
    .form-section {
        padding-left: 0;
    }
}
