#loading { 
    display: none;
}

button {
    margin: 0 auto;
    display: none; 
}

body {
    background-image: url("../background_pic.webp");
    background-size: cover;
    background-repeat: no-repeat;
    background-attachment: fixed;
    background-position: center;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
}

/* Prevent scrolling on mobile devices */
@media only screen and (max-width: 768px) {
    body {
        overflow: hidden;
        position: fixed;
        width: 100%;
        height: 100%;
    }
}

navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    z-index: 1000;
    min-height: 80px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 5%;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.3);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

/* Hamburger Menu */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-around;
    width: 30px;
    height: 30px;
    background: transparent;
    border: none;
    cursor: pointer;
    z-index: 1001;
    transition: all 0.3s ease;
}

.mobile-menu-toggle span {
    width: 100%;
    height: 3px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 2px;
    transition: all 0.3s ease;
    transform-origin: center;
}

.mobile-menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(7px, 7px);
}

.mobile-menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
}

#nav-ul {
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    list-style-type: none;
    margin: 0;
    padding: 0;
    gap: 40px;
    flex: 1;
}

#nav-ul li {
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Hide mobile logo on desktop and larger screens */
#logo-image-mobile {
    display: none !important;
}

/* Navbar brand positioning */
.navbar-brand {
    display: flex;
    align-items: center;
    order: 1;
}

/* Login button positioning */
#log-in-btn {
    display: flex;
    align-items: center;
}

#nav-ul li a {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.1em;
    text-decoration: none;
    padding: 10px 15px;
    border-radius: 8px;
    transition: all 0.3s ease;
    font-weight: 500;
    position: relative;
    overflow: hidden;
}

#nav-ul li a::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: left 0.5s;
}

#nav-ul li a:hover::before {
    left: 100%;
}

#nav-ul li a:hover {
    color: white;
    background-color: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}

.main {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 100vh;
    padding-top: 100px;
    justify-content: center;
}

.container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin-bottom: 40px;
    text-align: center;
}

.tutoring {
    margin-bottom: 60px;
    width: 100%;
    display: flex;
    justify-content: center;
}

#btn-tutoring {
    display: block;
    width: 300px;
    font-size: 1.3em;
    font-weight: bold; 
    padding: 18px 30px;
    border-radius: 50px;
    background: linear-gradient(135deg, #4CAF50, #45a049);
    color: white;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(76, 175, 80, 0.3);
    text-transform: uppercase;
    letter-spacing: 1px;
}

#btn-tutoring:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 8px 25px rgba(76, 175, 80, 0.4);
    background: linear-gradient(135deg, #45a049, #4CAF50);
}

#btn-tutoring:active {
    transform: translateY(-1px) scale(1.02);
    box-shadow: 0 4px 15px rgba(76, 175, 80, 0.3);
}

h1 {
    font-size: 4.5em;
    font-weight: bold;
    color: white;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    margin: 0;
    text-align: center;
    line-height: 1.2;
}

footer {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    padding: 15px;
    background-color: rgba(0, 0, 0, 0.3);
    display: flex;
    justify-content: center; 
    -webkit-backdrop-filter: blur(5px);
    backdrop-filter: blur(5px);
}

footer p {
    color: rgba(255, 255, 255, 0.8);
    margin: 0 2rem;
    font-size: 0.9em;
}

footer a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    margin: 0 2rem;
    font-size: 0.9em;
    transition: color 0.3s ease;
}

footer a:hover {
    color: white;
}

img {
    max-width: 60px;
    height: auto;
    transition: transform 0.3s ease;
}

img:hover {
    transform: scale(1.1);
}

#log-in-btn {
    display: flex;
    align-items: center;
}

#log-in-btn a {
    background: linear-gradient(135deg, #007BFF, #0056b3);
    color: white;
    padding: 12px 24px;
    border-radius: 25px;
    font-size: 1em;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 3px 10px rgba(0, 123, 255, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

#log-in-btn a:hover {
    background: linear-gradient(135deg, #0056b3, #004085);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 123, 255, 0.4);
}

#profile-img {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.3);
    cursor: pointer;
    transition: all 0.3s ease;
}

#profile-img:hover {
    border-color: rgba(255, 255, 255, 0.6);
    transform: scale(1.1);
}

