body {
    font-family: 'Arial', sans-serif;
    margin: 0;
    padding: 0;
    line-height: 1.6;
    color: #333;
    background-color: #f5f5f5;
}

main {
    padding: 2rem;
    background-color: white;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
}

footer {
    text-align: center;
    padding: 1rem;
    margin-top: 2rem;
    color: #666;
    font-size: 0.9rem;
}

.main-nav {
    background-color: #fff;
    padding: 0.5rem 2rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 60px;
}

.nav-brand {
    display: flex;
    align-items: center;
}

.brand-text {
    text-decoration: none;
    color: #333;
    font-size: 1.5rem;
    font-weight: bold;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 2rem 0;
    gap: 0.5rem;
}

.pagination-item {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 10px;
    border-radius: 4px;
    background-color: white;
    color: #333;
    text-decoration: none;
    font-weight: 500;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    border: 1px solid #e9ecef;
}

.pagination-item.active {
    background-color: #3498db;
    color: white;
    border-color: #3498db;
}

.pagination-item.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

.pagination-ellipsis {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    color: #7f8c8d;
}

/* Waterfall Image */
.waterfall-image::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: var(--bg-image);
    background-size: cover;
    background-position: center;
    filter: blur(20px); /* 背景画像にぼかし効果を適用 */
    z-index: 1; /* 背景が画像の下に来るように設定 */
}

.waterfall-image img {
    position: relative;
    width: auto;
    max-width: 100%;
    height: 100%;
    box-sizing: border-box;
    display: block;
    margin: 0 auto;
    z-index: 2; /* 画像を背景の上に表示 */
}

/* waterfall card */
.waterfall-card {
    display: flex;
    align-items: center;
    margin-bottom: 1px;
    border: 1px solid #ccc;
    border-radius: 2px;
    overflow: hidden;
    height: 150px;
    text-decoration: none; /* リンクの下線を消す */
    color: inherit; /* テキストの色を継承 */
}

.list-waterfall-image-container {
    width: 225px;
    height: 150px;
    overflow: hidden;
    text-align: center;
    box-sizing: border-box;
    position: relative;
    filter: none;
}

.waterfall-info {
    width: 35%;
    overflow: hidden;
    box-sizing: border-box;
    padding: 4px 16px;
}

.waterfall-info .waterfall-name {
    margin: 0;
    padding: 2px 0;
    font-size: 1.5em;
    font-weight: bold; /* 太字にする */
}

.waterfall-info .waterfall-height, 
.waterfall-info .waterfall-location, 
.waterfall-info .waterfall-width {
    margin: 2px 0;
}

/* waterfall card grid */
.waterfalls-grid {
    display: grid;
    grid-template-columns: 1fr; /* 1列に設定 */
    gap: 10px;
    padding: 10px 0;
}

/* Top Page (List Page) */
.top-image {
    width: 100%;
    margin: 0 auto;
    text-align: center; /* インライン要素を中央に配置 */
    box-sizing: border-box;
    position: relative;
    overflow: hidden; /* はみ出しを防ぐ */
    height: 350px;
}

.top-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.waterfall-list-container {
    padding: 20px;
}

.sort-options {
    display: flex;
    align-items: center;
    justify-content: flex-end; /* ボタンを右寄せにする */
    margin-bottom: 16px;
    padding: 8px;
    background-color: #fff;
    border-bottom: 1px solid #ddd;
}

.sort-options span {
    font-size: 1em;
    margin-right: 8px;
    color: #555;
}

#sort-select {
    padding: 6px 10px;
    font-size: 1em;
    border: 1px solid #ddd;
    border-radius: 3px;
    background-color: #f9f9f9;
    color: #555;
    transition: border-color 0.2s;
}

#sort-select:hover {
    border-color: #aaa;
}

#sort-select:focus {
    border-color: #777;
    outline: none;
}

/* Detail Page */
.waterfall-header {
    display: flex;
    align-items: center;
}

.waterfall-header h1 {
    margin-right: 14px;
}

.waterfall-header .location {
    margin-bottom: 4px;
}

/* Sort Options */
.sort-options {
    margin: 20px 0;
    text-align: right;
    padding: 0 20px;
}

.sort-options select {
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
    margin-left: 10px;
}

