@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');

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

body {
    font-family: 'Poppins', sans-serif;
    background: linear-gradient(135deg, #0f3553 0%, #0a2842 50%, #0f3553 100%);
    min-height: 100vh;
    overflow: hidden;
    position: relative;
}

/* Animated background elements */
.bg-animation {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 1;
}

.floating-shapes {
    position: absolute;
    width: 100%;
    height: 100%;
}

.shape {
    position: absolute;
    opacity: 0.1;
    animation: float 8s ease-in-out infinite;
}

.shape:nth-child(1) {
    top: 10%;
    left: 5%;
    font-size: 4rem;
    animation-delay: 0s;
    color: rgba(0,201,255,0.3);
}

.shape:nth-child(2) {
    top: 60%;
    right: 10%;
    font-size: 3rem;
    animation-delay: 3s;
    color: rgba(255,255,255,0.2);
}

.shape:nth-child(3) {
    bottom: 20%;
    left: 15%;
    font-size: 2.5rem;
    animation-delay: 6s;
    color: rgba(0,201,255,0.2);
}

.shape:nth-child(4) {
    top: 30%;
    right: 30%;
    font-size: 2rem;
    animation-delay: 2s;
    color: rgba(255,255,255,0.15);
}

@keyframes float {
    0%, 100% { 
        transform: translateY(0px) rotate(0deg) scale(1); 
    }
    33% { 
        transform: translateY(-30px) rotate(120deg) scale(1.1); 
    }
    66% { 
        transform: translateY(20px) rotate(240deg) scale(0.9); 
    }
}

/* Geometric patterns */
.geometric-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0.05;
    background-image: 
        radial-gradient(circle at 25% 25%, rgba(255,255,255,0.2) 2px, transparent 2px),
        radial-gradient(circle at 75% 75%, rgba(0,201,255,0.2) 1px, transparent 1px);
    background-size: 50px 50px, 30px 30px;
    animation: geometricMove 20s linear infinite;
}

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

/* Main container */
.login-container {
    position: relative;
    z-index: 2;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.login-card {
    background: rgba(255,255,255,0.95);
    backdrop-filter: blur(20px);
    border-radius: 24px;
    box-shadow: 
        0 25px 50px rgba(0,0,0,0.15),
        0 0 0 1px rgba(0,201,255,0.1);
    overflow: hidden;
    width: 100%;
    max-width: 1000px;
    min-height: 600px;
    position: relative;
    animation: slideUp 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(40px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.login-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    min-height: 600px;
}

/* Left side - Image section */
.image-section {
    background: linear-gradient(135deg, #0f3553 0%, #0a2842 100%);
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3rem;
}

.image-content {
    text-align: center;
    color: white;
    z-index: 2;
    position: relative;
}

.bible-icon {
    width: 120px;
    height: 120px;
    background: rgba(0,201,255,0.15);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 2rem;
    font-size: 3rem;
    color: #00c9ff;
    box-shadow: 0 0 30px rgba(0,201,255,0.2);
    animation: pulse 3s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); box-shadow: 0 0 30px rgba(0,201,255,0.2); }
    50% { transform: scale(1.05); box-shadow: 0 0 40px rgba(0,201,255,0.4); }
}

.image-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 1rem;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.image-subtitle {
    font-size: 1.1rem;
    font-weight: 300;
    opacity: 0.9;
    line-height: 1.6;
}

/* Decorative elements for image section */
.image-section::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(0,201,255,0.08) 1px, transparent 1px);
    background-size: 30px 30px;
    animation: rotate 30s linear infinite;
}

@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Right side - Form section */
.form-section {
    padding: 3rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background: white;
}

.form-header {
    text-align: center;
    margin-bottom: 3rem;
    animation: fadeInDown 0.8s ease-out 0.2s both;
}

.form-title {
    font-size: 2.2rem;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 0.5rem;
}

.form-subtitle {
    color: #666;
    font-size: 1rem;
    font-weight: 400;
}

