:root {
    --bg-gradient: linear-gradient(to right, #fdfbfb, #ebedee);
    --container-bg: rgba(0, 0, 0, 0.05);
    --text-color: #333;
    --btn-bg: #6a11cb;
    --btn-hover: #2575fc;
    --accent-color: #ff4081;
}

body {
    background: var(--bg-gradient);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen,
        Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    min-height: 100vh;
    margin: 0;
    color: var(--text-color);
    padding: 40px 20px;
    box-sizing: border-box;
}

.container {
    background: var(--container-bg);
    padding: 40px;
    border-radius: 15px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.05);
    text-align: center;
    backdrop-filter: blur(10px);
    position: relative;
    width: 100%;
    max-width: 600px;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

/* 탭 스타일 */
.tabs {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 30px;
    border-bottom: 2px solid rgba(0, 0, 0, 0.1);
    padding-bottom: 10px;
}

.tab-btn {
    background: none;
    border: none;
    padding: 10px 20px;
    font-size: 1.1em;
    cursor: pointer;
    color: #888;
    transition: color 0.3s ease, font-weight 0.3s ease;
}

.tab-btn.active {
    color: var(--btn-bg);
    font-weight: bold;
    border-bottom: 3px solid var(--btn-bg);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
    animation: fadeIn 0.5s ease;
}

h1 {
    font-size: 2.5em;
    margin-bottom: 20px;
}

/* 메뉴 추천 스타일 */
.meal-result {
    margin: 30px 0;
    min-height: 100px;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 0.3s ease;
}

.meal-result.fade-out {
    opacity: 0;
}

.meal-display {
    animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.category {
    font-size: 1.1em;
    color: var(--btn-bg);
    font-weight: bold;
    display: block;
    margin-bottom: 5px;
}

.meal-name {
    font-size: 2.2em;
    margin: 0;
    color: #000;
}

#recommend-btn, .action-btn {
    background-color: var(--btn-bg);
    color: white;
    border: none;
    padding: 15px 30px;
    font-size: 1.1em;
    border-radius: 50px;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease;
    box-shadow: 0 5px 15px rgba(106, 17, 203, 0.3);
    margin-bottom: 20px;
}

#recommend-btn:hover, .action-btn:hover {
    background-color: var(--btn-hover);
    transform: translateY(-2px);
}

/* 동물상 테스트 스타일 */
.animal-container, .upload-container {
    margin: 20px 0;
}

#webcam-container, #image-preview-container {
    margin: 20px auto;
    border-radius: 10px;
    overflow: hidden;
    width: 200px;
    height: 200px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    background: #eee;
    display: flex;
    justify-content: center;
    align-items: center;
}

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


/* 동물상 테스트 결과 스타일 */
.top-prediction {
    background: white;
    padding: 20px;
    border-radius: 15px;
    margin-bottom: 20px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    animation: fadeIn 0.5s ease;
}

.top-emoji {
    font-size: 4em;
    margin-bottom: 10px;
}

.top-name {
    font-size: 2em;
    font-weight: bold;
    color: var(--btn-bg);
}

.top-prob {
    font-size: 1.2em;
    color: #888;
    margin-bottom: 15px;
}

.top-description {
    font-size: 1em;
    line-height: 1.6;
    color: #555;
    background: #f9f9f9;
    padding: 15px;
    border-radius: 10px;
    text-align: left;
}

.prediction-list {
    margin-top: 20px;
    padding: 10px;
}

#label-container, #upload-label-container {
    margin-top: 20px;
}

.prediction-bar-container {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}

.class-label {
    width: 80px;
    text-align: right;
    font-weight: bold;
}

.bar-outer {
    flex-grow: 1;
    height: 20px;
    background: rgba(0, 0, 0, 0.05);
    border-radius: 10px;
    overflow: hidden;
}

.bar-inner {
    height: 100%;
    background: var(--btn-bg);
    transition: width 0.3s ease;
}

.prob-label {
    width: 40px;
    font-size: 0.9em;
    color: #666;
}

/* 공통 섹션 */
.contact-section {
    margin-top: 40px;
}

hr {
    border: 0;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    margin: 20px 0;
}

h3 {
    font-size: 1.5em;
    margin-bottom: 15px;
}

#contact-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: 300px;
    margin: 0 auto;
}

#contact-form input,
#contact-form textarea {
    padding: 12px;
    border-radius: 5px;
    border: 1px solid rgba(0, 0, 0, 0.1);
    background: white;
    color: #333;
    font-size: 1em;
}

#contact-form input::placeholder,
#contact-form textarea::placeholder {
    color: #999;
}

#contact-form textarea {
    height: 100px;
    resize: none;
}

#contact-form button {
    background-color: var(--btn-bg);
    color: white;
    border: none;
    padding: 12px;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    font-weight: bold;
}

#contact-form button:hover {
    background-color: var(--btn-hover);
}
