/* 클릭 가능한 예시 스타일 */
.clickable-example {
    background-color: #fef3c7; /* yellow-100 */
    border: 1px solid #fbbf24; /* yellow-400 */
    border-radius: 0.5rem;
    padding: 0.75rem 1rem;
    margin: 0.5rem 0;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-block;
    max-width: 100%;
    word-wrap: break-word;
    line-height: 1.5;
}

.clickable-example:hover {
    background-color: #fde68a; /* yellow-200 */
    border-color: #f59e0b; /* yellow-500 */
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.clickable-example:active {
    transform: translateY(0);
}

.clickable-example::before {
    content: "👆 ";
    font-size: 0.875rem;
    opacity: 0.7;
}

/* 예시 설명 텍스트 */
.example-hint {
    font-size: 0.875rem;
    color: #6b7280; /* gray-500 */
    margin-top: 0.25rem;
    font-style: italic;
}

/* 어시스턴트 메시지 내 예시 처리 */
.assistant-message .clickable-example {
    margin: 0.5rem 0 0.25rem 0;
    display: block;
    text-align: left;
}

.assistant-message .clickable-example:hover {
    background-color: #fde68a;
}

.chart-container {
    position: relative;
    height: 400px;
    width: 100%;
}
.resource-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 1rem;
}
.resource-card {
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    padding: 1rem;
    text-align: center;
    transition: transform 0.2s;
}
.resource-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}
.resource-image {
    width: 100px;
    height: 100px;
    object-fit: cover;
    border-radius: 0.5rem;
    margin: 0 auto;
}
.article-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}
.article-card {
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    overflow: hidden;
    transition: transform 0.2s;
}
.article-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}
.article-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
}
.article-content {
    padding: 1rem;
}
.footer-links {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-top: 2rem;
    padding: 1rem 0;
    border-top: 1px solid #e5e7eb;
}
.copyright {
    border-top: 1px solid #e5e7eb;
    text-align: center;
    padding: 1rem 0;
    margin-top: 2rem;
    color: #6b7280;
    font-size: 0.875rem;
}
/* (style 태그 내부도 기존과 동일) */
.chat-container h2 {
    background: linear-gradient(135deg, #3b82f6, #60a5fa);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 700;
    margin-bottom: 1.5rem;
}

.goal-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.goal-btn.bg-gray-200:hover {
    background-color: #d1d5db;
    border-color: #9ca3af;
}

.goal-btn.active {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    border-color: #2563eb;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
    color: white;
}

.goal-btn.active:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.4);
}

.goal-btn.active {
    border-color: #3b82f6;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.2);
}

/* 채팅박스 스크롤 개선 */
.chat-box {
    height: 400px; /* 기존 250px → 400px */
    overflow-y: auto;
    margin-bottom: 1rem;
    padding: 1rem;
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    background-color: #ffffff;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.chat-box::-webkit-scrollbar {
    width: 6px;
}

.chat-box::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 3px;
}

.chat-box::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 3px;
}

.chat-box::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* 채팅 메시지 개선 */
.chat-message {
    margin-bottom: 1rem;
    padding: 0.75rem 1rem;
    border-radius: 0.75rem;
    max-width: 85%;
    line-height: 1.5;
    word-wrap: break-word;
    white-space: pre-line; /* 줄바꿈 처리 */
}

.user-message {
    background-color: #3b82f6; /* blue-600 */
    color: white;
    align-self: flex-end;
    margin-left: auto;
    border-bottom-right-radius: 0.25rem;
}

.assistant-message {
    background-color: #f8fafc; /* gray-50 */
    color: #374151; /* gray-700 */
    align-self: flex-start;
    border: 1px solid #e5e7eb; /* gray-200 */
    border-bottom-left-radius: 0.25rem;
}

/* 채팅 입력 폼 개선 */
/* textarea 컨테이너 스타일 명확화 */
.chat-input-form {
    display: flex;
    gap: 0.75rem;
    align-items: flex-end;
    padding: 0.75rem;
    background-color: #f9fafb;
    border-radius: 0.5rem;
    border: 1px solid #e5e7eb;
    width: 100%; /* 전체 너비 사용 */
    box-sizing: border-box; /* padding 포함 */
}

/* Tailwind 클래스와의 충돌 방지 */
#chatInput {
    width: 100% !important; /* Tailwind 오버라이드 */
    max-width: none !important;
}

.chat-input-form textarea {
    flex: 1;
    width: 100%; /* 명시적으로 100% 너비 설정 */
    padding: 0.75rem 1rem;
    border: 1px solid #d1d5db;
    border-radius: 0.5rem;
    font-size: 1rem;
    resize: none;
    min-height: 2.5rem;
    max-height: 5rem;
    overflow-y: auto;
    line-height: 1.5;
    font-family: inherit;
    box-sizing: border-box; /* padding을 너비에 포함 */
}

.chat-input-form textarea:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* 스크롤바 스타일링 */
.chat-input-form textarea::-webkit-scrollbar {
    width: 4px;
}

.chat-input-form textarea::-webkit-scrollbar-track {
    background: #f1f5f9;
}

.chat-input-form textarea::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 2px;
}

.chat-input-form input {
    flex: 1;
    padding: 0.75rem 1rem;
    border: 1px solid #d1d5db;
    border-radius: 0.5rem;
    font-size: 1rem;
    resize: none;
    min-height: 2.5rem;
}

.chat-input-form button {
    padding: 0.75rem 1.5rem;
    background-color: #3b82f6;
    color: white;
    border: none;
    border-radius: 0.5rem;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s;
    white-space: nowrap;
    min-width: 4rem;
    height: auto;
    align-self: stretch;
}

.chat-input-form button:hover {
    background-color: #2563eb;
}

.chat-input-form button:disabled {
    background-color: #9ca3af;
    cursor: not-allowed;
}