.profile-menu {
    display: none;
    position: fixed;
    top: 90px;
    right: 20px;
    background: rgba(255, 255, 255, 0.95);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    box-shadow: 0px 8px 25px rgba(0, 0, 0, 0.2);
    border-radius: 12px;
    z-index: 1000;
    width: auto;
    min-width: 180px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.profile-menu ul {
    list-style: none;
    margin: 0;
    padding: 8px 0;
    display: flex;
    flex-direction: column;
}

.profile-menu ul li {
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    padding: 0;
    margin: 0;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.profile-menu ul li:last-child {
    border-bottom: none;
}

.profile-menu ul li:hover {
    background-color: rgba(0, 123, 255, 0.1);
}

.profile-menu ul li a {
    display: block;
    padding: 12px 20px;
    text-decoration: none;
    color: #333333;
    font-size: 14px;
    font-weight: 500;
    transition: color 0.3s ease;
}

.profile-menu ul li:hover a {
    color: #007bff;
}

#particles-js {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
}

#chat-circle {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: linear-gradient(135deg, #007bff, #0056b3);
    width: 65px;
    height: 65px;
    border-radius: 50%;
    box-shadow: 0px 4px 20px rgba(0, 123, 255, 0.3);
    cursor: pointer;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(.4,1.6,.6,1);
    border: 2px solid rgba(255, 255, 255, 0.2);
    overflow: visible;
}

#chat-circle.enlarged {
    width: 320px;
    border-radius: 32px;
    background: linear-gradient(135deg, #0056b3 60%, #007bff 100%);
    box-shadow: 0px 8px 32px rgba(0, 123, 255, 0.45);
}

#chat-circle i {
    color: white;
    font-size: 26px;
    transition: font-size 0.3s;
}

#chat-circle.enlarged i {
    font-size: 32px;
    margin-right: 18px;
}

.chat-label {
    display: none;
    opacity: 0;
    font-size: 1.1em;
    font-weight: 500;
    color: #fff;
    text-align: left;
    margin-left: 10px;
    transition: opacity 0.4s, display 0.4s;
    pointer-events: none;
    line-height: 1.3;
    letter-spacing: 0.02em;
}

#chat-circle.enlarged .chat-label {
    display: block;
    opacity: 1;
    pointer-events: auto;
}

#chat-circle:hover {
    background: linear-gradient(135deg, #0056b3, #004085);
    box-shadow: 0px 6px 25px rgba(0, 123, 255, 0.4);
    transform: scale(1.1) translateY(-2px);
}

#chat-circle:active {
    background: linear-gradient(135deg, #004085, #003d80);
    box-shadow: 0px 3px 15px rgba(0, 123, 255, 0.3);
    transform: scale(0.95);
}

* {
    font-family: 'Afacad Flux', sans-serif;
    box-sizing: border-box; 
}

/* Tablet Responsive */
@media only screen and (max-width: 1024px) {
    navbar {
        padding: 0 3%;
    }
    
    #nav-ul {
        gap: 25px;
    }
    
    h1 {
        font-size: 3.5em;
    }
    
    #btn-tutoring {
        width: 280px;
        font-size: 1.2em;
    }
}

@media only screen and (min-width: 769px) {
    navbar {
        justify-content: space-between;
    }
    
    .navbar-brand {
        order: 1;
    }
    
    #nav-ul {
        order: 2;
        flex: 1;
        justify-content: center;
    }
    
    .navbar-right {
        order: 3;
        margin-left: auto;
    }
    
    /* Hide hamburger menu on desktop */
    .mobile-menu-toggle {
        display: none !important;
    }
    
    #log-in-btn {
        display: flex;
        align-items: center;
    }
}

