@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;600&display=swap');

body {
    font-family: 'Poppins', sans-serif;
    background-color: #f5f5f5;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    overflow-x: hidden; /* Prevent horizontal scroll */
}

header {
    width: 100%;
    background-color: #007BFF;
    color: white;
    padding: 10px 0;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.app-header {
    display: flex;
    align-items: center;
}

.app-icon {
    width: 32px;
    height: 32px;
    margin-right: 10px;
}

.app-name {
    font-size: 24px;
    margin: 0;
    line-height: 1.2;
}

.highlight {
    color: #FFD700;
    font-weight: bold;
}

.app-description {
    font-size: 16px;
    margin: 0;
    margin-top: 5px;
    color: #ffffff;
}

.container {
    background-color: #ffffff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    max-width: 70%;
    width: 100%;
    margin-top: 20px;
    text-align: center;
    box-sizing: border-box; /* Ensure padding is included in the element's width and height */
}

h2 {
    font-size: 20px;
    margin-bottom: 20px;
}

form {
    display: flex;
    flex-direction: column;
    align-items: center;
}

input[type="file"] {
    margin-bottom: 10px;
    padding: 10px;
    border: 2px dashed #007BFF;
    border-radius: 5px;
    background-color: #f0f8ff;
    cursor: pointer;
}

input[type="file"]::file-selector-button {
    display: none;
}

button {
    background-color: #007BFF;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    margin-top: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

button:hover {
    background-color: #0056b3;
}

.hidden {
    visibility: hidden; /* Effectively hides the text without changing button size */
}

.loader {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #ffffff;
    border-radius: 50%;
    width: 16px;
    height: 16px;
    animation: spin 2s linear infinite;
    position: absolute;
    z-index: 1; /* Ensure loader is above the text */
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

p {
    margin-top: 10px;
    font-size: 14px;
    color: #555;
}

.result-container {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-top: 20px;
    flex-wrap: wrap;
    width: 100%;
    box-sizing: border-box; /* Ensure padding is included in the element's width and height */
}

.image-container {
    width: 100%;
    max-width: 500px;
    height: auto;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    border: 1px solid #ddd;
    border-radius: 8px;
    margin-right: 20px;
}

.image-container img {
    max-width: 100%;
    max-height: auto;
    object-fit: contain;
}

.result-details {
    flex: 2;
    text-align: left;
    margin-bottom: 20px;
    width: 100%;
    box-sizing: border-box; /* Ensure padding is included in the element's width and height */
}

.result-details h2 {
    text-align: center;
}

.result-details table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

.result-details table td {
    padding: 10px;
    border-bottom: 1px solid #ddd;
    text-align: left;
}

.result-details strong {
    color: #333;
}

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

@media (max-width: 768px) {
    body {
        background-color: #ffffff; /* Match card background color */
    }

    .container {
        box-shadow: none; /* Remove card effect */
        padding: 10px; /* Adjust padding for mobile */
    }

    .result-container {
        flex-direction: column;
        align-items: center;
    }

    .image-section {
        margin-right: 0;
    }

    .result-details {
        text-align: center;
    }

    .result-details table {
        margin: 0 auto;
    }

    .result-details table td {
        text-align: left;
    }
}