/* 포커스 애니메이션 */
@keyframes focusPulse {
    0% {
        box-shadow: 0 0 0 0 rgba(59, 130, 246, 0.5);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(59, 130, 246, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(59, 130, 246, 0);
    }
}

.chat-input-form textarea:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
    animation: focusPulse 1.5s ease-out;
}

@media (max-width: 775px) {
    /* 모바일 화면에서의 테이블 스타일 */
    table {
        font-size: 0.85rem;
    }
    
    th, td {
        padding: 0.75rem 0.5rem;
    }

    .chat-message {
        max-width: 90%;
        padding: 0.5rem 0.75rem;
    }

    .goal-btn {
        font-size: 0.875rem;
        padding: 0.5rem 0.75rem;
    }
    
    /* 숫자 데이터를 좀 더 작게 표시 */
    td:nth-child(2), td:nth-child(3) {
        font-size: 0.82rem;
    }
    
    /* 각 행 구분을 위한 배경색 추가 */
    tr:nth-child(even) {
        background-color: #f9fafb;
    }
    
    /* 헤더 스타일 강화 */
    thead tr {
        background-color: #f3f4f6;
        font-weight: 600;
    }
    
    /* 테이블 테두리 추가 */
    .overflow-x-auto {
        border: 1px solid #e5e7eb;
        border-radius: 0.5rem;
        margin: 1rem 0;
    }

    /* 기존 스타일 유지하면서 추가 */
    .chat-box {
        height: 350px; /* 모바일에서는 조금 낮게 */
    }
    
    .chat-input-form {
        flex-direction: row; /* 가로 배치 유지 */
        gap: 0.5rem;
        padding: 0.5rem;
    }
    
    .chat-input-form textarea {
        flex: 1;
        width: 100%;
        font-size: 16px;
        padding: 0.6rem 0.8rem;
        min-width: 0; /* flexbox 너비 문제 해결 */
    }
    
    .chat-input-form button {
        flex-shrink: 0; /* 버튼 크기 고정 */
        padding: 0.6rem 1rem;
        font-size: 0.95rem;
    }
}

/* 웰컴 모달 스타일 - 기존 스타일 끝부분에 추가 */
.welcome-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.welcome-content {
    position: relative;
    background-color: #fefefe;
    margin: 15% auto;
    padding: 25px;
    border-radius: 12px;
    width: 90%;
    max-width: 420px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from { transform: translateY(-50px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.welcome-header {
    text-align: center;
    margin-bottom: 20px;
}

.welcome-header h2 {
    color: #333;
    font-size: 1.5rem;
    margin: 10px 0 8px 0;
}

.welcome-header p {
    color: #666;
    font-size: 0.9rem;
    margin: 0;
}

.first-time-badge {
    background-color: #fef3c7;
    color: #92400e;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.85rem;
    display: inline-block;
}

/* Feature 아이콘 컨테이너 */
.feature-container {
    margin: 25px 0;
    text-align: center;
}

.feature-icons {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 3rem;
    margin-bottom: 10px;
    min-height: 80px;
}

.feature-icon-item {
    position: relative;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.feature-icon-item:hover {
    transform: scale(1.1);
}

.feature-icon-item .icon {
    font-size: 2.5rem;
    display: block;
    transition: opacity 0.3s ease;
}

.feature-icon-item.active .icon {
    opacity: 0;
}

.feature-text-hidden {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 0.85rem;
    color: #555;
    line-height: 1.4;
    width: 80px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    font-weight: 500;
}

.feature-icon-item.active .feature-text-hidden {
    opacity: 1;
}

.feature-hint {
    font-size: 0.75rem;
    color: #999;
    margin: 0;
    font-style: italic;
}

/* 버튼 스타일 통일 */
.welcome-buttons {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-top: 20px;
}

.welcome-btn {
    flex: 1;
    min-width: 120px;
    height: 44px;
    padding: 0 20px;
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s;
    font-weight: 600;
}

.welcome-btn-primary {
    background-color: #3b82f6;
    color: white;
}

.welcome-btn-primary:hover {
    background-color: #2563eb;
    transform: translateY(-1px);
}

.welcome-btn-secondary {
    background-color: #e5e7eb;
    color: #374151;
}

.welcome-btn-secondary:hover {
    background-color: #d1d5db;
}

/* 모바일 대응 - 웰컴 모달 부분만 */
@media (max-width: 768px) {
    .welcome-content {
        margin: 10% auto;
        padding: 20px;
        width: 92%;
    }
    
    .welcome-header h2 {
        font-size: 1.3rem;
    }
    
    .feature-icons {
        gap: 2rem;
    }
    
    .feature-icon-item .icon {
        font-size: 2rem;
    }
    
    .feature-text-hidden {
        font-size: 0.8rem;
        width: 70px;
    }
}

/* 아주 작은 화면 대응 */
@media (max-width: 480px) {
    .welcome-content {
        margin: 5% auto;
        padding: 15px;
    }
    
    .feature-icons {
        gap: 1.5rem;
    }
    
    .feature-icon-item .icon {
        font-size: 1.8rem;
    }
    
    .welcome-header h2 {
        font-size: 1.2rem;
    }
    
    .welcome-header p {
        font-size: 0.85rem;
    }
}

/* 라이프 스테이지 시나리오 스타일 */
.life-stage-section {
    background-color: #f8fafc;
    border-radius: 0.75rem;
    padding: 2rem;
    margin-bottom: 2rem;
    border: 1px solid #e5e7eb;
}

.scenario-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.scenario-card {
    background-color: white;
    border: 2px solid #e5e7eb;
    border-radius: 0.75rem;
    padding: 1.5rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.scenario-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #3b82f6, #60a5fa);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.scenario-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1);
    border-color: #3b82f6;
}

.scenario-card::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 0;
    background: linear-gradient(to top, rgba(59, 130, 246, 0.1), transparent);
    transition: height 0.3s ease;
}

.scenario-card:hover::after {
    height: 100%;
}

/* 유태인의 지혜 카드 특별 스타일 */
.scenario-card[data-stage="jewish"] {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border-color: #fbbf24;
}

.scenario-card[data-stage="jewish"] .scenario-icon {
    color: #d97706;
    text-shadow: 0 0 20px rgba(217, 119, 6, 0.3);
}

.scenario-card[data-stage="jewish"]:hover {
    border-color: #f59e0b;
    box-shadow: 0 10px 30px -5px rgba(245, 158, 11, 0.3);
}

.scenario-card:hover::before {
    transform: scaleX(1);
}

.scenario-icon {
    font-size: 3rem;
    margin-bottom: 0.75rem;
    display: block;
    text-align: center;
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
}

.scenario-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 0.5rem;
    text-align: center;
}

.scenario-desc {
    color: #6b7280;
    font-size: 0.9rem;
    text-align: center;
    margin-bottom: 1rem;
}

.scenario-examples {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-top: 1rem;
}

.example-chip {
    background-color: #eff6ff;
    color: #1e40af;
    border: 1px solid #bfdbfe;
    padding: 0.5rem 1rem;
    border-radius: 2rem;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center; /* 중앙 정렬로 변경 */
    line-height: 1.4;
    white-space: normal;
    display: block; /* block으로 변경 */
    width: 100%; /* 전체 너비 사용 */
}

.example-chip:hover {
    background-color: #3b82f6;
    color: white;
    transform: translateX(5px);
}

/* 선택된 스테이지 표시 */
.scenario-card.selected {
    border-color: #3b82f6;
    background-color: #eff6ff;
}

.scenario-card.selected::before {
    transform: scaleX(1);
}

.example-chip {
    position: relative;
    z-index: 10;
    pointer-events: auto;
}

.scenario-card {
    position: relative;
    z-index: 1;
}

.scenario-examples {
    position: relative;
    z-index: 5;
}

/* 모바일 반응형 */
@media (max-width: 768px) {
    .life-stage-section {
        padding: 1.5rem 1rem;
    }
    
    .scenario-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .scenario-card {
        padding: 1rem;
    }
    
    .scenario-icon {
        font-size: 2.5rem;
    }
    
    .example-chip {
        font-size: 0.82rem;
        padding: 0.4rem 0.8rem;
    }
}

/* 시나리오 클릭 시 하이라이트 효과 */
@keyframes highlight {
    0% { background-color: #fef3c7; }
    100% { background-color: transparent; }
}

.message-highlight {
    animation: highlight 2s ease;
}

/* 투어 하이라이트 스타일 */
.tour-highlight {
    position: relative !important;
    z-index: 999 !important;
    animation: tourPulse 1.5s ease-in-out infinite !important;
}

.tour-highlight::before {
    content: '';
    position: absolute;
    top: -8px;
    left: -8px;
    right: -8px;
    bottom: -8px;
    border: 3px solid #3b82f6;
    border-radius: 8px;
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.3),
                0 0 20px rgba(59, 130, 246, 0.5),
                inset 0 0 20px rgba(59, 130, 246, 0.2);
    animation: tourGlow 1.5s ease-in-out infinite;
    pointer-events: none;
}

@keyframes tourPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.02); }
}

