/* 기본 스타일 리셋 및 폰트 설정 */
@import url('https://fonts.googleapis.com/css2?family=Pretendard:wght@400;700&display=swap');

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

body {
    font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    color: #1D1D1F;
    min-height: 100vh;
    padding: 40px 20px;

    /* === 화면 정중앙 배치를 위한 코드 === */
    display: flex;
    justify-content: center;
    align-items: center;

    /* === 움직이는 그라데이션 배경 === */
    background: linear-gradient(-45deg, #ee7752, #e73c7e, #23a6d5, #23d5ab);
    background-size: 400% 400%;
    animation: gradientBG 15s ease infinite;
}

@keyframes gradientBG {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* 전체 콘텐츠를 감싸는 래퍼 */
.main-wrapper {
    width: 100%;
    max-width: 680px;
    text-align: center;
    background-color: rgba(255, 255, 255, 0.7); /* 반투명 흰색 배경 */
    backdrop-filter: blur(20px); /* 블러 효과 */
    -webkit-backdrop-filter: blur(20px);
    border-radius: 24px;
    padding: 50px;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.1);
}

/* 메인 타이틀 섹션 */
.hero-section {
    margin-bottom: 40px;
}

.hero-section h1 {
    font-size: 48px;
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.2;
    margin-bottom: 16px;
}

.hero-section p {
    font-size: 18px;
    color: #333;
}

/* 파일 업로드 및 결과 영역 */
.content-section {
    width: 100%;
}

.upload-box {
    background-color: #FFFFFF;
    border: 1px solid #D1D1D6;
    border-radius: 18px;
    padding: 40px;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
    margin-bottom: 40px;
}

.upload-box:hover {
    transform: scale(1.02);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}

.upload-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    color: #8A8A8E;
    font-size: 16px;
}

/* 업로드 후 미리보기 이미지 스타일 */
.upload-box img {
    max-width: 100%;
    max-height: 250px;
    border-radius: 12px;
    object-fit: cover;
}

/* 결과 표시 박스 */
.result-box {
    display: none; /* 초기에는 숨김 */
    background-color: #FFFFFF;
    border-radius: 18px;
    padding: 30px;
    text-align: left; /* 왼쪽 정렬로 변경 */
    opacity: 0;
    transform: translateY(20px);
    animation: fadeIn 0.5s ease-out forwards;
}

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

.result-box h2 {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 20px;
    text-align: center;
}

#resultTitle {
    text-align: center;
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 24px;
}

.result-section {
    margin-bottom: 24px;
}

.result-section h3 {
    font-size: 16px;
    font-weight: 700;
    color: #8A8A8E;
    margin-bottom: 12px;
}

.color-palette {
    display: flex;
    gap: 10px;
    justify-content: center; /* 컬러칩 중앙 정렬 */
}

.color-chip {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid rgba(0, 0, 0, 0.05);
}

#styling-tips {
    font-size: 16px;
    line-height: 1.6;
    color: #333;
    text-align: center; /* 텍스트 중앙 정렬 */
}

.button-area {
    text-align: center;
    margin-top: 30px;
}

#reset-button {
    background-color: #0071E3;
    color: white;
    border: none;
    border-radius: 12px;
    padding: 12px 24px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: background-color 0.2s;
}

#reset-button:hover {
    background-color: #0056b3;
}


/* 모바일 반응형 디자인 */
@media (max-width: 600px) {
    .main-wrapper {
        padding: 20px;
        background-color: rgba(255, 255, 255, 0.85);
    }
    .hero-section h1 {
        font-size: 32px;
    }
    .hero-section p {
        font-size: 16px;
    }
}