@import url('https://cdn.jsdelivr.net/gh/orioncactus/pretendard/dist/web/static/pretendard.css');

.word-count-container * {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Pretendard', sans-serif;
}

.word-count-container {
    width: 100%;
    max-width: 700px;
    overflow: hidden;
    color: #212529;
    margin: 20px auto;
}

/* 헤더 */
.word-count-header {
    padding: 24px 30px;
    border-bottom: 1px solid #e9ecef;
}

.word-count-header h1 {
    font-size: 26px;
    font-weight: 800;
}

.word-count-header-description {
    margin-top: 8px;
    font-size: 15px;
    color: #495057;
}

/* 메인 컨텐츠 영역 */
.word-count-main-content {
    padding: 30px;
}

/* 입력 영역 */
.word-count-label {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    font-weight: 600;
    color: #495057;
}

.word-count-textarea {
    width: 100%;
    padding: 16px;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    font-size: 16px;
    line-height: 1.6;
    resize: vertical;
    transition: all 0.2s ease;
}

.word-count-textarea:focus {
    outline: none;
    border-color: #4c6ef5;
    box-shadow: 0 0 0 2px rgba(76, 110, 245, 0.2);
}

.word-count-action-buttons {
    display: flex;
    justify-content: flex-end;
    margin-top: 12px;
}

.word-count-btn {
    padding: 14px;
    border-radius: 6px;
    border: none;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    line-height: 1;
}

.word-count-btn-reset {
    background-color: #f1f3f5;
    color: #495057;
}

.word-count-btn-reset:hover {
    background-color: #e9ecef;
}

/* 구분선 */
.word-count-divider {
    border: 0;
    height: 1px;
    background-color: #e9ecef;
    margin: 32px 0;
}

/* 결과 영역 */
.word-count-result-section h3 {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.word-count-result-list {
    list-style: none;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 12px;
}

.word-count-result-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px;
    border-radius: 8px;
    background-color: #f8f9fa;
    border: 1px solid #e9ecef;
    font-size: 15px;
}

.word-count-result-item .label {
    font-weight: 600;
    color: #495057;
}

.word-count-result-item .value {
    font-weight: 500;
    text-align: right;
}

/* 안내사항 섹션 */
.word-count-reference-section h3 {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 16px;
}
.word-count-reference-section ul {
    list-style: none;
    padding-left: 0;
}
.word-count-reference-section li {
    font-size: 14px;
    color: #495057;
    line-height: 1.6;
}

/* 에러 메시지 */
.word-count-error-message {
    color: #fa5252;
    font-size: 14px;
    margin-top: 8px;
    min-height: 1.5em;
    visibility: hidden;
    opacity: 0;
    transition: opacity 0.2s ease-in-out, visibility 0.2s ease-in-out;
}
.word-count-error-message.visible {
    visibility: visible;
    opacity: 1;
}

/* 로딩 스피너 */
.word-count-loader {
    display: none;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #4c6ef5;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    animation: word-count-spin 1s linear infinite;
}
@keyframes word-count-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}