.particleContainer {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: linear-gradient(135deg, #1a1c2c 0%, #2c3e50 100%);
    z-index: -1;
    overflow: hidden;
}

.top-left-logo {
    position: fixed;
    top: 20px;
    left: 30px;
    z-index: 2000;
    width: 170px;
    height: auto;
}

.page-wrapper {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    /* Align to top to avoid stretching */
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    flex-grow: 1;
    /* Grow to fill available space within body */
    box-sizing: border-box;
    /* Include padding in dimensions */
}

.download-btn {
    background-color: transparent;
    background-image: linear-gradient(360deg, #E5A812 0%, #F9C83B 100%);
    font-family: 'Exo', sans-serif;
    font-size: 1.1em;
    font-weight: bold;
    text-transform: uppercase;
    line-height: 1.2;
    letter-spacing: 1px;
    color: #FFFFFF;
    fill: #FFFFFF;
    text-shadow: 0px 0px 10px rgba(0, 0, 0, 0.3);
    border-style: solid;
    border-width: 1px 1px 1px 1px;
    border-color: #E5A812;
    border-radius: 5px 5px 5px 5px;
    padding: 12px 25px;
    cursor: pointer;
    transition: all 0.3s ease-in-out;
    display: flex;
    align-items: center;
    gap: 8px;
}

button:hover,
.download-btn:hover {
    background-image: linear-gradient(360deg, #E5A812 0%, #F9C83B 200%);
    transform: scale(1.05);
    box-shadow: 0px 0px 0px 0px #E5A812;
}

button:active,
.download-btn:active {
    transform: scale(0.98);
    box-shadow: -30px 0px 25px -10px rgba(13, 127, 114, 0.3) inset;
}

.download-btn[onclick="downloadHistory()"] {
    position: fixed;
    top: 20px;
    right: 20px;
}

.download-view-btn {
    background-color: transparent;
    background-image: linear-gradient(360deg, #E5A812 0%, #F9C83B 100%);
    font-family: 'Exo', sans-serif;
    font-size: 1.1em;
    font-weight: bold;
    text-transform: uppercase;
    line-height: 1.2;
    letter-spacing: 1px;
    color: #FFFFFF;
    fill: #FFFFFF;
    text-shadow: 0px 0px 10px rgba(0, 0, 0, 0.3);
    border-style: solid;
    border-width: 1px 1px 1px 1px;
    border-color: #E5A812;
    border-radius: 5px 5px 5px 5px;
    padding: 12px 25px;
    cursor: pointer;
    transition: all 0.3s ease-in-out;
    display: flex;
    align-items: center;
    gap: 8px;
}

button:hover,
.download-view-btn:hover {
    background-image: linear-gradient(360deg, #E5A812 0%, #F9C83B 200%);
    transform: scale(1.05);
    box-shadow: 0px 0px 0px 0px #E5A812;
}

button:active,
.download-view-btn:active {
    transform: scale(0.98);
    box-shadow: -30px 0px 25px -10px rgba(13, 127, 114, 0.3) inset;
}

.download-view-btn[onclick="downloadHistory()"] {
    position: fixed;
    top: 20px;
    right: 20px;
}

.view-btn {
    background-color: transparent;
    background-image: linear-gradient(360deg, #E5A812 0%, #F9C83B 100%);
    font-family: 'Exo', sans-serif;
    font-size: 1.1em;
    font-weight: bold;
    text-transform: uppercase;
    line-height: 1.2;
    letter-spacing: 1px;
    color: #FFFFFF;
    fill: #FFFFFF;
    text-shadow: 0px 0px 10px rgba(0, 0, 0, 0.3);
    box-shadow: 0px 0px 0px 0px #E5A812;
    border-style: solid;
    border-width: 1px 1px 1px 1px;
    border-color: #E5A812;
    border-radius: 5px 5px 5px 5px;
    padding: 12px 25px;
    cursor: pointer;
    transition: all 0.3s ease-in-out;
    display: flex;
    align-items: center;
    gap: 8px;
}

button:hover,
.view-btn:hover {
    background-image: linear-gradient(360deg, #E5A812 0%, #F9C83B 200%);
    transform: scale(1.05);
    box-shadow: 0px 0px 0px 0px #E5A812;
}

button:active,
.view-btn:active {
    transform: scale(0.98);
    box-shadow: -30px 0px 25px -10px rgba(13, 127, 114, 0.3) inset;
}

.view-btn[onclick="downloadHistory()"] {
    position: fixed;
    top: 20px;
    right: 20px;
}

.view-history-btn {
    background-color: transparent;
    background-image: linear-gradient(360deg, #E5A812 0%, #F9C83B 100%);
    font-family: 'Exo', sans-serif;
    font-size: 1.1em;
    font-weight: bold;
    text-transform: uppercase;
    line-height: 1.2;
    letter-spacing: 1px;
    color: #FFFFFF;
    fill: #FFFFFF;
    text-shadow: 0px 0px 10px rgba(0, 0, 0, 0.3);
    box-shadow: 0px 0px 0px 0px #E5A812;
    border-style: solid;
    border-width: 1px 1px 1px 1px;
    border-color: #E5A812;
    border-radius: 5px 5px 5px 5px;
    padding: 12px 25px;
    cursor: pointer;
    transition: all 0.3s ease-in-out;
    display: flex;
    align-items: center;
    gap: 8px;
}

button:hover,
.view-history-btn:hover {
    background-image: linear-gradient(360deg, #E5A812 0%, #F9C83B 200%);
    transform: scale(1.05);
    box-shadow: 0px 0px 0px 0px #E5A812;
}

button:active,
.view-history-btn:active {
    transform: scale(0.98);
    box-shadow: -30px 0px 0px 0px 0px #E5A812;
}

.view-history-btn[onclick="downloadHistory()"] {
    position: fixed;
    top: 20px;
    right: 20px;
}

.add-manual-wrapper {
    display: flex;
    justify-content: center;
    margin-top: 12px;
    margin-bottom: 20px;
}

.add-manual-btn {
    background-color: transparent;
    background-image: linear-gradient(360deg, #E5A812 0%, #F9C83B 100%);
    font-family: 'Exo', sans-serif;
    font-size: 1.1em;
    font-weight: bold;
    text-transform: uppercase;
    line-height: 1.2;
    letter-spacing: 1px;
    color: #FFFFFF;
    fill: #FFFFFF;
    text-shadow: 0px 0px 10px rgba(0, 0, 0, 0.3);
    border-style: solid;
    border-width: 1px 1px 1px 1px;
    border-color: #E5A812;
    box-shadow: 0px 0px 0px 0px #E5A812;
    border-radius: 5px 5px 5px 5px;
    padding: 12px 25px;
    cursor: pointer;
    transition: all 0.3s ease-in-out;
    display: flex;
    align-items: center;
    gap: 8px;
    position: static;
}

button:hover,
.add-manual-btn:hover {
    background-image: linear-gradient(360deg, #E5A812 0%, #F9C83B 200%);
    transform: scale(1.05);
    box-shadow: 0px 0px 0px 0px #E5A812;
}

button:active,
.add-manual-btn:active {
    transform: scale(0.98);
    box-shadow: -30px 0px 0px 0px 0px #E5A812;
}

.or-separator {
    text-align: center;
    margin: 40px 0;
    position: relative;
}

.or-separator::before,
.or-separator::after {
    content: "";
    display: inline-block;
    width: 30%;
    height: 1px;
    background-color: #ccc;
    vertical-align: middle;
    margin: 0 10px;
}

.or-separator span {
    font-weight: bold;
    color: #7e7d7d;
    letter-spacing: 1px;
}

body {
    font-family: 'Exo', sans-serif;
    margin: 0;
    padding: 0;
    background-color: #020817;
    height: 100vh;
    /* Match viewport height */
    overflow-y: auto;
    /* Scroll only when content overflows */
    overflow-x: hidden;
    /* Prevent horizontal scrollbar */
    position: relative;
    display: flex;
    /* Make body a flex container */
    flex-direction: column;
    /* Stack children vertically */
}

.container {
    background-color: transparent;
    padding: 20px;
    border-top-left-radius: 15px;
    border-top-right-radius: 15px;
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
    box-sizing: border-box;
    /* Include padding in dimensions */
}

h1 {
    color: #FFFFFF;
    margin-bottom: 40px;
    font-size: 2.5em;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.2);
    text-align: center;
}

.cards-container {
    display: flex;
    flex-wrap: wrap;
    gap: 40px;
    margin-bottom: 30px;
    justify-content: center;
    max-width: 1000px;
    margin-left: auto;
    margin-right: auto;
}

.cards-container.first-row {
    display: flex;
    flex-wrap: nowrap;
    justify-content: space-between;
    gap: 20px;
    align-items: stretch;
}

.cards-container.first-row .form-group.card {
    flex: 1;
    min-width: 200px;
    min-height: 150px;
}

.cards-container.image-row {
    display: none;
    flex-wrap: nowrap;
    justify-content: space-between;
    gap: 20px;
    align-items: stretch;
    max-width: 1000px;
    margin-left: auto;
    margin-right: auto;
}

.cards-container.image-row .form-group.card {
    flex: 1;
    min-width: 200px;
    min-height: 150px;
}

.cards-container.second-row {
    display: flex;
    flex-wrap: nowrap;
    justify-content: space-between;
    gap: 20px;
    align-items: stretch;
}

.cards-container.second-row .form-group.card {
    flex: 1;
    min-width: 200px;
}

.cards-container.third-row {
    display: none;
    flex-wrap: nowrap;
    justify-content: space-between;
    gap: 20px;
    align-items: stretch;
    max-width: 1000px;
    margin-left: auto;
    margin-right: auto;
}

.cards-container.third-row .form-group.card {
    flex: 1;
    min-width: 200px;
    min-height: 150px;
}

@media (max-width: 768px) {
    .cards-container.first-row {
        flex-wrap: wrap;
        justify-content: center;
    }

    .cards-container.first-row .form-group.card {
        flex: 1 1 45%;
        max-width: 45%;
        margin-bottom: 20px;
    }
}

@media (max-width: 480px) {
    .cards-container.first-row .form-group.card {
        flex: 1 1 100%;
        max-width: 100%;
    }
}

@media (max-width: 768px) {
    .cards-container.image-row {
        flex-wrap: wrap;
        justify-content: center;
    }

    .cards-container.image-row .form-group.card {
        flex: 1 1 45%;
        max-width: 45%;
        margin-bottom: 20px;
    }
}

@media (max-width: 480px) {
    .cards-container.image-row .form-group.card {
        flex: 1 1 100%;
        max-width: 100%;
    }
}

@media (max-width: 900px) {
    .cards-container.second-row {
        flex-wrap: wrap;
        justify-content: center;
    }

    .cards-container.second-row .form-group.card {
        flex: 1 1 45%;
        max-width: 45%;
        margin-bottom: 20px;
    }
}

@media (max-width: 600px) {
    .cards-container.second-row .form-group.card {
        flex: 1 1 100%;
        max-width: 100%;
    }
}

@media (max-width: 768px) {
    .cards-container.third-row {
        flex-wrap: wrap;
        justify-content: center;
    }

    .cards-container.third-row .form-group.card {
        flex: 1 1 45%;
        max-width: 45%;
        margin-bottom: 20px;
    }
}

@media (max-width: 480px) {
    .cards-container.third-row .form-group.card {
        flex: 1 1 100%;
        max-width: 100%;
    }
}

.login-wrapper {
    flex-direction: column;
    min-height: 100vh;
    align-items: center;
    justify-content: center;
    padding: 20px 0;
}

.login-header {
    flex: 0 0 auto;
    text-align: center;
    margin-bottom: 40px;
    z-index: 1;
}

.login-main {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
}

.login-container {
    max-width: 400px;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px;
}

.login-form-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    width: 100%;
}

.login-container .form-group.card {
    max-width: 300px;
    width: 100%;
}

.login-container button[type="submit"] {
    margin-top: 0;
}

.flashes {
    list-style: none;
    padding: 0;
    margin: 20px 0;
    text-align: center;
    width: 100%;
}

.flashes li {
    background: linear-gradient(180deg, rgba(255, 0, 0, 0.2), rgba(255, 0, 0, 0.1));
    color: #FFFFFF;
    padding: 12px;
    border-radius: 5px;
    border: 1px solid rgba(255, 68, 68, 0.5);
    margin-bottom: 10px;
    font-family: 'Exo', sans-serif;
    font-size: 0.95em;
    text-shadow: 0px 0px 2px rgba(0, 0, 0, 0.3);
    box-shadow: 0 2px 4px rgba(255, 0, 0, 0.2);
}

.button-group {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    margin-top: 10px;
}

.button-group button {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 300px;
    padding: 10px;
    font-size: 1em;
    font-family: "Exo", sans-serif;
    background-image: linear-gradient(360deg, #E5A812 0%, #F9C83B 100%);
    text-shadow: 0px 0px 10px rgba(0, 0, 0, 0.3);
    box-shadow: 0px 0px 0px 0px #E5A812;
    border-style: solid;
    border-width: 1px;
    border-color: #E5A812;
    border-radius: 5px;
    color: #FFFFFF;
    cursor: pointer;
    transition: transform 0.3s ease, opacity 0.3s ease;
    text-align: center;
}

.button-group button:hover {
    opacity: 0.9;
    transform: translateY(-3px);
}

.button-group button.inactive {
    background-image: linear-gradient(360deg, #808080 0%, #A9A9A9 100%);
    border-color: #808080;
    color: #D3D3D3;
    cursor: pointer;
}

.button-group button.inactive:hover {
    opacity: 0.8;
    transform: translateY(-3px);
}

.login-container .form-group.card:has(#usernameButtons) {
    min-height: auto;
    padding: 15px;
}

.login-container .button-group {
    width: 100%;
    max-width: 300px;
}

@media (max-width: 600px) {
    .button-group button {
        width: 100%;
        max-width: 300px;
    }

    .login-wrapper {
        padding: 10px 0;
    }

    .login-header {
        margin-bottom: 20px;
    }
}

.header-actions {
    position: fixed;
    top: 40px;
    right: 30px;
    display: flex;
    gap: 10px;
    align-items: center;
    z-index: 1000;
}

.view-quiz-header-actions {
    position: fixed;
    top: 40px;
    right: 30px;
    display: flex;
    gap: 10px;
    align-items: center;
    z-index: 1000;
}

.logout-dashboard-btn {
    background-color: transparent;
    background-image: linear-gradient(360deg, #e74c3c 0%, #ec7063 100%);
    font-family: 'Exo', sans-serif;
    font-size: 1.1em;
    font-weight: bold;
    text-transform: uppercase;
    line-height: 1.2;
    letter-spacing: 1px;
    color: #FFFFFF;
    fill: #FFFFFF;
    text-shadow: 0px 0px 10px rgba(0, 0, 0, 0.3);
    box-shadow: 0px 0px 0px 0px #e74c3c;
    border-style: solid;
    border-width: 1px 1px 1px 1px;
    border-color: #e74c3c;
    border-radius: 5px 5px 5px 5px;
    padding: 12px 25px;
    cursor: pointer;
    transition: all 0.3s ease-in-out;
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
}

.logout-dashboard-btn:hover {
    background-image: linear-gradient(360deg, #e74c3c 0%, #ec7063 200%);
    transform: scale(1.05);
    box-shadow: 0px 0px 0px 0px #e74c3c;
}

.logout-dashboard-btn:active {
    transform: scale(0.98);
    box-shadow: -30px 0px 25px -10px rgba(13, 127, 114, 0.3) inset;
}

.delete-btn {
    background-color: transparent;
    background-image: linear-gradient(360deg, #e74c3c 0%, #ec7063 100%);
    font-family: 'Exo', sans-serif;
    font-size: 1.1em;
    font-weight: bold;
    text-transform: uppercase;
    line-height: 1.2;
    letter-spacing: 1px;
    color: #FFFFFF;
    fill: #FFFFFF;
    text-shadow: 0px 0px 10px rgba(0, 0, 0, 0.3);
    box-shadow: 0px 0px 0px 0px #e74c3c;
    border-style: solid;
    border-width: 1px 1px 1px 1px;
    border-color: #e74c3c;
    border-radius: 5px 5px 5px 5px;
    padding: 12px 25px;
    cursor: pointer;
    transition: all 0.3s ease-in-out;
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
}

.delete-btn:hover {
    background-image: linear-gradient(360deg, #e74c3c 0%, #ec7063 200%);
    transform: scale(1.05);
    box-shadow: 0px 0px 0px 0px #e74c3c;
}

.edit-btn {
    background-color: transparent;
    background-image: linear-gradient(360deg, #3c86e7 0%, #63baec 100%);
    font-family: 'Exo', sans-serif;
    font-size: 1.1em;
    font-weight: bold;
    text-transform: uppercase;
    line-height: 1.2;
    letter-spacing: 1px;
    color: #FFFFFF;
    fill: #FFFFFF;
    text-shadow: 0px 0px 10px rgba(0, 0, 0, 0.3);
    box-shadow: 0px 0px 0px 0px #3cb7e7;
    border-style: solid;
    border-width: 1px 1px 1px 1px;
    border-color: #3ca8e7;
    border-radius: 5px 5px 5px 5px;
    padding: 12px 25px;
    cursor: pointer;
    transition: all 0.3s ease-in-out;
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
}

.edit-btn:hover {
    background-image: linear-gradient(360deg, #3ca8e7 0%, #63baec 200%);
    transform: scale(1.05);
    box-shadow: 0px 0px 0px 0px #3cb7e7;
}

.save-btn {
    background-color: transparent;
    background-image: linear-gradient(360deg, #39d853 0%, #54c77a 100%);
    font-family: 'Exo', sans-serif;
    font-size: 1.1em;
    font-weight: bold;
    text-transform: uppercase;
    line-height: 1.2;
    letter-spacing: 1px;
    color: #FFFFFF;
    fill: #FFFFFF;
    text-shadow: 0px 0px 10px rgba(0, 0, 0, 0.3);
    box-shadow: 0px 0px 0px 0px #50e73c;
    border-style: solid;
    border-width: 1px 1px 1px 1px;
    border-color: #3ca8e7;
    border-radius: 5px 5px 5px 5px;
    padding: 12px 25px;
    cursor: pointer;
    transition: all 0.3s ease-in-out;
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
}

.save-btn:hover {
    background-image: linear-gradient(360deg, #2ebe6a 0%, #44c970 100%);
    transform: scale(1.05);
    box-shadow: 0px 0px 0px 0px #50e73c;
}

.table-search {
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 12px 0 18px 0;
    padding: 10px 12px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 10px;
    background: rgba(0, 0, 0, 0.15);
    color: #ffffff;
    z-index: 20;
}

.table-search i {
    opacity: 0.8;
}

.table-search input {
    flex: 1;
    border: none;
    outline: none;
    background: transparent;
    color: #fff;
    caret-color: #fff;
    font-size: 14px;
    pointer-events: auto;
}

.table-search button {
    border: none;
    background: transparent;
    color: inherit;
    cursor: pointer;
    opacity: 0.8;
    pointer-events: auto;
}

.table-search button:hover {
    opacity: 1;
}

@media (max-width: 768px) {
    .header-actions {
        right: 10px;
        top: 20px;
        flex-direction: column;
        gap: 5px;
    }

    .view-quiz-header-actions {
        right: 10px;
        top: 20px;
        flex-direction: column;
        gap: 5px;
    }

    .view-history-btn,
    .logout-dashboard-btn {
        width: 100%;
        max-width: 200px;
        justify-content: center;
    }
}

.form-group.card {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.25), rgba(255, 255, 255, 0.05));
    opacity: 0.75;
    padding: 15px;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    border: 1px solid #E5A812;
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.form-group.card:hover {
    opacity: 0.9;
    transform: translateY(-5px);
}

.form-group.card i {
    font-size: 1.5em;
    color: #FFFFFF;
    margin-bottom: 5px;
    display: block;
    width: 40px;
    height: 40px;
    line-height: 40px;
    text-align: center;
    background-color: #E5A812;
    border-radius: 50%;
    margin-left: auto;
    margin-right: auto;
}

.form-group.card label {
    font-weight: bold;
    color: #FFFFFF;
    font-size: 1em;
    margin-bottom: 5px;
    display: block;
}

.form-group.card input,
.form-group.card select,
.form-group.card textarea {
    font-family: "Exo", sans-serif;
    padding: 8px;
    margin: 0;
    border: 1px solid #FFFFFF2B;
    border-radius: 5px;
    font-size: 0.9em;
    background: rgba(255, 255, 255, 0.15);
    color: #FFFFFF;
    width: 100%;
    box-sizing: border-box;
    resize: none;
}

.form-group.card textarea {
    height: 80px;
    line-height: 1.4;
}

#translation-model-group.form-group.card {
    flex: 1;
    min-width: 200px;
}

#translation-model-group select {
    width: 100%;
    padding-right: 25px;
}

#image-upload-group .file-input-wrapper {
    position: relative;
    width: 100%;
}

#image-upload-group input[type="file"] {
    opacity: 0;
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    cursor: pointer;
}

#image-upload-group .file-label {
    display: block;
    padding: 8px;
    border: 1px solid #FFFFFF2B;
    border-radius: 5px;
    background: rgba(255, 255, 255, 0.15);
    color: #FFFFFF;
    text-align: center;
    cursor: pointer;
    width: 100%;
    box-sizing: border-box;
}

.carousel {
    display: flex;
    overflow-x: auto;
    gap: 10px;
    padding: 5px 0;
    max-height: 110px;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.2) transparent;
}

.carousel::-webkit-scrollbar {
    height: 8px;
}

.carousel::-webkit-scrollbar-track {
    background: transparent;
    border-radius: 10px;
}

.carousel::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 10px;
}

.carousel::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.4);
}

.image-container {
    position: relative;
    display: inline-block;
}

.remove-btn {
    position: absolute;
    top: 5px;
    right: 5px;
    width: 20px;
    height: 20px;
    background: rgba(255, 0, 0, 0.7);
    color: white;
    font-size: 16px;
    line-height: 20px;
    text-align: center;
    border-radius: 50%;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.image-container:hover .remove-btn {
    opacity: 1;
}

.form-group.card select option {
    color: #333333;
    background: #FFFFFF;
}

.form-group.card select {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: url('data:image/svg+xml;utf8,<svg fill="%23FFFFFF" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg"><path d="M7 10l5 5 5-5z"/></svg>');
    background-repeat: no-repeat;
    background-position: right 8px center;
    background-size: 12px;
    cursor: pointer;
}

input::placeholder,
textarea::placeholder {
    color: #CCCCCC;
}

.form-group.card input:hover,
.form-group.card select:hover,
.form-group.card textarea:hover {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.15), rgba(255, 255, 255, 0.08));
    border-color: rgba(255, 255, 255, 0.3);
}

.form-group.card input[type="number"] {
    appearance: textfield;
    -moz-appearance: textfield;
    padding-right: 8px;
}

.form-group.card input[type="number"]::-webkit-inner-spin-button,
.form-group.card input[type="number"]::-webkit-outer-spin-button {
    -webkit-appearance: inner-spin-button;
    opacity: 1;
    background: rgba(255, 255, 255, 0.15);
    width: 12px;
    height: 100%;
    cursor: pointer;
    border: none;
    color: #FFFFFF;
}

.button-container {
    display: flex;
    justify-content: center;
    margin-top: 40px;
}

button {
    background-color: transparent;
    background-image: linear-gradient(360deg, #E5A812 0%, #F9C83B 100%);
    font-family: "Exo", Sans-serif;
    font-size: 1.1em;
    font-weight: bold;
    text-transform: uppercase;
    line-height: 1.2;
    letter-spacing: 1px;
    color: #FFFFFF;
    fill: #FFFFFF;
    text-shadow: 0px 0px 10px rgba(0, 0, 0, 0.3);
    border-style: solid;
    border-width: 1px 1px 1px 1px;
    border-color: #E5A812;
    border-radius: 0px 0px 0px 0px;
    box-shadow: 0px 0px 0px 0px #E5A812;
    border-radius: 5px 5px 5px 5px;
    padding: 12px 25px;
    cursor: pointer;
    transition: all 0.3s ease-in-out;
    display: flex;
    align-items: center;
    gap: 8px;
}

#quiz-table-container {
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    max-height: 80vh;
    margin-bottom: 20px;
}

#quiz-table {
    width: auto;
    min-width: 100%;
    border-collapse: collapse;
    background: rgba(255, 255, 255, 0.05);
    color: #FFFFFF;
    table-layout: auto;
}

#quiz-table th,
#quiz-table td {
    padding: 10px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    text-align: left;
    font-size: 0.9em;
    white-space: normal;
}

#quiz-table th {
    position: sticky;
    top: 0;
    z-index: 10;
    background: rgb(27, 32, 49);
    font-weight: bold;
    text-transform: uppercase;
}

#quiz-table td {
    vertical-align: middle;
}

#quiz-table input[type="checkbox"] {
    transform: scale(1.2);
    cursor: pointer;
}

#quiz-table a {
    color: #4DC1AD;
    text-decoration: underline;
}

#quiz-table a:hover {
    color: #0F7F72;
}

.arabic {
    font-family: 'Exo', sans-serif;
    direction: rtl;
    display: block;
    color: #d0d0d0;
}

.attachment {
    max-width: 200px;
    max-height: 200px;
    object-fit: contain;
    display: block;
    margin: 5px auto;
    border: 1px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
}

.attachment:hover {
    border-color: #007bff;
    transform: scale(1.05);
    transition: all 0.2s ease;
}

.image-container {
    text-align: center;
    padding: 10px;
}

.image-fallback {
    display: none;
    color: #666;
    font-style: italic;
}

.image-fallback a {
    color: #007bff;
    text-decoration: none;
}

.image-fallback a:hover {
    text-decoration: underline;
}

.image-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
}