/* Form styling */
.login-form {
    animation: fadeInUp 0.8s ease-out 0.4s both;
}

.form-group {
    margin-bottom: 1.5rem;
    position: relative;
}

.form-label {
    display: block;
    font-weight: 500;
    color: #333;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.input-container {
    position: relative;
    display: flex;
    align-items: center;
}

.input-icon {
    position: absolute;
    left: 1rem;
    color: #0f3553;
    font-size: 1.1rem;
    z-index: 3;
    transition: color 0.3s ease;
}

.form-input {
    width: 100%;
    padding: 1rem 1rem 1rem 3rem;
    border: 2px solid #e1e5e9;
    border-radius: 12px;
    font-size: 1rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: white;
    font-family: 'Poppins', sans-serif;
}

.form-input:focus {
    outline: none;
    border-color: #0f3553;
    box-shadow: 0 0 0 3px rgba(15, 53, 83, 0.1);
    transform: translateY(-2px);
}

.form-input:focus + .input-icon {
    color: #00c9ff;
}

.password-toggle {
    position: absolute;
    right: 1rem;
    background: none;
    border: none;
    color: #666;
    cursor: pointer;
    font-size: 1.1rem;
    padding: 0.5rem;
    border-radius: 6px;
    transition: all 0.3s ease;
    z-index: 3;
}

.password-toggle:hover {
    color: #0f3553;
    background: rgba(15, 53, 83, 0.05);
}

/* Submit button */
.submit-btn {
    width: 100%;
    padding: 1rem;
    background: linear-gradient(135deg, #0f3553 0%, #0a2842 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 600;
    font-family: 'Poppins', sans-serif;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 15px rgba(15, 53, 83, 0.3);
    position: relative;
    overflow: hidden;
    margin-top: 1rem;
}

.submit-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(0,201,255,0.2), transparent);
    transition: left 0.5s ease;
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(15, 53, 83, 0.4);
    background: linear-gradient(135deg, #114060 0%, #0c2d47 100%);
}

.submit-btn:hover::before {
    left: 100%;
}

.submit-btn:active {
    transform: translateY(0);
}

/* Loading state */
.submit-btn.loading {
    pointer-events: none;
    opacity: 0.8;
}

.submit-btn.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid transparent;
    border-top: 2px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Footer */
.login-footer {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
    color: rgba(255,255,255,0.8);
    font-size: 0.85rem;
    animation: fadeIn 1s ease-out 0.8s both;
    z-index: 3;
}

.footer-logo {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: #00c9ff;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.footer-logo:hover {
    color: white;
    text-decoration: none;
}

/* Error message */
.error-message {
    background: linear-gradient(135deg, #ff4757, #ff3742);
    color: white;
    padding: 1rem;
    border-radius: 12px;
    margin-bottom: 1rem;
    font-size: 0.9rem;
    display: none;
    align-items: center;
    gap: 0.5rem;
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Animation keyframes */
@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Responsive design */
@media (max-width: 768px) {
    .login-container {
        padding: 1rem;
    }
    
    .login-card {
        border-radius: 16px;
        min-height: auto;
    }
    
    .login-content {
        grid-template-columns: 1fr;
    }
    
    .image-section {
        display: none;
    }
    
    .form-section {
        padding: 2rem 1.5rem;
    }
    
    .form-title {
        font-size: 1.8rem;
    }
    
    .bible-icon {
        width: 80px;
        height: 80px;
        font-size: 2rem;
        margin-bottom: 1rem;
    }
    
    .image-title {
        font-size: 1.5rem;
    }
    
    .login-footer {
        position: relative;
        bottom: auto;
        left: auto;
        transform: none;
        margin-top: 2rem;
    }
}

@media (max-width: 480px) {
    .form-section {
        padding: 1.5rem 1rem;
    }
    
    .form-title {
        font-size: 1.6rem;
    }
    
    .form-input {
        padding: 0.8rem 0.8rem 0.8rem 2.5rem;
    }
    
    .submit-btn {
        padding: 0.8rem;
        font-size: 1rem;
    }
}