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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    min-height: 100vh;
    background: #f8fafc;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

body::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: radial-gradient(circle at 2px 2px, rgba(0, 0, 0, 0.02) 1px, transparent 0);
    background-size: 40px 40px;
    z-index: 0;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.language-container {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    z-index: 2;
}

.language-switcher {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.language-switcher select {
    padding: 0.5rem 2.25rem 0.5rem 0.75rem;
    border: 1.5px solid #e2e8f0;
    border-radius: 8px;
    background: #ffffff;
    font-size: 0.875rem;
    color: #1e293b;
    cursor: pointer;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    appearance: none;
    background-image: linear-gradient(45deg, transparent 50%, #475569 50%), linear-gradient(135deg, #475569 50%, transparent 50%);
    background-position: calc(100% - 18px) calc(50% - 3px), calc(100% - 13px) calc(50% - 3px);
    background-size: 6px 6px, 6px 6px;
    background-repeat: no-repeat;
}

.language-switcher select:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.language-switcher select:hover {
    border-color: #cbd5e1;
}

.language-switcher button {
    padding: 0.5rem 0.75rem;
    border-radius: 8px;
    border: 1.5px solid #e2e8f0;
    background: #ffffff;
    color: #1e293b;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
}

.language-switcher button:hover {
    border-color: #cbd5e1;
}

.login-container {
    background: white;
    border-radius: 16px;
    padding: 3rem;
    width: 100%;
    max-width: 420px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    position: relative;
    z-index: 1;
    border: 1px solid #e2e8f0;
}

.error-message {
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 8px;
    padding: 0.75rem 1rem;
    margin-bottom: 1.5rem;
    color: #dc2626;
    font-size: 0.875rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.error-message svg {
    flex-shrink: 0;
    width: 16px;
    height: 16px;
}

.error-message {
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 8px;
    padding: 0.75rem 1rem;
    margin-bottom: 1.5rem;
    color: #dc2626;
    font-size: 0.875rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.error-message svg {
    flex-shrink: 0;
    width: 16px;
    height: 16px;
}

.logo p {
    margin-top: 0.2rem;
    color: #64748b;
    font-size: 0.875rem;
    font-weight: 400;
    margin-bottom: 2.5rem;
}

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

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

.form-group input {
    width: 100%;
    padding: 0.75rem 1rem;
    background: white;
    border: 1.5px solid #e2e8f0;
    border-radius: 8px;
    color: #1e293b;
    font-size: 0.875rem;
    transition: all 0.2s ease;
}

.form-group input::placeholder {
    color: #94a3b8;
}

.form-group input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.form-group input:hover {
    border-color: #cbd5e1;
}

.login-btn {
    width: 100%;
    padding: 0.75rem 1rem;
    background: #1e293b;
    border: none;
    border-radius: 8px;
    color: white;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-bottom: 1.5rem;
}

.login-btn:hover {
    background: #0f172a;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(30, 41, 59, 0.15);
}

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

.login-btn:disabled {
    background: #cbd5e1;
    cursor: not-allowed;
    transform: none;
}

.forgot-password {
    text-align: center;
    margin-bottom: 2rem;
}

.forgot-password a {
    color: #3b82f6;
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    transition: color 0.2s ease;
}

.forgot-password a:hover {
    color: #2563eb;
    text-decoration: underline;
}

.divider {
    display: flex;
    align-items: center;
    margin: 2rem 0;
}

.divider::before,
.divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #e2e8f0;
}

.divider span {
    margin: 0 1rem;
    color: #64748b;
    font-size: 0.875rem;
    background: white;
    padding: 0 0.5rem;
}

.demo-section {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    text-align: center;
}

.demo-info h3 {
    color: #374151;
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.demo-info p {
    color: #6b7280;
    font-size: 0.875rem;
    margin-bottom: 1.25rem;
}

.demo-btn {
    display: inline-flex;
    align-items: center;
    padding: 0.75rem 1.5rem;
    background: white;
    border: 1.5px solid #d1d5db;
    border-radius: 8px;
    color: #374151;
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.2s ease;
}

.demo-btn:hover {
    border-color: #9ca3af;
    background: #f9fafb;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.demo-btn svg {
    margin-right: 0.5rem;
    opacity: 0.7;
}

.signup-link {
    text-align: center;
    color: #64748b;
    font-size: 0.875rem;
}

.signup-link a {
    color: #3b82f6;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s ease;
}

.signup-link a:hover {
    color: #2563eb;
    text-decoration: underline;
}

.spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    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: 0.5rem;
}

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

@media (max-width: 480px) {
    .login-container {
        margin: 1rem;
        padding: 2rem;
    }

    .logo h1 {
        font-size: 1.5rem;
    }

    .social-login {
        flex-direction: column;
    }
}

body::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: #fafbfc;
    background-image: 
        linear-gradient(30deg, transparent 40px, rgba(59, 130, 246, 0.06) 41px, rgba(59, 130, 246, 0.06) 42px, transparent 43px),
        linear-gradient(-30deg, transparent 40px, rgba(59, 130, 246, 0.06) 41px, rgba(59, 130, 246, 0.06) 42px, transparent 43px),
        linear-gradient(90deg, transparent 59px, rgba(168, 85, 247, 0.04) 60px, rgba(168, 85, 247, 0.04) 61px, transparent 62px);
    background-size: 120px 69px, 120px 69px, 120px 69px;
    background-repeat: repeat;
    z-index: 0;
}