.modal-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    max-width: 90%;
    max-height: 90%;
}

.close-modal {
    position: absolute;
    top: 15px;
    right: 35px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
}

.close-modal:hover {
    color: #bbb;
}

#quiz-table td div {
    line-height: 1.5;
    white-space: normal;
    word-wrap: break-word;
}

#button-container {
    display: flex;
    justify-content: center;
    gap: 20px;
    align-items: center;
    flex-wrap: wrap;
}

.result-container {
    display: none;
    margin: 40px auto;
    padding: 20px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.05));
    opacity: 0.85;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
    border: 1px solid #E5A812;
    width: 90%;
    max-width: 1000px;
    text-align: left;
    max-height: 800px;
    overflow-y: auto;
}

.result-container::-webkit-scrollbar {
    width: 8px;
}

.result-container::-webkit-scrollbar-track {
    background: transparent;
    border-radius: 10px;
}

.result-container::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 10px;
}

.result-container::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.4);
}

.result-container h2 {
    color: #E5A812;
    font-size: 1.5em;
    margin-bottom: 15px;
    letter-spacing: 1px;
    text-shadow: 0px 0px 10px rgba(0, 0, 0, 0.3);
    text-align: center;
}

.result-container pre {
    white-space: pre-wrap;
    font-family: 'Exo', sans-serif;
    font-size: 1em;
    color: #FFFFFF;
    background: rgba(255, 255, 255, 0.05);
    padding: 15px;
    border-radius: 5px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    line-height: 1.6;
    margin-bottom: 20px;
}

