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

:root {
    --nfl-primary: #013369;
    --nfl-secondary: #D50A0A;
    --nfl-dark: #000000;
    --nfl-light: #FFFFFF;
    --nfl-gray: #8B8B8D;
    --nfl-field-green: #386643;
    --nfl-gold: #FFB612;
}

.auth-page {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-feature-settings: 'liga' 1, 'kern' 1;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.auth-page {
    background: linear-gradient(135deg, var(--nfl-primary) 0%, var(--nfl-dark) 100%);
    min-height: 100vh;
    position: relative;
}

.auth-page::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: repeating-linear-gradient(
        45deg,
        transparent,
        transparent 10px,
        rgba(255, 255, 255, 0.03) 10px,
        rgba(255, 255, 255, 0.03) 20px
    );
    animation: slide 20s linear infinite;
}

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

/* NFL Logo Animation */
.nfl-logo-container {
    width: 80px;
    height: 80px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--nfl-secondary);
    border-radius: 50%;
    box-shadow: 0 4px 20px rgba(213, 10, 10, 0.3);
    animation: pulse 2s ease-in-out infinite;
}

.nfl-logo {
    font-size: 2.5rem;
    color: var(--nfl-light);
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 4px 20px rgba(213, 10, 10, 0.3);
    }
    50% {
        transform: scale(1.05);
        box-shadow: 0 6px 30px rgba(213, 10, 10, 0.5);
    }
}

/* NFL Brand Title */
.nfl-brand-title {
    font-size: 3.5rem;
    font-weight: 900;
    letter-spacing: 2px;
    text-shadow: 0 4px 8px rgba(0, 0, 0, 0.4);
    background: linear-gradient(45deg, #ffffff, #f1f5f9);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Tagline */
.tagline {
    font-size: 1.1rem;
    letter-spacing: 4px;
    text-transform: uppercase;
    font-weight: 400;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

/* Auth Card */
.auth-card {
    background: rgba(255, 255, 255, 0.98);
    border: none;
    border-radius: 12px;
    backdrop-filter: blur(10px);
    position: relative;
    overflow: hidden;
}

.auth-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--nfl-primary), var(--nfl-secondary), var(--nfl-primary));
    background-size: 200% 100%;
    animation: gradient 3s ease infinite;
}

