body {
    font-family: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
    background-attachment: fixed;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    min-height: 100vh;
    margin: 0;
}

.main-container {
    padding: 14px;
    min-height: 75vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.main {
    border-radius: 5px;
    margin-top: 10px;
    min-width: 500px;
    background: #ffffff;
    box-shadow: 0 25px 45px -12px rgba(0, 0, 0, 0.25), 0 2px 6px rgba(0, 0, 0, 0.05);
    padding: 2rem 2rem 2.5rem;
    text-align: center;
    transition: all 0.2s ease;
}

.main #uploadForm {
    align-items: center;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    width: 100%;
}

.main label {
    font-weight: 600;
    color: #1f3a4b;
    font-size: 1rem;
    letter-spacing: -0.2px;
    display: block;
    text-align: left;
    margin-bottom: 0.25rem;
}

a {
    text-decoration: none;
}

#selector-title {
    font-size: 1.9rem;
    font-weight: 700;
    margin-bottom: 1.8rem;
    background: linear-gradient(120deg, #1e4663, #2c6e9e);
    background-clip: text;
    -webkit-background-clip: text;
    color: transparent;
    letter-spacing: -0.3px;
    word-break: break-word;
    /* ensures long text wraps */
}

/* --- LINE UNDER THE TITLE --- */
.title-underline {
    width: auto;
    height: 4px;
    background: linear-gradient(90deg, #c44536, #e06c5e, #f4a261);
    border-radius: 4px;
    margin: 0 auto 1.8rem auto;
    transition: width 0.2s ease;
}

.main input {
    height: 25px;
}

.file-input-group {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1rem;
    background: #f8fafd;
    padding: 0.8rem 1.2rem;
    border-radius: 1.5rem;
    border: 1px solid #dce5ec;
    transition: 0.2s;
}

.file-input-group:hover {
    border-color: #8db5d0;
    background: #ffffff;
}

/* CUSTOM FILE INPUT STYLING (works across browsers with proper wrapping) */
.main input[type="file"] {
    flex: 2;
    background-color: #4b4848;
    padding: 15px;
    min-width: 150px;
    font-size: 0.9rem;
    color: #ffffff;
    cursor: pointer;
}

.main input[type="file"]::file-selector-button {
    background: #eef3fc;
    border: 1px solid #cbdde9;
    border-radius: 2rem;
    padding: 0.5rem 1.2rem;
    font-weight: 500;
    color: #1f5e7e;
    cursor: pointer;
    transition: 0.2s;
    margin-right: 1rem;
}

.main input[type="file"]::file-selector-button:hover {
    background: #e2edf7;
    border-color: #9bbdd4;
}

/* SUBMIT BUTTON */
.main button[type="submit"] {
    background: #2c7da0;
    border: none;
    padding: 0.8rem 1.8rem;
    font-weight: 600;
    font-size: 1rem;
    border-radius: 3rem;
    color: white;
    cursor: pointer;
    transition: all 0.2s ease;
    flex: 1;
    min-width: 120px;
    font-family: inherit;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.main button[type="submit"]:hover {
    background: #1f5e7e;
    transform: translateY(-2px);
    box-shadow: 0 8px 18px rgba(44, 125, 160, 0.25);
}

.main button[type="submit"]:active {
    transform: translateY(1px);
}

/* additional responsive wrapping for very small devices */
@media (max-width: 480px) {
    .main {
        padding: 1.5rem;
        min-width: 100px;
    }

    .main #uploadForm #selector-title {
        font-size: 1.6rem;
        margin-bottom: 1.2rem;
    }

    .main #uploadForm .file-input-group {
        flex-direction: column;
        align-items: stretch;
        gap: 0.8rem;
        padding: 1rem;
    }

    .main #uploadForm input[type="file"] {
        width: 100%;
    }

    .main #uploadForm button[type="submit"] {
        width: 100%;
    }
}

/* optional: nice focus ring for accessibility */
input[type="file"]:focus,
button[type="submit"]:focus {
    outline: 3px solid #8bbdd9;
    outline-offset: 2px;
}

/* small helper text for wrapping demo (just visual flair) */
.hint-text {
    margin-top: 1.5rem;
    font-size: 0.75rem;
    color: #68839b;
    border-top: 1px dashed #cbdae3;
    padding-top: 1rem;
    text-align: center;
    word-break: break-word;
}

.hint-text span {
    background: #eef2f7;
    padding: 0.2rem 0.6rem;
    border-radius: 30px;
}

.progress-bar {
    width: 0%;
    height: 25px;
    background-color: #4CAF50;
    text-align: center;
    line-height: 25px;
    color: white;
    border-radius: 4px;
    transition: width 0.3s;
}

.message {
    margin-top: 15px;
    padding: 10px;
    border-radius: 4px;
}

.loading {
    display: none;
    margin-top: 10px;
    color: #666;
}

.panic-card {
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 20px;
    background: #f9f9f9;
}

.panic-code {
    font-size: 1.2em;
    font-weight: bold;
    color: #d9534f;
    margin-bottom: 10px;
}

.description {
    margin: 10px 0;
}

.description-en {
    color: #2c3e50;
}

.description-ar {
    color: #16a085;
    font-family: 'Traditional Arabic', 'Arial', sans-serif;
    direction: rtl;
}

.solution-image {
    max-width: 200px;
    max-height: 200px;
    margin-top: 10px;
}

.solution-video a {
    color: #337ab7;
    text-decoration: none;
}

.result {
    margin-top: 20px;
}

#result {
    overflow-y: auto;
    display: inline-grid;
}

.no-match {
    background: #f2dede;
    color: #a94442;
    padding: 10px;
    border-radius: 5px;
}

