body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    line-height: 1.7;
    margin: 0;
    color: #333;
    
    /* [NEW] 일본풍 파도 무늬 패턴 (Seigaiha) - 연한 회색 */
    background-color: #fbfbfc;
    background-image: 
        radial-gradient(circle at 100% 150%, #fbfbfc 24%, #f0f0f0 25%, #f0f0f0 28%, #fbfbfc 29%, #fbfbfc 36%, #f0f0f0 36%, #f0f0f0 40%, transparent 40%, transparent),
        radial-gradient(circle at 0    150%, #fbfbfc 24%, #f0f0f0 25%, #f0f0f0 28%, #fbfbfc 29%, #fbfbfc 36%, #f0f0f0 36%, #f0f0f0 40%, transparent 40%, transparent),
        radial-gradient(circle at 50%  100%, #f0f0f0 10%, #fbfbfc 11%, #fbfbfc 23%, #f0f0f0 24%, #f0f0f0 30%, #fbfbfc 31%, #fbfbfc 43%, #f0f0f0 44%, #f0f0f0 50%, #fbfbfc 51%, #fbfbfc 63%, #f0f0f0 64%, #f0f0f0 71%, transparent 71%, transparent);
    background-size: 50px 25px;
    background-attachment: fixed; /* 스크롤 해도 배경 고정 */
}

.container {
    max-width: 900px;
    margin: 0 auto;
    padding: 0;
    background-color: #fff;
    box-shadow: 0 0 20px rgba(0,0,0,0.05); /* 그림자 살짝 추가 */
    border-radius: 0;
    overflow: hidden;
}

header {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    background-color: #fff;
    border-bottom: 1px solid #f0f0f0;
}

h1 { margin: 0; padding: 0; line-height: 1; }

.logo-img {
    max-width: 650px;
    height: auto;
    display: block;
    margin: 0 auto 30px auto;
    filter: none; 
    transition: transform 0.3s ease;
}

.logo-img:hover {
    transform: none;
    filter: none;
}

.update-message {
    font-size: 0.9rem;
    color: #888;
    margin-top: -10px;
    margin-bottom: 25px;
    font-weight: 500;
}

#map {
    width: 100%;
    height: 500px;
    margin-bottom: 0;
    border-radius: 0;
}

.gm-fullscreen-control {
    display: none !important;
}

/* InfoWindow 스타일 */
.infowindow-content {
    max-width: 260px;
    padding: 5px;
}
.infowindow-content img {
    width: 100%;
    height: 140px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 8px;
    background-color: #f0f0f0;
    border: 1px solid #eee;
}
.infowindow-content h3 {
    font-size: 16px;
    font-weight: bold;
    margin: 8px 0 4px 0;
    color: #333;
    line-height: 1.3;
}
.infowindow-content p { 
    margin: 0 0 10px 0; 
    font-size: 13px;
    color: #666;
}
.infowindow-content a { color: #3498db; font-weight: bold; text-decoration: none; }

/* [NEW] InfoWindow 내 버튼 그룹 스타일 */
.info-btn-group {
    display: flex; 
    gap: 6px; 
    margin-top: 10px;
}
.info-btn {
    flex: 1; 
    text-align: center; 
    padding: 8px 4px; 
    border-radius: 6px; 
    text-decoration: none; 
    font-size: 12px; 
    font-weight: bold;
    border: none;
    cursor: pointer;
    transition: background 0.2s;
    display: flex;
    justify-content: center;
    align-items: center;
}
.dir-btn {
    background: #4285F4; 
    color: white; 
}
.dir-btn:hover { background: #3367d6; }

.blog-btn {
    background: #f1f1f1; 
    color: #333; 
    border: 1px solid #ddd;
}
.blog-btn:hover { background: #e0e0e0; }

.copy-btn {
    background: #fff;
    color: #555;
    border: 1px solid #ccc;
    font-size: 14px; /* 아이콘 크기 */
    width: 32px; /* 정사각형 버튼 */
    flex: none; /* 크기 고정 */
}
.copy-btn:hover { background: #f9f9f9; border-color: #bbb; }


/* 테마 필터 버튼 */
.theme-filter-buttons {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    padding: 10px 15px;
    gap: 10px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}
.theme-filter-buttons::-webkit-scrollbar { display: none; }

.theme-button {
    position: relative;
    padding: 8px 16px;
    font-size: 14px;
    font-weight: bold;
    border: 1px solid #ddd;
    background-color: #f7f7f7;
    color: #555;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.theme-button:hover::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 125%; left: 50%; transform: translateX(-50%);
    background-color: #2c3e50; color: white;
    padding: 8px 12px; border-radius: 6px;
    font-size: 13px; font-weight: 500; white-space: nowrap;
    z-index: 10; pointer-events: none;
}

/* 테마별 색상 */
.theme-button[data-theme="all"]:hover { border-color: #3498db; color: #3498db; }
.theme-button[data-theme="all"].active { background-color: #3498db; border-color: #3498db; color: white; }

.theme-button[data-theme="wealth"]:hover { border-color: #FBC02D; color: #e0a800; }
.theme-button[data-theme="wealth"].active { background-color: #FBC02D; border-color: #FBC02D; color: #333; }

.theme-button[data-theme="love"]:hover { border-color: #E91E63; color: #E91E63; }
.theme-button[data-theme="love"].active { background-color: #E91E63; border-color: #E91E63; color: white; }

.theme-button[data-theme="health"]:hover { border-color: #2E7D32; color: #2E7D32; }
.theme-button[data-theme="health"].active { background-color: #2E7D32; border-color: #2E7D32; color: white; }

.theme-button[data-theme="study"]:hover { border-color: #1565C0; color: #1565C0; }
.theme-button[data-theme="study"].active { background-color: #1565C0; border-color: #1565C0; color: white; }

.theme-button[data-theme="safety"]:hover { border-color: #455A64; color: #455A64; }
.theme-button[data-theme="safety"].active { background-color: #455A64; border-color: #455A64; color: white; }

.theme-button[data-theme="success"]:hover { border-color: #512DA8; color: #512DA8; }
.theme-button[data-theme="success"].active { background-color: #512DA8; border-color: #512DA8; color: white; }

.theme-button[data-theme="history"]:hover { border-color: #EF6C00; color: #EF6C00; }
.theme-button[data-theme="history"].active { background-color: #EF6C00; border-color: #EF6C00; color: white; }

@media (max-width: 768px) {
    .container { margin: 0; border-radius: 0; box-shadow: none; }
    header { padding: 30px 15px; }
    .logo-img { max-width: 90%; margin-bottom: 30px; }
    .theme-filter-buttons { padding: 0 15px; }
    .theme-button { font-size: 13px; padding: 7px 12px; }
    .theme-button:hover::after { display: none; } 
}

/* 리스트 섹션 */
.list-section {
    padding: 40px 20px;
    background-color: rgba(249, 249, 249, 0.9); /* 배경 살짝 투명 */
    border-top: 1px solid #eee;
}

.list-title {
    text-align: center;
    margin-bottom: 30px;
    font-size: 1.5rem;
    color: #333;
}

.shrine-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
    max-width: 1200px;
    margin: 0 auto;
}

.shrine-card {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
    display: flex;
    flex-direction: column;
}

.shrine-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

.card-thumb-link { display: block; height: 180px; overflow: hidden; }
.card-thumb { width: 100%; height: 100%; object-fit: cover; transition: transform 0.3s; }
.shrine-card:hover .card-thumb { transform: scale(1.05); }
.card-content { padding: 20px; flex-grow: 1; display: flex; flex-direction: column; }
.card-title { font-size: 1.1rem; margin: 0 0 10px 0; line-height: 1.4; }
.card-title a { text-decoration: none; color: #333; font-weight: bold; }
.card-meta { font-size: 0.8rem; color: #888; margin-bottom: 12px; }
.card-summary {
    font-size: 0.9rem; color: #666; line-height: 1.6;
    margin-bottom: 15px; display: -webkit-box;
    -webkit-line-clamp: 3; -webkit-box-orient: vertical;
    overflow: hidden; flex-grow: 1;
}
.card-btn {
    display: inline-block; padding: 8px 0; color: #3498db;
    font-weight: bold; text-decoration: none; font-size: 0.9rem; margin-top: auto;
}
.card-btn:hover { text-decoration: underline; }

/* 오미쿠지 & 모달 */
.omikuji-floating-btn {
    position: fixed; bottom: 30px; left: 20px;
    background-color: #d32f2f; color: white; border: none;
    border-radius: 50px; padding: 12px 20px;
    font-size: 16px; font-weight: bold;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
    cursor: pointer; z-index: 1000; transition: transform 0.2s;
}
.omikuji-floating-btn:hover { transform: scale(1.05); background-color: #b71c1c; }

.modal-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background-color: rgba(0,0,0,0.6); z-index: 2000;
    display: flex; justify-content: center; align-items: center;
}
.modal-content {
    background-color: white; padding: 30px; border-radius: 15px;
    text-align: center; width: 90%; max-width: 350px;
    position: relative; box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    animation: popIn 0.3s ease;
}
@keyframes popIn { from { transform: scale(0.8); opacity: 0; } to { transform: scale(1); opacity: 1; } }

.close-modal {
    position: absolute; top: 10px; right: 15px;
    font-size: 28px; font-weight: bold; color: #aaa; cursor: pointer;
}
.close-modal:hover { color: #333; }

.action-btn {
    background-color: #333; color: white; border: none;
    padding: 10px 20px; font-size: 1rem; border-radius: 5px;
    cursor: pointer; margin-top: 15px; width: 100%; font-weight: bold;
}

.shake { animation: shake 0.5s cubic-bezier(.36,.07,.19,.97) both infinite; }
@keyframes shake {
    10%, 90% { transform: translate3d(-1px, 0, 0); }
    20%, 80% { transform: translate3d(2px, 0, 0); }
    30%, 50%, 70% { transform: translate3d(-4px, 0, 0); }
    40%, 60% { transform: translate3d(4px, 0, 0); }
}

/* assets/css/style.css 수정 */

/* 기존 .infowindow-content a 스타일 아래에 버튼 전용 스타일을 더 강력하게 추가합니다 */

/* (1) 길찾기 버튼 글씨색 강제 수정 */
.info-btn.dir-btn {
    background: #4285F4; 
    color: #ffffff !important; /* !important로 흰색 강제 적용 */
    text-decoration: none;
    font-weight: bold;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2); /* 입체감 추가 */
}

.info-btn.dir-btn:hover { 
    background: #3367d6; 
    color: #ffffff !important;
}

/* (2) 블로그 버튼도 깔끔하게 정리 */
.info-btn.blog-btn {
    background: #f1f1f1; 
    color: #333 !important; 
    border: 1px solid #ddd;
    text-decoration: none;
}

/* assets/css/style.css 수정 (맨 아래에 추가하거나 기존 footer 관련 교체) */

footer {
    padding: 40px 20px;       /* 위아래 여백을 넉넉하게 */
    text-align: center;       /* 가운데 정렬 */
    background-color: #fff;   /* 배경색 흰색 확인 */
    border-top: 1px solid #eee; /* 상단 구분선 */
    margin-top: 0;
    font-size: 0.85rem;       /* 글씨 크기 살짝 작게 */
    color: #888;              /* 글씨 색상 연한 회색 */
}

footer p {
    margin: 5px 0;            /* 줄 간격 조정 */
}

footer a {
    color: #666;
    text-decoration: none;
    transition: color 0.2s;
}

footer a:hover {
    color: #3498db;           /* 마우스 올리면 파란색 */
    text-decoration: underline;
}

/* 커스텀 마커 아이콘 스타일 */
.marker-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 3px solid #757575; /* 기본 테두리 색상, JS에서 덮어씀 */
    background-color: white;
    box-shadow: 0 3px 6px rgba(0,0,0,0.3);
    
    /* --- [수정 및 추가된 부분 시작] --- */
    background-image: url('/static/images/JinjaMap_Torii.png');
    background-size: 22px 22px; /* 아이콘 크기 조정 */
    background-repeat: no-repeat;
    background-position: center;
    /* --- [수정 및 추가된 부분 끝] --- */
    box-sizing: border-box; 
}


/* 내 위치 찾기 버튼 스타일 */
.location-button {
    background-color: #fff;
    border: 2px solid #fff;
    border-radius: 3px;
    box-shadow: 0 2px 6px rgba(0,0,0,.3);
    color: rgb(25,25,25);
    cursor: pointer;
    font-family: Roboto, Arial, sans-serif;
    font-size: 14px;
    line-height: 38px;
    margin: 10px;
    padding: 0 10px;
    text-align: center;
}