:root {
    --primary-color: #6366f1;
    --primary-hover: #4f46e5;
    --bg-gradient-start: #fdfbfb;
    --bg-gradient-end: #ebedee;
    --text-color: #1f2937;
    --text-secondary: #6b7280;
    --card-bg: #ffffff;
    --shadow-soft: 0 10px 15px -3px rgba(0, 0, 0, 0.05), 0 4px 6px -2px rgba(0, 0, 0, 0.025);
    --shadow-hover: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

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

body {
    font-family: 'Noto Sans KR', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background: linear-gradient(135deg, var(--bg-gradient-start) 0%, var(--bg-gradient-end) 100%);
    color: var(--text-color);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    line-height: 1.6;
}

.container {
    width: 100%;
    max-width: 500px;
    background: var(--card-bg);
    border-radius: 24px;
    box-shadow: var(--shadow-soft);
    padding: 40px;
    margin: 20px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.header {
    text-align: center;
    margin-bottom: 32px;
}

.header h1 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-color);
    margin-bottom: 8px;
    letter-spacing: -0.025em;
}

.subtitle {
    font-size: 1rem;
    color: var(--text-secondary);
}

.upload-area {
    width: 100%;
    border: 2px dashed #e5e7eb;
    border-radius: 16px;
    padding: 32px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background-color: #f9fafb;
    position: relative;
    overflow: hidden;
}

.upload-area:hover {
    border-color: var(--primary-color);
    background-color: #eef2ff;
}

.upload-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    pointer-events: none;
}

.icon-upload {
    font-size: 3rem;
    margin-bottom: 16px;
    opacity: 0.8;
}

.upload-text {
    font-size: 1.125rem;
    font-weight: 500;
    color: var(--text-color);
    margin-bottom: 4px;
}

.upload-subtext {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.image-preview {
    display: flex;
    flex-direction: column;
    align-items: center;
}

#preview-img {
    max-width: 100%;
    max-height: 300px;
    border-radius: 12px;
    margin-bottom: 16px;
    box-shadow: var(--shadow-soft);
}

.remove-btn {
    padding: 8px 16px;
    background-color: white;
    border: 1px solid #d1d5db;
    border-radius: 9999px;
    color: var(--text-secondary);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.remove-btn:hover {
    background-color: #f3f4f6;
    color: var(--text-color);
}

.loading-area {
    text-align: center;
    padding: 20px;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #e5e7eb;
    border-top: 4px solid var(--primary-color);
    border-radius: 50%;
    margin: 0 auto 16px;
    animation: spin 1s linear infinite;
}

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

.result-area {
    margin-top: 32px;
}

.result-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 16px;
    text-align: center;
}

.result-bars {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.label-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 4px;
}

.label-name {
    font-weight: 500;
    font-size: 0.9375rem;
}

.label-prob {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.bar-container {
    width: 100%;
    background-color: #e5e7eb;
    border-radius: 9999px;
    height: 10px;
    overflow: hidden;
}

.bar-fill {
    height: 100%;
    background-color: var(--primary-color);
    border-radius: 9999px;
    transition: width 1s cubic-bezier(0.4, 0, 0.2, 1);
}

.footer {
    text-align: center;
    margin-top: 40px;
    font-size: 0.75rem;
    color: #9ca3af;
}

@media (max-width: 640px) {
    .container {
        padding: 24px;
        margin: 16px;
    }
}
