/* 기본 리셋 & 레이아웃 */
body {
    font-family: "Nanum Gothic", sans-serif;
    background-color: #f2f2f2;
    margin: 0;
    padding: 20px;
}

.container {
    width: 100%;
    max-width: 680px;
    min-height: 600px;
    margin: 30px auto;  /* 0 auto에서 30px auto로 수정 */
    background-color: #fff;
    border-radius: 5px;
    overflow: hidden;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    display: flex;
    flex-direction: column;
}

/* 헤더 */
.header {
    background: linear-gradient(135deg, #5c0a9a 0%, #9b4dca 100%);
    color: #fff;
    padding: 20px 15px;
    text-align: center;
    box-shadow: 0 2px 10px rgba(92, 10, 154, 0.2);
    border-bottom: 3px solid #4c0882;
}

.header h1 {
    margin: 0;
    font-size: 26px;
    font-weight: 700;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.2);
}

/* 입력 폼 */
.input-form {
    padding: 30px;
    background: #fff;
}

.person-input {
    margin-bottom: 30px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 12px;
    border: 1px solid rgba(92, 10, 154, 0.1);
    border-left: 4px solid #5c0a9a;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.person-input:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(92, 10, 154, 0.1);
}

.person-input h2 {
    color: #5c0a9a;
    font-size: 1.3rem;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid rgba(92, 10, 154, 0.1);
}

/* 입력 필드 */
input[type="text"],
select {
    width: 100%;
    padding: 12px;
    margin-bottom: 10px;
    border: 2px solid #5c0a92;
    border-radius: 25px;
    font-size: 16px;
    outline: none;
    box-sizing: border-box;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

input[type="text"]:focus,
select:focus {
    border-color: #4c0882;
    box-shadow: 0 0 0 2px rgba(92, 10, 154, 0.1);
}

/* 버튼 */
#submit-btn {
    width: 100%;
    padding: 15px;
    background-color: #5c0a92;
    color: white;
    border: none;
    border-radius: 25px;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 20px;
}

#submit-btn:hover {
    background-color: #4c0882;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(92, 10, 154, 0.2);
}

#submit-btn:active {
    transform: translateY(0);
}

/* 반응형 디자인 */
@media (max-width: 768px) {
    body {
        padding: 10px;
    }

    .container {
        width: 100%;
        min-height: auto;
    }

    .input-form {
        padding: 15px;
    }

    .person-input {
        padding: 15px;
    }

    input[type="text"],
    select {
        font-size: 14px;
    }

    #submit-btn {
        font-size: 16px;
        padding: 12px;
    }
}

/* 스피너 스타일 */
.spinner-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.spinner {
    width: 20px;
    height: 20px;
    border: 3px solid #ffffff;
    border-top: 3px solid transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 버튼 내부 텍스트가 여러 줄이 되지 않도록 */
.spinner-container span {
    white-space: nowrap;
}

/* 비활성화된 버튼 스타일 */
#submit-btn:disabled {
    background-color: #7c3bad;
    cursor: not-allowed;
    opacity: 0.8;
}