/* General Styles */
body {
    margin: 0;
    font-family: 'Fira Sans', Arial, sans-serif;
    /* background: linear-gradient(to bottom, #f0f8ff, #d6e6f2); */
    color: #000;
    display: flex;
    flex-direction: column;
    height: 100vh;
    padding-top: 70px;
    /* Space for the fixed header */
}

#mainContent {
    width: -webkit-fill-available;
    height: fit-content;
    background: url('bg.png') repeat-x center center;
    background-size: cover;
    border: 1px lightgrey;
    border-radius: 15px;
    margin: 5px;
}

/* Header Styles */
.header {
    position: absolute;
    top: 0;
    width: -webkit-fill-available;
    height: 50px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 20px;
    background: #fff;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    border: 1px solid lightgrey;
    border-radius: 20px;
    margin: 0 5px;
}

.header-left .logo {
    height: 16px;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 10px;
}

.powered-by {
    font-size: 14px;
    color: #666;
}

.powered-logo {
    height: 22px;
}

.profile-dropdown {
    position: relative;
    display: flex;
    align-items: center;
    cursor: pointer;
}

.profile-icon {
    width: 30px;
    height: 30px;
    background: #4c63d2;
    color: #fff;
    font-size: 12px;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    margin-right: 10px;
}

.dropdown-content {
    display: none;
    position: absolute;
    top: 50px;
    right: 0;
    background: #fff;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    border-radius: 4px;
    overflow: hidden;
    z-index: 1000;
}

.profile-dropdown:hover .dropdown-content {
    display: block;
}

.dropdown-item {
    padding: 10px 20px;
    font-size: 14px;
    color: #000;
    text-decoration: none;
    display: block;
    text-align: left;
    background: #fff;
    transition: background 0.2s;
}

.dropdown-item:hover {
    background: #f0f0f0;
}

/* Main Section Styles */
.main1 {
    text-align: center;
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
    width: -webkit-fill-available;
    height: -webkit-fill-available;
}

.app-title {
    font-family: 'Fira Sans';
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 30px;
}

.button-container {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: center;
}

select,
input {
    font-family: 'Fira Sans';
    font-size: 14px;
}

/* Button Styles */
.button {
    width: 160px;
    height: 160px;
    background: #2D3494;
    /* Updated color */
    color: #fff;
    font-size: 16px;
    font-weight: bold;
    border-radius: 10px;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    text-align: center;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
    cursor: pointer;
    padding: 10px;
    transition: transform 0.2s, box-shadow 0.2s;
}

.button:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 8px rgba(0, 0, 0, 0.3);
}

/* Adjust Text Placement */
.button span {
    margin-top: 10px;
    /* Push text down slightly */
    font-size: 19px;
    font-weight: bold;
    text-align: left;
}

/* Adjust Icon Placement */
.button-icon {
    position: absolute;
    bottom: 10px;
    right: 10px;
    height: 60px;
}


/* Responsive Styles */
@media (max-width: 768px) {
    .app-title {
        font-size: 25px;
        margin-top: 40%;
    }

    .button {
        width: 150px;
        height: 130px;
        font-size: 14px;
    }

    .button-icon {
        height: 45px;
    }
}

@media (max-width: 480px) {
    .header {
        padding: 10px;
    }

    .powered-by {
        display: none;
        /* Hide on small screens */
    }

    .button {
        width: 130px;
        height: 110px;
        font-size: 12px;
    }

    .button-icon {
        height: 40px;
    }
}

/* Back Button Styling */
.back-button {
    display: flex;
    align-items: center;
    gap: 10px;
    background-color: transparent;
    border: none;
    cursor: pointer;
    font-size: 14px;
    font-weight: bold;
    margin-top: 10px;
    /* Adds spacing from content */
}

/* Ensures it stays at the bottom of the page */
.back-button-container {
    width: 100%;
    display: flex;
    justify-content: flex-start;
    /* Aligns it to the left */
}


.back-button img.back-icon {
    width: 30px;
    height: 30px;
}



#loadingOverlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    backdrop-filter: blur(5px);
    background-color: rgba(255, 255, 255, 0.6);
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
  }

  .loading-spinner {
    text-align: center;
    font-family: 'Segoe UI', sans-serif;
    color: #333;
  }

  .spinner {
    width: 50px;
    height: 50px;
    border: 6px solid #ddd;
    border-top: 6px solid #3498db;
    border-radius: 50%;
    margin: 0 auto 10px;
    animation: spin 1s linear infinite;
  }

  @keyframes spin {
    to { transform: rotate(360deg); }
  }

  @keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
  }