#download-container {
    text-align: center;
    margin-top: 20px;
}

#loading-spinner {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.3);
    justify-content: center;
    align-items: center;
    z-index: 1000;
    backdrop-filter: blur(5px);
}

.spinner {
    position: relative;
    animation: slideAndRotate 9s ease-in-out infinite;
}

.spinner img {
    width: 50px;
    height: 50px;
}

@keyframes slideAndRotate {
    0% {
        transform: translateX(-100vw);
    }

    25% {
        transform: translateX(calc(50vw - 25px)) rotate(360deg);
    }

    50% {
        transform: translateX(calc(100vw - 50px));
    }

    75% {
        transform: translateX(calc(50vw - 25px)) rotate(720deg);
    }

    100% {
        transform: translateX(-100vw);
    }
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

body::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #020817;
    background-position: top center;
    background-repeat: no-repeat;
    background-size: cover;
    opacity: 0.45;
    z-index: 0;
    pointer-events: none;
}

/* Task Status Container */
.task-status-container {
    width: 100%;
    max-width: 800px;
    margin: 20px auto;
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.status-card {
    background: linear-gradient(135deg, rgba(229, 168, 18, 0.1) 0%, rgba(229, 168, 18, 0.05) 100%);
    border: 2px solid #E5A812;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3), inset 0 0 20px rgba(229, 168, 18, 0.1);
}

.status-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    border-bottom: 1px solid rgba(229, 168, 18, 0.3);
    padding-bottom: 12px;
}

