.results-page {
    background: linear-gradient(180deg, #1a2a3a 0%, #2c3e50 100%);
    min-height: 100vh;
    padding: 2rem 1rem;
}
i.fas.fa-search,
.info-card i{
    font-size: 1rem;
    margin-bottom: auto;
}
.results-section {
    position: relative;
    max-width: 1000px;
    margin: 0 auto;
    padding: 2rem;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.results-card {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 2rem;
    width: 100%;
    max-width: 380px;
    margin: 0 auto;
}

.results-card.info-card {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 2rem;
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.results-card.info-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.results-card.info-card .card-title {
    color: #2c5282;
    font-size: 1.3rem;
    margin-bottom: 1.5rem;
    text-align: center;
    font-weight: 600;
    border-bottom: 2px solid #e6eff8;
    padding-bottom: 0.8rem;
}

section.results-list-section.info-section,
section.n-map-section.info-section {
    margin-top: auto;
}
.results-card.info-card .results-table-container,
.results-card.info-card .location-map {
    margin-top: 1rem;
}

/* セクションタイトル */
.section-title {
    color: #1e88e5;
    font-size: 1.8rem;
    font-weight: bold;
    text-align: center;
    margin-bottom: 2rem;
    padding: 1rem 0;
    border-bottom: 2px solid #1e88e5;
    width: 100%;
    max-width: 600px;
    margin: 0 auto 2rem;
}

/* 位置情報結果表示エリア */
#locationResult {
    text-align: left;
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

#locationResult p {
    display: flex;
    align-items: center;
    margin: 0;
    padding: 0.5rem 0;
}

#locationResult i {
    width: 40px;  /* アイコンの幅を固定 */
    text-align: center;
    margin-right: 1rem;
    color: #1e88e5;
}

#locationResult span {
    flex: 1;  /* 残りのスペースを文字列が占める */
}

/* 位置情報アイコンの個別スタイル */
i.fas.fa-map-marker-alt,
i.fas.fa-home {
    margin-bottom: auto;
}

/* レスポンシブデザイン */
@media (max-width: 1024px) {
    .results-container {
        max-width: 800px;
        gap: 2rem;
    }

    .results-card {
        max-width: 340px;
    }

    .image-preview {
        height: 250px;
    }
}

@media (max-width: 768px) {
    .results-section {
        padding: 1rem;
    }

    .section-title {
        font-size: 1.5rem;
    }

    .results-container {
        grid-template-columns: 1fr;
        max-width: 400px;
        gap: 1.5rem;
    }

    .results-card {
        max-width: 100%;
        padding: 1.5rem;
    }

    .image-preview {
        height: 280px;
    }

    .dropzone-text {
        width: 90%;
    }

    .location-buttons {
        grid-template-columns: 1fr;
    }

    i.fas.fa-camera {
        font-size: 1.5rem;  /* iPadサイズ以下でのフォントサイズ */
    }
}

@media (max-width: 480px) {
    .image-preview {
        height: 240px;
    }

    .results-card {
        padding: 1rem;
    }

    .dropzone-text {
        width: 95%;
    }

    i.fas.fa-camera {
        font-size: 1.5rem;  /* スマートフォンサイズでのフォントサイズ */
    }

    .submit-btn {
        font-size: 1rem;  /* スマートフォンサイズでのフォントサイズ */
    }
}

.results-content {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 1rem;
}

.results-header {
    text-align: center;
    margin-bottom: 3rem;
}

.results-title {
    font-size: 2.5rem;
    color: #1a365d;
    margin-bottom: 1rem;
}

.results-description {
    font-size: 1.2rem;
    color: #4a5568;
}

.results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.results-section h2 {
    color: #2c5282;
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
    border-bottom: 2px solid #e2e8f0;
    padding-bottom: 0.5rem;
}

/* 水質データスタイル */
.data-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 1rem;
}

.data-item {
    text-align: center;
    padding: 1rem;
    background: #f7fafc;
    border-radius: 6px;
}

.data-item label {
    display: block;
    color: #4a5568;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.data-item .value {
    font-size: 1.2rem;
    color: #2b6cb0;
    font-weight: bold;
}

