/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    overflow-x: hidden;
    line-height: 1.6;
}

/* Carousel Section - Improved */
.carousel_section {
    height: 100vh;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1;
}

.carousel-image {
    width: 100%;
    height: 100vh;
    object-fit: cover;
    object-position: center;
    filter: brightness(0.6) blur(1px);
}

.carousel-inner {
    height: 100vh;
}

/* Auth Section Overlay - Fixed positioning issues */
#auth_section {
    position: relative;
    z-index: 10;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(8px);
    padding: 1rem;
}

/* Logo Section - Improved */
.logo {
    text-align: center;
    margin-bottom: 2rem;
    animation: fadeInDown 0.8s ease-out;
}

.bluebirdlogo {
    width: 80px;
    height: 80px;
    margin-bottom: 1rem;
    border-radius: 50%;
    box-shadow: 0 8px 25px rgba(255, 255, 255, 0.3);
    transition: transform 0.3s ease;
    object-fit: cover;
}

.bluebirdlogo:hover {
    transform: scale(1.05);
}

.logo p {
    color: white;
    font-size: 1.8rem;
    font-weight: bold;
    letter-spacing: 2px;
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.7);
    margin: 0;
}

/* Auth Container - Better mobile handling */
.auth_container {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(15px);
    border-radius: 20px;
    padding: 2.5rem;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    max-width: 450px;
    width: 100%;
    margin: 0 auto;
    animation: fadeInUp 0.8s ease-out;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Login/Signup Sections */
#Log_in, #sign_up {
    text-align: center;
}

#Log_in h2, #sign_up h2 {
    color: #333;
    margin-bottom: 1.5rem;
    font-size: 2rem;
    font-weight: 600;
    text-align: center;
}

/* Role Button Toggle - Enhanced */
.role_btn {
    display: flex;
    background: #f1f3f4;
    border-radius: 15px;
    padding: 6px;
    margin-bottom: 2rem;
    box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.1);
    border: 1px solid #e0e0e0;
}

.btns {
    flex: 1;
    padding: 14px 20px;
    text-align: center;
    border-radius: 12px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    color: #666;
    font-size: 0.95rem;
    user-select: none;
}

.btns.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 6px 15px rgba(102, 126, 234, 0.4);
    transform: translateY(-1px);
}

.btns:hover:not(.active) {
    background: #e9ecef;
    color: #333;
    transform: translateY(-1px);
}

/* Form Sections - Improved transitions */
.authsection {
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
}

.authsection.active {
    display: block;
    opacity: 1;
}

.user_signup {
    display: block;
    opacity: 1;
}

/* Form Controls - Enhanced styling */
.form-floating {
    margin-bottom: 1.5rem;
    position: relative;
}

.form-control {
    width: 100%;
    padding: 18px 20px;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    font-size: 1rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: #fff;
    color: #333;
    font-weight: 400;
}

.form-control:focus {
    border-color: #667eea;
    outline: none;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.15);
    transform: translateY(-2px);
    background: #fff;
}

.form-control:hover:not(:focus) {
    border-color: #d1d5db;
}

.form-floating label {
    position: absolute;
    top: 50%;
    left: 20px;
    transform: translateY(-50%);
    color: #666;
    pointer-events: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: white;
    padding: 0 8px;
    font-weight: 500;
    font-size: 1rem;
}

.form-control:focus + label,
.form-control:not(:placeholder-shown) + label {
    top: 0;
    font-size: 0.85rem;
    color: #667eea;
    font-weight: 600;
}

/* Auth Button - Enhanced */
.auth_btn {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    border-radius: 12px;
    color: white;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    margin-bottom: 1.5rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.auth_btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(102, 126, 234, 0.4);
}

.auth_btn:active {
    transform: translateY(-1px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

/* Footer Line */
.footer_line {
    text-align: center;
    margin-top: 1rem;
}

.footer_line h6 {
    color: #666;
    font-size: 0.95rem;
    font-weight: 400;
    margin: 0;
}

.page_move_btn {
    color: #667eea;
    cursor: pointer;
    font-weight: 600;
    text-decoration: underline;
    transition: all 0.3s ease;
}

.page_move_btn:hover {
    color: #764ba2;
    text-decoration: none;
}

/* Sign Up Section */
#sign_up {
    display: none;
}

.show-signup #sign_up {
    display: block;
    animation: slideInRight 0.5s ease-out;
}

.show-signup #Log_in {
    display: none;
}

/* Animations */
@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Loading Bar Styles */
.pace {
    pointer-events: none;
    user-select: none;
}

.pace-inactive {
    display: none;
}

.pace .pace-progress {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    position: fixed;
    z-index: 2000;
    top: 0;
    right: 100%;
    width: 100%;
    height: 4px;
}

