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

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-weight: 300;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 50%, #cbd5e1 100%);
    min-height: 100vh;
    color: #1e293b;
    position: relative;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url('{{ url_for("static", filename="css/images/Arts to GoGo Gradient.png") }}');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0.08;
    z-index: 0;
    pointer-events: none;
}

body > * {
    position: relative;
    z-index: 1;
}

/* Language Selector - NEW */
.language-selector {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 12px;
    padding: 8px 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
}

.language-selector select {
    border: none;
    background: transparent;
    font-size: 14px;
    font-weight: 500;
    color: #374151;
    cursor: pointer;
    outline: none;
}

/* Login Page Styles */
.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
}

.login-form {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(226, 232, 240, 0.8);
    padding: 48px 40px;
    border-radius: 24px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.08);
    width: 100%;
    max-width: 420px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.logo-wrapper {
    display: flex;
    justify-content: center;
    margin-bottom: 24px;
    animation: fadeInDown 0.6s ease-out;
}

.login-logo {
    max-width: 150px;
    height: auto;
    filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.1));
}

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

.login-form h2 {
    color: #0f172a;
    text-align: center;
    margin-bottom: 32px;
    font-size: 1.875rem;
    font-weight: 300;
    letter-spacing: -0.01em;
}

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

.form-group label {
    color: #374151;
    display: block;
    margin-bottom: 8px;
    font-weight: 400;
    font-size: 0.9rem;
}

.form-group input {
    width: 100%;
    padding: 16px 20px;
    border: 1px solid rgba(203, 213, 225, 0.6);
    border-radius: 12px;
    background: rgba(248, 250, 252, 0.8);
    color: #1e293b;
    font-size: 1rem;
    font-weight: 300;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

.login-btn {
    width: 100%;
    background: linear-gradient(135deg, #3b82f6 0%, #1e40af 100%);
    color: white;
    border: none;
    padding: 16px 24px;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 400;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    margin-top: 8px;
}

.login-btn:hover {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    transform: translateY(-2px);
    box-shadow: 0 12px 24px -4px rgba(59, 130, 246, 0.4);
}

.login-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

/* Message Styles */
.error-message {
    background: rgba(254, 242, 242, 0.9);
    border: 1px solid rgba(252, 165, 165, 0.6);
    color: #dc2626;
    padding: 16px;
    border-radius: 12px;
    margin-top: 16px;
    text-align: center;
    font-weight: 400;
}

/* Loading spinner */
.loading-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;
}

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

/* Responsive Design */
@media (max-width: 768px) {
    .language-selector {
        top: 10px;
        right: 10px;
        padding: 8px 12px;
    }

    .login-form {
        padding: 32px 24px;
        margin: 16px;
    }

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

    .login-logo {
        max-width: 120px;
    }
}

@media (max-width: 480px) {
    .language-selector {
        top: 8px;
        right: 8px;
        padding: 6px 10px;
        font-size: 12px;
    }

    .login-form {
        padding: 24px 16px;
        margin: 12px;
    }

    .login-form h2 {
        font-size: 1.25rem;
    }

    .form-group input {
        padding: 14px 16px;
        font-size: 0.95rem;
    }

    .login-btn {
        padding: 14px 20px;
        font-size: 0.95rem;
    }

    .login-logo {
        max-width: 100px;
    }
}

@media (max-width: 320px) {
    .login-form {
        padding: 20px 12px;
        margin: 8px;
    }

    .login-form h2 {
        font-size: 1.1rem;
    }

    .login-logo {
        max-width: 80px;
    }
}

/* Prevent horizontal overflow */
html, body {
    overflow-x: hidden;
    max-width: 100vw;
}
