/* 데일리웰100 - 시니어 웹사이트 스타일 */

:root {
    --primary-color: #2c3e50;
    --secondary-color: #3498db;
    --accent-color: #e74c3c;
    --text-dark: #2c3e50;
    --text-light: #7f8c8d;
    --bg-light: #f8f9fa;
    --border-color: #dee2e6;
}

body {
    font-family: 'Noto Sans KR', sans-serif;
    color: var(--text-dark);
    background-color: #fff;
    line-height: 1.6;
}

/* 헤더 스타일 */
.site-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.site-title {
    font-size: 2rem;
    font-weight: bold;
    color: white;
    text-decoration: none;
    margin: 0;
}

.site-title:hover {
    color: #ffd700;
}

.site-tagline {
    font-size: 1rem;
    color: rgba(255,255,255,0.9);
    margin: 5px 0 0 0;
}

/* 네비게이션 스타일 */
.main-navigation {
    background-color: white;
    border-bottom: 2px solid var(--border-color);
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    padding: 0;
}

.main-navigation .nav-link {
    color: var(--text-dark);
    font-weight: 600;
    font-size: 1.1rem;
    padding: 15px 25px;
    border-right: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.main-navigation .nav-link:hover,
.main-navigation .nav-link.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.main-navigation .nav-link i {
    margin-right: 8px;
}

/* 환영 배너 */
.welcome-banner {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
    padding: 60px 40px;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
}

.welcome-banner h1 {
    font-weight: bold;
    color: white;
}

.welcome-banner .lead {
    font-size: 1.3rem;
    opacity: 0.95;
}

/* 서비스 카드 */
.service-card {
    background: white;
    border: 2px solid var(--border-color);
    border-radius: 15px;
    padding: 30px;
    text-align: center;
    transition: all 0.3s ease;
    height: 100%;
    box-shadow: 0 3px 10px rgba(0,0,0,0.08);
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    border-color: var(--secondary-color);
}

.service-icon {
    margin-bottom: 20px;
}

.service-card h3 {
    color: var(--text-dark);
    font-weight: bold;
    margin-bottom: 15px;
}

.service-card p {
    color: var(--text-light);
    line-height: 1.8;
    margin-bottom: 20px;
}

/* 단계 번호 */
.step-number {
    width: 60px;
    height: 60px;
    line-height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    font-size: 1.5rem;
    font-weight: bold;
    margin: 0 auto 15px;
}

/* 푸터 */
.site-footer {
    background-color: var(--primary-color);
    color: white;
    padding: 40px 0 20px;
    margin-top: 60px;
}

.site-footer h5 {
    color: white;
    margin-bottom: 20px;
    font-weight: bold;
}

.site-footer p {
    color: #bdc3c7;
    line-height: 1.8;
}

.site-footer a {
    color: #bdc3c7;
    text-decoration: none;
}

.site-footer a:hover {
    color: white;
}

/* AI 손주 채팅 페이지 스타일 */
.ai-grandson-intro {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 15px;
    padding: 30px;
}

.chat-container {
    max-width: 900px;
    margin: 0 auto;
}

/* 성별 선택 스타일 */
.gender-selection-container {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 400px;
}

.gender-selection-card {
    background: white;
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    max-width: 500px;
    animation: slideDown 0.5s ease-out;
}

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-30px); }
    to { opacity: 1; transform: translateY(0); }
}

.gender-btn {
    transition: all 0.3s ease;
    min-width: 150px;
}

.gender-btn:hover {
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
}

/* 채팅 메시지 스타일 */
.message {
    display: flex;
    margin-bottom: 20px;
    animation: fadeIn 0.3s ease-in;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.ai-message {
    justify-content: flex-start;
}

.user-message {
    justify-content: flex-end;
}

.message-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    flex-shrink: 0;
}

.ai-message .message-avatar {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: 2px solid #667eea;
    margin-right: 10px;
    color: white;
}

.user-message .message-avatar {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
    margin-left: 10px;
    order: 2;
}

.message-content {
    max-width: 70%;
}