/* プランクトン分析スタイル */
.plankton-data {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.plankton-chart {
    background: #f7fafc;
    padding: 1rem;
    border-radius: 6px;
    height: 300px;
}

.plankton-info ul {
    list-style: none;
    padding: 0;
}

.plankton-info li {
    margin-bottom: 0.5rem;
    color: #4a5568;
}

.plankton-info span {
    color: #2b6cb0;
    font-weight: 500;
}

/* 環境要因スタイル */
.env-factors {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 1rem;
}

.factor {
    text-align: center;
    padding: 1rem;
    background: #f7fafc;
    border-radius: 6px;
}

.factor i {
    font-size: 2rem;
    color: #3182ce;
    margin-bottom: 0.5rem;
}

.factor h3 {
    font-size: 1rem;
    color: #2d3748;
    margin-bottom: 0.5rem;
}

.factor p {
    color: #4a5568;
    font-size: 0.9rem;
}

/* 対策提案スタイル */
.solution-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.solution-card {
    background: #f7fafc;
    padding: 1.5rem;
    border-radius: 6px;
}

.solution-card h3 {
    color: #2d3748;
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

.solution-card ul {
    list-style: none;
    padding: 0;
}

.solution-card li {
    color: #4a5568;
    margin-bottom: 0.5rem;
    padding-left: 1.5rem;
    position: relative;
}

.solution-card li::before {
    content: "•";
    position: absolute;
    left: 0;
    color: #3182ce;
}

/* レスポンシブ対応 */
@media (max-width: 768px) {
    .results-title {
        font-size: 2rem;
    }

    .results-description {
        font-size: 1rem;
    }

    .results-grid {
        grid-template-columns: 1fr;
    }

    .data-grid,
    .env-factors,
    .solution-cards {
        grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    }
}

/* マップモーダル関連のスタイル */
.map-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 9999;
    justify-content: center;
    align-items: center;
}

.map-modal-content {
    background-color: white;
    width: 90%;
    max-width: 800px;
    border-radius: 15px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    padding: 20px;
    position: relative;
}

#map {
    height: 400px;
    width: 100%;
    border-radius: 8px;
    margin: 10px 0;
}

.map-confirm-button {
    margin-top: 20px;
    width: 100%;
    padding: 12px;
    background: linear-gradient(45deg, #2ecc71, #27ae60);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.map-confirm-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(46, 204, 113, 0.3);
}

/* 解析結果モーダル */
.analysis-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 99999;
    justify-content: center;
    align-items: center;
    overflow: auto;
    padding: 20px;
}

.analysis-modal-content {
    background-color: #ffffff;
    width: 90%;
    max-width: 700px;
    border-radius: 10px;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.2);
    padding: 0;
    position: relative;
    overflow: hidden;
    font-family: "Noto Sans JP", sans-serif;
    z-index: 100000;
    margin: 20px auto;
}