.status-header h3 {
    color: #FFFFFF;
    font-family: 'Exo', sans-serif;
    font-size: 1.3em;
    margin: 0;
    text-shadow: 0px 2px 10px rgba(0, 0, 0, 0.3);
}

.status-badge {
    padding: 6px 12px;
    border-radius: 20px;
    font-weight: bold;
    font-size: 0.85em;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-family: 'Exo', sans-serif;
}

.status-badge.status-queued {
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
    color: #FFFFFF;
    animation: pulse 1.5s ease-in-out infinite;
}

.status-badge.status-processing {
    background: linear-gradient(135deg, #f39c12 0%, #e67e22 100%);
    color: #FFFFFF;
    animation: pulse 1s ease-in-out infinite;
}

.status-badge.status-completed {
    background: linear-gradient(135deg, #27ae60 0%, #229954 100%);
    color: #FFFFFF;
}

.status-badge.status-failed {
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
    color: #FFFFFF;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
}

.status-content {
    margin-bottom: 20px;
}

.status-info {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    border-left: 4px solid #E5A812;
}

.status-info i {
    font-size: 1.8em;
    color: #E5A812;
    min-width: 30px;
    text-align: center;
}

.status-info.status-error {
    border-left-color: #e74c3c;
}

.status-info.status-error i {
    color: #e74c3c;
}

.status-info > div {
    flex: 1;
}

.status-info p {
    margin: 0;
    color: #FFFFFF;
    font-family: 'Exo', sans-serif;
    font-size: 0.95em;
}

.status-info p:first-child {
    font-weight: bold;
    margin-bottom: 5px;
    font-size: 1.05em;
}

.status-info strong {
    color: #E5A812;
    font-weight: bold;
}

.queue-position,
.processing-time,
.completion-time,
.eta-time,
.error-message {
    font-size: 0.9em;
    color: #AAAAAA;
    margin-top: 3px;
}

.api-stats {
    display: flex;
    gap: 20px;
    padding: 15px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    border-top: 1px solid rgba(229, 168, 18, 0.3);
}

.stat {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.stat-label {
    font-size: 0.8em;
    color: #AAAAAA;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 5px;
    font-family: 'Exo', sans-serif;
}

.stat-value {
    font-size: 1.3em;
    color: #E5A812;
    font-weight: bold;
    font-family: 'Exo', sans-serif;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.fade-in {
    animation: fadeIn 1s ease-in;
}