:root {
    --primary-color: #ffb6b9;
    --secondary-color: #fae3d9;
    --accent-color: #bbded6;
    --text-color: #333333;
    --bg-color: #fcf9ea;
    --box-bg: #ffffff;
    --shadow: 0 8px 16px rgba(0, 0, 0, 0.08);
    --border-radius: 20px;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Jua', 'Nunito', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
}

.app-container {
    width: 100%;
    max-width: 500px;
    background-color: var(--box-bg);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    padding: 30px 20px;
    margin: 20px;
    text-align: center;
}

/* Header */
.app-header h1 {
    font-size: 2.2rem;
    color: #ff7e67;
    margin-bottom: 10px;
}
.app-header p {
    font-size: 1.1rem;
    color: #666;
    margin-bottom: 25px;
}

/* Upload Section */
.upload-box {
    border: 3px dashed var(--primary-color);
    border-radius: var(--border-radius);
    padding: 40px 20px;
    cursor: pointer;
    background-color: var(--secondary-color);
    transition: all 0.3s ease;
}

.upload-box:hover, .upload-box.dragover {
    background-color: var(--primary-color);
    color: white;
}

.upload-icon {
    font-size: 4rem;
    margin-bottom: 15px;
}

.upload-label h3 {
    font-size: 1.5rem;
    margin-bottom: 5px;
}

.file-input {
    display: none;
}

/* Loading Section */
.loading-section {
    padding: 40px 0;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 6px solid var(--secondary-color);
    border-top: 6px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px auto;
}

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

#loading-text {
    font-size: 1.2rem;
    color: #555;
}

/* Result Section */
.image-preview-box {
    width: 250px;
    height: 250px;
    margin: 0 auto 20px auto;
    border-radius: 50%;
    overflow: hidden;
    box-shadow: var(--shadow);
    border: 5px solid var(--accent-color);
}

#image-preview {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.prediction-results h2 {
    font-size: 1.8rem;
    color: #ff7e67;
    margin-bottom: 20px;
}

.bars-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 30px;
}

.result-bar-wrapper {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 1.2rem;
}

.label-name {
    width: 80px;
    text-align: left;
    font-weight: bold;
}

.bar-bg {
    flex-grow: 1;
    background-color: #eee;
    height: 20px;
    border-radius: 10px;
    margin: 0 15px;
    overflow: hidden;
    position: relative;
}

.bar-fill {
    height: 100%;
    border-radius: 10px;
    background-color: var(--primary-color);
    width: 0%;
    transition: width 1s ease-in-out;
}

.label-percent {
    width: 50px;
    text-align: right;
    font-weight: bold;
}

/* Button */
.retry-btn {
    background-color: var(--accent-color);
    color: #333;
    border: none;
    padding: 15px 30px;
    font-size: 1.2rem;
    font-family: 'Jua', sans-serif;
    border-radius: 30px;
    cursor: pointer;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    transition: transform 0.2s, box-shadow 0.2s;
}

.retry-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0,0,0,0.15);
}

.hidden {
    display: none !important;
}

/* Footer */
.app-footer {
    margin-top: 30px;
    font-size: 0.9rem;
    color: #999;
}