/* Modern Dark Bubble Theme Login Page */

body {
    background: linear-gradient(135deg, #0f1419 0%, #1a1f2e 50%, #0f1419 100%);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

/* Animated Background Bubbles */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background:
        radial-gradient(circle at 20% 20%, rgba(74, 144, 226, 0.3) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(116, 185, 255, 0.2) 0%, transparent 50%),
        radial-gradient(circle at 40% 60%, rgba(45, 156, 219, 0.4) 0%, transparent 50%),
        radial-gradient(circle at 70% 30%, rgba(74, 144, 226, 0.25) 0%, transparent 50%),
        radial-gradient(circle at 90% 10%, rgba(116, 185, 255, 0.3) 0%, transparent 50%);
    animation: bubbleFloat 50s ease-in-out infinite;
    z-index: -2;
}

/* Floating Animation */
@keyframes bubbleFloat {

    0%,
    100% {
        transform: translateY(0px) scale(1);
        opacity: 0.7;
    }

    25% {
        transform: translateY(-20px) scale(1.1);
        opacity: 0.8;
    }

    50% {
        transform: translateY(-40px) scale(1.05);
        opacity: 0.9;
    }

    75% {
        transform: translateY(-20px) scale(1.1);
        opacity: 0.8;
    }
}

/* Glance Effect Overlay */
.glance-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg,
            transparent 30%,
            rgba(255, 255, 255, 0.1) 50%,
            transparent 70%);
    animation: glanceEffect 15s ease-in-out infinite;
    z-index: -1;
    pointer-events: none;
}

@keyframes glanceEffect {
    0% {
        transform: translateX(-100%) translateY(-100%);
    }

    50% {
        transform: translateX(0%) translateY(0%);
    }

    100% {
        transform: translateX(100%) translateY(100%);
    }
}

/* Login Container */
.login-container {
    min-height: calc(100vh - 200px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    position: relative;
    z-index: 1;
    margin-top: 2rem;
    margin-bottom: 2rem;
}

/* Flash Messages Positioning for Login Page */
body:has(.login-container) .alert {
    position: fixed;
    top: 100px;
    left: 50%;
    margin-left: -300px;
    z-index: 1050;
    width: 600px;
}

/* Mobile Flash Messages */
@media (max-width: 768px) {
    body:has(.login-container) .alert {
        position: fixed;
        top: 20px;
        left: 1rem;
        right: 1rem;
        width: auto;
        margin-left: 0;
        z-index: 1100;
        font-size: 0.9rem;
        padding: 0.8rem 1rem;
    }
}

/* Modern Login Card */
.modern-login-card {
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 25px;
    padding: 4rem;
    box-shadow:
        0 25px 60px rgba(0, 0, 0, 0.6),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    position: relative;
    overflow: hidden;
    max-width: 550px;
    width: 100%;
    transform: translateY(0);
    transition: all 0.4s ease;
}

.modern-login-card:hover {
    transform: translateY(-10px);
    box-shadow:
        0 35px 80px rgba(0, 0, 0, 0.5),
        inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

/* Card Glow Effect */
.modern-login-card::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg,
            rgba(74, 144, 226, 0.5) 0%,
            rgba(116, 185, 255, 0.5) 25%,
            rgba(45, 156, 219, 0.5) 50%,
            rgba(74, 144, 226, 0.5) 75%,
            rgba(116, 185, 255, 0.5) 100%);
    border-radius: 25px;
    opacity: 0;
    transition: opacity 0.4s ease;
    z-index: -1;
    animation: borderGlow 15s ease-in-out infinite;
}

.modern-login-card:hover::before {
    opacity: 1;
}

@keyframes borderGlow {

    0%,
    100% {
        opacity: 0.3;
    }

    50% {
        opacity: 0.7;
    }
}

/* Login Title */
.login-title {
    color: #ffffff;
    font-size: 2.5rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 2rem;
    text-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
    animation: titleGlow 12s ease-in-out infinite alternate;
}

@keyframes titleGlow {
    0% {
        filter: drop-shadow(0 0 10px rgba(116, 185, 255, 0.3));
    }

    100% {
        filter: drop-shadow(0 0 20px rgba(162, 155, 254, 0.5));
    }
}

/* Form Styling */
.modern-form-group {
    margin-bottom: 2rem;
    position: relative;
}