@keyframes tourGlow {
    0%, 100% { 
        box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.3),
                    0 0 20px rgba(59, 130, 246, 0.5),
                    inset 0 0 20px rgba(59, 130, 246, 0.2);
    }
    50% { 
        box-shadow: 0 0 0 8px rgba(59, 130, 246, 0.4),
                    0 0 30px rgba(59, 130, 246, 0.7),
                    inset 0 0 25px rgba(59, 130, 246, 0.3);
    }
}

/* 투어 툴팁 개선 */
#tourTooltip {
    background: linear-gradient(135deg, #1f2937 0%, #374151 100%) !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3) !important;
    font-size: 15px !important;
    padding: 12px 18px !important;
    animation: tooltipBounce 0.5s ease-out !important;
}

@keyframes tooltipBounce {
    0% { transform: translateY(-10px); opacity: 0; }
    100% { transform: translateY(0); opacity: 1; }
}

/* 모바일에서 하이라이트 크기 조정 */
@media (max-width: 768px) {
    .tour-highlight::before {
        top: -6px;
        left: -6px;
        right: -6px;
        bottom: -6px;
    }
}

/* 책 홍보 섹션 스타일 */
.book-gallery-container {
    max-width: 1000px;
    margin: 0 auto 2rem;
}

.book-gallery {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0;
}

.book-detail-image {
    width: 100%;
    max-width: 800px;  /* 600px → 800px */
    height: auto;
    display: block;
    margin: 0 auto;  /* 중앙 정렬 추가 */
}

