/* Import Tailwind CSS */
@import url('https://cdn.jsdelivr.net/npm/tailwindcss@2.2.19/dist/tailwind.min.css');

/* RTC Branded Background */
body {
    margin: 0;
    padding: 0;
    min-height: 100vh;
    background: 
        linear-gradient(135deg, rgba(99, 102, 241, 0.85) 0%, rgba(37, 99, 235, 0.85) 100%),
        url('{% static "images/background.webp" %}');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Login container styles */
.login-container {
    width: 100%;
    max-width: 380px;
    padding: 1.5rem;
}

.login-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 0;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    padding: 2.5rem 2rem;
    width: 100%;
    position: relative;
    animation: slideUp 0.6s ease-out;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

/* Fallback for browsers that don't support backdrop-filter */
@supports not (backdrop-filter: blur(10px)) {
    .login-card {
        background: rgba(255, 255, 255, 0.98);
    }
}

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

/* Form styles */
.login-form {
    width: 100%;
}

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

.form-label {
    display: block;
    margin-bottom: 0.4rem;
    font-weight: 500;
    color: #374151;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.form-input {
    width: 100%;
    padding: 0.7rem 0.9rem;
    border: 1px solid #d1d5db;
    border-radius: 0;
    font-size: 0.85rem;
    transition: none;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(5px);
    box-sizing: border-box;
    color: #374151;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.form-input:focus {
    outline: none;
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.form-input:hover {
    border-color: #9ca3af;
    transition: none;
}

.form-input::placeholder {
    color: #9ca3af;
}

/* RTC Button styles */
.login-button {
    width: 100%;
    background: linear-gradient(135deg, #6366f1, #2563eb);
    color: white;
    border: none;
    padding: 0.8rem 1.2rem;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.login-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(99, 102, 241, 0.4);
    background: linear-gradient(135deg, #5b5bd6, #1d4ed8);
}

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

/* RTC Header and Logo Styles */
.rtc-header {
    text-align: center;
    margin-bottom: 2rem;
}

.rtc-logo-text-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
}

.rtc-logo {
    flex-shrink: 0;
}

.logo-img {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: transform 0.3s ease;
}

.logo-img:hover {
    transform: scale(1.05);
}

.rtc-text {
    text-align: left;
}

/* Enhanced Title styles */
.login-title {
    text-align: left;
    margin-bottom: 0.2rem;
    color: #1e40af;
    font-size: 1.4rem;
    font-weight: 800;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    text-shadow: 0 2px 4px rgba(30, 64, 175, 0.3);
    background: linear-gradient(135deg, #1e40af, #3b82f6, #60a5fa);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    position: relative;
    letter-spacing: 0.5px;
}

.login-title::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(135deg, #1e40af, #3b82f6);
    border-radius: 2px;
    opacity: 0.8;
    animation: underlineGlow 2s ease-in-out infinite alternate;
}

@keyframes underlineGlow {
    0% {
        opacity: 0.6;
        transform: scaleX(0.95);
    }
    100% {
        opacity: 1;
        transform: scaleX(1);
    }
}

.login-subtitle {
    text-align: left;
    color: #4b5563;
    font-size: 0.7rem;
    margin-bottom: 0;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.6);
    font-weight: 500;
}

/* Error message styles */
.error-messages {
    margin-bottom: 1rem;
    padding: 0.6rem;
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 0;
    color: #dc2626;
    font-size: 0.75rem;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.error-messages ul {
    margin: 0;
    padding-left: 1rem;
}

/* Base design optimized for 1024x768 */
.login-container {
    max-width: 360px;
}

.login-card {
    padding: 2rem 1.8rem;
}

/* Mobile styles - smaller screens */
@media (max-width: 768px) {
    .login-container {
        padding: 1rem;
        max-width: 320px;
    }
    
    .login-card {
        padding: 1.8rem 1.5rem;
    }
    
    .rtc-logo-text-container {
        flex-direction: column;
        gap: 0.8rem;
    }
    
    .rtc-text {
        text-align: center;
    }
    
    .login-title {
        font-size: 1.3rem;
        text-align: center;
        font-weight: 800;
    }
    
    .login-subtitle {
        font-size: 0.65rem;
        text-align: center;
    }
    
    .form-label {
        font-size: 0.75rem;
    }
    
    .form-input {
        padding: 0.6rem 0.8rem;
        font-size: 0.8rem;
    }
    
    .login-button {
        padding: 0.6rem 1rem;
        font-size: 0.8rem;
    }
}

/* Very small screens */
@media (max-width: 480px) {
    .login-container {
        padding: 0.8rem;
        max-width: 280px;
    }
    
    .login-card {
        padding: 1.5rem 1.2rem;
    }
    
    .login-title {
        font-size: 1.1rem;
    }
    
    .login-subtitle {
        font-size: 0.65rem;
    }
    
    .form-group {
        margin-bottom: 1.2rem;
    }
}

/* Large screens - maintain clean look */
@media (min-width: 1200px) {
    .login-container {
        max-width: 380px;
    }
    
    .login-card {
        padding: 2.5rem 2rem;
    }
    
    .login-card:hover {
        transform: translateY(-1px);
        box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12);
    }
}

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

.login-button.loading::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    top: 50%;
    left: 50%;
    margin-left: -10px;
    margin-top: -10px;
    border: 2px solid transparent;
    border-top: 2px solid #ffffff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}


/* RTC Footer Styles */
.rtc-footer {
    text-align: center;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
}

.footer-text {
    font-size: 0.7rem;
    color: #6b7280;
    margin: 0;
    font-weight: 500;
}

.footer-subtext {
    font-size: 0.65rem;
    color: #9ca3af;
    margin: 0.3rem 0 0 0;
    font-weight: 400;
}

/* Hide scrollbars */
::-webkit-scrollbar {
    display: none;
}

/* Hide scrollbar for Firefox */
html {
    scrollbar-width: none;
}

/* Hide scrollbar for all browsers */
body {
    overflow-x: hidden;
    -ms-overflow-style: none;
}
