:root {
    --primary-color: #4a90e2;
    --bg-color: #f8f9fa;
    --text-color: #333;
    --card-bg: #ffffff;
    --border-radius: 12px;
    --shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

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

body {
    font-family: 'Pretendard', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
}

.content-wrapper {
    background-color: var(--card-bg);
    width: 100%;
    max-width: 500px;
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    text-align: center;
}

header h1 {
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
    color: var(--primary-color);
}

.subtitle {
    font-size: 0.95rem;
    color: #666;
    margin-bottom: 2rem;
}

.upload-container {
    margin-bottom: 1.5rem;
}

#image-upload {
    display: none;
}

.upload-btn {
    display: inline-block;
    padding: 0.8rem 2rem;
    background-color: var(--primary-color);
    color: white;
    border-radius: 50px;
    cursor: pointer;
    font-weight: 600;
    transition: background 0.3s;
}

.upload-btn:hover {
    background-color: #357abd;
}

#image-preview-container {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1;
    max-width: 300px;
    margin: 0 auto 2rem;
    border: 2px dashed #ddd;
    border-radius: var(--border-radius);
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    background-color: #fafafa;
}

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

#label-container {
    margin-top: 1rem;
    padding: 1rem;
    background: #f1f3f5;
    border-radius: var(--border-radius);
    min-height: 100px;
}

.result-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.8rem;
    padding: 0.5rem;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

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

.result-value {
    color: var(--primary-color);
    font-weight: bold;
}

.placeholder-text {
    color: #999;
    font-size: 0.9rem;
    margin-top: 30px;
}

/* 로딩 애니메이션 */
#loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.8);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 10;
}

.hidden {
    display: none !important;
}

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

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

    100% {
        transform: rotate(360deg);
    }
}

footer {
    margin-top: 2rem;
    font-size: 0.8rem;
    color: #999;
}

.result-item.highlight {
    border: 2px solid var(--primary-color);
    background-color: #f0f7ff;
}