/* 영유아 성장도표 모바일 전용 CSS */

/* CSS 변수 추가 */
:root {
    --growth-gradient: linear-gradient(135deg, #ec4899 0%, #be185d 100%);
    --growth-primary: #ec4899;
    --growth-secondary: #be185d;
    --growth-accent: #f472b6;
    --glass-blur: blur(12px);
    --white: #ffffff;
    --bg-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 25%, #f093fb 50%, #f5576c 75%, #4facfe 100%);
    --gray-50: #f9fafb;
    --gray-700: #374151;
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --radius-xl: 18px;
    --transition-normal: 0.25s ease;
}

/* 기본 스타일 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    line-height: 1.5;
    color: var(--gray-700);
    background: var(--gray-50);
    overflow-x: hidden;
    font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, sans-serif;
}

/* 모바일 검색 트리거 버튼 (플로팅 버튼) */
.mobile-search-trigger {
    position: fixed;
    bottom: 30px;
    right: 20px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--growth-gradient);
    border: none;
    box-shadow: 0 8px 25px rgba(236, 72, 153, 0.3);
    color: white;
    font-size: 24px;
    cursor: pointer;
    z-index: 9998;
    display: none;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.mobile-search-trigger:hover {
    transform: scale(1.1);
    box-shadow: 0 12px 30px rgba(236, 72, 153, 0.4);
}

.mobile-search-trigger:active {
    transform: scale(0.95);
}

/* 컬러풀 배경 */
.glass-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background: var(--bg-gradient);
    background-size: 400% 400%;
    animation: gradientShift 10s ease infinite;
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.blob-1 {
    width: 300px;
    height: 300px;
    top: 5%;
    left: 5%;
    animation-delay: 0s;
    background: rgba(236, 72, 153, 0.1);
}

.blob-2 {
    width: 200px;
    height: 200px;
    top: 40%;
    right: 5%;
    animation-delay: 3s;
    background: rgba(190, 24, 93, 0.1);
}

.blob-3 {
    width: 150px;
    height: 150px;
    bottom: 5%;
    left: 40%;
    animation-delay: 6s;
    background: rgba(244, 114, 182, 0.1);
}

@keyframes float {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    33% { transform: translateY(-15px) rotate(3deg); }
    66% { transform: translateY(8px) rotate(-3deg); }
}

/* 메인 컨텐츠 */
.main-content {
    position: relative;
    min-height: 100vh;
    padding-top: 70px;
}

.main-wrapper {
    width: 100%;
    margin: 0 auto;
    padding: 0;
}

/* 히어로 섹션 및 배경 스타일 개선 */
.hero-section {
    position: relative;
    padding: 10px 0 20px;
    text-align: center;
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: var(--glass-blur);
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
}

@media (max-width: 768px) {
    .hero-section {
        padding: 10px 0 15px;
        min-height: auto;
    }
    
    .hero-title {
        font-size: 1.5rem;
        margin-bottom: 8px;
    }
    
    .hero-description {
        font-size: 13px;
        margin-bottom: 0;
    }
    
    .hero-badge {
        padding: 6px 12px;
        font-size: 13px;
        margin-bottom: 15px;
    }
    
    .mobile-search-interface {
        border-radius: 16px 16px 0 0;
        z-index: 9999;
    }
    
    .mobile-search-interface.active {
        display: block;
        transform: translateY(0);
    }
    
    .hero-section {
        position: relative;
        z-index: 1;
    }
}

.hero-content {
    max-width: 600px;
    margin: 0 auto;
    padding: 0 20px;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: var(--glass-blur);
    padding: 8px 16px;
    border-radius: 50px;
    font-size: 14px;
    font-weight: 500;
    color: var(--white);
    margin-bottom: 20px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.hero-badge i {
    color: #ec4899;
}

.hero-title {
    font-size: clamp(1.8rem, 3vw, 2.5rem);
    font-weight: 700;
    color: var(--white);
    margin-bottom: 8px;
    line-height: 1.1;
}

.gradient-text {
    background: var(--growth-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-description {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 0;
    line-height: 1.4;
}

/* 모바일 플로팅 버튼 - 실손보험료 페이지와 동일한 스타일 */
.mobile-floating-btn {
    position: fixed;
    bottom: 30px;
    right: 20px;
    width: 60px;
    height: 60px;
    background: var(--growth-gradient);
    border: none;
    border-radius: 50%;
    color: white;
    font-size: 22px;
    cursor: pointer;
    box-shadow: 0 8px 25px rgba(236, 72, 153, 0.3);
    z-index: 9999;
    transition: all 0.3s ease;
    display: none;
    align-items: center;
    justify-content: center;
}

.mobile-floating-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 12px 30px rgba(236, 72, 153, 0.4);
}

.mobile-floating-btn i {
    font-size: 22px;
}

/* PC 검색 인터페이스 스타일 개선 */
.growth-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

.pc-search-interface {
    display: grid;
    grid-template-columns: 380px 1fr;
    gap: 20px;
    height: calc(100vh - 180px);
    align-items: start;
}

.search-sidebar {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: var(--glass-blur);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 18px;
    padding: 25px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    position: sticky;
    top: 90px;
    height: fit-content;
}

.search-results-area {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: var(--glass-blur);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 18px;
    padding: 30px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    overflow: hidden;
    height: fit-content;
}

/* 모바일 검색 인터페이스 - 승강기 보험 페이지와 동일한 구조 */
.mobile-search-interface {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9999;
    display: none;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.mobile-search-interface.active {
    display: block;
    opacity: 1;
    visibility: visible;
}

.mobile-search-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
}

.mobile-search-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    max-height: 85vh;
    background: white;
    border-radius: 20px 20px 0 0;
    padding: 20px;
    transform: translateY(100%);
    transition: transform 0.3s ease;
    overflow-y: auto;
}

.mobile-search-interface.active .mobile-search-content {
    transform: translateY(0);
}

.mobile-search-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 20px;
    position: relative;
}

.mobile-search-close {
    position: absolute;
    top: -10px;
    right: 0;
    background: none;
    border: none;
    font-size: 24px;
    color: #666;
    cursor: pointer;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.mobile-search-close:hover {
    background: #f5f5f5;
    color: #333;
}

.mobile-search-title {
    text-align: center;
}

.mobile-search-title h3 {
    margin: 0;
    font-size: 18px;
    color: #333;
    font-weight: 600;
}

.mobile-search-title p {
    margin: 4px 0 0 0;
    font-size: 14px;
    color: #666;
}

.mobile-search-form {
    padding: 20px;
}

.mobile-form-group {
    margin-bottom: 20px;
}

.mobile-form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
    font-size: 14px;
}

.mobile-form-control {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s ease;
    box-sizing: border-box;
}

.mobile-form-control:focus {
    outline: none;
    border-color: #ec4899;
}

.mobile-form-select {
    width: 100px;
    padding: 12px 8px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s ease;
    background: white;
}

.mobile-form-select:focus {
    outline: none;
    border-color: #ec4899;
}

.mobile-input-with-select {
    display: flex;
    gap: 8px;
}

.mobile-input-with-select input {
    flex: 1;
}

.mobile-input-with-unit {
    position: relative;
}

.mobile-input-unit {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #666;
    font-size: 14px;
    font-weight: 500;
}

.mobile-input-with-unit input {
    padding-right: 40px;
}

.mobile-radio-group {
    display: flex;
    gap: 8px;
}

.mobile-radio-item {
    flex: 1;
}

.mobile-radio-input {
    display: none;
}

.mobile-radio-label {
    background: #f8f9fa;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 12px 16px;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    justify-content: center;
    font-weight: 500;
    font-size: 14px;
}

.mobile-radio-input:checked + .mobile-radio-label {
    background: var(--growth-gradient);
    color: white;
    border-color: var(--growth-primary);
}

.mobile-radio-label i {
    font-size: 16px;
}

.mobile-radio-input:checked + .mobile-radio-label i {
    color: white !important;
}

.mobile-search-btn {
    width: 100%;
    background: var(--growth-gradient);
    color: white;
    border: none;
    border-radius: 8px;
    padding: 14px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.mobile-search-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 20px rgba(236, 72, 153, 0.3);
}

.mobile-info-section {
    margin-top: 20px;
}

.mobile-info-card {
    background: linear-gradient(135deg, #fdf2f8 0%, #eff6ff 100%);
    border: 1px solid #ec4899;
    border-radius: 8px;
    padding: 12px;
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.mobile-info-card .info-icon {
    color: #ec4899;
    font-size: 16px;
    margin-top: 2px;
}

.mobile-info-card .info-content h6 {
    margin: 0 0 4px 0;
    color: #333;
    font-size: 14px;
    font-weight: 600;
}

.mobile-info-card .info-content p {
    margin: 0;
    color: #666;
    font-size: 12px;
    line-height: 1.4;
}

/* 모바일 검색 결과 영역 */
.mobile-search-results {
    position: fixed;
    top: 50px;
    left: 0;
    right: 0;
    bottom: 0;
    background: white;
    transform: translateX(100%);
    transition: transform 0.3s ease;
    z-index: 1002;
    display: none;
    height: calc(100vh - 50px);
}

.mobile-search-results.active {
    display: block;
    transform: translateX(0);
}

/* PC 검색 결과 CSS - 모바일에서 재사용 */
.results-grid {
    display: grid;
    gap: 16px;
    grid-template-columns: 1fr; /* 모바일에서는 1칼럼 */
    flex: 1;
    align-content: start;
    overflow-y: auto;
    padding: 0 5px;
}

/* 성장 분석 결과 카드 */
.growth-result-card {
    background: var(--white);
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    padding: 16px;
    cursor: pointer;
    transition: all 0.25s ease;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    min-height: 200px;
    height: auto;
    animation: cardFadeIn 0.5s ease-out forwards;
    opacity: 0;
    transform: translateY(20px);
}

.growth-result-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--growth-gradient);
    opacity: 0.8;
    transition: 0.25s ease;
}

.growth-result-card:hover::before {
    height: 4px;
    opacity: 1;
}

.growth-result-card:hover {
    border-color: rgba(236, 72, 153, 0.3);
    transform: translateY(-4px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

.growth-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 16px;
    gap: 16px;
}

.growth-info {
    flex: 1;
}

.child-age {
    font-size: 18px;
    font-weight: 700;
    color: #1f2937;
    margin: 0 0 6px 0;
    line-height: 1.2;
}

.child-gender {
    font-size: 12px;
    color: #6b7280;
    margin: 0 0 6px 0;
    line-height: 1.3;
}

.analysis-type {
    display: inline-block;
    background: rgba(236, 72, 153, 0.1);
    border: 1px solid rgba(236, 72, 153, 0.3);
    color: #be185d;
    padding: 3px 8px;
    border-radius: 6px;
    font-size: 10px;
    font-weight: 600;
}

.growth-status {
    text-align: right;
    flex-shrink: 0;
}

.status-badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 20px;
    font-size: 10px;
    font-weight: 600;
    margin-bottom: 6px;
}

.badge-normal {
    background: rgba(34, 197, 94, 0.1);
    border: 1px solid rgba(34, 197, 94, 0.4);
    color: #059669;
}

.badge-warning {
    background: rgba(245, 158, 11, 0.1);
    border: 1px solid rgba(245, 158, 11, 0.4);
    color: #d97706;
}

.badge-alert {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.4);
    color: #dc2626;
}

