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

/* ================= RESET & BASE ================= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
}

body {
    background: linear-gradient(135deg, #0a0f1e 0%, #1a1f35 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    position: relative;
    overflow-x: hidden;
}

/* Background Animation */
body::before {
    content: '';
    position: absolute;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at 20% 50%, rgba(59, 130, 246, 0.1) 0%, transparent 50%),
                radial-gradient(circle at 80% 80%, rgba(139, 92, 246, 0.1) 0%, transparent 50%);
    animation: backgroundMove 20s ease-in-out infinite;
    pointer-events: none;
}

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

/* ================= CONTAINER ================= */
.login-container {
    width: 100%;
    max-width: 440px;
    animation: fadeIn 0.6s ease-out;
    position: relative;
    z-index: 1;
}

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

/* ================= GLASS CARD ================= */
.glass-card {
    background: rgba(15, 23, 42, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(148, 163, 184, 0.15);
    border-radius: 1.75rem;
    padding: 2.5rem;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5),
                0 0 0 1px rgba(255, 255, 255, 0.05) inset;
    transition: transform 0.3s ease;
}

.glass-card:hover {
    transform: translateY(-2px);
}

/* ================= LOGO SECTION ================= */
.logo-section {
    text-align: center;
    margin-bottom: 2rem;
}

.logo-box {
    display: inline-block;
    padding: 1rem;
    background: rgba(30, 41, 59, 0.6);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 1.25rem;
    margin-bottom: 1.25rem;
    transition: all 0.3s ease;
}

.logo-box:hover {
    transform: scale(1.05);
    border-color: rgba(59, 130, 246, 0.4);
    box-shadow: 0 0 20px rgba(59, 130, 246, 0.2);
}

.logo-img {
    width: 70px;
    height: 70px;
    object-fit: contain;
    display: block;
    border-radius: 20%;
}

.title {
    font-size: 2rem;
    font-weight: 700;
    color: #f1f5f9;
    margin-bottom: 0.5rem;
    letter-spacing: -0.02em;
}

.subtitle {
    font-size: 0.9375rem;
    color: #94a3b8;
    font-weight: 400;
}

/* ================= ALERT MESSAGES ================= */
.alert {
    display: flex;
    align-items: center;
    gap: 0.875rem;
    padding: 1rem 1.25rem;
    border-radius: 1rem;
    margin-bottom: 1.5rem;
    font-size: 0.9375rem;
    font-weight: 500;
    animation: slideDown 0.4s ease-out;
}

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

.alert-error {
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.4);
    color: #fca5a5;
}

.alert-success {
    background: rgba(34, 197, 94, 0.15);
    border: 1px solid rgba(34, 197, 94, 0.4);
    color: #86efac;
}

.alert-icon {
    width: 1.5rem;
    height: 1.5rem;
    flex-shrink: 0;
}

/* ================= FORM STYLES ================= */
.form-group {
    margin-bottom: 1.25rem;
}

.form-label {
    display: block;
    color: #e2e8f0;
    font-size: 0.9375rem;
    font-weight: 600;
    margin-bottom: 0.625rem;
    letter-spacing: -0.01em;
}

.input-wrapper {
    position: relative;
}

.input-icon {
    position: absolute;
    left: 1.125rem;
    top: 50%;
    transform: translateY(-50%);
    width: 1.375rem;
    height: 1.375rem;
    color: #64748b;
    pointer-events: none;
    transition: color 0.3s ease;
}

.form-input {
    width: 100%;
    padding: 1rem 1.25rem 1rem 3.25rem;
    background: rgba(30, 41, 59, 0.6);
    backdrop-filter: blur(10px);
    border: 1.5px solid rgba(148, 163, 184, 0.25);
    border-radius: 1rem;
    color: #f1f5f9;
    font-size: 0.9375rem;
    outline: none;
    transition: all 0.3s ease;
}

.form-input::placeholder {
    color: #64748b;
}

.form-input:hover {
    background: rgba(30, 41, 59, 0.75);
    border-color: rgba(148, 163, 184, 0.35);
}

.form-input:focus {
    background: rgba(30, 41, 59, 0.85);
    border-color: rgba(59, 130, 246, 0.6);
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.15);
}

.form-input:focus + .input-icon,
.input-wrapper:has(.form-input:focus) .input-icon {
    color: #3b82f6;
}

/* ================= SUBMIT BUTTON ================= */
.btn-submit {
    width: 100%;
    padding: 1rem 1.75rem;
    margin-top: 1.5rem;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.5), rgba(37, 99, 235, 0.5));
    backdrop-filter: blur(10px);
    border: 1.5px solid rgba(59, 130, 246, 0.5);
    border-radius: 1rem;
    color: #f1f5f9;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.625rem;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.btn-submit::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 ease;
}

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