/* 証明書スタイル */
.certificate-header {
    background: linear-gradient(135deg, #1e5799 0%, #2989d8 50%, #207cca 51%, #7db9e8 100%);
    color: white;
    padding: 20px;
    text-align: center;
    border-bottom: 2px solid #1a4c80;
}

.certificate-title {
    font-size: 1.5rem;
    font-weight: bold;
    margin-bottom: 5px;
}

.certificate-date {
    font-size: 0.9rem;
}

.certificate-body {
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    background: url('data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxMDAiIGhlaWdodD0iMTAwIj48Y2lyY2xlIGN4PSI1MCIgY3k9IjUwIiByPSI0MCIgZmlsbD0ibm9uZSIgc3Ryb2tlPSJyZ2JhKDAsIDAsIDAsIDAuMDUpIiBzdHJva2Utd2lkdGg9IjIiLz48L3N2Zz4=') center center;
    color: #333333;
}

.image-data {
    display: flex;
    justify-content: center;
    margin-bottom: 15px;
}

.image-section {
    text-align: center;
    background-color: white;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 15px;
    width: 100%;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.image-title {
    font-weight: bold;
    margin-bottom: 10px;
    color: #1a4c80;
}

.analyzed-image {
    height: 180px;
    overflow: hidden;
    margin: 0 auto;
    text-align: center;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    background-color: #f5f5f5;
}

.analyzed-image img {
    max-height: 100%;
    max-width: 100%;
    object-fit: contain;
    display: block;
    margin: 0 auto;
}

.result-data {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    justify-content: space-between;
}

.result-section {
    flex: 1;
    min-width: 200px;
    background-color: white;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 15px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    position: relative;
}

.result-title {
    font-weight: bold;
    margin-bottom: 10px;
    color: #1a4c80;
    border-bottom: 2px solid #e0e0e0;
    padding-bottom: 5px;
}

.result-value {
    font-size: 1.1rem;
    margin-top: 10px;
    color: #333333;
    font-weight: 500;
    background-color: #f8f8f8;
    padding: 10px 15px;
    border-radius: 5px;
    border: 1px solid #e0e0e0;
    display: block;
    line-height: 1.6;
    text-align: left;
}

.result-value div {
    margin-bottom: 8px;
    padding: 5px 0;
    border-bottom: 1px dashed #e0e0e0;
}

.result-value div:last-child {
    margin-bottom: 0;
    border-bottom: none;
}

.certificate-footer {
    padding: 20px;
    text-align: center;
    background-color: #f0f0f0;
    border-top: 1px solid #ddd;
    position: relative;
}

.certificate-stamp {
    position: absolute;
    top: 50%;
    right: 60px;
    transform: translateY(-50%) rotate(-15deg);
    font-size: 1.5rem;
    color: rgba(220, 0, 0, 0.7);
    border: 3px solid rgba(220, 0, 0, 0.7);
    padding: 5px 15px;
    border-radius: 8px;
    font-weight: bold;
}

.certificate-close-btn {
    background: linear-gradient(to bottom, #3498db, #2980b9);
    color: white;
    border: none;
    padding: 10px 25px;
    border-radius: 5px;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.certificate-close-btn:hover {
    background: linear-gradient(to bottom, #2980b9, #3498db);
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

/* レスポンシブ対応 */
@media (max-width: 768px) {
    .certificate-title {
        font-size: 1.2rem;
    }
    
    .result-data {
        flex-direction: column;
    }
    
    .certificate-stamp {
        font-size: 1.2rem;
        right: 20px;
    }
}

/* 画像がある場合は背景の指示テキストを非表示に */
.image-preview.has-image .dropzone-text {
    display: none;
}

/* 詳細モーダルが最初は非表示になるように修正 */
.detail-modal {
    display: none; /* 初期状態では非表示 */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 99999;
    justify-content: center;
    align-items: center;
    overflow: auto;
    padding: 20px;
}

/* モーダルが表示される時のスタイル（JavaScriptで.showクラスを追加するか、直接display:flexに変更） */
.detail-modal.show {
    display: flex;
}

/* テーブルコンテナのスタイルを調整して横スクロールを可能に */
.results-table-container {
    width: 100%;
    overflow-x: auto;
    margin-bottom: 1.5rem;
}

.results-table {
    width: 100%;
    border-collapse: collapse;
    color: #333333; /* テキスト色を濃いグレーに変更 */
}

/* テーブルヘッダー */
.results-table thead th {
    background-color: #e2e8f0; /* 薄いグレーの背景 */
    color: #2c5282; /* 青みがかった濃い色 */
    padding: 12px 15px;
    text-align: center;
    font-weight: 600;
    border-bottom: 2px solid #cbd5e0;
}

/* テーブル本体のセル */
.results-table tbody td {
    padding: 10px 15px;
    border-bottom: 1px solid #e2e8f0;
    color: #2d3748; /* 暗めのグレー */
}

/* 奇数行と偶数行で色を変えて視認性アップ */
.results-table tbody tr:nth-child(odd) {
    background-color: #f8f9fa;
}

.results-table tbody tr:nth-child(even) {
    background-color: #ffffff;
}

/* ホバー時のハイライト */
.results-table tbody tr:hover {
    background-color: #ebf4ff; /* 薄い青色のハイライト */
}

/* 詳細ボタンのスタイル */
.detail-btn {
    background-color: #4299e1;
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: background-color 0.2s;
}

.detail-btn:hover {
    background-color: #3182ce;
}

.detail-btn i {
    margin-right: 5px;
}

/* 調査場所マップのスタイル改善 */
.location-map-section .results-card.info-card {
    width: 100%;
    margin-bottom: 2rem;
}

.location-map {
    width: 100%;
    height: 500px; /* マップの高さを大きく */
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #e2e8f0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    margin: 1rem 0;
}

/* レスポンシブ対応 */
@media (max-width: 768px) {
    .location-map {
        height: 400px;
    }
}

@media (max-width: 480px) {
    .location-map {
        height: 300px;
    }
}

/* ページインジケーターを他のテキストと色合いを統一 */
.page-indicator {
    display: inline-block;
    padding: 10px 18px;
    margin: 0 12px;
    background-color: #f0f4f8; /* 薄い青みがかったグレー背景 */
    color: #2c5282; /* 青みがかった暗い色のテキスト（他の見出しと同系色） */
    font-weight: 700; /* 太字維持 */
    font-size: 1.1rem;
    border-radius: 8px;
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.1);
    min-width: 70px;
    text-align: center;
    border: 1px solid #e2e8f0; /* 薄い境界線を追加 */
}

/* ホバー効果 */
.pagination-controls:hover .page-indicator {
    transform: translateY(-2px);
    box-shadow: 0 5px 10px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
}

/* ページ読み込み時にCSSを追加 */
document.addEventListener('DOMContentLoaded', function() {
    // 既存のコード...
    
    // 住所セルのスタイルを追加
    const style = document.createElement('style');
    style.innerHTML = `
        .address-cell {
            text-align: left;
        }
        .results-table td {
            text-align: left;
        }
    `;
    document.head.appendChild(style);
});

td.value-cell {
    text-align: left;
}

td.value-cell div {
    margin: 2px 0;
} 