.sort-options select:focus {
    outline: none;
    border-color: #666;
}

.waterfall-detail h2 {
    color: #2c3e50;
    font-weight: 600;
    margin-bottom: 1.5rem;
    border-bottom: 2px solid #3498db;
}

.detail-waterfall-image-container {
    width: 95%;
    margin: 0 auto;
    text-align: center;
    box-sizing: border-box;
    position: relative;
    overflow: hidden;
    filter: none;
    height: 400px;
}

.waterfall-info-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1.5rem;
}

.waterfall-info-table th {
    width: 30%;
    padding: 0.75rem;
    text-align: left;
    background-color: #f1f9ff;
    border-bottom: 1px solid #e9ecef;
}

.waterfall-info-table td {
    padding: 0.75rem;
    border-bottom: 1px solid #e9ecef;
}

.prefecture-item {
    display: inline-block; /* インラインブロックで横並びに */
    margin-right: 10px; /* 都道府県間のスペース */
    margin-bottom: 10px; /* 行が折り返されたときのスペース */
}

/* Review */
.reviews-section {
    margin-top: 30px;
}

.review-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.review-card {
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    background-color: #fff;
}

.reviewer-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.reviewer-image {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: #3498db;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
}

.reviewer-name {
    font-weight: 500;
    font-size: 18px;
}

.review-date {
    font-size: 16px;
    color: #666;
}

.visit-year-and-month {
    font-size: 16px;
    color: #666;
}

.review-ratings {
    display: flex;
    gap: 20px;
    margin-bottom: 15px;
}

.review-rating-item {
    text-align: center;
}

.review-rating-label {
    font-size: 12px;
    color: #666;
    margin-bottom: 5px;
}

.review-rating-stars {
    font-size: 16px;
    color: #ffd700;
}

.review-comment {
    font-size: 14px;
    line-height: 1.6;
    color: #555;
}

.review-additional-info th{
    text-align: left;
}

/* Rating Section */
.waterfall-ratings {
    margin: 8px;
    padding: 8px;
    display: flex;
    gap: 24px;
}

.rating-summary {
    min-width: 160px;
}

.rating-big-score {
    font-size: 64px;
    font-weight: bold;
    color: #1a73e8;
    line-height: 1;
    margin-bottom: 4px;
}

.rating-small-score {
    font-size: 32px;
    font-weight: bold;
    color: #1a73e8;
    line-height: 1;
}

.rating-stars {
    font-size: 24px;
    color: #ffd700;
}

.rating-details {
    min-width: 160px;
    display:flex;
    flex-flow: column;
    justify-content:space-between;
}

.rating-item {
    display: flex;
}

.rating-bar-container {
    display: flex;
    align-items: center;
}

.rating-label {
    width: 160px;
    font-size: 16px;
}

/* スタイルをリセット */
.rating-progress {
    height: 8px;
    width: 240px;
    margin: 0 16px 0 0;
    -webkit-appearance: none;
}
 
.rating-progress::-webkit-progress-bar { 
    background-color: #ffffff;
}
.rating-progress::-webkit-progress-value {
    background-color: #ffd700;
} 
.rating-progress::-moz-progress-bar {
    background-color: #ffd700;
}
.rating-progress::-ms-fill {
    background-color: #ffd700;
}

.rating-value {
    font-size: 16px;
    font-weight: bold;
}

.no-combined-rating {
    display: flex;
    flex-direction: column;
    align-items: center;
    height: 120px;
    margin-bottom: 8px;
}

.no-combined-rating-star {
    text-align: center;
    font-size: 48px;
    color: #808080;
}

.no-combined-rating-text {
    font-size: 16px;
    color: #808080;
    font-weight: bold;
}

.no-reviews-text {
    text-align: center;
}

.button-container {
    margin-top: 24px;
    padding-top: 16px;
    border-top: 1px solid #e5e7eb;
}

.button-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
    justify-content: center;
    align-items: center;
}

.prefecture-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background-color: transparent;
    border: 1px solid #d1d5db;
    color: #374151;
    padding: 12px 24px;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s ease-in-out;
    cursor: pointer;
    min-width: 200px;
    justify-content: center;
}

