/* General Styles */
body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f4f4f4;
    color: #333;
}

/* Header */
header {
    background: linear-gradient(to right, #0044cc, #00cc66);
    color: white;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 15px 0;
    box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.1);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    height: auto;
}

/* Logo */
.logo {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 10px;
}

.logo img {
    width: 50px;
    height: 50px;
    margin-right: 10px;
}


/* Navigation Menu */
nav {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

nav ul {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    padding: 0;
    margin: 0;
    gap: 10px;
    justify-content: center;
    align-items: center;
}

/* 3D Button Navigation Links */
nav ul li a {
    background: #0033a0;
    color: white;
    text-decoration: none;
    font-weight: bold;
    padding: 12px 18px;
    border-radius: 8px;
    transition: all 0.3s ease;
    box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.2);
    display: inline-block;
    text-align: center;
}

nav ul li a:hover {
    background: #002080;
    transform: translateY(-2px);
    box-shadow: 0px 6px 10px rgba(0, 0, 0, 0.3);
}

/* Main Content */
/* Main Content */
main {
    padding: 120px 20px 20px; /* Increased padding to push content below fixed header */
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Upload Container */
.upload-container {
    background: white;
    padding: 20px;
    width: 90%;
    max-width: 400px;
    border-radius: 10px;
    box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.1);
    text-align: center;
    margin-top: 60px; /* Increased margin to clear the header */
    box-sizing: border-box;
}

/* Image Preview */
#imagePreview {
    margin-top: 10px;
    display: flex;
    justify-content: center;
}

#imagePreview img {
    max-width: 100%;
    height: auto;
    border-radius: 5px;
    box-shadow: 0px 2px 5px rgba(0, 0, 0, 0.2);
}

/* Input Fields */
input {
    width: 100%;
    max-width: 100%;
    padding: 10px;
    margin: 8px 0;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 16px;
    box-sizing: border-box;
}

/* Buttons */
button {
    width: 100%;
    padding: 12px;
    margin-top: 10px;
    background: #0044cc;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    transition: background 0.3s, transform 0.2s;
}

button:hover {
    background: #0033a0;
    transform: scale(1.05);
}

/* Footer */
footer {
    background: #222;
    color: white;
    text-align: center;
    padding: 20px;
    margin-top: 20px;
    font-size: 14px;
}

.footer-menu ul {
    list-style: none;
    padding: 0;
    display: flex;
    justify-content: center;
    gap: 15px;
}

.footer-menu ul li a {
    color: white;
    text-decoration: none;
}

/* Footer Search */
.footer-search {
    margin-top: 10px;
    display: flex;
    justify-content: center;
    gap: 10px;
}

.footer-search input {
    padding: 8px;
    width: 200px;
    border-radius: 5px;
    border: none;
}

.footer-search button {
    padding: 8px 12px;
    background: #00cc66;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    width: auto;
}

.footer-search button:hover {
    background: #008f4f;
}

/* Mobile Styles */
@media screen and (max-width: 768px) {
    .upload-container {
        width: 95%;
    }

    .menu-toggle {
        display: block;
        margin: 10px auto;
    }

    nav ul {
        display: none;
        flex-direction: column;
        background: #0033a0;
        width: 100%;
        position: absolute;
        top: 60px;
        left: 0;
        padding: 10px;
        text-align: center;
    }

    nav ul.show {
        display: flex;
    }

    .footer-search {
        flex-direction: column;
        align-items: center;
    }

    .footer-search input,
    .footer-search button {
        width: 90%;
    }
}
/* Ensure extracted text stays inside the container */
#extractedTextContainer {
    max-width: 100%; /* Prevents overflowing */
    max-height: 300px; /* Limits height, but you can adjust */
    overflow-y: auto; /* Enables scrolling if text is long */
    word-wrap: break-word; /* Ensures long text breaks properly */
    white-space: pre-wrap; /* Maintains line breaks from OCR */
    padding: 10px;
    background: #f9f9f9; /* Light background for readability */
    border: 1px solid #ccc;
    border-radius: 5px;
    font-family: monospace; /* Keeps OCR text structured */
    font-size: 14px;
    text-align: left;
}


.popup {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    padding: 20px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    z-index: 1000;
    width: 300px;
    text-align: center;
}

.popup input {
    width: 100%;
    padding: 5px;
    margin-bottom: 10px;
    border: 1px solid #ccc;
    border-radius: 5px;
}

.popup-buttons {
    display: flex;
    justify-content: space-around;
    margin-top: 10px;
}

.popup-buttons button {
    padding: 8px 12px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}

.popup-buttons button:first-child {
    background-color: #4CAF50;
    color: white;
}

.popup-buttons button:last-child {
    background-color: #f44336;
    color: white;
}