.btn-submit:hover {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.7), rgba(37, 99, 235, 0.7));
    border-color: rgba(59, 130, 246, 0.7);
    transform: translateY(-2px);
    box-shadow: 0 12px 30px rgba(59, 130, 246, 0.4);
}

.btn-submit:active {
    transform: translateY(0);
    box-shadow: 0 6px 15px rgba(59, 130, 246, 0.3);
}

.btn-submit:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: rgba(59, 130, 246, 0.2);
    border-color: rgba(59, 130, 246, 0.3);
}

.btn-submit:disabled:hover {
    transform: none;
    box-shadow: none;
}

.btn-icon {
    width: 1.375rem;
    height: 1.375rem;
    transition: transform 0.3s ease;
}

.btn-submit:hover .btn-icon {
    transform: translateX(3px);
}

/* ================= FOOTER ================= */
.footer {
    margin-top: 2rem;
    padding-top: 1.25rem;
    border-top: 1px solid rgba(148, 163, 184, 0.15);
    text-align: center;
}

.footer p {
    color: #64748b;
    font-size: 0.8125rem;
    font-weight: 400;
}

/* ================= RESPONSIVE DESIGN ================= */

/* Tablet (768px and below) */
@media (max-width: 768px) {
    .login-container {
        max-width: 400px;
    }
    
    .glass-card {
        padding: 2rem;
        border-radius: 1.5rem;
    }
    
    .logo-img {
        width: 65px;
        height: 65px;
    }
    
    .title {
        font-size: 1.875rem;
    }
}

/* Mobile (480px and below) */
@media (max-width: 480px) {
    body {
        padding: 0.75rem;
    }
    
    .login-container {
        max-width: 100%;
    }
    
    .glass-card {
        padding: 1.75rem;
        border-radius: 1.25rem;
    }
    
    .logo-box {
        padding: 0.875rem;
        border-radius: 1rem;
        margin-bottom: 1rem;
    }
    
    .logo-img {
        width: 60px;
        height: 60px;
    }
    
    .title {
        font-size: 1.625rem;
    }
    
    .subtitle {
        font-size: 0.875rem;
    }
    
    .alert {
        padding: 0.875rem 1rem;
        font-size: 0.875rem;
        gap: 0.75rem;
    }
    
    .alert-icon {
        width: 1.25rem;
        height: 1.25rem;
    }
    
    .form-label {
        font-size: 0.875rem;
        margin-bottom: 0.5rem;
    }
    
    .form-input {
        padding: 0.875rem 1rem 0.875rem 3rem;
        font-size: 0.875rem;
    }
    
    .input-icon {
        left: 1rem;
        width: 1.25rem;
        height: 1.25rem;
    }
    
    .btn-submit {
        padding: 0.875rem 1.5rem;
        font-size: 0.9375rem;
        margin-top: 1.25rem;
    }
    
    .btn-icon {
        width: 1.25rem;
        height: 1.25rem;
    }
    
    .footer {
        margin-top: 1.5rem;
        padding-top: 1rem;
    }
    
    .footer p {
        font-size: 0.75rem;
    }
}

/* Small Mobile (360px and below) */
@media (max-width: 360px) {
    .glass-card {
        padding: 1.5rem;
        border-radius: 1rem;
    }
    
    .logo-box {
        padding: 0.75rem;
    }
    
    .logo-img {
        width: 55px;
        height: 55px;
    }
    
    .title {
        font-size: 1.5rem;
    }
    
    .subtitle {
        font-size: 0.8125rem;
    }
    
    .form-input {
        padding: 0.75rem 0.875rem 0.75rem 2.75rem;
    }
    
    .btn-submit {
        padding: 0.75rem 1.25rem;
        font-size: 0.875rem;
    }
}

/* ================= ACCESSIBILITY ================= */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    .glass-card {
        border: 2px solid rgba(148, 163, 184, 0.5);
    }
    
    .form-input {
        border: 2px solid rgba(148, 163, 184, 0.5);
    }
    
    .btn-submit {
        border: 2px solid rgba(59, 130, 246, 0.8);
    }
}

/* Focus Visible for Keyboard Navigation */
.form-input:focus-visible,
.btn-submit:focus-visible {
    outline: 3px solid rgba(59, 130, 246, 0.6);
    outline-offset: 2px;
}

/* ================= PERFORMANCE OPTIMIZATION ================= */
.glass-card,
.form-input,
.btn-submit,
.logo-box {
    will-change: transform;
}

/* Print Styles */
@media print {
    body {
        background: white;
    }
    
    .glass-card {
        background: white;
        border: 1px solid black;
        box-shadow: none;
    }
}