.user-message .message-content {
    order: 1;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.message-bubble {
    padding: 15px 20px;
    border-radius: 20px;
    margin-bottom: 5px;
    word-wrap: break-word;
}

.ai-bubble {
    background: white;
    color: #2c3e50;
    border: 1px solid #e0e0e0;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.user-bubble {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 2px 5px rgba(102, 126, 234, 0.3);
}

.message-time {
    color: #7f8c8d;
    font-size: 0.75rem;
    padding: 0 10px;
}

/* 타이핑 인디케이터 */
.typing-indicator {
    display: flex;
    align-items: center;
    padding: 15px 20px;
    background: white;
    border-radius: 20px;
    border: 1px solid #e0e0e0;
    width: fit-content;
}

.typing-indicator span {
    height: 8px;
    width: 8px;
    background: #7f8c8d;
    border-radius: 50%;
    display: inline-block;
    margin: 0 2px;
    animation: typing 1.4s infinite;
}

.typing-indicator span:nth-child(2) {
    animation-delay: 0.2s;
}

.typing-indicator span:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes typing {
    0%, 60%, 100% { transform: translateY(0); }
    30% { transform: translateY(-10px); }
}

/* 추천 질문 */
.suggested-questions {
    padding: 15px;
    background: white;
    border-radius: 10px;
    border: 1px dashed #dee2e6;
    margin-top: 15px;
}

.suggested-btn {
    border-radius: 20px;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.suggested-btn:hover {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-color: #667eea;
    transform: translateY(-2px);
}

/* 스크롤바 스타일 */
#chatMessages::-webkit-scrollbar {
    width: 8px;
}

#chatMessages::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

#chatMessages::-webkit-scrollbar-thumb {
    background: #667eea;
    border-radius: 10px;
}

#chatMessages::-webkit-scrollbar-thumb:hover {
    background: #764ba2;
}

/* 게시글 카드 스타일 */
.post-card {
    border: 1px solid var(--border-color);
    border-radius: 15px;
    overflow: hidden;
    transition: all 0.3s ease;
    background: white;
    margin-bottom: 30px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.post-card:hover {
    box-shadow: 0 5px 20px rgba(0,0,0,0.15);
    transform: translateY(-5px);
}

.post-card-image {
    width: 100%;
    height: 250px;
    object-fit: cover;
    background: var(--bg-light);
}

.post-card-body {
    padding: 25px;
}

.post-category {
    display: inline-block;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 15px;
    text-decoration: none;
}

.post-category:hover {
    background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
    color: white;
}

.post-title {
    font-size: 1.4rem;
    font-weight: bold;
    margin-bottom: 15px;
    color: var(--text-dark);
    text-decoration: none;
    display: block;
    line-height: 1.5;
}

.post-title:hover {
    color: #667eea;
}

.post-meta {
    color: var(--text-light);
    font-size: 0.9rem;
    margin-bottom: 15px;
}

.post-meta i {
    margin-right: 5px;
}

.post-excerpt {
    color: var(--text-dark);
    line-height: 1.8;
    margin-bottom: 20px;
}

.read-more {
    color: #667eea;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
}

.read-more:hover {
    color: #764ba2;
}

.read-more i {
    transition: transform 0.3s ease;
}

.read-more:hover i {
    transform: translateX(5px);
}

/* 게시글 상세 페이지 */
.post-detail {
    background: white;
    padding: 40px;
    border-radius: 15px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.post-content {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text-dark);
}

.post-content h2 {
    margin-top: 30px;
    margin-bottom: 20px;
    color: #667eea;
    font-weight: bold;
}

.post-content p {
    margin-bottom: 20px;
}

/* AI 손주 프로필 이미지 스타일 */
.profile-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    border-radius: 50%;
    position: absolute;
    top: 0;
    left: 0;
}

.fallback-avatar {
    font-size: 24px;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

.message-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    flex-shrink: 0;
    overflow: hidden;
    border: 2px solid rgba(255,255,255,0.3);
    position: relative;
    background: rgba(255,255,255,0.1);
}

/* 반응형 */
@media (max-width: 768px) {
    .site-title {
        font-size: 1.5rem;
    }
    
    .site-tagline {
        font-size: 0.9rem;
    }
    
    .main-navigation .nav-link {
        border-right: none;
        border-bottom: 1px solid var(--border-color);
        font-size: 1rem;
    }
    
    .welcome-banner {
        padding: 40px 20px;
    }
    
    .welcome-banner h1 {
        font-size: 2rem;
    }
    
    .gender-selection-card {
        padding: 20px;
    }
    
    .message-content {
        max-width: 85%;
    }
    
    .post-card-image {
        height: 200px;
    }
    
    .post-detail {
        padding: 20px;
    }
}

