@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+KR:wght@300;400;700&display=swap');

:root {
    --bg-color: #1a1a2e;
    --primary-color: #16213e;
    --secondary-color: #0f3460;
    --highlight-color: #e94560;
    --text-color: #dcdcdc;
    --font-family: 'Noto Sans KR', sans-serif;
}

body {
    font-family: var(--font-family);
    background-color: var(--bg-color);
    color: var(--text-color);
    margin: 0;
    padding: 20px;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    min-height: 100vh;
}

.container {
    width: 100%;
    max-width: 500px;
    background-color: var(--primary-color);
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    text-align: center;
    border: 1px solid var(--secondary-color);
}

header h1 {
    color: #fff;
    font-weight: 700;
    margin-bottom: 5px;
}

header p {
    color: var(--text-color);
    font-weight: 300;
    margin-bottom: 30px;
}

#upload-button {
    background-color: var(--highlight-color);
    color: #fff;
    border: none;
    padding: 15px 30px;
    font-size: 18px;
    font-family: var(--font-family);
    font-weight: 400;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 20px; /* 추가 */
}

#upload-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 15px rgba(233, 69, 96, 0.4);
}

.hidden {
    display: none;
}

#analysis-section {
    width: 100%;
}

.image-wrapper {
    position: relative;
    width: 80%;
    max-width: 300px;
    margin: 20px auto;
    border: 2px solid var(--secondary-color);
    border-radius: 8px;
    overflow: hidden;
}

#image-preview {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 6px;
}

#scanner {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--highlight-color), transparent);
    animation: scan 2.5s ease-in-out forwards;
}

@keyframes scan {
    0% { top: 0%; }
    100% { top: 100%; }
}

#loader {
    margin: 20px 0;
    font-size: 16px;
    font-weight: 300;
}

#result-card {
    background-color: var(--secondary-color);
    padding: 25px;
    margin-top: 20px;
    border-radius: 8px;
    text-align: left;
    border: 1px solid #3a476a;
}

#result-card h2 {
    color: #fff;
    text-align: center;
    margin: 0 0 15px 0;
    font-weight: 400;
}

#result-card p {
    font-size: 16px;
    line-height: 1.7;
    font-weight: 300;
}

/* 추가된 스타일: 결과 리포트 가독성 향상 */
#result-text h3 {
    color: var(--highlight-color);
    font-weight: 400;
    font-size: 1.1em;
    border-bottom: 1px solid var(--primary-color);
    padding-bottom: 8px;
    margin-top: 20px;
    margin-bottom: 10px;
}

#result-text h3:first-of-type {
    margin-top: 0;
}

#result-text p {
    margin-bottom: 1.5em;
    padding-left: 5px;
    border-left: 2px solid var(--primary-color);
}

/* 추가된 스타일: 얼굴 인식 애니메이션 (현재는 사용하지 않음, 이전으로 복구됨) */
#face-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.face-box {
    fill: none;
    stroke: var(--highlight-color);
    stroke-width: 1;
    stroke-dasharray: 1000;
    stroke-dashoffset: 1000;
    animation: draw-box 1s ease-out forwards;
}

.face-point {
    fill: var(--highlight-color);
    stroke: #fff;
    stroke-width: 0.5;
    opacity: 0;
    animation: show-points 0.5s ease-out forwards;
}

@keyframes draw-box {
    to {
        stroke-dashoffset: 0;
    }
}

@keyframes show-points {
    to {
        opacity: 0.8;
    }
}

/* 새로운 스타일: 맛 선택 및 내비게이션 */
.flavor-selection {
    margin-bottom: 15px;
    display: flex;
    justify-content: center;
    gap: 15px; /* 라디오 버튼 간격 */
}

.flavor-selection label {
    font-size: 1em;
    cursor: pointer;
    display: flex;
    align-items: center;
    color: var(--text-color);
}

.flavor-selection input[type="radio"] {
    appearance: none; /* 기본 라디오 버튼 숨기기 */
    width: 18px;
    height: 18px;
    border: 2px solid var(--highlight-color);
    border-radius: 50%;
    margin-right: 8px;
    position: relative;
    cursor: pointer;
    outline: none;
    transition: all 0.2s ease-in-out;
}

.flavor-selection input[type="radio"]:checked {
    background-color: var(--highlight-color);
    border-color: var(--highlight-color);
}

.flavor-selection input[type="radio"]:checked::before {
    content: '';
    display: block;
    width: 8px;
    height: 8px;
    background-color: var(--primary-color); /* 내부 색상 */
    border-radius: 50%;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}


.navigation-links {
    margin-top: 25px;
    display: flex;
    justify-content: center;
    gap: 15px;
}

.navigation-links a {
    color: var(--text-color);
    text-decoration: none;
    padding: 8px 15px;
    border: 1px solid var(--secondary-color);
    border-radius: 5px;
    transition: all 0.2s ease;
}

.navigation-links a:hover {
    background-color: var(--secondary-color);
    color: #fff;
}

.navigation-links a.active {
    background-color: var(--highlight-color);
    border-color: var(--highlight-color);
    color: #fff;
    font-weight: 700;
}