/* 사주아이작명 — 아이작명 페이지 (아이름 스타일) */

.naming-hero {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    padding: 1.25rem 1rem;
    margin-bottom: 0;
}

.naming-hero .container {
    padding-top: 0;
    padding-bottom: 0;
}

.naming-hero-title {
    font-size: clamp(1.15rem, 3vw, 1.65rem);
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 0.35rem;
}

.naming-hero-desc {
    font-size: 0.9rem;
    opacity: 0.95;
    max-width: 520px;
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 0.4rem;
}

.naming-hero-badges {
    margin-bottom: 0.6rem !important;
}

.naming-hero-badges .badge {
    font-weight: 500;
    padding: 0.3rem 0.6rem;
    font-size: 0.8rem;
}

.naming-hero .naming-mode-btns {
    margin-top: 0.25rem;
}

.naming-hero-hint {
    margin-top: 0.5rem !important;
    font-size: 0.8rem;
    margin-bottom: 0 !important;
}

@media (max-width: 576px) {
    .naming-hero { padding: 1rem 0.75rem; }
    .naming-hero-title { margin-bottom: 0.25rem; }
    .naming-hero-desc { font-size: 0.85rem; }
    .naming-hero-badges { margin-bottom: 0.5rem !important; }
    .naming-hero-hint { margin-top: 0.4rem !important; }
}

.naming-mode-btns .btn {
    font-weight: 600;
}

.btn-naming-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    color: #fff;
}

.btn-naming-primary:hover {
    color: #fff;
    opacity: 0.9;
    transform: translateY(-1px);
}

.btn-naming-outline {
    background: transparent;
    border: 2px solid #fff;
    color: #fff;
}

.btn-naming-outline:hover {
    background: rgba(255,255,255,0.2);
    color: #fff;
    border-color: #fff;
}

.naming-card {
    border: none;
    border-radius: 1rem;
}

/* 보고서 */
.naming-report {
    max-width: 800px;
    margin: 0 auto;
}

.naming-report-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.naming-report-section {
    margin-bottom: 3rem;
}

.naming-report-section-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #e9ecef;
}

/* TOP 3 카드 */
.naming-top3-card {
    border-radius: 1rem;
    border: 1px solid #e9ecef;
    overflow: hidden;
    transition: box-shadow 0.2s;
}

.naming-top3-card:hover {
    box-shadow: 0 8px 24px rgba(0,0,0,0.08);
}

.naming-top3-rank {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    font-weight: 700;
    font-size: 1rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.naming-top3-score {
    font-size: 1.5rem;
    font-weight: 700;
    color: #667eea;
}

.naming-top3-name {
    font-size: 1.35rem;
    font-weight: 600;
}

.naming-top3-hanja {
    font-size: 1.1rem;
    color: #495057;
}

.naming-top3-meaning {
    font-size: 0.95rem;
    color: #6c757d;
    line-height: 1.5;
}

/* 오행 바 */
.naming-element-bars {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.naming-element-bar {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.naming-element-bar .label {
    width: 80px;
    font-weight: 500;
    font-size: 0.9rem;
}

.naming-element-bar .bar-wrap {
    flex: 1;
    height: 1.5rem;
    background: #e9ecef;
    border-radius: 0.5rem;
    overflow: hidden;
}

.naming-element-bar .bar {
    height: 100%;
    border-radius: 0.5rem;
    transition: width 0.5s ease;
}

.naming-element-bar .pct {
    width: 3rem;
    text-align: right;
    font-size: 0.85rem;
    color: #6c757d;
}

/* 성향/직업 박스 */
.naming-tendency-box {
    background: #f8f9fa;
    border-radius: 0.75rem;
    padding: 1.25rem;
    border-left: 4px solid #667eea;
    font-size: 0.95rem;
    line-height: 1.6;
    color: #495057;
}

/* 한자 찾기 결과 */
#hanjaResult .card-body {
    font-size: 1rem;
}

#hanjaResult .hanja-big {
    font-size: 1.75rem;
    font-weight: 600;
}

/* ----- 작명 정보 입력 (아이름 /input 스타일) ----- */
.naming-input-section .naming-input-main-title {
    font-size: 1.75rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 0.5rem;
}

.naming-input-block {
    background: #fff;
    border-radius: 1rem;
    padding: 1.75rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
    border: 1px solid #eee;
}

.naming-input-step-num {
    font-size: 0.9rem;
    font-weight: 700;
    color: #667eea;
    margin-bottom: 0.25rem;
}

.naming-input-step-title {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.naming-input-step-desc {
    font-size: 0.875rem;
    color: #6c757d;
    margin-bottom: 1rem;
}

.naming-field-error.invalid-feedback {
    display: none;
}
.naming-field-error.invalid-feedback[style*="display: block"],
.form-control.is-invalid ~ .naming-field-error,
.form-select.is-invalid ~ .naming-field-error {
    display: block !important;
}

/* 성씨 한자 자동완성 (아이름 스타일) */
.naming-surname-wrap {
    position: relative;
    display: flex;
    align-items: center;
    border: 1px solid #ced4da;
    border-radius: 0.375rem;
    background: #fff;
}
.naming-surname-wrap:focus-within {
    border-color: #fd7e14;
    box-shadow: 0 0 0 0.2rem rgba(253, 126, 20, 0.25);
}
.naming-surname-icon {
    padding: 0 0.75rem;
    font-size: 1rem;
    color: #6c757d;
    flex-shrink: 0;
}
.naming-surname-input {
    border: none !important;
    flex: 1;
    min-width: 0;
}
.naming-surname-input:focus {
    box-shadow: none !important;
    outline: none !important;
}
#name-recommend .mb-0.position-relative {
    overflow: visible;
}
.naming-surname-wrap + .naming-surname-dropdown,
.mb-0.position-relative .naming-surname-dropdown {
    display: block;
}
.mb-0.position-relative .naming-surname-dropdown.d-none {
    display: none !important;
}
.naming-surname-dropdown {
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    margin-top: 2px;
    background: #fff;
    border: 1px solid #dee2e6;
    border-radius: 0.5rem;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    max-height: 280px;
    overflow-y: auto;
    z-index: 1050;
}
.naming-surname-dropdown-fixed {
    position: fixed !important;
    left: 0;
    top: 0;
    width: 280px;
    z-index: 9999;
    max-height: 280px;
}
.naming-surname-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 0.65rem 1rem;
    border: none;
    background: none;
    text-align: left;
    font-size: 1rem;
    cursor: pointer;
    transition: background 0.15s;
}
.naming-surname-item:hover {
    background: #f8f9fa;
}
.naming-surname-item-name {
    font-weight: 500;
    color: #212529;
}
.naming-surname-item-meta {
    font-size: 0.875rem;
    color: #6c757d;
}