.modern-label {
    color: #ffffff;
    font-weight: 500;
    margin-bottom: 0.5rem;
    display: block;
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.modern-input {
    width: 100%;
    padding: 1rem 1.5rem;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    color: #ffffff;
    font-size: 1rem;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}



.modern-input::placeholder {
    color: rgba(189, 195, 199, 0.6);
}

/* Form Validation Styling - Only manual classes, no auto :invalid */

/* Neutral state - light blue glow when focused */
.modern-input:focus {
    outline: none;
    border-color: #74b9ff;
    background: rgba(116, 185, 255, 0.08);
    box-shadow: 0 0 25px rgba(116, 185, 255, 0.3);
    transform: translateY(-2px);
}

/* Valid state - green when user types correctly */
.modern-input.is-valid {
    border-color: #00b894;
    background: rgba(0, 184, 148, 0.1);
    box-shadow: 0 0 15px rgba(0, 184, 148, 0.3);
}

.modern-input.is-valid:focus {
    border-color: #00b894;
    background: rgba(0, 184, 148, 0.15);
    box-shadow: 0 0 25px rgba(0, 184, 148, 0.4);
}

/* Invalid state - red only when there's an actual error */
.modern-input.is-invalid {
    border-color: #e74c3c;
    background: rgba(231, 76, 60, 0.1);
    box-shadow: 0 0 15px rgba(231, 76, 60, 0.3);
}

.modern-input.is-invalid:focus {
    border-color: #e74c3c;
    background: rgba(231, 76, 60, 0.15);
    box-shadow: 0 0 25px rgba(231, 76, 60, 0.4);
}

/* Glow Login Button */
.glow-login-btn {
    width: 100%;
    padding: 1rem 2rem;
    background: linear-gradient(45deg, #74b9ff, #a29bfe);
    border: none;
    border-radius: 15px;
    color: white;
    font-weight: 600;
    font-size: 1.1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 10px 30px rgba(116, 185, 255, 0.3);
    margin-top: 1rem;
}

.glow-login-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 40px rgba(116, 185, 255, 0.5);
    background: linear-gradient(45deg, #a29bfe, #74b9ff);
}

.glow-login-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s ease;
}

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

.glow-login-btn:active {
    transform: translateY(-1px);
}

/* Register Link */
.register-link {
    text-align: center;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.register-link a {
    color: #74b9ff;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
}

.register-link a:hover {
    color: #a29bfe;
    text-shadow: 0 0 10px rgba(116, 185, 255, 0.5);
}

/* Mobile Responsive - Full Screen App Style */
@media (max-width: 768px) {
    body {
        background: linear-gradient(135deg, #0f1419 0%, #1a1f2e 50%, #0f1419 100%);
    }

    .login-container {
        position: fixed;
        top: 60px;
        /* Start below navbar */
        left: 0;
        right: 0;
        bottom: 0;
        height: calc(100vh - 60px);
        /* Full height minus navbar */
        width: 100vw;
        margin: 0;
        padding: 0;
        display: flex;
        align-items: center;
        justify-content: center;
        z-index: 100;
    }

    .modern-login-card {
        background: rgba(0, 0, 0, 0.3);
        padding: 2rem;
        margin: 2rem;
        max-width: none;
        width: calc(100% - 4rem);
        border-radius: 25px;
        backdrop-filter: blur(15px);
        border: 1px solid rgba(255, 255, 255, 0.1);
        box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    }

    .login-title {
        font-size: 2.2rem;
        margin-bottom: 2rem;
        text-align: center;
    }

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

    .modern-input {
        padding: 1rem 1.2rem;
        font-size: 1rem;
        border-radius: 12px;
    }

    .glow-login-btn {
        padding: 1rem 2rem;
        font-size: 1.1rem;
        width: 100%;
        border-radius: 12px;
        margin-top: 1rem;
    }

    .register-link {
        margin-top: 1.5rem;
        text-align: center;
    }

    /* Hide footer on mobile but keep navbar */
    footer {
        display: none !important;
    }

    /* Hide background effects to improve performance */
    .glance-overlay,
    body::before,
    body::after {
        display: none;
    }
}

@media (max-width: 480px) {
    .modern-login-card {
        margin: 1rem;
        width: calc(100% - 2rem);
        padding: 1.5rem;
    }

    .login-title {
        font-size: 2rem;
        margin-bottom: 1.5rem;
    }

    .modern-input {
        padding: 1.2rem 1rem;
        font-size: 1rem;
    }

    .glow-login-btn {
        padding: 1.2rem 2rem;
        font-size: 1.1rem;
    }
}

/* Large Screen Enhancements */
@media (min-width: 1200px) {
    .modern-login-card {
        max-width: 600px;
        padding: 5rem;
    }

    .login-title {
        font-size: 3rem;
    }

    /* Add more bubble effects for larger screens */
    body::after {
        content: '';
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background:
            radial-gradient(circle at 10% 90%, rgba(162, 155, 254, 0.2) 0%, transparent 60%),
            radial-gradient(circle at 90% 20%, rgba(74, 144, 226, 0.15) 0%, transparent 60%),
            radial-gradient(circle at 30% 70%, rgba(116, 185, 255, 0.25) 0%, transparent 50%);
        animation: bubbleFloat 25s ease-in-out infinite reverse;
        z-index: -2;
    }
}

/* Success/Error Message Styling */
.alert {
    border-radius: 15px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 2rem;
    position: relative;
    padding: 1rem 1.5rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    animation: fadeIn 0.4s ease-out;
    transition: all 0.5s ease;
    text-align: center;
}

/* Auto-dismiss styling */
.alert.auto-dismiss {
    cursor: default;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.alert-success {
    background: rgba(0, 184, 148, 0.25);
    color: #ffffff;
    border-color: rgba(0, 184, 148, 0.4);
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.alert-danger {
    background: rgba(231, 76, 60, 0.25);
    color: #ffffff;
    border-color: rgba(231, 76, 60, 0.4);
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}