.book-description-box {
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 2rem;
    margin: 2rem auto;
    max-width: 1000px;  /* 800px → 1000px */
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.book-title {
    font-size: 1.5rem;
    font-weight: bold;
    color: #1f2937;
    margin-bottom: 1.5rem;
    text-align: center;
    border-bottom: 2px solid #3b82f6;
    padding-bottom: 0.75rem;
}

.book-content {
    color: #374151;
    line-height: 1.8;
}

.book-content p {
    margin-bottom: 1rem;
}

.book-headline {
    font-size: 1.25rem;
    font-weight: bold;
    color: #1f2937;
    text-align: center;
    margin-bottom: 0.5rem !important;
}

.book-subtitle {
    font-size: 1.1rem;
    color: #3b82f6;
    text-align: center;
    margin-bottom: 2rem !important;
}

.book-quote {
    background: #eff6ff;
    border-left: 4px solid #3b82f6;
    padding: 1rem 1.5rem;
    font-style: italic;
    margin: 1.5rem 0;
}

.book-features {
    background: white;
    border-radius: 8px;
    padding: 1.5rem;
    margin: 1.5rem 0;
}

.book-features ul {
    list-style: none;
    padding-left: 0;
    margin: 1rem 0;
}

.book-features li {
    position: relative;
    padding-left: 1.5rem;
    margin-bottom: 0.5rem;
}

.book-features li::before {
    content: "✓";
    position: absolute;
    left: 0;
    color: #3b82f6;
    font-weight: bold;
}

.book-conclusion {
    font-size: 1.15rem;
    font-weight: bold;
    text-align: center;
    color: #1f2937;
    background: #fef3c7;
    padding: 1rem;
    border-radius: 8px;
    margin-top: 2rem !important;
}

/* 비디오 그리드 */
.book-videos {
    margin: 2rem auto;
    max-width: 1000px;
}

.video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

.video-card {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 비율 */
    height: 0;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.video-card iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* 구매 링크 */
.purchase-section {
    margin: 2rem auto;
    max-width: 800px;
    text-align: center;
}

.purchase-links {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
    max-width: 600px;
    margin: 0 auto;
}

.purchase-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.875rem 1rem;
    min-height: 50px;
    border-radius: 8px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    font-size: 1rem;
    white-space: nowrap;
}

.purchase-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
    filter: brightness(1.1);
}

.purchase-btn.coupang {
    background: #E52330;
    color: white;
}

.purchase-btn.kyobo {
    background: #574142;
    color: white;
}

.purchase-btn.yes24 {
    background: #00A651;
    color: white;
}

.purchase-btn.youngpoong {
    background: #1E3A8A;
    color: white;
}

.purchase-btn.aladin {
    background: #F03E3E;
    color: white;
}

/* 모바일 반응형 */
@media (max-width: 768px) {
    .book-description-box {
        padding: 1.5rem;
    }
    
    .book-headline {
        font-size: 1.1rem;
    }
    
    .book-subtitle {
        font-size: 1rem;
    }
    
    .video-grid {
        grid-template-columns: 1fr;
    }
    
    .purchase-btn {
        padding: 0.6rem 1.5rem;
        font-size: 0.9rem;
    }
}

/* 블로그 리뷰 섹션 */
.blog-review-section {
    margin: 3rem auto 0;
    max-width: 1100px;
    padding-top: 2rem;
    border-top: 1px solid #e5e7eb;
}

.review-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* PC에서는 3열 고정 */
    gap: 1.5rem;
}

/* 중간 크기 화면 */
@media (max-width: 1024px) {
    .review-grid {
        grid-template-columns: repeat(2, 1fr); /* 태블릿에서는 2열 */
    }
}

@media (max-width: 768px) {
    .review-grid {
        grid-template-columns: 1fr; /* 모바일에서는 1열 */
        gap: 1rem;
    }
}

.review-card {
    display: block !important;
    text-decoration: none !important;
    color: inherit !important;
    transition: all 0.3s ease !important;
    border-radius: 16px !important;
    overflow: hidden !important;
    background: white !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08) !important;
    border: 2px solid transparent !important;
}

.review-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    border-color: #3b82f6;
}

.review-card-inner {
    padding: 1.5rem;
    position: relative;
    overflow: hidden;
}

.review-card-inner::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #3b82f6 0%, #60a5fa 100%);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s ease;
}

.review-card:hover .review-card-inner::before {
    transform: scaleX(1);
}

.review-icon-wrapper {
    display: inline-flex;
    margin-bottom: 1rem;
}

.review-icon {
    font-size: 2.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
    border-radius: 16px;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.15);
    transition: transform 0.3s ease;
}

.review-card:hover .review-icon {
    transform: rotate(-5deg) scale(1.1);
}

.review-content {
    position: relative;
}

.review-title {
    font-size: 1.15rem;
    font-weight: bold;
    color: #1f2937;
    margin-bottom: 0.75rem;
    line-height: 1.4;
    transition: color 0.3s ease;
}

.review-card:hover .review-title {
    color: #3b82f6;
}

.review-author {
    font-size: 0.9rem;
    color: #6b7280;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.author-icon {
    font-size: 1rem;
}

.review-excerpt {
    font-size: 0.95rem;
    color: #4b5563;
    line-height: 1.6;
    margin-bottom: 1rem;
}

.review-action {
    display: flex;
    justify-content: flex-end;
    margin-top: 1rem;
}

.read-more {
    font-size: 0.9rem;
    color: #3b82f6;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    transition: all 0.3s ease;
}

.review-card:hover .read-more {
    transform: translateX(4px);
}