.progress-container {
    display: none;
    width: 100%;
    background-color: #f3f3f3;
    margin: 10px 0;
    border-radius: 5px;
}

/* get panic data start*/


/* get panic data end*/

/*/////////////////////////////////////////*/
/* ===== SIMPLE NAVBAR STYLES Start ===== */
.navbar {
    background: #4f4f4fad;
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 0;
    width: 100%;
    z-index: 100;
    display: block;
}

.nav-container {
    padding: 5px 24px 5px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

/* Logo */
.navLogo img {
    width: 50px;
    height: 50px;
}

.logo:hover {
    opacity: 0.8;
}

.language-selector select {
    height: 30px;
    border-radius: 5px;
    min-width: 75px;
    background: #00000000;
    border: solid 1px #ffffff;
    color: #ffffff;
}

.language-selector select option {
    background-color: #1e4663;
    padding: 5px;
}

/* Desktop navigation menu */
.nav-menu {
    display: flex;
    gap: 2rem;
    list-style: none;
    align-items: center;
    margin: 0;
}

.nav-menu li a {
    display: flex;
    text-decoration: none;
    color: #ffffff;
    font-weight: 500;
    transition: color 0.2s;
    padding: 0.5rem 0;
}

.nav-menu li a:hover {
    color: #b1b1b1;
}

.nav-menu .nav-option img {
    width: 20px;
    height: 20px;
}

/* nav*/
.nav-menu .user-dropdown {
    color: #ffffff;
    position: relative;
    display: inline-block;
}

/* Style the username trigger button */
.nav-menu .dropdown-trigger {
    background: none;
    border: none;
    color: inherit;
    font: inherit;
    cursor: pointer;
    padding: 10px 15px;
    display: flex;
    align-items: center;
    gap: 5px;
}

/* The actual dropdown menu (hidden by default) */
.nav-menu .dropdown-menu {
    display: none;
    /* Keeps it hidden */
    position: absolute;
    right: 0;
    top: 100%;
    background-color: #ffffff;
    min-width: 160px;
    box-shadow: 0px 8px 16px rgba(0, 0, 0, 0.15);
    border-radius: 4px;
    padding: 5px 0;
    list-style: none;
    z-index: 1000;
}

/* Dropdown links */
.nav-menu .dropdown-option {
    color: #333333;
    padding: 10px 15px;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
}

.nav-menu .dropdown-option:hover {
    background-color: #f5f5f5;
}

.nav-menu .dropdown-option.logout {
    color: #de3545;
    border-top: 1px solid #eeeeee;
}

/* Hamburger button - hidden on desktop */
.hamburger {
    display: none;
    font-size: 1.8rem;
    background: none;
    border: none;
    cursor: pointer;
    color: #1e293b;
    padding: 0.25rem 0.5rem;
}

/* Mobile responsive */
@media (max-width: 680px) {
    .hamburger {
        display: block;
    }

    .nav-menu {
        display: none;
        position: absolute;
        top: 70px;
        left: 0;
        right: 0;
        background: white;
        flex-direction: column;
        gap: 1rem;
        padding: 1.5rem;
        box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
        border-top: 1px solid #e2e8f0;
    }

    .nav-menu.show {
        display: flex;
    }

    .nav-menu li {
        width: 100%;
        text-align: center;
    }

    .nav-menu li a {
        display: block;
        padding: 0.6rem;
    }

    .nav-menu .nav-option img {
        width: 20px;
        height: 20px;
    }
}

/* ===== NAVBAR STYLES End ===== */

/* ===== Footer start ===== */
.footer {
    background-color: #0b2b38;
    margin-top: 180px;
    height: 200px;
    color: #e0edf2;
    padding: 1.8rem 1rem;
    text-align: center;
    font-size: 0.95rem;
    border-top: 1px solid #235b6e;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

/* left side: copyright */
.footer-copyright p {
    margin: 0;
    font-size: 0.9rem;
    opacity: 0.85;
}

/* center/right: simple links */
.footer-links {
    display: flex;
    gap: 1.8rem;
    flex-wrap: wrap;
    justify-content: center;
}

.footer-links a {
    color: #cbdbe6;
    text-decoration: none;
    transition: color 0.2s ease;
    font-weight: 500;
}

.footer-links a:hover {
    color: #ffd966;
    text-decoration: underline;
}

/* optional credit line / extra style */
.footer-credit {
    margin-top: 0.8rem;
    font-size: 0.75rem;
    opacity: 0.6;
    width: 100%;
    text-align: center;
}

/* make sure footer is visible and responsive */
@media (max-width: 640px) {
    .footer-container {
        flex-direction: column;
        text-align: center;
        gap: 0.8rem;
    }

    .footer-links {
        gap: 1.2rem;
    }

    .simple-footer {
        padding: 1.5rem 0.8rem;
    }
}

/* ===== Footer end ===== */

/* Drop Zone */
.drop-zone {
    max-width: 400px;
    width: 100%;
    height: 150px;
    padding: 25px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    font-family: sans-serif;
    font-weight: 500;
    font-size: 1.2rem;
    cursor: pointer;
    color: #cccccc;
    border: 2px dashed #009578;
    border-radius: 10px;
    transition: background-color 0.3s, border-color 0.3s;
}

/* Change style when file is dragged over */
.drop-zone--over {
    border-style: solid;
    background-color: #f0fbf8;
    border-color: #006652;
    color: #006652;
}

/* Hide the actual file input visually but keep it functional */
.drop-zone input[type="file"] {
    display: none;
}

.drop-zone .center-content {
    cursor: pointer;
    background: #009578;
    padding: 15px;
    border-radius: 10px;
    align-items: center;
    justify-content: center;
}

.drop-zone label {
    color: #ffffff;
}

.drop-zone #plus {
    width: 15px;
    height: 15px;
}