body {
    font-family: 'Noto Sans KR', sans-serif;
    background: linear-gradient(135deg, #f0f2f5 0%, #e0e5ec 100%);
    display: flex;
    justify-content: center;
    align-items: flex-start; /* 상단에 배치되도록 수정 */
    min-height: 100vh;
    margin: 0;
    padding: 40px 20px; /* 상하 여백 추가 */
    box-sizing: border-box;
    color: #333;
}

.container {
    background-color: #ffffff;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    padding: 40px;
    width: 100%;
    max-width: 800px;
    text-align: center;
}

h1 {
    color: #2c3e50;
    font-size: 2.5em;
    margin-bottom: 10px;
    font-weight: 700;
}

.title-hr { /* 제목 아래 줄 스타일 */
    border: none;
    border-top: 2px solid #8e44ad; /* 보라색 선 */
    width: 80px; /* 선 길이 조절 */
    margin: 5px auto; /* 중앙 정렬 및 위아래 간격 */
}

.subtitle {
    color: #7f8c8d;
    font-size: 1.1em;
    margin-top: 30px; /* 줄과의 간격 */
    margin-bottom: 30px;
}

.input-section {
    margin-bottom: 30px;
}

.input-header {
    display: flex;
    justify-content: flex-end; /* 버튼들을 오른쪽으로 정렬 */
    gap: 10px; /* 버튼 사이 간격 */
    margin-bottom: 10px; /* 텍스트 에어리어와의 간격 */
}

textarea {
    width: calc(100% - 20px);
    height: 180px;
    padding: 15px;
    border: 1px solid #dcdfe6;
    border-radius: 8px;
    font-size: 1.05em;
    color: #555;
    resize: vertical;
    margin-bottom: 20px;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.05);
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

textarea:focus {
    border-color: #8e44ad;
    box-shadow: 0 0 8px rgba(142, 68, 173, 0.2);
    outline: none;
}

.button-group {
    display: flex;
    justify-content: center;
    gap: 15px;
}

.btn {
    padding: 12px 25px;
    border: none;
    border-radius: 8px;
    font-size: 1.1em;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.btn.primary {
    background-color: #8e44ad; /* 보라색 계열 */
    color: #ffffff;
}

.btn.primary:hover {
    background-color: #6c3483;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(142, 68, 173, 0.3);
}

.btn.secondary {
    background-color: #34495e; /* 다크 그레이 */
    color: #ffffff;
}

.btn.secondary:hover {
    background-color: #2c3e50;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(52, 73, 94, 0.3);
}

.btn.tertiary {
    background-color: #ecf0f1; /* 라이트 그레이 */
    color: #34495e;
    border: 1px solid #dcdfe6;
    margin-top: 20px;
}

.btn.tertiary:hover {
    background-color: #dcdfe6;
    transform: translateY(-2px);
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
}

.btn.clear { /* 입력 초기화 버튼 스타일 */
    background-color: #f1c40f; /* 밝은 노란색 */
    color: #ffffff;
    padding: 8px 15px; /* 작은 패딩 */
    font-size: 0.9em; /* 작은 글씨 */
    border-radius: 5px; /* 살짝 둥근 모서리 */
    text-transform: none; /* 대문자 사용 안함 */
}

.btn.clear:hover {
    background-color: #e6b700;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(241, 196, 15, 0.2);
}

.btn.paste { /* 붙여넣기 버튼 스타일 (새로 추가) */
    background-color: #27ae60; /* 녹색 */
    color: #ffffff;
    padding: 8px 15px;
    font-size: 0.9em;
    border-radius: 5px;
    text-transform: none;
}

.btn.paste:hover {
    background-color: #229954;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(39, 174, 96, 0.2);
}


.result-section {
    background-color: #f9fbfd;
    border: 1px solid #e0e5ec;
    border-radius: 10px;
    padding: 25px;
    margin-top: 30px;
    text-align: left;
    box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.03);
}

.result-section.hidden {
    display: none;
}

.result-section h2 {
    color: #34495e;
    font-size: 1.8em;
    margin-top: 0;
    margin-bottom: 20px;
    border-bottom: 2px solid #e0e5ec;
    padding-bottom: 10px;
}

#detectionSummary {
    font-size: 1.1em;
    color: #2c3e50;
    margin-bottom: 15px;
    font-weight: 500;
}

.details-box {
    background-color: #ffffff;
    border: 1px solid #dcdfe6;
    border-radius: 8px;
    padding: 15px;
    min-height: 80px;
    max-height: 200px;
    overflow-y: auto;
    font-size: 0.95em;
    line-height: 1.6;
    color: #555;
}

.summary-box {
    background-color: #ffffff;
    border: 1px solid #dcdfe6;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 20px;
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
    gap: 10px;
}

.summary-box p {
    margin: 0;
    font-size: 1.1em;
    color: #34495e;
    font-weight: 500;
}

.summary-box span {
    font-weight: 700;
    color: #8e44ad;
}

.status-message {
    font-size: 1.2em;
    font-weight: 600;
    color: #27ae60; /* 성공 메시지 색상 */
    margin-top: 15px;
}

#outputResultText {
    width: calc(100% - 20px);
    height: 200px;
    padding: 15px;
    border: 1px solid #dcdfe6;
    border-radius: 8px;
    font-size: 1.05em;
    color: #333;
    background-color: #eef1f4;
    cursor: default;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.05);
}