/* 모바일 반응형 */
@media (max-width: 768px) {
    .purchase-links {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }
    
    .purchase-btn {
        font-size: 0.9rem;
        padding: 0.75rem 0.5rem;
        min-height: 45px;
    }
    
    .review-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .review-card-inner {
        padding: 1.25rem;
    }
    
    .review-icon {
        width: 60px;
        height: 60px;
        font-size: 2rem;
    }
    
    .review-title {
        font-size: 1.05rem;
    }
    
    .review-excerpt {
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .purchase-links {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.5rem;
    }
    
    .purchase-btn {
        font-size: 0.85rem;
    }
}

/* 입력창 기본 스타일 */
.modern-input {
    width: 100%;
    padding: 16px;
    border: none;
    border-radius: 12px;
    background-color: #f3f4f6;
    font-size: 16px;
    transition: all 0.2s ease;
    outline: none;
}

.modern-input:focus {
    background-color: #ffffff;
    box-shadow: 0 0 0 2px #3b82f6, 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

/* 셀렉트 박스 스타일 */
.modern-select {
    width: 100%;
    padding: 16px;
    border: none;
    border-radius: 12px;
    background-color: #f3f4f6;
    font-size: 16px;
    transition: all 0.2s ease;
    outline: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%236b7280' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    padding-right: 40px;
}

.modern-select:focus {
    background-color: #ffffff;
    box-shadow: 0 0 0 2px #3b82f6, 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

/* 라벨 스타일 */
.modern-label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    font-weight: 700;
    color: #374151;
    margin-bottom: 8px;
}

/* 툴팁 아이콘 */
.tooltip-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    background-color: #e5e7eb;
    color: #6b7280;
    border-radius: 50%;
    font-size: 11px;
    cursor: help;
    position: relative;
}

.tooltip-icon:hover {
    background-color: #d1d5db;
    color: #374151;
}

/* 툴팁 내용 */
.tooltip-icon .tooltip-content {
    visibility: hidden;
    opacity: 0;
    position: absolute;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    background-color: #1f2937;
    color: white;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 400;
    white-space: nowrap;
    z-index: 10;
    transition: all 0.2s ease;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.tooltip-icon:hover .tooltip-content {
    visibility: visible;
    opacity: 1;
}

/* 툴팁 화살표 */
.tooltip-icon .tooltip-content::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 4px solid transparent;
    border-top-color: #1f2937;
}

/* 버튼 스타일 */
.modern-button {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.modern-button:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 12px -2px rgba(0, 0, 0, 0.15);
}

.modern-button:active {
    transform: translateY(0);
}

/* 인사이트 섹션 애니메이션 */
#results .bg-gray-50 {
    animation: fadeInUp 0.5s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 리소스 카드 호버 효과 강화 */
.resource-card.group:hover {
    border-color: #3b82f6;
    box-shadow: 0 10px 25px -5px rgba(59, 130, 246, 0.2);
}

/* 추천 배지 애니메이션 */
.resource-card .absolute {
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.8;
    }
}

/* 부드러운 위아래 애니메이션 */
@keyframes gentle-bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-5px);
    }
}

.animate-gentle-bounce {
    animation: gentle-bounce 3s ease-in-out infinite;
}

/* 호버 시 애니메이션 멈춤 */
.animate-gentle-bounce:hover {
    animation-play-state: paused;
    transform: translateY(-3px);
}

/* style.css에 추가할 목표 선택 버튼 스타일 */

/* 목표 선택 버튼 스타일 */
.goal-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
    padding: 1rem 0.75rem;
    border-radius: 0.75rem;
    border: 2px solid transparent;
    transition: all 0.2s ease;
    cursor: pointer;
    min-height: 80px;
    position: relative;
    overflow: hidden;
}

/* 호버 효과 */
.goal-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* 비활성 상태 */
.goal-btn.bg-gray-200:hover {
    background-color: #e5e7eb;
    border-color: #9ca3af;
}

/* 활성 상태 */
.goal-btn.active {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    border-color: #2563eb;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
    color: white;
}

.goal-btn.active:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.4);
}

/* 아이콘 스타일 */
.goal-btn span:first-child {
    font-size: 1.75rem;
    line-height: 1;
}

/* 텍스트 스타일 */
.goal-btn span:last-child {
    font-size: 0.75rem;
    line-height: 1.2;
    text-align: center;
}

/* 선택 애니메이션 */
.goal-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at center, rgba(255,255,255,0.3) 0%, transparent 70%);
    opacity: 0;
    transform: scale(0);
    transition: all 0.3s ease;
}

.goal-btn.active::before {
    opacity: 1;
    transform: scale(1);
}

/* 폼 필드 비활성화 스타일 */
input.bg-gray-100 {
    background-color: #f3f4f6 !important;
    color: #6b7280;
    cursor: not-allowed !important;
}

input.bg-gray-100::placeholder {
    color: #9ca3af;
    font-style: italic;
}

/* 폼 필드 전환 애니메이션 */
.form-field {
    transition: all 0.3s ease;
}

.form-field.hidden {
    display: none;
}

/* 목표 버튼 그리드 레이아웃 */
.goal-buttons-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 0.5rem;
}

/* 모바일 반응형 */
@media (max-width: 768px) {
    .goal-btn {
        min-height: 70px;
        padding: 0.75rem 0.5rem;
    }
    
    .goal-btn span:first-child {
        font-size: 1.5rem;
    }
    
    .goal-btn span:last-child {
        font-size: 0.7rem;
    }
    
    /* 모바일에서 2열로 표시, 마지막 버튼도 동일한 크기로 좌측 정렬 */
    .goal-buttons-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* 모바일 결과 카드 스타일 */
.mobile-results {
    display: block;
}

/* PC에서는 숨기기 */
@media (min-width: 769px) {
    .mobile-results {
        display: none !important;
    }
}

/* 모바일 카드 호버 효과 */
.mobile-results > div:active {
    transform: scale(0.98);
    transition: transform 0.1s ease;
}

/* 테이블 헤더 중앙 정렬 및 굵게 */
thead th {
    text-align: center !important;
    font-weight: 700 !important;
}

/* 모달 스타일 */
.fixed {
    animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* 모달 내부 스크롤 */
.max-h-96 {
    max-height: 24rem;
}

/* sticky 헤더 */
.sticky {
    position: sticky;
    top: 0;
    z-index: 10;
}

/* 반응형 테이블 처리 - 수정된 버전 */
@media (max-width: 768px) {
    /* PC 테이블은 모바일 결과가 있을 때만 숨기기 */
    .overflow-x-auto:has(.mobile-results) table {
        display: none;
    }
    
    /* 모바일 카드 보이기 */
    .mobile-results {
        display: block !important;
    }
    
    /* 모바일 결과가 없을 때는 테이블을 스크롤 가능하게 */
    .overflow-x-auto {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .overflow-x-auto table {
        min-width: 600px;
    }
}

/* 계산 로딩 인디케이터 애니메이션 */
@keyframes calculatingPulse {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.1);
        opacity: 0.8;
    }
}

#calculatingIndicator .animate-pulse {
    animation: calculatingPulse 1.5s ease-in-out infinite;
}