.waterfall-card .review-section {
    height: 100%;
    width: 40%;
    overflow: hidden;
    box-sizing: border-box;
    padding: 4px 8px;
}


.waterfall-card .rating-score-container {
    height: 35%;
    display: flex;
    align-items: center;
}

.waterfall-card .list-rating-details {
    height: 65%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.waterfall-card .rating-label {
    font-size: 14px;
    color: #666;
    margin-bottom: 0px;
}

.waterfall-card .rating-stars {
    padding: 0 10px;
}

.waterfall-card .no-review-container {
    text-align: center;
    height: 100%;
}

.waterfall-card .no-review-stars {
    display: flex;
    justify-content: center;
    align-items: flex-end;
    font-size: 18px;
    color: #d1d5db;
    margin-bottom: 8px;
    height: 50%;
}

.waterfall-card .no-review-message {
    font-size: 16px;
    color: #6b7280;
    margin-bottom: 8px;
    height: 50%;
}


/* ヒーローセクション */
.hero-section {
    background-image: var(--hero-bg-image, none);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    color: white;
    padding: 96px 20px;
    text-align: center;
    position: relative;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        135deg,
        rgba(0, 0, 0, 0.6) 0%,
        rgba(0, 0, 0, 0.3) 50%,
        rgba(0, 0, 0, 0.7) 100%
    );
}

.hero-container {
    max-width: 1280px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
}

.hero-title {
    font-size: 4rem;
    margin-bottom: 24px;
    line-height: 1.2;
}

.hero-subtitle {
    font-size: 1.6rem;
    margin-bottom: 32px;
    color: #fff;
}

/* 検索バー */
.search-container {
    max-width: 512px;
    margin: 0 auto;
}

.search-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.search-form {
    flex-direction: row;
}

.search-input-container {
    position: relative;
    flex: 1;
}

.search-input {
    width: 100%;
    padding: 12px 16px 12px 40px;
    font-size: 18px;
    border: none;
    border-radius: 8px;
    outline: none;
    color: #111827;
    box-sizing: border-box;
}

.search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #6b7280;
    width: 20px;
    height: 20px;
}

.search-btn {
    background: #fbbf24;
    color: #111827;
    padding: 8px 32px;
    border: none;
    border-radius: 8px;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.3s;
}

.search-btn:hover {
    background: #f59e0b;
}

/* 成功メッセージ */
.success-message-container {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    border-radius: 8px;
    padding: 16px 20px;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 12px;
    color: white;
    box-shadow: 0 2px 4px rgba(16, 185, 129, 0.2);
    animation: slideDown 0.4s ease-out;
    position: relative;
}

.error-message-container {
    background: linear-gradient(135deg, #ef4444 0%, #b91c1c 100%);
    border-radius: 8px;
    padding: 16px 20px;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 12px;
    color: white;
    box-shadow: 0 2px 4px rgba(239, 68, 68, 0.2);
    animation: slideDown 0.4s ease-out;
    position: relative;
}

.warning-message-container {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    border-radius: 8px;
    padding: 16px 20px;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 12px;
    color: white;
    box-shadow: 0 2px 4px rgba(245, 158, 11, 0.2);
    animation: slideDown 0.4s ease-out;
    position: relative;
}

.info-message-container {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    border-radius: 8px;
    padding: 16px 20px;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 12px;
    color: white;
    box-shadow: 0 2px 4px rgba(59, 130, 246, 0.2);
    animation: slideDown 0.4s ease-out;
    position: relative;
}

.message-icon {
    width: 24px;
    height: 24px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    flex-shrink: 0;
}

.message-content {
    flex: 1;
}

.message-title {
    font-weight: 600;
    font-size: 16px;
    margin-bottom: 2px;
}

.close-btn {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.8);
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: all 0.2s;
    flex-shrink: 0;
}

.close-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

/* 非表示アニメーション */
.hide-message {
    animation: slideUp 0.3s ease-out forwards;
}

@keyframes slideUp {
    from {
        opacity: 1;
        transform: translateY(0);
        max-height: 100px;
    }
    to {
        opacity: 0;
        transform: translateY(-10px);
        max-height: 0;
        margin-bottom: 0;
        padding-top: 0;
        padding-bottom: 0;
    }
}