/* ======================== RESPONSIVE DESIGN ======================== */

/* Large Screens (1200px and up) */
@media (min-width: 1200px) {
    .auth_container {
        max-width: 480px;
        padding: 3rem;
    }
    
    .logo p {
        font-size: 2rem;
    }
    
    .bluebirdlogo {
        width: 90px;
        height: 90px;
    }
}

/* Medium Screens (992px to 1199px) */
@media (max-width: 1199px) and (min-width: 992px) {
    .auth_container {
        max-width: 450px;
        padding: 2.5rem;
    }
}

/* Small Tablets (768px to 991px) */
@media (max-width: 991px) and (min-width: 768px) {
    #auth_section {
        padding: 1.5rem;
    }
    
    .auth_container {
        max-width: 500px;
        padding: 2rem;
    }
    
    .logo p {
        font-size: 1.7rem;
    }
    
    .bluebirdlogo {
        width: 75px;
        height: 75px;
    }
}

/* Tablets and Small Screens (481px to 767px) */
@media (max-width: 767px) and (min-width: 481px) {
    html {
        font-size: 15px;
    }
    
    #auth_section {
        padding: 1rem;
        min-height: 100vh;
    }
    
    .auth_container {
        max-width: 90%;
        padding: 1.8rem;
        border-radius: 16px;
        margin: 1rem auto;
    }
    
    .logo {
        margin-bottom: 1.5rem;
    }
    
    .logo p {
        font-size: 1.5rem;
        letter-spacing: 1.5px;
    }
    
    .bluebirdlogo {
        width: 65px;
        height: 65px;
    }
    
    #Log_in h2, #sign_up h2 {
        font-size: 1.7rem;
        margin-bottom: 1.3rem;
    }
    
    .form-floating {
        margin-bottom: 1.3rem;
    }
    
    .form-control {
        padding: 15px 18px;
        font-size: 0.95rem;
    }
    
    .auth_btn {
        padding: 14px;
        font-size: 1rem;
    }
    
    .btns {
        padding: 12px 18px;
        font-size: 0.9rem;
    }
    
    .role_btn {
        margin-bottom: 1.5rem;
    }
}

/* Mobile Phones (320px to 480px) */
@media (max-width: 480px) {
    html {
        font-size: 14px;
    }
    
    body {
        overflow-x: hidden;
    }
    
    .carousel_section {
        height: 100vh;
    }
    
    #auth_section {
        padding: 0.5rem;
        min-height: 100vh;
        justify-content: flex-start;
        padding-top: 1rem;
    }
    
    .auth_container {
        width: calc(100% - 1rem);
        max-width: none;
        margin: 0.5rem;
        padding: 1.5rem;
        border-radius: 15px;
        box-shadow: 0 15px 30px rgba(0, 0, 0, 0.3);
    }
    
    .logo {
        margin-bottom: 1.2rem;
    }
    
    .logo p {
        font-size: 1.3rem;
        letter-spacing: 1px;
    }
    
    .bluebirdlogo {
        width: 55px;
        height: 55px;
    }
    
    #Log_in h2, #sign_up h2 {
        font-size: 1.5rem;
        margin-bottom: 1.2rem;
    }
    
    .role_btn {
        margin-bottom: 1.3rem;
        padding: 4px;
    }
    
    .btns {
        padding: 10px 15px;
        font-size: 0.85rem;
        font-weight: 600;
    }
    
    .form-floating {
        margin-bottom: 1.2rem;
    }
    
    .form-control {
        padding: 12px 15px;
        font-size: 0.9rem;
        border-radius: 10px;
    }
    
    .form-floating label {
        left: 15px;
        font-size: 0.9rem;
        padding: 0 6px;
    }
    
    .form-control:focus + label,
    .form-control:not(:placeholder-shown) + label {
        font-size: 0.75rem;
    }
    
    .auth_btn {
        padding: 12px;
        font-size: 0.95rem;
        margin-bottom: 1.2rem;
        border-radius: 10px;
        letter-spacing: 0.5px;
    }
    
    .footer_line h6 {
        font-size: 0.85rem;
    }
}

/* Extra Small Mobile Phones (280px to 319px) */
@media (max-width: 319px) {
    html {
        font-size: 13px;
    }
    
    .auth_container {
        width: calc(100% - 0.5rem);
        margin: 0.25rem;
        padding: 1.2rem;
        border-radius: 12px;
    }
    
    .logo p {
        font-size: 1.2rem;
        letter-spacing: 0.5px;
    }
    
    .bluebirdlogo {
        width: 50px;
        height: 50px;
    }
    
    #Log_in h2, #sign_up h2 {
        font-size: 1.3rem;
        margin-bottom: 1rem;
    }
    
    .form-control {
        padding: 10px 12px;
        font-size: 0.85rem;
    }
    
    .form-floating label {
        left: 12px;
        font-size: 0.85rem;
    }
    
    .auth_btn {
        padding: 10px;
        font-size: 0.9rem;
    }
    
    .btns {
        padding: 8px 12px;
        font-size: 0.8rem;
    }
}

