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

:root {
    --primary-color: #4365ff;
    --primary-dark: #2a3eb1;
    --secondary-color: #9333ea;
    --dark-color: #0f172a;
    --light-color: #f8fafc;
    --glass-bg: rgba(255, 255, 255, 0.85);
    --glass-border: rgba(255, 255, 255, 0.4);
    --shadow-soft: 0 10px 40px -10px rgba(0, 0, 0, 0.08);
    --shadow-hover: 0 20px 40px -10px rgba(67, 101, 255, 0.15);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    font-family: 'Outfit', sans-serif;
    color: var(--dark-color);
    background-color: var(--light-color);
}

main {
    flex: 1;
}

/* Modern Utilities */
.glass-panel {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    box-shadow: var(--shadow-soft);
}

.hover-lift {
    transition: var(--transition);
}

.hover-lift:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-hover);
}

.text-gradient {
    background: linear-gradient(90deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-bg {
    background: linear-gradient(0deg, #4365ff 0%, #ffffff 100%);
}

.hero-bg-rev {
    background: linear-gradient(180deg, #4365ff 0%, #ffffff 100%);
}

.navbar-brand {
    font-size: 1.5rem;
}

.navbar-spacer {
    width: 100%;
    background: linear-gradient(90deg, var(--primary-color) 0%, var(--secondary-color) 100%);
}

/* Hero Section */
.hero-section {
    position: relative;
    height: calc(90vh - 16vh); /* Account for navbar (8vh) + spacer (8vh) */
    overflow: hidden;
    background-color: #0d6efd; /* Primary background fallback */
}

.hero-slide {
    height: calc(90vh - 16vh); /* Match section height */
    background-size: cover;
    background-position: top center;
    background-repeat: no-repeat;
}

.hero-slide-1 {
    background-image: url('/static/images/hero/1.jpg');
}

.hero-slide-2 {
    background-image: url('/static/images/hero/2.jpg');
}

.hero-slide-3 {
    background-image: url('/static/images/hero/3.jpg');
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to top, rgba(67, 101, 255, 1) 0%, rgba(67, 101, 255, 0.6) 50%, rgba(67, 101, 255, 0.5) 100%);
    z-index: 2;
}

.hero-logo {
    max-width: 300px;
    max-height: 200px;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.3));
    opacity: 0.9;
    transition: opacity 0.3s ease;
}

.hero-logo:hover {
    opacity: 1;
}

/* Password Validation Styles */
.password-toggle {
    border-left: 0;
}

.password-generate {
    border-left: 0;
}

.password-validation {
    font-size: 0.875rem;
}

.password-validation .rule-item {
    display: flex;
    align-items: center;
    margin-bottom: 0.25rem;
    transition: color 0.2s ease;
}

.password-validation .rule-item i {
    margin-right: 0.5rem;
    font-size: 0.75rem;
}

.password-validation .rule-item span {
    flex: 1;
}

.password-strength-bar .progress {
    background-color: #e9ecef;
}

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

.strong-password-message {
    padding: 0.5rem;
    border-radius: 0.375rem;
    background-color: rgba(25, 135, 84, 0.1);
    border: 1px solid rgba(25, 135, 84, 0.2);
}

/* Input group styling for password fields */
.input-group .form-control:not(:last-child) {
    border-right: 0;
}

.input-group .password-toggle,
.input-group .password-generate {
    border-left: 1px solid #ced4da;
}

.input-group .form-control:focus + .password-toggle,
.input-group .form-control:focus + .password-toggle + .password-generate {
    border-color: #86b7fe;
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}

/* Credentials display styles */
.credentials-display {
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 0.375rem;
    padding: 1rem;
    margin-top: 1rem;
}

.credential-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
    border-bottom: 1px solid #dee2e6;
}

.credential-item:last-child {
    border-bottom: none;
}

.credential-value {
    font-family: 'Courier New', monospace;
    background-color: #e9ecef;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    font-size: 0.875rem;
}

.credential-hidden {
    letter-spacing: 0.2em;
}

/* Mobile-first responsive adjustments */
@media (max-width: 768px) {
    .hero-section {
        height: calc(100vh - 16vh); /* Account for navbar (8vh) + spacer (8vh) */
    }
    
    .hero-slide {
        height: calc(100vh - 16vh);
    }
    
    .display-4 {
        font-size: 2rem;
    }
    
    .hero-overlay .btn {
        width: 100%;
        max-width: 280px;
    }
}

/* Hero Section Responsive Improvements */
@media (max-width: 575.98px) {
    .hero-overlay .btn {
        width: auto;
        min-width: 200px;
        max-width: none;
        display: inline-block;
    }
    
    .hero-section .d-flex.gap-3 {
        width: 100%;
        justify-content: center !important;
        align-items: center;
    }
    
    /* Center the button container */
    .hero-section .d-flex.gap-3.text-center {
        margin: 0 auto;
    }
}

/* Additional mobile optimizations */
@media (max-width: 767.98px) {
    .hero-overlay {
        padding: 2rem 1rem;
    }
    
    .hero-overlay .display-5 {
        font-size: 2rem;
        margin-bottom: 1.5rem;
    }
    
    .hero-overlay .lead {
        font-size: 1.1rem;
        margin-bottom: 2rem;
    }
}

/* Floating Flash Messages */
.flash-messages-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1050;
    max-width: 400px;
    pointer-events: none;
}

.flash-messages-container .alert {
    pointer-events: auto;
    margin-bottom: 10px;
    border-radius: 8px;
    border: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    backdrop-filter: blur(10px);
    animation: slideInFromRight 0.3s ease-out;
}

.flash-messages-container .alert:last-child {
    margin-bottom: 0;
}

.flash-messages-container .alert .btn-close {
    padding: 1.25rem 1rem;
}

.flash-messages-container .alert i {
    margin-right: 8px;
    font-size: 1.1em;
}

/* Animations */
@keyframes slideInFromRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Responsive adjustments */
@media (max-width: 576px) {
    .flash-messages-container {
        left: 20px;
        right: 20px;
        bottom: 15px;
        max-width: none;
    }
    
    .flash-messages-container .alert {
        margin-bottom: 8px;
    }
}
