
body {
    font-family: 'Arial', sans-serif;
    background-color: #f0f2f5;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    margin: 0;
    padding: 20px;
    box-sizing: border-box;
}

.container {
    text-align: center;
    background-color: #fff;
    padding: 40px;
    border-radius: 15px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 500px;
}

.back-link {
    margin-bottom: 20px; /* Adjust spacing below the link */
    text-align: left; /* Align link to the left within the container */
}

.back-link a {
    text-decoration: none;
    color: #008CBA; /* Use a color from the existing theme */
    font-weight: bold;
    font-size: 1em;
    padding: 8px 15px;
    border-radius: 8px;
    transition: background-color 0.3s, color 0.3s;
    background-color: rgba(0, 140, 186, 0.1); /* Light background */
    display: inline-block; /* Make padding and margin work */
}

.back-link a:hover {
    background-color: rgba(0, 140, 186, 0.2);
    color: #005f7a; /* Darker on hover */
}

h1 {
    color: #333;
    margin-bottom: 10px;
}

p {
    color: #666;
    margin-bottom: 30px;
}

.upload-area input[type="file"] {
    display: none;
}

.upload-label {
    background-color: #008CBA;
    color: white;
    padding: 12px 25px;
    font-size: 16px;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.3s;
    display: inline-block;
}

.upload-label:hover {
    background-color: #005f7a;
}

.image-preview {
    margin-top: 30px;
    width: 100%;
    max-width: 300px;
    height: auto;
    min-height: 150px;
    border: 2px dashed #ccc;
    border-radius: 10px;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    margin-left: auto;
    margin-right: auto;
}

.image-preview img {
    width: 100%;
    height: auto;
    object-fit: cover;
}

.predict-button {
    background-color: #4CAF50;
    color: white;
    border: none;
    padding: 15px 30px;
    font-size: 18px;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.3s;
    margin-top: 20px;
    width: 100%;
}

.predict-button:disabled {
    background-color: #ccc;
    cursor: not-allowed;
}

.predict-button:hover:not(:disabled) {
    background-color: #45a049;
}

.result-area {
    margin-top: 30px;
    padding: 20px;
    border-radius: 10px;
    background-color: #f8f9fa;
    font-size: 1.2em;
    font-weight: bold;
    color: #333;
}

.loading-spinner {
    border: 8px solid #f3f3f3;
    border-top: 8px solid #3498db;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
    margin: 30px auto;
}

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

/* New styles for results gauge bars */
.result-area h2 {
    font-size: 1.2em;
    margin-bottom: 10px;
}
.result-area p {
    font-size: 0.9em;
    font-weight: normal;
    margin-bottom: 20px;
}
.highlight {
    color: #008CBA;
}

.results-container {
    margin-top: 20px;
    text-align: left;
}

.result-bar {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
    font-size: 0.9em;
    font-weight: normal;
}

.animal-name {
    width: 60px; /* Fixed width for alignment */
    font-weight: bold;
}

.gauge-bar-container {
    flex-grow: 1;
    height: 20px;
    background-color: #e9ecef;
    border-radius: 10px;
    margin: 0 10px;
    overflow: hidden;
}

.gauge-bar {
    height: 100%;
    background-color: #28a745; /* Green for positive */
    border-radius: 10px;
    transition: width 0.5s ease-in-out;
}

.percentage {
    width: 50px; /* Fixed width for alignment */
    font-weight: bold;
    text-align: right;
}