/* Mobile Large */
@media only screen and (max-width: 768px) {
    .mobile-menu-toggle {
        display: flex;
    }
    
    /* Ensure mobile logo stays hidden on all mobile devices */
    #logo-image-mobile {
        display: none !important;
    }
    
    navbar {
        justify-content: space-between;
        padding: 15px 20px;
        min-height: 70px;
        display: flex;
        align-items: center;
        position: relative;
    }
    
        .navbar-brand {
            display: flex;
            align-items: center;
            order: 1;
            flex-shrink: 0;
        }
    
    .navbar-brand img {
        max-height: 40px;
        width: auto;
    }
    
    /* Container for login button and hamburger menu */
    .navbar-right {
        display: flex;
        align-items: center;
        gap: 15px;
        order: 3;
    }
    
    #log-in-btn {
        display: flex;
        align-items: center;
        flex-shrink: 0;
    }
    
    #log-in-btn a {
        background: linear-gradient(135deg, #007bff, #0056b3);
        color: white;
        padding: 8px 16px;
        border-radius: 25px;
        text-decoration: none;
        font-weight: 500;
        font-size: 0.9em;
        transition: all 0.3s ease;
        box-shadow: 0 2px 10px rgba(0, 123, 255, 0.3);
        white-space: nowrap;
    }
    
    #log-in-btn a:hover {
        background: linear-gradient(135deg, #0056b3, #004085);
        transform: translateY(-1px);
        box-shadow: 0 4px 15px rgba(0, 123, 255, 0.4);
    }
    
    #profile-img {
        width: 40px;
        height: 40px;
        border-radius: 50%;
        cursor: pointer;
        transition: all 0.3s ease;
        border: 2px solid rgba(255, 255, 255, 0.3);
    }
    
    #profile-img:hover {
        transform: scale(1.05);
        border-color: rgba(255, 255, 255, 0.6);
    }
    
    .mobile-menu-toggle {
        flex-shrink: 0;
        position: relative;
        z-index: 1001;
    }
        
    #nav-ul {
        position: fixed;
        top: 92.5px;
        left: 0;
        width: 100%;
        height: calc(100vh - 70px);
        background: rgba(0, 0, 0, 0.95);
        -webkit-backdrop-filter: blur(15px);
        backdrop-filter: blur(15px);
        flex-direction: column;
        justify-content: flex-start;
        padding-top: 50px;
        gap: 30px;
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        z-index: 999;
        order: 0; /* Ensure it doesn't interfere with navbar layout */
    }
    
    #nav-ul.mobile-open {
        transform: translateX(0);
    }
    
    #nav-ul li {
        width: 100%;
        text-align: center;
        opacity: 0;
        transform: translateY(30px);
        transition: all 0.3s ease;
    }
    
    #nav-ul.mobile-open li {
        opacity: 1;
        transform: translateY(0);
    }
    
    /* Staggered animation for menu items - skip first item (mobile logo) */
    #nav-ul.mobile-open li:nth-child(2) { transition-delay: 0.1s; }
    #nav-ul.mobile-open li:nth-child(3) { transition-delay: 0.2s; }
    
    #nav-ul li a {
        font-size: 1.3em;
        padding: 15px 30px;
        margin: 0 20px;
        border-radius: 12px;
        background: rgba(255, 255, 255, 0.05);
        -webkit-backdrop-filter: blur(10px);
        backdrop-filter: blur(10px);
        border: 1px solid rgba(255, 255, 255, 0.1);
        transition: all 0.3s ease;
    }
    
    #nav-ul li a:hover {
        background: rgba(255, 255, 255, 0.15);
        transform: translateY(-2px);
        box-shadow: 0 8px 25px rgba(255, 255, 255, 0.1);
    }
    
    .main {
        padding: 25px 20px 80px 20px;
    }
    
    h1 {
        font-size: 2.8em;
        margin-bottom: 30px;
    }
    
    #btn-tutoring {
        width: 85%;
        font-size: 1.1em;
        padding: 16px 25px;
    }
    
    .profile-menu {
        right: 10px;
        top: 80px;
        min-width: 160px;
    }
    
    #chat-circle {
        width: 60px;
        height: 60px;
        bottom: 25px;
        right: 25px;
    }
    
    #chat-circle i {
        font-size: 24px;
    }
}

@media (max-width: 600px) {
    #chat-circle.enlarged {
        width: 90vw;
        min-width: 220px;
        right: 5vw;
    }
    .chat-label {
        font-size: 1em;
    }
}