/* 전체 데이터 모달 개선 */
.modal-table-container {
    position: relative;
    max-height: 70vh;
    overflow: auto;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    background: white;
}

/* 스티키 헤더와 첫 번째 컬럼 */
.modal-table-container table {
    border-collapse: separate;
    border-spacing: 0;
    width: 100%;
    min-width: 500px;
}

.modal-table-container thead th {
    position: sticky;
    top: 0;
    background: #f9fafb;
    z-index: 20;
    border-bottom: 2px solid #e5e7eb;
    padding: 0.75rem;
    font-weight: 600;
    font-size: 0.875rem;
}

.modal-table-container tbody td:first-child {
    position: sticky;
    left: 0;
    background: #ffffff;
    z-index: 10;
    border-right: 1px solid #e5e7eb;
    font-weight: 600;
}

.modal-table-container tbody tr:hover {
    background-color: #f3f4f6;
}

.modal-table-container tbody tr:hover td:first-child {
    background-color: #f3f4f6;
}

/* 5년 단위 행 강조 */
.modal-table-container tbody tr.bg-blue-50 {
    background-color: #eff6ff;
}

.modal-table-container tbody tr.bg-blue-50 td:first-child {
    background-color: #eff6ff;
}

/* 모달 내부 스크롤바 스타일 */
.modal-table-container::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

.modal-table-container::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 4px;
}

.modal-table-container::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}

.modal-table-container::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

.modal-table-container::-webkit-scrollbar-corner {
    background: #f1f5f9;
}

/* 모달 반응형 */
@media (max-width: 768px) {
    .modal-table-container {
        max-height: 60vh;
    }
    
    .modal-table-container table {
        font-size: 0.8rem;
    }
    
    .modal-table-container thead th,
    .modal-table-container tbody td {
        padding: 0.5rem;
    }
}

/* 모바일 그래프 개선 */
@media (max-width: 768px) {
    .chart-container {
        height: 320px;
        margin-bottom: 1rem;
        margin-left: -1rem;  /* 좌우 여백 더 줄이기 */
        margin-right: -1rem;
        width: calc(100% + 2rem);
        padding: 0;
    }
    
    /* Chart.js 캔버스 자체의 패딩 조정 */
    .chart-container canvas {
        padding: 0 !important;
    }
    
    /* 상세 분석 섹션의 내부 컨테이너 여백 조정 */
    #results .bg-white.p-8 {
        padding: 1.5rem 0.75rem !important; /* 좌우 패딩 줄이기 */
    }
    
    /* 내부 그리드 컨테이너 여백 조정 */
    #results .bg-gray-50.rounded-lg.p-6,
    #results .bg-blue-50.rounded-lg.p-6 {
        padding: 1rem !important;
        margin-left: -0.25rem;
        margin-right: -0.25rem;
    }
    
    /* 인사이트 박스 여백 조정 */
    #results .bg-gradient-to-r.from-amber-50.to-orange-50 {
        padding: 1rem !important;
        margin-left: -0.25rem;
        margin-right: -0.25rem;
    }
    
    /* 그리드 갭 조정 */
    #results .grid.gap-6 {
        gap: 0.75rem !important;
    }
}

@media (max-width: 768px) {
    .chart-container {
        height: 320px; /* 모바일에서 그래프 높이 증가 */
        margin-bottom: 1rem;
    }
}

/* ========================================
   모바일 연도별 상세 데이터 섹션 여백 조정
   style.css 파일 맨 끝에 추가하세요
   ======================================== */

@media (max-width: 768px) {
    /* 연도별 상세 데이터 박스의 패딩 줄이기 */
    #results .bg-white.p-6.rounded-xl.shadow-md:last-child {
        padding: 1rem 0.75rem !important;
    }
    
    /* 모바일 결과 카드 컨테이너 좌우 확장 */
    .overflow-x-auto:has(.mobile-results) {
        margin-left: -0.75rem;
        margin-right: -0.75rem;
        border: none !important;
        overflow: visible !important;
    }
    
    /* 모바일 결과 카드 래퍼 패딩 */
    .mobile-results {
        padding: 0 0.25rem;
    }
    
    /* 개별 카드들의 마진 조정으로 화면 꽉 채우기 */
    .mobile-results > div {
        margin-left: 0;
        margin-right: 0;
    }
    
    /* 전체 보기 버튼 컨테이너 */
    .mobile-results > div:last-child {
        padding-left: 0.5rem;
        padding-right: 0.5rem;
    }
}

/* 480px 이하 작은 화면에서 추가 조정 */
@media (max-width: 480px) {
    /* 연도별 상세 데이터 박스 패딩 더 줄이기 */
    #results .bg-white.p-6.rounded-xl.shadow-md:last-child {
        padding: 0.75rem 0.5rem !important;
    }
    
    /* 카드 컨테이너 마진 더 확장 */
    .overflow-x-auto:has(.mobile-results) {
        margin-left: -1rem;
        margin-right: -1rem;
    }
}

/* ========================================
   새로운 입력 폼 스타일
   style.css 파일에 추가하세요
   ======================================== */

/* 슬라이더 컨테이너 */
.slider-container {
    margin: 1rem 0;
    padding: 0 0.5rem;
    min-height: 80px; /* 고정 높이 추가 */
}

/* 슬라이더 스타일 */
.slider {
    -webkit-appearance: none;
    width: 100%;
    height: 6px;
    border-radius: 3px;
    background: #e5e7eb;
    outline: none;
    transition: background 0.2s;
}

