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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    overflow: hidden;
}

.login-container {
    display: flex;
    height: 100vh;
    width: 100vw;
}

/* Workspace Animation Side */
.workspace-animation {
    flex: 1;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.workspace-animation::before {
    content: '';
    position: absolute;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.15) 0%, transparent 70%);
    border-radius: 50%;
    top: -300px;
    left: -300px;
    animation: pulse 8s ease-in-out infinite, float 20s ease-in-out infinite;
}

.workspace-animation::after {
    content: '';
    position: absolute;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.15) 0%, transparent 70%);
    border-radius: 50%;
    bottom: -250px;
    right: -250px;
    animation: pulse 6s ease-in-out infinite, float 15s ease-in-out infinite reverse;
}

/* Scanner Container */
.scanner-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3rem;
    margin: 5rem 0;
}

/* Document Paper */
.document-paper {
    width: 300px;
    height: 400px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    padding: 2.5rem 2rem;
    position: relative;
    overflow: hidden;
    animation: docFloat 3s ease-in-out infinite;
}

@keyframes docFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

/* Document Lines */
.doc-line {
    height: 3px;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    border-radius: 2px;
    margin: 1.5rem 0;
    opacity: 0.6;
    animation: lineAppear 0.5s ease-out backwards;
}

.doc-line.short {
    width: 60%;
}

.doc-line:nth-child(1) { animation-delay: 0.1s; }
.doc-line:nth-child(2) { animation-delay: 0.2s; }
.doc-line:nth-child(3) { animation-delay: 0.3s; }
.doc-line:nth-child(4) { animation-delay: 0.4s; }
.doc-line:nth-child(5) { animation-delay: 0.5s; }
.doc-line:nth-child(6) { animation-delay: 0.6s; }
.doc-line:nth-child(7) { animation-delay: 0.7s; }

@keyframes lineAppear {
    from {
        width: 0;
        opacity: 0;
    }
    to {
        width: 100%;
        opacity: 0.6;
    }
}

/* Scanning Beam */
.scan-beam {
    position: absolute;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg,
        transparent,
        rgba(102, 126, 234, 0.3),
        rgba(102, 126, 234, 0.8),
        rgba(102, 126, 234, 0.3),
        transparent);
    box-shadow: 0 0 20px rgba(102, 126, 234, 0.8);
    animation: scanBeam 3s ease-in-out infinite;
}

@keyframes scanBeam {
    0%, 10% {
        top: 0;
        opacity: 0;
    }
    20% {
        opacity: 1;
    }
    80% {
        opacity: 1;
    }
    90%, 100% {
        top: 100%;
        opacity: 0;
    }
}

/* Success Checkmark */
.success-check {
    width: 80px;
    height: 80px;
    opacity: 0;
    animation: checkAppear 1s ease-out 3s forwards;
}