.growth-percentile {
    font-size: 11px;
    color: #6b7280;
    line-height: 1.3;
}

.growth-card-body {
    margin-bottom: 16px;
}

.growth-info-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-bottom: 16px;
}

.growth-info-item {
    background: #f9fafb;
    padding: 10px;
    border-radius: 6px;
    border: 1px solid #e5e7eb;
}

.info-label {
    font-size: 10px;
    color: #6b7280;
    margin-bottom: 4px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.info-value {
    font-size: 12px;
    color: #1f2937;
    font-weight: 600;
    line-height: 1.3;
}

.bmi-value {
    color: #be185d;
    font-weight: 700;
}

.growth-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 12px;
    border-top: 1px solid #e5e7eb;
    gap: 10px;
    margin-top: auto;
}

.chart-info {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.chart-badge {
    padding: 2px 6px;
    border-radius: 6px;
    font-size: 9px;
    font-weight: 600;
    background: #f3f4f6;
    color: #6b7280;
    border: 1px solid #e5e7eb;
    display: flex;
    align-items: center;
    gap: 4px;
}

.chart-badge i {
    font-size: 10px;
}

/* 분석일시 표시 */
.analysis-info {
    margin-top: 16px;
    padding: 12px;
    background: #f9fafb;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
}

.analysis-info p {
    margin: 0;
    font-size: 11px;
    color: #6b7280;
    display: flex;
    align-items: center;
    gap: 6px;
}

.analysis-info i {
    font-size: 12px;
    color: #ec4899;
}

/* 애니메이션 */
@keyframes cardFadeIn {
    0% {
        opacity: 0;
        transform: translateY(20px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

.growth-result-card:nth-child(1) {
    animation-delay: 0.1s;
}

.growth-result-card:nth-child(2) {
    animation-delay: 0.2s;
}

.mobile-results-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 20px;
    background: var(--growth-gradient);
    color: white;
    position: sticky;
    top: 0;
    z-index: 10;
}

.mobile-back-btn {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: white;
    font-size: 16px;
    transition: all 0.2s ease;
}

.mobile-back-btn:hover {
    background: rgba(255, 255, 255, 0.3);
}

.mobile-results-title {
    text-align: center;
    flex: 1;
}

.mobile-results-title h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
}

.mobile-results-title .results-count {
    font-size: 12px;
    opacity: 0.8;
}

.mobile-new-search-btn {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: white;
    font-size: 16px;
    transition: all 0.2s ease;
}

.mobile-new-search-btn:hover {
    background: rgba(255, 255, 255, 0.3);
}

.mobile-results-content {
    padding: 20px;
    overflow-y: auto;
    height: calc(100vh - 50px - 66px);
}

.mobile-results-container {
    max-width: 100%;
    margin: 0 auto;
}

.mobile-results-grid {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.mobile-growth-result-card {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    padding: 16px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.mobile-growth-result-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--growth-gradient);
}

.mobile-growth-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.mobile-growth-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.mobile-child-age {
    font-size: 14px;
    font-weight: 600;
    color: #333;
}

.mobile-child-gender {
    font-size: 12px;
    color: #666;
}

.mobile-analysis-type {
    font-size: 16px;
    font-weight: 600;
    color: var(--growth-primary);
    margin-top: 4px;
}

.mobile-growth-status {
    text-align: right;
}

.mobile-status-badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 4px;
}

.mobile-status-badge.badge-normal {
    background: #10b981;
    color: white;
}

.mobile-status-badge.badge-warning {
    background: #f59e0b;
    color: white;
}

.mobile-status-badge.badge-alert {
    background: #ef4444;
    color: white;
}

.mobile-growth-percentile {
    font-size: 12px;
    color: #666;
}

.mobile-growth-info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 12px;
}