/* Landscape Orientation for Mobile Devices */
@media (max-height: 600px) and (orientation: landscape) {
    #auth_section {
        padding: 0.5rem;
        justify-content: center;
        min-height: 100vh;
    }
    
    .auth_container {
        max-height: calc(100vh - 1rem);
        overflow-y: auto;
        margin: 0.5rem auto;
        padding: 1.5rem;
    }
    
    .logo {
        margin-bottom: 1rem;
    }
    
    .logo p {
        font-size: 1.2rem;
        letter-spacing: 1px;
    }
    
    .bluebirdlogo {
        width: 50px;
        height: 50px;
    }
    
    #Log_in h2, #sign_up h2 {
        font-size: 1.4rem;
        margin-bottom: 1rem;
    }
    
    .form-floating {
        margin-bottom: 1rem;
    }
    
    .role_btn {
        margin-bottom: 1rem;
    }
    
    .auth_btn {
        margin-bottom: 1rem;
    }
}

/* Very Short Screens (Portrait) */
@media (max-height: 500px) and (orientation: portrait) {
    #auth_section {
        padding: 0.5rem;
        justify-content: flex-start;
        padding-top: 1rem;
    }
    
    .logo {
        margin-bottom: 0.8rem;
    }
    
    .auth_container {
        padding: 1.2rem;
    }
    
    .form-floating {
        margin-bottom: 0.8rem;
    }
}

/* High DPI Displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .bluebirdlogo {
        image-rendering: -webkit-optimize-contrast;
        image-rendering: crisp-edges;
    }
    
    .carousel-image {
        image-rendering: -webkit-optimize-contrast;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    body {
        background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    }
    
    .auth_container {
        background: rgba(20, 20, 30, 0.95);
        color: #fff;
        border: 1px solid rgba(255, 255, 255, 0.1);
    }
    
    #Log_in h2, #sign_up h2 {
        color: #fff;
    }
    
    .form-control {
        background: rgba(40, 40, 50, 0.8);
        border-color: #555;
        color: #fff;
    }
    
    .form-control:focus {
        background: rgba(40, 40, 50, 0.9);
        border-color: #667eea;
    }
    
    .form-floating label {
        color: #ccc;
        background: rgba(20, 20, 30, 0.9);
    }
    
    .form-control:focus + label,
    .form-control:not(:placeholder-shown) + label {
        color: #667eea;
        background: rgba(20, 20, 30, 0.9);
    }
    
    .footer_line h6 {
        color: #ccc;
    }
    
    .role_btn {
        background: rgba(40, 40, 50, 0.5);
        border-color: #555;
    }
    
    .btns {
        color: #ccc;
    }
    
    .btns:hover:not(.active) {
        background: rgba(60, 60, 70, 0.5);
        color: #fff;
    }
}

/* Accessibility Improvements */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* Focus Styles for Better Accessibility */
.form-control:focus,
.auth_btn:focus,
.btns:focus,
.page_move_btn:focus {
    outline: 3px solid #667eea;
    outline-offset: 2px;
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    .form-control {
        border-width: 3px;
        border-color: #000;
    }
    
    .auth_btn {
        border: 3px solid #000;
    }
    
    .btns.active {
        border: 2px solid #fff;
    }
    
    .auth_container {
        border: 2px solid #000;
    }
}

/* Print Styles */
@media print {
    .carousel_section,
    #auth_section {
        display: none;
    }
    
    body::after {
        content: "This is a web application and cannot be printed.";
        display: block;
        text-align: center;
        font-size: 1.5rem;
        margin-top: 2rem;
    }
}

/* Touch Device Optimizations */
@media (hover: none) and (pointer: coarse) {
    .btns {
        padding: 14px 20px;
        min-height: 44px;
    }
    
    .auth_btn {
        min-height: 48px;
        padding: 16px;
    }
    
    .form-control {
        min-height: 48px;
        padding: 14px 18px;
    }
    
    .page_move_btn {
        padding: 8px;
        margin: 4px;
    }
}





/* Mobile Responsive Styles for Hostel Login Page */

/* Base responsive design */
* {
    box-sizing: border-box;
}

/* Carousel responsive */
.carousel_section {
    height: 40vh; /* Reduce height on mobile */
}

.carousel-image {
    width: 100%;
    height: 40vh;
    object-fit: cover;
}

