/* style.css */
/* ヘッダー */
.main-header {
    background: #2c3e50;
    color: #fff;
    padding: 10px 20px;
    position: sticky;
    top: 0; z-index: 1000;
}
.header-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.header-left { display: flex; align-items: center; gap: 10px; }
.logo { width: 40px; height: 40px; }
.site-title { font-size: 1.5em; font-weight: bold; }
.user-link { color: #fff; text-decoration: none; margin-right: 15px; font-weight: bold; }
.logout-btn, .login-btn { color: #bdc3c7; text-decoration: none; font-size: 0.9em; }

/* 人気の山 */
.popular-section { padding: 20px; background: #fff; margin-bottom: 10px; border-bottom: 1px solid #eee; }
.popular-list { 
    display: flex; gap: 10px; overflow-x: auto; padding-bottom: 10px; 
    scrollbar-width: thin; /* スマホで横スクロール可能に */
}
.rank-item {
    background: #f8f9fa; padding: 8px 15px; border-radius: 20px;
    white-space: nowrap; text-decoration: none; color: #333; font-size: 0.9em;
    border: 1px solid #ddd;
}
.rank-num { font-weight: bold; color: #e67e22; margin-right: 5px; }

/* 検索バー */
.search-nav { background: #ecf0f1; padding: 15px; }
.search-bar {
    max-width: 1200px; margin: 0 auto;
    display: flex; flex-wrap: wrap; gap: 10px;
}
.search-bar select, .search-bar input {
    padding: 10px; border: 1px solid #bdc3c7; border-radius: 4px; flex: 1; min-width: 150px;
}
.search-bar button {
    background: #27ae60; color: #fff; border: none; padding: 10px 20px; border-radius: 4px; cursor: pointer;
}

@media (max-width: 768px) {
    .header-container { flex-direction: column; gap: 10px; }
    .search-bar { flex-direction: column; }
}

body { font-family: sans-serif; background-color: #f4f4f4; }
h1 { text-align: center; }

/* グリッドレイアウト */
.mountain-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    padding: 20px;
}

/* 山カードの基本スタイル */
.mountain-card {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    position: relative; /* 子要素の絶対配置の基準 */
    transition: transform 0.2s;
}
.mountain-card:hover { transform: translateY(-3px); }

/* 画像エリア */
.card-image {
    width: 100%;
    height: 200px;
    object-fit: cover; /* 縦横比を維持して切り抜き */
    display: block;
}

/* 画像の上に重ねるテキストエリア */
.card-overlay {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 200px;
    background: linear-gradient(to bottom, rgba(0,0,0,0.5), rgba(0,0,0,0)); /* 文字を見やすくするグラデーション */
    color: #fff;
    padding: 15px;
    box-sizing: border-box;
}

.card-prefectures { font-size: 0.8em; opacity: 0.9; }
.card-name-kana { font-size: 0.8em; opacity: 0.8; margin-top: 2px; }
.card-name { font-size: 1.4em; font-weight: bold; margin: 2px 0; text-shadow: 1px 1px 2px rgba(0,0,0,0.5); }
.card-categories { font-size: 0.8em; background: rgba(255,255,255,0.2); padding: 2px 6px; border-radius: 4px; display: inline-block; }

/* 登頂バッジ */
.status-badge {
    position: absolute;
    bottom: 10px; right: 10px;
    background-color: #ff9800; /* オレンジ */
    color: #fff;
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 0.8em;
    font-weight: bold;
}

/* --- 未登頂の山のスタイル --- */
.not-climbed .card-image {
    filter: grayscale(100%) brightness(60%); /* 白黒にして暗くする */
}
.not-climbed .status-badge {
    background-color: #757575; /* グレー */
    opacity: 0.8;
}