@keyframes checkAppear {
    0% {
        opacity: 0;
        transform: scale(0);
    }
    50% {
        opacity: 1;
        transform: scale(1.2);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

.check-circle {
    stroke: rgba(255, 255, 255, 0.8);
    stroke-width: 2;
    stroke-dasharray: 166;
    stroke-dashoffset: 166;
    animation: strokeCircle 0.6s ease-out 3.2s forwards;
}

@keyframes strokeCircle {
    to {
        stroke-dashoffset: 0;
    }
}

.check-path {
    stroke: white;
    stroke-width: 3;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-dasharray: 48;
    stroke-dashoffset: 48;
    animation: strokeCheck 0.4s ease-out 3.6s forwards;
}

@keyframes strokeCheck {
    to {
        stroke-dashoffset: 0;
    }
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        opacity: 0.5;
    }
    50% {
        transform: scale(1.3);
        opacity: 0.3;
    }
}

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

.workspace-content {
    position: relative;
    z-index: 10;
    text-align: center;
    color: white;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

.brand-title {
    font-size: 2.5rem;
    font-weight: 700;
    /*margin-bottom: 3rem;*/
    margin-top: 12rem;
    animation: fadeInUp 1s ease-out;
    text-shadow: 0 2px 20px rgba(0, 0, 0, 0.3);
    color: white;
    z-index: 100;
    position: relative;
}

.brand-subtitle {
    font-size: 1.1rem;
    opacity: 0.95;
    margin-top: 2rem;
    animation: fadeInUp 1s ease-out 0.2s backwards;
    font-weight: 400;
    color: white;
    z-index: 100;
    position: relative;
}

/* Simple Features List */
.simple-features {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    animation: fadeInUp 1s ease-out 1s backwards;
}

.simple-feature {
    display: flex;
    align-items: center;
    gap: 1rem;
    color: white;
    font-size: 1.1rem;
    opacity: 0;
    animation: featureFadeIn 0.6s ease-out forwards;
}

.simple-feature:nth-child(1) { animation-delay: 4s; }
.simple-feature:nth-child(2) { animation-delay: 4.2s; }
.simple-feature:nth-child(3) { animation-delay: 4.4s; }

@keyframes featureFadeIn {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.feature-dot {
    width: 10px;
    height: 10px;
    background: white;
    border-radius: 50%;
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
    animation: dotPulse 2s ease-in-out infinite;
}

@keyframes dotPulse {
    0%, 100% {
        transform: scale(1);
        opacity: 0.8;
    }
    50% {
        transform: scale(1.3);
        opacity: 1;
    }
}


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

/* Login Form Side */
.login-form-container {
    flex: 1;
    background: #ffffff;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    position: relative;
}

.login-form-container::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(102, 126, 234, 0.03) 0%, transparent 50%);
    animation: rotate 30s linear infinite;
}

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

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

.login-form-wrapper {
    width: 100%;
    max-width: 450px;
    animation: fadeInRight 0.8s ease-out;
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.login-header {
    text-align: center;
    margin-bottom: 3rem;
}

.logo-circle {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    color: white;
    animation: scaleIn 0.6s ease-out, logoFloat 3s ease-in-out infinite;
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.3);
}

@keyframes logoFloat {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
        box-shadow: 0 10px 30px rgba(102, 126, 234, 0.3);
    }
    50% {
        transform: translateY(-10px) rotate(5deg);
        box-shadow: 0 20px 40px rgba(102, 126, 234, 0.4);
    }
}

.logo-circle svg {
    width: 40px;
    height: 40px;
}

@keyframes scaleIn {
    from {
        transform: scale(0);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

.login-header h2 {
    font-size: 2rem;
    color: #2d3748;
    margin-bottom: 0.5rem;
}

.login-header p {
    color: #718096;
    font-size: 1rem;
}

/* Form Styles */
.login-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group label {
    color: #2d3748;
    font-weight: 600;
    font-size: 0.9rem;
}

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

.input-icon {
    position: absolute;
    left: 1rem;
    width: 20px;
    height: 20px;
    color: #a0aec0;
    pointer-events: none;
}

.input-wrapper input {
    width: 100%;
    padding: 1rem 1rem 1rem 3rem;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    font-size: 1rem;
    transition: all 0.3s ease;
    outline: none;
}

.input-wrapper input:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.15),
                0 4px 12px rgba(102, 126, 234, 0.2);
    transform: translateY(-1px);
}

.toggle-password {
    position: absolute;
    right: 1rem;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.eye-icon {
    width: 20px;
    height: 20px;
    color: #a0aec0;
    transition: color 0.2s;
}

.toggle-password:hover .eye-icon {
    color: #667eea;
}

.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: -0.5rem;
}

.remember-me {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    font-size: 0.9rem;
    color: #4a5568;
}

.remember-me input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.forgot-password {
    color: #667eea;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 600;
    transition: color 0.2s;
}

.forgot-password:hover {
    color: #764ba2;
}

.login-button {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 1.2rem 2rem;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    margin-top: 1rem;
    position: relative;
    overflow: hidden;
}

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

.login-button:hover::before {
    left: 100%;
}

.login-button:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 15px 35px rgba(102, 126, 234, 0.5),
                0 5px 15px rgba(102, 126, 234, 0.3);
}

.login-button:active {
    transform: translateY(-1px) scale(0.98);
}

.arrow-icon {
    width: 20px;
    height: 20px;
    transition: transform 0.3s ease;
}

.login-button:hover .arrow-icon {
    transform: translateX(5px);
}

.error-message {
    color: #e53e3e;
    font-size: 0.9rem;
    text-align: center;
    padding: 0.75rem;
    background: #fff5f5;
    border-radius: 8px;
    display: none;
}

.error-message.show {
    display: block;
    animation: shake 0.5s ease;
}

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

.login-footer {
    text-align: center;
    margin-top: 2rem;
    color: #718096;
}

.login-footer a {
    color: #667eea;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s;
}

