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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background: #f0f2f5;
    color: #333;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    padding: 2rem 1rem;
}

.container {
    max-width: 520px;
    width: 100%;
}

h1 {
    font-size: 1.8rem;
    text-align: center;
    margin-bottom: 0.25rem;
}

.subtitle {
    text-align: center;
    color: #888;
    margin-bottom: 1.5rem;
}

.upload-area {
    background: #fff;
    border: 2px dashed #ccc;
    border-radius: 12px;
    cursor: pointer;
    overflow: hidden;
    transition: border-color 0.2s;
}

.upload-area:hover,
.upload-area.dragover {
    border-color: #4a90d9;
}

.upload-placeholder {
    padding: 3rem 1rem;
    text-align: center;
    color: #999;
}

.upload-icon {
    font-size: 2.5rem;
    font-weight: 300;
    margin-bottom: 0.5rem;
    color: #bbb;
}

.preview-image {
    width: 100%;
    display: block;
}

.predict-btn {
    width: 100%;
    padding: 0.85rem;
    margin-top: 1rem;
    background: #4a90d9;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.predict-btn:hover:not(:disabled) {
    background: #357abd;
}

.predict-btn:disabled {
    background: #b0c4de;
    cursor: not-allowed;
}

.results {
    margin-top: 1.5rem;
    background: #fff;
    border-radius: 12px;
    padding: 1.25rem;
}

.results h2 {
    font-size: 1.1rem;
    margin-bottom: 1rem;
}

.result-item {
    margin-bottom: 0.75rem;
}

.result-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.3rem;
    font-size: 0.95rem;
}

.result-label {
    font-weight: 500;
}

.result-confidence {
    color: #4a90d9;
    font-weight: 600;
}

.result-bar {
    height: 8px;
    background: #eee;
    border-radius: 4px;
    overflow: hidden;
}

.result-bar-fill {
    height: 100%;
    background: #4a90d9;
    border-radius: 4px;
    transition: width 0.4s ease;
}

.loading {
    text-align: center;
    margin-top: 1.5rem;
    color: #888;
}

.spinner {
    width: 32px;
    height: 32px;
    border: 3px solid #eee;
    border-top-color: #4a90d9;
    border-radius: 50%;
    margin: 0 auto 0.5rem;
    animation: spin 0.7s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.error {
    color: #d9534f;
}
