body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
    padding: 20px;
    background-color: #f0f2f5;
    color: #333;
}

h1 {
    text-align: center;
    color: #333;
    margin-bottom: 30px;
}

.main-wrapper {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 30px;
    max-width: 1200px;
    margin: auto;
}

.card {
    background-color: #ffffff;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    padding: 25px 30px;
    flex-basis: 450px;
    flex-grow: 1;
    max-width: 500px;
    box-sizing: border-box;
    height: fit-content;
}

.card h2 {
    color: #5a67d8;
    margin-top: 0;
    text-align: center;
    border-bottom: 2px solid #f0f0f0;
    padding-bottom: 15px;
}

.card-image {
    width: 100%;
    height: auto;
    border-radius: 8px;
    margin-bottom: 20px;
}

.upload-card form {
    display: flex;
    flex-direction: column;
    gap: 15px;
    text-align: center;
}

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

.custom-file-upload {
    display: inline-block;
    padding: 10px 20px;
    background-color: #2c5171;
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s;
}

.custom-file-upload:hover {
    background-color: #1987dc;
}

#file-name {
    font-size: 0.9em;
    color: #555;
    margin-top: 5px;
}

.analyze-btn {
    padding: 12px 25px;
    cursor: pointer;
    background-color: #d86900;
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 16px;
    font-weight: bold;
    transition: background-color 0.3s;
    margin-top: 10px;
}

.analyze-btn:hover {
    background-color: #8e4400;
}

.analyze-btn:disabled {
    background-color: #ccc;
    cursor: not-allowed;
}

.result-card img {
    width: 100%;
    height: auto;
    margin-top: 10px;
    border: 2px solid #ddd;
    border-radius: 8px;
}

.result-top {
    margin-top: 25px;
    padding: 15px;
    border: 2px solid #5a67d8;
    border-radius: 5px;
    background-color: #f0f2ff;
    text-align: center;
}

.result-top h3 {
    margin-top: 0;
    color: #333;
}

.result-top p {
    font-size: 1.1em;
    margin: 5px 0;
}

.result-top .label {
    font-weight: bold;
    color: #d9534f;
    font-size: 1.2em;
}

.recommendation-box {
    margin-top: 20px;
    padding: 15px;
    background-color: #fafafa;
    border: 1px solid #ddd;
    border-radius: 5px;
    text-align: left;
}

.recommendation-box h4 {
    margin-top: 0;
    text-align: center;
    color: #333;
}

.recommendation-box p {
    font-size: 0.95em;
    line-height: 1.6;
}

.all-predictions-box {
    margin-top: 20px;
    padding: 15px;
    background-color: #f0f8ff;
    border: 1px solid #87ceeb;
    border-radius: 5px;
}

.all-predictions-box h4 {
    margin-top: 0;
    color: #0066cc;
}

.disclaimer {
    margin-top: 15px;
    padding: 10px;
    background-color: #fffbeb;
    border: 1px solid #fde086;
    border-radius: 5px;
    font-size: 0.9em;
    color: #5d4203;
    text-align: justify;
    line-height: 1.5;
}

.loading {
    text-align: center;
    color: #666;
}

.error {
    color: #d9534f;
    padding: 10px;
    background-color: #f2dede;
    border: 1px solid #ebccd1;
    border-radius: 5px;
    margin-top: 10px;
}

#result-card {
    display: none;
}

#result-card.show {
    display: block;
}

@media (max-width: 900px) {
    .main-wrapper {
        flex-direction: column;
        align-items: center;
    }
}