.login-footer a:hover {
    color: #764ba2;
}

.powered-by {
    position: absolute;
    bottom: 2rem;
    color: #a0aec0;
    font-size: 0.9rem;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .workspace-animation {
        display: none;
    }

    .login-form-container {
        flex: 1;
        background: linear-gradient(135deg, rgba(102, 126, 234, 0.05) 0%, rgba(118, 75, 162, 0.05) 100%);
    }
}

@media (max-width: 480px) {
    .login-form-wrapper {
        max-width: 100%;
    }

    .brand-title {
        font-size: 2rem;
    }

    .login-header h2 {
        font-size: 1.5rem;
    }
}

/* Loading Animation */
.login-button.loading {
    pointer-events: none;
    opacity: 0.7;
}

.login-button.loading::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

/* Add these styles to your existing login.css or create a signup.css file */
/* You can copy all styles from login.css and add these additional ones */

.password-requirements {
    margin-top: 10px;
    font-size: 0.85rem;
    color: #64748b;
}

.requirement {
    display: flex;
    align-items: center;
    margin-top: 6px;
    transition: all 0.3s ease;
}

.requirement::before {
    content: "○";
    margin-right: 8px;
    color: #cbd5e0;
    font-weight: bold;
    font-size: 1.2rem;
}

.requirement.met {
    color: #10b981;
}

.requirement.met::before {
    content: "✓";
    color: #10b981;
}

.success-message {
    background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
    color: #065f46;
    padding: 14px 18px;
    border-radius: 10px;
    margin-top: 15px;
    font-size: 0.95rem;
    font-weight: 500;
    border: 1px solid #6ee7b7;
    display: none;
    animation: slideIn 0.3s ease;
}

.success-message.show {
    display: block;
}

.terms-link {
    color: #667eea;
    text-decoration: none;
    font-weight: 500;
}

.terms-link:hover {
    text-decoration: underline;
}

/* Adjust form-group spacing for signup (more fields) */
#signupForm .form-group {
    margin-bottom: 18px;
}

/* Loading state for button */
.login-button.loading {
    opacity: 0.7;
    pointer-events: none;
}

.login-button.loading::after {
    content: "";
    width: 16px;
    height: 16px;
    border: 2px solid #ffffff;
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
    margin-left: 10px;
}

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

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

/* Add these styles to your login.css file for signup page enhancements */

/* Success message styling */
.success-message {
    background-color: #d1fae5;
    color: #065f46;
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 14px;
    margin-top: 16px;
    display: none;
    border-left: 4px solid #10b981;
    animation: slideIn 0.3s ease-out;
}

.success-message.show {
    display: block;
}

/* Terms link styling */
.terms-link {
    color: #6366f1;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}

.terms-link:hover {
    color: #4f46e5;
    text-decoration: underline;
}

/* Password strength indicator - optional enhancement */
.password-strength {
    height: 4px;
    background-color: #e5e7eb;
    border-radius: 2px;
    margin-top: 8px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.password-strength-bar {
    height: 100%;
    transition: all 0.3s ease;
}

.password-strength-bar.weak {
    width: 33%;
    background-color: #ef4444;
}

.password-strength-bar.medium {
    width: 66%;
    background-color: #f59e0b;
}

.password-strength-bar.strong {
    width: 100%;
    background-color: #10b981;
}

/* Enhanced input validation states */
input:invalid:not(:placeholder-shown) {
    border-color: #ef4444;
}

input:valid:not(:placeholder-shown) {
    border-color: #10b981;
}

/* Smooth transitions for form elements */
.form-group {
    transition: all 0.3s ease;
}

/* Animation for error and success messages */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Checkbox styling enhancement */
.remember-me input[type="checkbox"]:checked + span {
    color: #1f2937;
}

/* Loading state for button */
.login-button.loading {
    opacity: 0.7;
    cursor: not-allowed;
    pointer-events: none;
}

.login-button.loading span::after {
    content: '...';
    animation: dots 1.5s steps(4, end) infinite;
}

@keyframes dots {
    0%, 20% {
        content: '.';
    }
    40% {
        content: '..';
    }
    60%, 100% {
        content: '...';
    }
}

/* Responsive adjustments for signup form */
@media (max-width: 768px) {
    .login-form-wrapper {
        padding: 24px;
    }

    .form-group {
        margin-bottom: 16px;
    }

    .login-header h2 {
        font-size: 24px;
    }
}
