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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    position: relative;
    overflow: hidden;
}

/* Background Animation */
body::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1000 600"><defs><linearGradient id="sunset" x1="0%" y1="0%" x2="100%" y2="100%"><stop offset="0%" style="stop-color:%23ff7e5f;stop-opacity:0.3" /><stop offset="100%" style="stop-color:%23feb47b;stop-opacity:0.3" /></linearGradient></defs><rect width="1000" height="600" fill="url(%23sunset)"/><polygon points="0,400 100,380 200,390 300,370 400,385 500,375 600,390 700,380 800,395 900,385 1000,390 1000,600 0,600" fill="%23d4a574" opacity="0.2"/><polygon points="0,450 150,430 300,440 450,425 600,435 750,430 900,440 1000,435 1000,600 0,600" fill="%23c49968" opacity="0.3"/></svg>') center/cover;
    pointer-events: none;
    z-index: 1;
}

.floating-shapes {
    position: absolute;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 2;
}

.shape {
    position: absolute;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    animation: float 15s infinite linear;
}

.shape:nth-child(1) {
    width: 80px;
    height: 80px;
    left: 10%;
    animation-delay: 0s;
}

.shape:nth-child(2) {
    width: 120px;
    height: 120px;
    left: 80%;
    animation-delay: 5s;
}

.shape:nth-child(3) {
    width: 60px;
    height: 60px;
    left: 40%;
    animation-delay: 2s;
}

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

/* Auth Container */
.auth-container {
    background: white;
    border-radius: 25px;
    padding: 0;
    width: 100%;
    max-width: 500px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
    display: grid;
    grid-template-columns: 1fr;
    min-height: 500px;
    position: relative;
    z-index: 10;
    overflow: hidden;
}

/* Auth Form Section */
.auth-form-section {
    padding: 40px 50px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.logo-section {
    text-align: center;
    margin-bottom: 30px;
}

.logo {
    width: 200px;
    height: auto;
    margin: 0 auto 10px;
    display: block;
}

.logo-subtitle {
    font-size: 14px;
    color: #666;
    letter-spacing: 1px;
    font-weight: 600;
}

.welcome-text {
    text-align: center;
    margin-bottom: 30px;
}

.welcome-title {
    font-size: 24px;
    font-weight: 700;
    color: #2d3748;
    margin-bottom: 8px;
}

.welcome-subtitle {
    font-size: 16px;
    color: #666;
    line-height: 1.6;
}

/* Form Styles */
.auth-form {
    width: 100%;
}

.form-group {
    margin-bottom: 20px;
    position: relative;
}

.form-label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #4a5568;
    margin-bottom: 8px;
}

.form-input {
    width: 100%;
    padding: 15px 20px;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    font-size: 16px;
    transition: all 0.3s;
    background: #f8f9fc;
}

.form-input:focus {
    outline: none;
    border-color: #5a67d8;
    background: white;
    box-shadow: 0 0 0 3px rgba(90, 103, 216, 0.1);
}

.form-input-icon {
    position: relative;
}

.form-input-icon i {
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    color: #a0aec0;
    transition: all 0.3s;
}

.form-input-icon .form-input {
    padding-left: 50px;
}

.form-input-icon .form-input:focus + i {
    color: #5a67d8;
}

.password-toggle {
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #a0aec0;
    cursor: pointer;
    font-size: 16px;
    transition: all 0.3s;
}

.password-toggle:hover {
    color: #5a67d8;
}

/* Error Messages */
.input-error {
    color: #e53e3e;
    font-size: 14px;
    margin-top: 8px;
    display: block;
}

/* Session Status */
.auth-session-status {
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 14px;
    font-weight: 500;
    background: #f0fff4;
    color: #38a169;
    border: 1px solid #9ae6b4;
}

.auth-session-status.error {
    background: #fed7d7;
    color: #c53030;
    border: 1px solid #feb2b2;
}

.auth-session-status.info {
    background: #ebf8ff;
    color: #2b6cb0;
    border: 1px solid #90cdf4;
}

/* Remember Me & Forgot Password */
.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
}

.remember-me {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #4a5568;
    cursor: pointer;
}

.remember-me input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: #5a67d8;
}

.forgot-password {
    color: #5a67d8;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s;
}

.forgot-password:hover {
    color: #4c51bf;
    text-decoration: underline;
}

/* Buttons */
.btn {
    display: block;
    width: 100%;
    padding: 15px;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: all 0.3s;
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    margin-bottom: 20px;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
}

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

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

/* Google Login Button */
.btn-google {
    background: white;
    color: #4a5568;
    border: 2px solid #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 25px;
}

.btn-google:hover {
    background: #f8f9fc;
    border-color: #cbd5e0;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
}

.google-icon {
    width: 20px;
    height: 20px;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path fill="%23EA4335" d="M22.56 12.25c0-.78-.07-1.53-.2-2.25H12v4.26h5.92c-.26 1.37-1.04 2.53-2.21 3.31v2.77h3.57c2.08-1.92 3.28-4.74 3.28-8.09z"/><path fill="%2334A853" d="M12 23c2.97 0 5.46-.98 7.28-2.66l-3.57-2.77c-.98.66-2.23 1.06-3.71 1.06-2.86 0-5.29-1.93-6.16-4.53H2.18v2.84C3.99 20.53 7.7 23 12 23z"/><path fill="%23FBBC05" d="M5.84 14.09c-.22-.66-.35-1.36-.35-2.09s.13-1.43.35-2.09V7.07H2.18C1.43 8.55 1 10.22 1 12s.43 3.45 1.18 4.93l2.85-2.22.81-.62z"/><path fill="%23EA4335" d="M12 5.38c1.62 0 3.06.56 4.21 1.64l3.15-3.15C17.45 2.09 14.97 1 12 1 7.7 1 3.99 3.47 2.18 7.07l3.66 2.84c.87-2.6 3.3-4.53 6.16-4.53z"/></svg>') center/contain no-repeat;
}

.divider {
    text-align: center;
    margin: 25px 0;
    position: relative;
}

.divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: #e2e8f0;
}

.divider span {
    background: white;
    padding: 0 20px;
    color: #a0aec0;
    font-size: 14px;
}

.auth-link {
    text-align: center;
    font-size: 14px;
    color: #666;
}

.auth-link a {
    color: #5a67d8;
    text-decoration: none;
    font-weight: 600;
}

.auth-link a:hover {
    text-decoration: underline;
}

/* Loading Animation */
.loading {
    display: none;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255,255,255,0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s ease-in-out infinite;
    margin-right: 10px;
}

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

/* Responsive Design */
@media (max-width: 768px) {
    body {
        padding: 10px;
    }

    .auth-container {
        grid-template-columns: 1fr;
        max-width: 400px;
        min-height: auto;
    }

    .auth-form-section {
        padding: 30px 25px;
    }

    .logo {
        width: 150px;
    }

    .welcome-title {
        font-size: 22px;
    }

    .form-input {
        padding: 12px 15px;
        font-size: 16px;
    }

    .form-input-icon .form-input {
        padding-left: 45px;
    }

    .form-input-icon i {
        left: 15px;
    }
}

@media (max-width: 480px) {
    .auth-form-section {
        padding: 25px 20px;
    }

    .form-options {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }

    .welcome-title {
        font-size: 20px;
    }
}