.mobile-growth-info-item {
    text-align: center;
}

.mobile-info-label {
    font-size: 11px;
    color: #666;
    margin-bottom: 4px;
}

.mobile-info-value {
    font-size: 14px;
    font-weight: 600;
    color: #333;
}

.mobile-info-value.bmi-value {
    color: var(--growth-primary);
}

.mobile-chart-footer {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid #f0f0f0;
}

.mobile-chart-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #f8f9fa;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 10px;
    color: #666;
}

.mobile-chart-badge i {
    font-size: 10px;
}

.mobile-no-results {
    text-align: center;
    padding: 40px 20px;
    color: #666;
}

.mobile-no-results i {
    font-size: 48px;
    color: #ddd;
    margin-bottom: 16px;
}

.mobile-no-results h3 {
    margin: 0 0 8px 0;
    font-size: 18px;
    color: #333;
}

.mobile-no-results p {
    margin: 0 0 20px 0;
    font-size: 14px;
}

/* 반응형 디자인 */
@media (max-width: 1200px) {
    .pc-search-interface {
        grid-template-columns: 360px 1fr;
        gap: 15px;
    }
}

@media (max-width: 1024px) {
    .pc-search-interface {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .search-sidebar {
        position: static;
    }
}

@media (max-width: 768px) {
    /* 모바일 검색 인터페이스 활성화 */
    .mobile-search-interface {
        display: block;
    }
    
    /* 모바일 검색 트리거 버튼 표시 */
    .mobile-search-trigger {
        display: flex;
    }
    
    /* PC 검색 인터페이스 숨김 */
    .pc-search-interface {
        display: none;
    }
    
    .growth-content {
        padding: 15px 15px 30px 15px;
    }
    
    .hero-section {
        padding: 10px 0 20px;
    }
    
    /* 모바일에서 검색 결과가 있을 때 히어로 섹션 높이 줄이기 */
    .hero-section.search-active {
        padding: 10px 0 5px;
        min-height: auto;
    }

    /* 모바일 검색 결과 영역 */
.mobile-search-results {
    margin-top: -70px;
}

}

@media (max-width: 480px) {
    .mobile-search-trigger {
        display: flex;
        bottom: 20px;
        right: 16px;
        width: 56px;
        height: 56px;
        font-size: 20px;
    }
    
    .mobile-search-content {
        border-radius: 16px 16px 0 0;
        padding: 16px;
    }
    
    .mobile-search-form {
        padding: 16px;
    }
    
    .mobile-form-control {
        padding: 10px 12px;
        font-size: 14px;
    }
    
    .mobile-form-select {
        padding: 10px 8px;
        font-size: 14px;
    }
    
    .mobile-search-btn {
        padding: 12px;
        font-size: 14px;
    }
    
    .mobile-results-content {
        padding: 16px;
    }
    
    .mobile-growth-result-card {
        padding: 14px;
    }
    
    .mobile-analysis-type {
        font-size: 14px;
    }
    
    .mobile-growth-info-grid {
        grid-template-columns: 1fr;
        gap: 8px;
    }
    
    .mobile-growth-info-item {
        text-align: left;
    }
} 