@keyframes gradient {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

/* Auth Title */
.auth-title {
    color: var(--nfl-primary);
    font-weight: 800;
    font-size: 2rem;
    letter-spacing: -0.5px;
    margin-bottom: 0.5rem;
}

.auth-subtitle {
    color: #6b7280;
    font-size: 1.1rem;
    font-weight: 400;
    line-height: 1.4;
}

/* Modern Input Groups */
.modern-input {
    position: relative;
    border: 2px solid #e2e8f0;
    border-radius: 0.375rem;
    transition: all 0.3s ease;
}

.modern-input:focus-within {
    border-color: var(--nfl-primary);
    box-shadow: 0 0 0 0.2rem rgba(1, 51, 105, 0.1);
}

.modern-input .input-group-text {
    background: transparent;
    border: none;
    color: var(--nfl-gray);
    transition: all 0.3s ease;
    border-radius: 0.375rem 0 0 0.375rem;
}

.modern-input .form-control {
    border: none;
    padding: 0.875rem 1rem;
    font-size: 1.1rem;
    font-weight: 500;
    transition: all 0.3s ease;
    background: transparent;
    border-radius: 0 0.375rem 0.375rem 0;
}

.modern-input .form-control::placeholder {
    color: #9ca3af;
    font-weight: 400;
    opacity: 0.8;
}

.modern-input:focus-within .input-group-text {
    color: var(--nfl-primary);
}

.modern-input .form-control:focus {
    box-shadow: none;
    border: none;
    outline: none;
}

/* Password Toggle Button */
.password-toggle {
    border: none;
    background: transparent;
    color: var(--nfl-gray);
    transition: all 0.3s ease;
    border-radius: 0 0.375rem 0.375rem 0;
}

.password-toggle:hover {
    color: var(--nfl-primary);
    background: transparent;
    border: none;
}

.password-toggle:focus {
    box-shadow: none;
    border: none;
    outline: none;
}

/* Special handling for password input group */
.modern-input .form-control[type="password"],
.modern-input .form-control[type="text"] {
    border-radius: 0;
}

/* NFL Primary Button */
.btn-nfl {
    background: linear-gradient(135deg, var(--nfl-primary) 0%, #025099 100%);
    border: none;
    color: white;
    font-weight: 700;
    font-size: 1.05rem;
    letter-spacing: 0.5px;
    padding: 1rem 2rem;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    text-transform: uppercase;
    border-radius: 0.5rem;
}

.btn-nfl::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-nfl:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(1, 51, 105, 0.3);
}

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

/* Outline Button */
.btn-outline-secondary {
    border: 2px solid var(--nfl-primary);
    color: var(--nfl-primary);
    font-weight: 600;
    font-size: 1.05rem;
    background: white;
    transition: all 0.3s ease;
    border-radius: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-outline-secondary:hover {
    background: var(--nfl-primary);
    border-color: var(--nfl-primary);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(1, 51, 105, 0.2);
}

/* Form Check */
.form-check-input:checked {
    background-color: var(--nfl-primary);
    border-color: var(--nfl-primary);
}

.form-check-input:focus {
    border-color: var(--nfl-primary);
    box-shadow: 0 0 0 0.2rem rgba(1, 51, 105, 0.25);
}

.form-check-label {
    font-weight: 500;
    font-size: 0.95rem;
    color: #374151;
}

.form-label {
    font-weight: 600;
    font-size: 0.95rem;
    color: #374151;
    margin-bottom: 0.5rem;
}

/* Forgot Password Link */
.forgot-link {
    color: var(--nfl-secondary);
    font-weight: 600;
    font-size: 0.9rem;
    transition: color 0.3s ease;
    text-decoration: none;
}

/* Text styling */
.text-muted {
    font-weight: 500;
    font-size: 1.05rem;
}

.forgot-link:hover {
    color: var(--nfl-primary);
}

/* Divider */
.divider-container {
    position: relative;
    text-align: center;
}

.divider {
    border: none;
    border-top: 1px solid #e2e8f0;
    margin: 0;
}

.divider-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    padding: 0 1rem;
    color: var(--nfl-gray);
    font-size: 0.875rem;
    font-weight: 500;
}

/* Validation States */
.is-valid {
    border-color: var(--nfl-field-green) !important;
}

.is-invalid {
    border-color: var(--nfl-secondary) !important;
}

.valid-feedback {
    color: var(--nfl-field-green);
}

.invalid-feedback {
    color: var(--nfl-secondary);
    font-size: 0.875rem;
}

/* Alert Styles */
.alert-danger {
    background: rgba(213, 10, 10, 0.1);
    border: 1px solid var(--nfl-secondary);
    color: var(--nfl-secondary);
}

.alert-success {
    background: rgba(56, 102, 67, 0.1);
    border: 1px solid var(--nfl-field-green);
    color: var(--nfl-field-green);
}

/* Loading States */
.btn.loading {
    position: relative;
    color: transparent;
}

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

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

/* Caps Lock Warning */
.caps-lock-warning {
    color: var(--nfl-gold);
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

/* Responsive Design */
@media (max-width: 576px) {
    .auth-page {
        padding: 1rem 0;
    }
    
    .container {
        padding: 0 1rem;
    }
    
    .auth-card {
        margin: 0.5rem 0;
        border-radius: 8px;
    }
    
    .auth-card .card-body {
        padding: 1.5rem 1rem;
    }
    
    .nfl-logo-container {
        width: 60px;
        height: 60px;
    }
    
    .nfl-logo {
        font-size: 2rem;
    }
    
    .nfl-brand-title {
        font-size: 2.5rem;
    }
    
    .tagline {
        font-size: 0.9rem;
        letter-spacing: 2px;
    }
    
    .pt-5 {
        padding-top: 2rem !important;
    }
    
    .mb-4 {
        margin-bottom: 1.5rem !important;
    }
    
    /* Ensure mobile scrolling works properly */
    body.auth-page {
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    /* Adjust form spacing for mobile keyboards */
    .auth-card .card-body {
        min-height: auto;
    }
}

@media (min-width: 768px) {
    .auth-card {
        min-width: 450px;
    }
}

/* Additional mobile fixes for very small screens */
@media (max-width: 480px) and (max-height: 700px) {
    .nfl-brand-title {
        font-size: 2rem;
    }
    
    .pt-5 {
        padding-top: 1rem !important;
    }
    
    .mb-4 {
        margin-bottom: 1rem !important;
    }
    
    .my-4 {
        margin-top: 1rem !important;
        margin-bottom: 1rem !important;
    }
    
    .auth-card .card-body {
        padding: 1rem 0.75rem;
    }
    
    /* Ensure buttons are accessible */
    .btn {
        padding: 0.75rem 1.5rem;
        font-size: 0.95rem;
    }
}

/* Accessibility */
.btn:focus {
    outline: 2px solid var(--nfl-primary);
    outline-offset: 2px;
}

.modern-input:focus-within {
    outline: 2px solid var(--nfl-primary);
    outline-offset: 2px;
}

.form-check-input:focus {
    outline: 2px solid var(--nfl-primary);
    outline-offset: 2px;
}

/* Animation for form submission */
.auth-page form.submitting {
    pointer-events: none;
    opacity: 0.7;
}

/* Password Strength Indicator */
.password-strength {
    margin-top: 0.5rem;
}

.password-strength .progress {
    height: 4px;
    background: #e2e8f0;
}

.password-strength .progress-bar {
    transition: width 0.3s ease;
}

/* Back to Home Link */
.auth-page small a {
    color: rgba(255, 255, 255, 0.7);
    transition: color 0.3s ease;
}

.auth-page small a:hover {
    color: white;
}