/* Mobile Medium */
@media only screen and (max-width: 480px) {
    navbar {
        padding: 12px 15px;
        min-height: 65px;
    }
    
    .navbar-brand img {
        max-height: 35px;
    }
    
    .navbar-right {
        gap: 12px;
    }
    
    .mobile-menu-toggle {
        width: 28px;
        height: 28px;
    }
    
    #log-in-btn a {
        padding: 8px 15px;
        font-size: 0.8em;
    }
    
    #profile-img {
        width: 35px;
        height: 35px;
    }
    
    #nav-ul {
        top: 80px;
        height: calc(100vh - 65px);
        padding-top: 40px;
        gap: 25px;
    }
    
    #nav-ul li a {
        font-size: 1.2em;
        padding: 12px 25px;
        margin: 0 15px;
    }
    
    .main {
        padding: 25px 15px 80px 15px;
    }
    
    h1 {
        font-size: 2.2em;
        margin-bottom: 25px;
    }
    
    #btn-tutoring {
        width: 90%;
        font-size: 1em;
        padding: 14px 20px;
    }
    
    .profile-menu {
        top: 70px;
        right: 5px;
        min-width: 150px;
    }
    
    .profile-menu ul li a {
        padding: 10px 16px;
        font-size: 13px;
    }
    
    #chat-circle {
        width: 55px;
        height: 55px;
        bottom: 20px;
        right: 20px;
    }
    
    #chat-circle i {
        font-size: 22px;
    }
    
    footer {
        padding: 12px 0;
    }
    
    footer p {
        font-size: 0.8em;
    }

    footer a {
        font-size: 0.8em;
    }
}

/* Mobile Small */
@media only screen and (max-width: 360px) {
    navbar {
        padding: 10px 12px;
        min-height: 60px;
    }
    
    .navbar-brand img {
        max-height: 30px;
    }
    
    .navbar-right {
        gap: 10px;
    }
    
    .mobile-menu-toggle {
        width: 25px;
        height: 25px;
    }
    
    #log-in-btn a {
        padding: 6px 12px;
        font-size: 0.75em;
    }
    
    #profile-img {
        width: 30px;
        height: 30px;
    }
    
    #nav-ul {
        top: 60px;
        height: calc(100vh - 60px);
        padding-top: 30px;
        gap: 20px;
    }
    
    #nav-ul li a {
        font-size: 1.1em;
        padding: 10px 20px;
        margin: 0 10px;
    }
    
    h1 {
        font-size: 1.8em;
    }
    
    #btn-tutoring {
        width: 95%;
        font-size: 0.9em;
        padding: 12px 18px;
    }
    
    #chat-circle {
        width: 50px;
        height: 50px;
        bottom: 15px;
        right: 15px;
    }
    
    #chat-circle i {
        font-size: 20px;
    }
}

/* Landscape orientation for mobile */
@media only screen and (max-height: 500px) and (orientation: landscape) {
    .main {
        padding-top: 80px;
        justify-content: flex-start;
    }
    
    h1 {
        font-size: 2em;
        margin-bottom: 20px;
    }
    
    #btn-tutoring {
        margin-bottom: 30px;
    }
    
    navbar {
        min-height: 60px;
        padding: 8px 15px;
    }
    
    .navbar-brand img {
        max-height: 35px;
    }
    
    .navbar-right {
        gap: 12px;
    }
    
    #log-in-btn a {
        padding: 6px 12px;
        font-size: 0.8em;
    }
    
    #profile-img {
        width: 35px;
        height: 35px;
    }
    
    #nav-ul {
        top: 60px;
        height: calc(100vh - 60px);
        padding-top: 20px;
        gap: 15px;
    }
    
    #nav-ul li a {
        padding: 8px 20px;
        font-size: 1em;
    }
}

/* Mobile menu overlay for better UX */
.mobile-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 998;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.mobile-overlay.active {
    display: block;
    opacity: 1;
}

@media only screen and (max-width: 768px) {
    .mobile-overlay {
        display: block;
    }
}

@media only screen and (max-width: 768px) {  
    /* Ensure button is properly positioned and clickable */
    #btn-tutoring {
        z-index: 999;
    }
    
}

* {
    box-sizing: border-box;
}