.slider:hover {
    background: #d1d5db;
}

.slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #3b82f6;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    transition: all 0.2s;
}

.slider::-webkit-slider-thumb:hover {
    transform: scale(1.2);
    box-shadow: 0 4px 8px rgba(59, 130, 246, 0.3);
}

.slider::-moz-range-thumb {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #3b82f6;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* 슬라이더 값 표시 */
.slider-value-display {
    text-align: center;
    margin-top: 0.5rem;
    font-size: 1.25rem;
    font-weight: 700;
    color: #1f2937;
}

.slider-labels {
    display: flex;
    justify-content: space-between;
    margin-top: 0.5rem;
    font-size: 0.875rem;
    color: #6b7280;
}

/* 퀵 선택 버튼 그리드 */
.quick-select-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.5rem;
    margin-top: 1rem;
}

/* Step 4 (수익률) 특별 처리 */
.step-container[data-step="4"] .slider-value-display {
    margin-bottom: 1rem; /* 여백 추가 */
}

/* 버튼 그리드들 고정 높이 */
.quick-select-grid,
.quick-select-grid-2x2,
.period-preset-grid-2x2,
.rate-preset-grid-2x2 {
    min-height: 120px; /* 모든 버튼 그리드 높이 통일 */
}

/* 퀵 버튼 스타일 */
.quick-btn {
    padding: 0.75rem;
    border: 2px solid #e5e7eb;
    border-radius: 0.5rem;
    background: white;
    cursor: pointer;
    transition: all 0.2s;
    font-weight: 600;
    color: #374151;
}

.quick-btn:hover {
    border-color: #3b82f6;
    background: #eff6ff;
}

.quick-btn.active {
    border-color: #3b82f6;
    background: #3b82f6;
    color: white;
}

/* 설명이 있는 퀵 버튼 */
.quick-btn.with-desc {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0.75rem 0.5rem;
}

.quick-btn.with-desc .amount {
    font-size: 1rem;
    font-weight: 700;
}

.quick-btn.with-desc .desc {
    font-size: 0.75rem;
    opacity: 0.8;
    margin-top: 0.25rem;
}

/* 프리셋 그리드 */
.target-preset-grid,
.period-preset-grid,
.rate-preset-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
    margin-top: 1rem;
}

/* 프리셋 버튼 */
.preset-btn,
.period-btn,
.rate-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1rem;
    border: 2px solid #e5e7eb;
    border-radius: 0.75rem;
    background: white;
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
}

.preset-btn:hover,
.period-btn:hover,
.rate-btn:hover {
    border-color: #3b82f6;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.15);
}

.preset-btn.active,
.period-btn.active,
.rate-btn.active {
    border-color: #3b82f6;
    background: linear-gradient(135deg, #eff6ff, #dbeafe);
}

.preset-btn .icon,
.period-btn .icon,
.rate-btn .icon {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.preset-btn .label,
.period-btn .label,
.rate-btn .label {
    font-size: 0.875rem;
    color: #6b7280;
    margin-bottom: 0.25rem;
}

.preset-btn .amount,
.period-btn .years,
.rate-btn .rate {
    font-size: 1rem;
    font-weight: 700;
    color: #1f2937;
}

/* 복리 주기 토글 */
.compound-toggle {
    display: flex;
    gap: 0;
    background: #f3f4f6;
    border-radius: 0.5rem;
    padding: 0.25rem;
}

.toggle-btn {
    flex: 1;
    padding: 0.75rem;
    border: none;
    background: transparent;
    cursor: pointer;
    font-weight: 600;
    color: #6b7280;
    border-radius: 0.375rem;
    transition: all 0.2s;
}

.toggle-btn.active {
    background: white;
    color: #3b82f6;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* 평균값 표시 */
.avg-indicator {
    font-size: 0.75rem;
    color: #059669;
    font-weight: 400;
    margin-left: 0.5rem;
}

/* 커스텀 입력 */
.custom-input-container {
    margin-top: 1rem;
}

/* 모바일 반응형 */
@media (max-width: 768px) {
    .quick-select-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .target-preset-grid,
    .period-preset-grid,
    .rate-preset-grid {
        grid-template-columns: 1fr;
    }
    
    .quick-btn.with-desc {
        flex-direction: row;
        justify-content: space-between;
        padding: 0.75rem 1rem;
    }
    
    .quick-btn.with-desc .desc {
        margin-top: 0;
        margin-left: 0.5rem;
    }
}

/* ========================================
   단계별 입력 폼 스타일
   style.css에 추가
   ======================================== */
/* 모바일 반응형 */
@media (max-width: 768px) {
    .step-form {
        min-height: 550px;
    }
    
    .step-container {
        padding-bottom: 70px; /* 모바일은 버튼이 작으므로 */
    }
    

    .step-content {
        min-height: 350px;
        padding-top: 1.5rem;
    }
    
    .step-container[data-step="5"] .step-content {
        min-height: 400px;
    }
    
    .summary-box {
        margin-top: 1rem;
        padding: 0.75rem;
    }
}

/* 단계별 폼 컨테이너 */
.step-form {
    position: relative;
    min-height: 600px;
    display: flex;
    flex-direction: column;
}

/* 진행률 표시 */
.step-progress {
    flex-shrink: 0;
    margin-bottom: 2rem;
}

.progress-bar {
    height: 6px;
    background: #e5e7eb;
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #3b82f6, #2563eb);
    border-radius: 3px;
    transition: width 0.3s ease;
    width: 20%; /* 초기값 */
}

.step-counter {
    text-align: right;
    font-size: 0.875rem;
    color: #6b7280;
}

/* 스텝 컨테이너 */
.step-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow-y: auto; /* 내용이 많으면 스크롤 */
    padding-bottom: 80px; /* 네비게이션 버튼 공간 확보 */
}

.step-container.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 스텝 헤더 */
.step-header {
    flex-shrink: 0;
}

.step-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 0.5rem;
}

.step-subtitle {
    color: #6b7280;
    font-size: 1rem;
}

.step-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: flex-start; /* center 대신 flex-start */
    min-height: 400px;
    padding-top: 2rem; /* 상단 여백 추가 */
}