/* Main auth section */
#auth_section {
    min-height: 60vh;
    padding: 20px 15px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Logo section */
.logo {
    text-align: center;
    margin-bottom: 30px;
}

.bluebirdlogo {
    width: 80px;
    height: 80px;
    margin-bottom: 10px;
}

.logo p {
    font-size: 24px;
    font-weight: bold;
    margin: 0;
}

/* Auth container */
.auth_container {
    width: 100%;
    max-width: 400px;
    margin: 0 auto;
}

/* Login and signup sections */
#Log_in, #sign_up {
    background: white;
    border-radius: 15px;
    padding: 30px 25px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
    margin-bottom: 20px;
}

#Log_in h2, #sign_up h2 {
    text-align: center;
    margin-bottom: 25px;
    color: #333;
    font-size: 28px;
}

/* Role buttons */
.role_btn {
    display: flex;
    margin-bottom: 25px;
    background: #f1f1f1;
    border-radius: 50px;
    padding: 5px;
}

.btns {
    flex: 1;
    text-align: center;
    padding: 12px 20px;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
}

.btns.active {
    background: #007bff;
    color: white;
}

/* Form styles */
.authsection {
    display: none;
}

.authsection.active {
    display: block;
}

.form-floating {
    margin-bottom: 20px;
}

.form-floating input {
    border-radius: 10px;
    border: 2px solid #e1e1e1;
    padding: 15px;
    font-size: 16px;
    transition: border-color 0.3s ease;
}

.form-floating input:focus {
    border-color: #007bff;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

.form-floating label {
    color: #666;
    font-size: 14px;
}

/* Auth button */
.auth_btn {
    width: 100%;
    padding: 15px;
    background: linear-gradient(135deg, #007bff, #0056b3);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 20px;
}

.auth_btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 123, 255, 0.3);
}

/* Footer line */
.footer_line {
    text-align: center;
}

.footer_line h6 {
    color: #666;
    font-size: 14px;
    margin: 0;
}

.page_move_btn {
    color: #007bff;
    cursor: pointer;
    text-decoration: underline;
    font-weight: 600;
}

.page_move_btn:hover {
    color: #0056b3;
}

/* Mobile specific styles */
@media (max-width: 768px) {
    .carousel_section {
        height: 35vh;
    }
    
    .carousel-image {
        height: 35vh;
    }
    
    #auth_section {
        padding: 15px 10px;
    }
    
    .auth_container {
        max-width: 100%;
        padding: 0 10px;
    }
    
    #Log_in, #sign_up {
        padding: 25px 20px;
        margin-bottom: 15px;
    }
    
    .logo p {
        font-size: 22px;
    }
    
    .bluebirdlogo {
        width: 70px;
        height: 70px;
    }
}

@media (max-width: 480px) {
    .carousel_section {
        height: 30vh;
    }
    
    .carousel-image {
        height: 30vh;
    }
    
    #Log_in, #sign_up {
        padding: 20px 15px;
        border-radius: 10px;
    }
    
    #Log_in h2, #sign_up h2 {
        font-size: 24px;
        margin-bottom: 20px;
    }
    
    .form-floating {
        margin-bottom: 15px;
    }
    
    .form-floating input {
        padding: 12px;
        font-size: 15px;
    }
    
    .auth_btn {
        padding: 12px;
        font-size: 15px;
    }
    
    .btns {
        padding: 10px 15px;
        font-size: 14px;
    }
    
    .logo p {
        font-size: 20px;
    }
    
    .bluebirdlogo {
        width: 60px;
        height: 60px;
    }
}

/* Very small screens */
@media (max-width: 360px) {
    #auth_section {
        padding: 10px 5px;
    }
    
    .auth_container {
        padding: 0 5px;
    }
    
    #Log_in, #sign_up {
        padding: 15px 10px;
    }
    
    .form-floating input {
        padding: 10px;
        font-size: 14px;
    }
    
    .auth_btn {
        padding: 10px;
        font-size: 14px;
    }
}

/* Landscape orientation on mobile */
@media (max-height: 500px) and (orientation: landscape) {
    .carousel_section {
        height: 25vh;
    }
    
    .carousel-image {
        height: 25vh;
    }
    
    #auth_section {
        min-height: 75vh;
    }
    
    .logo {
        margin-bottom: 15px;
    }
    
    .bluebirdlogo {
        width: 50px;
        height: 50px;
    }
    
    .logo p {
        font-size: 18px;
    }
}

/* Hide signup section initially if needed */
#sign_up {
    display: none;
}

/* Show signup when active */
#sign_up.active {
    display: block;
}

/* Additional utility classes */
.text-center {
    text-align: center;
}

.mb-0 {
    margin-bottom: 0;
}

.mt-20 {
    margin-top: 20px;
}