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

body {
    font-family: 'Helvetica Neue', Arial, sans-serif;
    background-color: #f7f9fc;
    color: #333;
    line-height: 1.6;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    background: #fff;
    min-height: 100vh;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
}

header {
    text-align: center;
    padding: 30px 0;
    border-bottom: 2px solid #edf2f7;
    margin-bottom: 30px;
}

header h1 {
    font-size: 1.8rem;
    color: #2d3748;
    margin-bottom: 10px;
}

header p {
    color: #718096;
    font-size: 0.95rem;
}

section {
    margin-bottom: 40px;
}

h3 {
    font-size: 1.2rem;
    color: #4a5568;
    margin-bottom: 15px;
    border-left: 4px solid #4299e1;
    padding-left: 10px;
}

.gender-selection {
    display: flex;
    gap: 20px;
    justify-content: center;
    margin-top: 10px;
}

.gender-selection label {
    font-size: 1.1rem;
    cursor: pointer;
    padding: 10px 20px;
    border: 1px solid #cbd5e0;
    border-radius: 20px;
    transition: all 0.2s;
}

.gender-selection label:hover {
    background-color: #edf2f7;
}

.gender-selection input[type="radio"] {
    margin-right: 5px;
}

.desc {
    font-size: 0.9rem;
    color: #a0aec0;
    margin-bottom: 15px;
}

.photo-inputs {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* PC에서는 가로로 배치 (반응형) */
@media (min-width: 600px) {
    .photo-inputs {
        flex-direction: row;
        justify-content: space-between;
    }
    .photo-box {
        flex: 1;
    }
}

.photo-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: #fdfdfd;
    padding: 20px;
    border: 2px dashed #cbd5e0;
    border-radius: 12px;
}

.photo-box input[type="file"] {
    display: none;
}

.upload-btn {
    background-color: #ebf8ff;
    color: #3182ce;
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: bold;
    margin-bottom: 15px;
    transition: background 0.3s;
}

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

.preview {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    background-color: #edf2f7;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    color: #a0aec0;
    font-size: 0.9rem;
}

.preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.action-btn {
    width: 100%;
    padding: 15px;
    font-size: 1.1rem;
    font-weight: bold;
    color: white;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    border-radius: 10px;
    cursor: pointer;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    transition: transform 0.1s, box-shadow 0.1s;
}

.action-btn:active {
    transform: translateY(2px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.action-btn.outline {
    background: transparent;
    color: #4a5568;
    border: 2px solid #cbd5e0;
    margin-top: 15px;
}

.hidden {
    display: none !important;
}

#loading {
    text-align: center;
    padding: 40px 0;
}

.spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #667eea;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 0 auto 15px auto;
}

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

#result-area {
    background: #ebf4ff;
    padding: 30px;
    border-radius: 12px;
    text-align: center;
    animation: fadeIn 0.5s ease-in;
}

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

.result-image-box {
    margin-bottom: 20px;
}

#result-img {
    width: 250px;
    height: 250px;
    border-radius: 20px;
    object-fit: cover;
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
}

.result-text {
    background: white;
    padding: 20px;
    border-radius: 10px;
    text-align: left;
}

.result-text h4 {
    margin-bottom: 10px;
    color: #2b6cb0;
}

#physiognomy-desc p {
    font-size: 0.95rem;
    color: #4a5568;
    margin-bottom: 8px;
    line-height: 1.5;
}