/* Step 5 (복리 주기) 높이 조정 */
.step-container[data-step="5"] .step-content {
    min-height: 450px; /* 더 높게 설정 */
}

/* 2x2 그리드 레이아웃 */
.quick-select-grid-2x2,
.period-preset-grid-2x2,
.rate-preset-grid-2x2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin-top: 1.5rem;
}

/* 대형 토글 버튼 */
.compound-toggle.large {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    background: transparent;
    padding: 0;
}

/* 큰 토글 버튼 높이 조정 */
.compound-toggle.large {
    min-height: 150px;
}

.compound-toggle.large .toggle-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 2rem 1rem;
    border: 2px solid #e5e7eb;
    border-radius: 1rem;
    background: white;
    transition: all 0.2s;
}

.compound-toggle.large .toggle-btn:hover {
    border-color: #3b82f6;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.15);
}

.compound-toggle.large .toggle-btn.active {
    border-color: #3b82f6;
    background: linear-gradient(135deg, #eff6ff, #dbeafe);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.15);
}

.toggle-icon {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.toggle-label {
    font-size: 1.125rem;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 0.25rem;
}

.toggle-desc {
    font-size: 0.875rem;
    color: #6b7280;
}

/* 요약 박스 */
.summary-box {
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    border-radius: 0.75rem;
    margin-top: 1.5rem; /* 여백 줄이기 */
    padding: 1rem; /* 패딩 줄이기 */
}

.summary-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 1rem;
    text-align: center;
}

.summary-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
}

.summary-item {
    text-align: center;
    padding: 0.75rem;
    background: white;
    border-radius: 0.5rem;
    border: 1px solid #e5e7eb;
}

.summary-label {
    display: block;
    font-size: 0.875rem;
    color: #6b7280;
    margin-bottom: 0.25rem;
}

.summary-value {
    display: block;
    font-size: 1.125rem;
    font-weight: 700;
    color: #1f2937;
}

/* 네비게이션 버튼 위치 고정 */
.step-navigation {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    display: flex;
    justify-content: space-between;
    padding: 1rem;
    gap: 1rem;
    background: white;
    border-top: 1px solid #e5e7eb;
    box-shadow: 0 -2px 4px rgba(0, 0, 0, 0.05);
}

.nav-btn {
    flex: 1;
    padding: 1rem 2rem;
    border: none;
    border-radius: 0.75rem;
    font-size: 1.125rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.prev-btn {
    background: #f3f4f6;
    color: #374151;
}

.prev-btn:hover {
    background: #e5e7eb;
}

.next-btn,
.submit-btn {
    background: #3b82f6;
    color: white;
}

.next-btn:hover,
.submit-btn:hover {
    background: #2563eb;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.submit-btn {
    background: linear-gradient(135deg, #10b981, #059669);
}

.submit-btn:hover {
    background: linear-gradient(135deg, #059669, #047857);
}

/* 모바일 반응형 */
@media (max-width: 768px) {
    .step-container {
        min-height: 450px;
    }
    
    .step-title {
        font-size: 1.25rem;
    }
    
    .quick-select-grid-2x2,
    .period-preset-grid-2x2,
    .rate-preset-grid-2x2 {
        gap: 0.75rem;
    }
    
    .period-btn,
    .rate-btn {
        padding: 0.75rem;
    }
    
    .period-btn .icon,
    .rate-btn .icon {
        font-size: 1.5rem;
    }
    
    .summary-grid {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }
    
    .nav-btn {
        padding: 0.875rem 1.5rem;
        font-size: 1rem;
    }
}

/* 모바일에서 복리 토글 버튼 크기 조정 */
@media (max-width: 768px) {
    /* 큰 토글 버튼 높이 줄이기 */
    .compound-toggle.large .toggle-btn {
        padding: 1.5rem 0.75rem; /* 기존 2rem → 1.5rem */
    }
    
    .compound-toggle.large .toggle-icon {
        font-size: 2rem; /* 기존 2.5rem → 2rem */
        margin-bottom: 0.25rem; /* 기존 0.5rem → 0.25rem */
    }
    
    .compound-toggle.large .toggle-label {
        font-size: 1rem; /* 기존 1.125rem → 1rem */
        margin-bottom: 0.2rem;
    }
    
    .compound-toggle.large .toggle-desc {
        font-size: 0.75rem; /* 기존 0.875rem → 0.75rem */
    }
    
    /* 요약 박스도 더 컴팩트하게 */
    .summary-box {
        margin-top: 0.75rem; /* 더 줄이기 */
        padding: 0.5rem;
    }
    
    .summary-title {
        font-size: 1rem;
        margin-bottom: 0.5rem;
    }
    
    .summary-item {
        padding: 0.5rem;
    }
}

/* 평균값 표시 스타일 */
.avg-indicator {
    font-size: 0.875rem;
    color: #059669; /* green-600 */
    font-weight: 500;
    margin-top: 0.5rem;
    padding: 0.5rem 1rem;
    background-color: #d1fae5; /* green-100 */
    border-radius: 9999px;
    display: inline-block;
    animation: fadeIn 0.5s ease;
}

.avg-indicator:empty {
    display: none;
}

/* 아이콘 추가 */
.avg-indicator::before {
    content: "📊 ";
    margin-right: 0.25rem;
}

/* 모바일 */
@media (max-width: 768px) {
    .avg-indicator {
        font-size: 0.75rem;
        padding: 0.375rem 0.75rem;
    }
}