body {
    font-family: sans-serif;
    background-color: #f0f0f0;
    color: #333;
    transition: background-color 0.3s, color 0.3s;
}

.dark-mode {
    background-color: #333;
    color: #f0f0f0;
}

.container {
    max-width: 600px;
    margin: 2rem auto;
    padding: 2rem;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    text-align: center;
}

.dark-mode .container {
    background-color: #444;
}

h1 {
    margin-bottom: 1rem;
}

#upload-button {
    background-color: #007bff;
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    margin-top: 1rem;
}

#upload-button:disabled {
    background-color: #cccccc;
    cursor: not-allowed;
}


#label-container {
    margin-top: 1rem;
    font-size: 1.2rem;
}

.theme-switch-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 1rem;
}

.theme-switch {
    position: relative;
    display: inline-block;
    width: 60px;
    height: 34px;
}

.theme-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
}

.slider:before {
    position: absolute;
    content: "";
    height: 26px;
    width: 26px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .4s;
}

input:checked + .slider {
    background-color: #2196F3;
}

input:checked + .slider:before {
    transform: translateX(26px);
}

.slider.round {
    border-radius: 34px;
}

.slider.round:before {
    border-radius: 50%;
}

.loader {
    border: 4px solid #f3f3f3;
    border-radius: 50%;
    border-top: 4px solid #3498db;
    width: 20px;
    height: 20px;
    -webkit-animation: spin 2s linear infinite;
    animation: spin 2s linear infinite;
    display: none; /* Initially hidden */
    margin: 1rem auto;
}

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

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

.prediction-result {
    display: flex;
    align-items: center;
    margin: 0.5rem 0;
}

.class-name {
    width: 100px;
    text-align: left;
}

.progress-bar-container {
    flex-grow: 1;
    height: 20px;
    background-color: #e0e0e0;
    border-radius: 5px;
    margin: 0 1rem;
}

.progress-bar {
    height: 100%;
    background-color: #4caf50;
    border-radius: 5px;
    transition: width 0.5s ease-in-out;
}

.probability {
    width: 60px;
    text-align: right;
}
