:root {
    --bg-color: #f8f9fa;
    --white: #ffffff;
    --primary-color: #ff9a9e;
    --secondary-color: #f6d365;
    --text-color: #333;
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

body {
    font-family: 'Nanum Gothic', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    margin: 0;
    padding: 0;
    line-height: 1.6;
}

.animal-header {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: var(--white);
    text-align: center;
    padding: 40px 20px 80px;
}

.animal-nav {
    max-width: 800px;
    margin: 0 auto 20px;
    text-align: left;
}

.back-home {
    color: var(--white);
    text-decoration: none;
    font-weight: bold;
    font-size: 0.9rem;
    opacity: 0.9;
}

.animal-header h1 {
    font-size: 3rem;
    margin: 10px 0 0;
    font-weight: 800;
}

.subtitle {
    font-size: 1.2rem;
    margin-top: 10px;
    opacity: 0.9;
}

.container {
    max-width: 800px;
    margin: -40px auto 40px;
    padding: 0 20px;
}

.upload-section {
    background: var(--white);
    border-radius: 20px;
    box-shadow: var(--shadow);
    padding: 40px;
    text-align: center;
}

.upload-area {
    border: 3px dashed #ddd;
    border-radius: 15px;
    padding: 40px;
    cursor: pointer;
    transition: all 0.3s;
    position: relative;
    min-height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
}

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

.upload-guide img {
    margin-bottom: 20px;
}

#face-image {
    max-width: 100%;
    max-height: 400px;
    border-radius: 15px;
}

/* Loading Spinner */
.loading {
    margin-top: 30px;
}

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

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

/* Result Area */
.result-area {
    margin-top: 40px;
}

#result-title {
    font-size: 2rem;
    margin-bottom: 10px;
}

#animal-name {
    color: var(--primary-color);
}

#result-explain {
    font-size: 1.1rem;
    color: #666;
    margin-bottom: 30px;
}

.retry-btn {
    background-color: var(--primary-color);
    color: var(--white);
    border: none;
    padding: 12px 30px;
    border-radius: 30px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.2s;
    margin-top: 20px;
}

.retry-btn:hover {
    transform: scale(1.05);
}

/* Label Bars */
#label-container {
    margin: 20px 0 40px;
}

.bar-container {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
}

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

.bar-bg {
    flex: 1;
    background-color: #eee;
    height: 20px;
    border-radius: 10px;
    margin: 0 15px;
    overflow: hidden;
}

.bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    border-radius: 10px;
}

.percent-text {
    width: 50px;
    text-align: right;
    font-size: 0.9rem;
    color: #888;
}

.info-section {
    margin-top: 40px;
    padding: 30px;
    background-color: #eef2f7;
    border-radius: 15px;
}

.info-section h3 {
    margin-top: 0;
}

.info-section ul {
    padding-left: 20px;
    color: #555;
}

footer {
    text-align: center;
    padding: 40px;
    color: #888;
    font-size: 0.9rem;
}

@media (max-width: 600px) {
    .animal-header h1 {
        font-size: 2rem;
    }
    .upload-section {
        padding: 20px;
    }
}
