:root {
    --primary-color: #3a86ff;
    --secondary-color: #ffbe0b;
    --background-color: #f8f9fa;
    --text-color: #333;
    --white: #fff;
    --shadow-color: rgba(0, 0, 0, 0.1);
}

body {
    font-family: 'Noto Sans KR', sans-serif;
    margin: 0;
    background-color: var(--background-color);
    color: var(--text-color);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
}

.container {
    width: 90%;
    max-width: 800px;
    background-color: var(--white);
    border-radius: 16px;
    box-shadow: 0 8px 32px var(--shadow-color);
    overflow: hidden;
    text-align: center;
    padding: 2rem;
}

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

header p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
}

.controls {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 2rem;
}

button {
    font-family: 'Noto Sans KR', sans-serif;
    font-size: 1rem;
    font-weight: 700;
    padding: 0.8rem 1.5rem;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px var(--shadow-color);
}

#upload-button {
    background-color: var(--secondary-color);
    color: var(--text-color);
}

#upload-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(255, 190, 11, 0.4);
}

#view-container {
    position: relative;
    width: 100%;
    max-width: 400px;
    margin: 0 auto;
    background-color: #eee;
    border-radius: 8px;
    min-height: 300px;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

#webcam-container canvas, #image-preview img {
    width: 100% !important;
    height: auto !important;
    border-radius: 8px;
}

#label-container {
    width: 100%;
    max-width: 400px; /* view-container와 동일하게 설정 */
    margin-top: 1.5rem; /* 이미지와의 간격 */
    padding: 1rem;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    font-size: 1.1rem;
    position: static;
    background: transparent;
    color: var(--text-color);
}

.result-item {
    width: 100%;
}

.result-label {
    text-align: left;
    font-weight: 700;
    color: var(--text-color);
    white-space: nowrap;
    margin-bottom: 0.25rem;
}

.bar-wrapper {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.progress-bar-container {
    width: 100%;
    flex-grow: 1; /* Take up available space */
    height: 1.2rem;
    background-color: #e9ecef;
    border-radius: 0.5rem;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background-color: var(--primary-color);
    border-radius: 0.5rem;
    transition: width 0.5s ease-in-out;
}

.result-percentage {
    text-align: left;
    font-weight: 700;
    color: var(--text-color);
    width: 40px; /* Fixed width for alignment */
}

footer {
    margin-top: 2rem;
    font-size: 0.9rem;
    color: #aaa;
}

@media (max-width: 600px) {
    .container {
        width: 100%;
        border-radius: 0;
        min-height: 100vh;
    }

    header h1 {
        font-size: 2rem;
    }

    .controls {
        flex-direction: column;
    }
}

main {
    display: flex;
    flex-direction: column;
    align-items: center;
}

#predict-button {
    background-color: var(--primary-color);
    color: var(--white);
}

#predict-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(58, 134, 255, 0.4);
}

button:disabled {
    background-color: #ccc;
    cursor: not-allowed;
    transform: none;
    box-shadow: 0 4px 12px var(--shadow-color);
}


#status-message {
    margin-top: -1rem; /* Adjust as needed */
    margin-bottom: 1rem;
    height: 1.2rem;
    color: var(--primary-color);
    font-weight: 700;
    opacity: 1;
    transition: opacity 0.5s ease-in-out;
}