/* ----- 로딩 오버레이 ----- */
.naming-loading-overlay {
    position: fixed;
    inset: 0;
    background: rgba(255,255,255,0.97);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.naming-loading-content {
    text-align: center;
    max-width: 360px;
    padding: 2rem;
}

.naming-loading-baby {
    font-size: 4rem;
    line-height: 1;
    margin-bottom: 0.5rem;
}

.naming-loading-cloud {
    width: 120px;
    height: 50px;
    margin: -1rem auto 0;
    background: radial-gradient(ellipse 60px 30px at 50% 70%, #e3f2fd 40%, transparent 70%);
    border-radius: 50%;
}

.naming-loading-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #333;
    margin: 1.5rem 0 0.5rem;
}

.naming-loading-desc {
    font-size: 0.9rem;
    color: #6c757d;
    margin-bottom: 1.25rem;
}

.naming-loading-bar-wrap {
    height: 10px;
    background: #e9ecef;
    border-radius: 6px;
    overflow: hidden;
    margin-bottom: 0.5rem;
    min-width: 260px;
}

.naming-loading-bar {
    height: 100%;
    width: 0;
    background: linear-gradient(90deg, #fd7e14, #f59f00);
    border-radius: 6px;
    transition: width 0.4s ease;
}

.naming-loading-step {
    font-size: 0.8rem;
    color: #adb5bd;
}

/* ----- 보고서 (아이름 스타일) ----- */
.naming-report-logo {
    font-size: 0.8rem;
    color: #6c757d;
    margin-bottom: 0.25rem;
}

.naming-report-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.naming-badge-pill {
    display: inline-block;
    padding: 0.35rem 0.75rem;
    background: #d4edda;
    color: #155724;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 500;
}

/* TOP 5 블록 */
.naming-top5-block {
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 1rem;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.naming-top5-rank {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    background: #dee2e6;
    color: #495057;
    font-weight: 700;
    font-size: 1rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.naming-top5-rank-1 {
    background: #fd7e14;
    color: #fff;
}

.naming-top5-score {
    font-size: 1.25rem;
    font-weight: 700;
    color: #667eea;
}

.naming-top5-name {
    font-size: 1.4rem;
    font-weight: 700;
    margin: 0.5rem 0 0.15rem;
}

.naming-top5-hanja {
    font-size: 1.1rem;
    color: #495057;
    margin-bottom: 0.15rem;
}

.naming-top5-roman {
    font-size: 0.85rem;
    color: #6c757d;
    margin-bottom: 0.25rem;
}

.naming-top5-pop {
    font-size: 0.8rem;
    margin-bottom: 0.75rem;
}

.naming-top5-hanja-break {
    margin-bottom: 0.75rem;
}

.naming-top5-hanja-row {
    font-size: 0.9rem;
    color: #495057;
    margin-bottom: 0.25rem;
}

.naming-top5-hanja-char {
    font-weight: 600;
    margin-right: 0.2rem;
}

.naming-top5-hanja-read {
    color: #667eea;
}

.naming-top5-explain {
    font-size: 0.9rem;
    line-height: 1.6;
    color: #495057;
    margin-bottom: 0.75rem;
}

.naming-top5-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    margin-bottom: 0.5rem;
}

.naming-eval-pill {
    display: inline-block;
    padding: 0.25rem 0.6rem;
    background: #e7f1ff;
    color: #0d6efd;
    border-radius: 999px;
    font-size: 0.75rem;
}

.naming-top5-detail-link {
    margin-bottom: 0;
}
