.research-page {
    background: linear-gradient(180deg, #1a2a3a 0%, #2c3e50 100%);
    min-height: 100vh;
    padding: 2rem 1rem;
}

.research-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);
}

/* セクションタイトル */
.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;
}

/* 画像アップロードエリア */
.upload-container {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 3rem;
    max-width: 900px;
    margin: 0 auto;
}

.upload-card {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 2rem;
    width: 100%;
    max-width: 380px;
    margin: 0 auto;
}

.image-preview {
    position: relative;
    overflow: hidden;
    width: 100%;
    height: 280px;
    margin-bottom: 1.5rem;
    border: 2px dashed #1e88e5;
    border-radius: 12px;
    background: #ffffff;
    transition: all 0.3s ease;
}

.image-preview img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.dropzone {
    cursor: pointer;
}

.dropzone.dragover {
    border-color: #2196f3;
    background-color: rgba(33, 150, 243, 0.1);
}

.dropzone-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    width: 80%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.8rem;
}

.upload-icon {
    font-size: 3rem;
    color: #1e88e5;
}

/* 位置情報エリア */
.location-buttons {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.location-btn {
    background: #ffffff;
    padding: 1.2rem;
    border-radius: 10px;
    font-size: 1.1rem;
    border: 2px solid #e3f2fd;
    transition: all 0.3s ease;
    text-align: left;
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.location-btn:hover {
    background: #e3f2fd;
    transform: translateY(-2px);
}

/* 位置情報ボタンのアイコン個別指定 */
i.fas.fa-map-marked-alt,
i.fas.fa-satellite-dish,
i.fas.fa-search-location {
    margin-bottom: auto;
}

/* カメラアイコンの基本スタイル */
i.fas.fa-camera {
    margin-bottom: auto;
    font-size: 2rem;  /* PCサイズのフォントサイズ */
}

/* アイコンとテキストの配置調整 */
.location-btn i {
    display: flex;
    align-items: center;
}

.location-btn .btn-text {
    display: flex;
    align-items: center;
}

.location-result {
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 5px;
}

/* 位置情報結果表示エリア */
#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;
}

/* 送信ボタン */
.submit-btn {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    margin: 3rem auto;
    background: linear-gradient(45deg, #2ecc71, #27ae60);
    color: white;
    padding: 1.5rem 4rem;
    border-radius: 50px;
    font-size: 1.2rem;  /* PCサイズのフォントサイズ */
    font-weight: 600;
    border: none;
    cursor: pointer;
    min-width: 300px;
    max-width: 400px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(46, 204, 113, 0.3);
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(46, 204, 113, 0.4);
}

.file-input {
    display: none !important;
}

/* レスポンシブデザイン */
@media (max-width: 1024px) {
    .upload-container {
        max-width: 800px;
        gap: 2rem;
    }

    .upload-card {
        max-width: 340px;
    }

    .image-preview {
        height: 250px;
    }
}

@media (max-width: 768px) {
    .research-section {
        padding: 1rem;
    }

    .section-title {
        font-size: 1.5rem;
    }

    .upload-container {
        grid-template-columns: 1fr;
        max-width: 400px;
        gap: 1.5rem;
    }

    .upload-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;
    }

    .upload-card {
        padding: 1rem;
    }

    .dropzone-text {
        width: 95%;
    }

    i.fas.fa-camera {
        font-size: 1.5rem;  /* スマートフォンサイズでのフォントサイズ */
    }

    .submit-btn {
        font-size: 1rem;  /* スマートフォンサイズでのフォントサイズ */
    }
}

.research-content {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 1rem;
}

.research-header {
    text-align: center;
    margin-bottom: 3rem;
}

.research-title {
    font-size: 2.5rem;
    color: #1a365d;
    margin-bottom: 1rem;
}

.research-description {
    font-size: 1.2rem;
    color: #4a5568;
}

.research-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.research-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) {
    .research-title {
        font-size: 2rem;
    }

    .research-description {
        font-size: 1rem;
    }

    .research-grid {
        grid-template-columns: 1fr;
    }

    .data-grid,
    .env-factors,
    .solution-cards {
        grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    }
}

/* アップロードボタン */
.modern-upload-btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.8rem 1.5rem;
    border-radius: 12px;
    cursor: pointer;
    overflow: hidden;
    transition: transform 0.3s ease;
    background: transparent;
    border: 2px solid #1e88e5;
    min-width: 200px;
    max-width: 250px;
}

.btn-content {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.8rem;
    z-index: 1;
    width: 100%;
}

.btn-content i,
.btn-text {
    color: #1e88e5;
}

.btn-text {
    font-size: 0.95rem;
    font-weight: 500;
}

/* ホバー時は変形のみ */
.modern-upload-btn:hover {
    transform: translateY(-2px);
}

/* 色変更に関連する全てのホバースタイルを削除 */
.modern-upload-btn:hover .btn-content i,
.modern-upload-btn:hover .btn-text,
.modern-upload-btn:hover .btn-bg {
    color: #1e88e5;  /* 常に同じ色を維持 */
}

/* アップロードカード内のタイトルのみに適用 */
.upload-card .card-title {
    color: #2c3e50;  /* 濃い青みがかった色 */
    font-size: 1.3rem;
    margin-bottom: 1.5rem;
    font-weight: 600;
}

/* GoogleMapアイコンの個別スタイル */
i.fas.fa-map-marked-alt {
    margin-bottom: auto;
    display: flex;
    justify-content: center;
    width: 24px;  /* アイコンの幅を固定 */
}

/* マップモーダル関連のスタイル */
.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;
}

.address-search-container {
    padding: 2rem;
    width: 100%;
}

.address-search-container h3 {
    margin-bottom: 1.5rem;
    color: #2c5282;
    text-align: center;
}

#addressInput {
    width: 100%;
    padding: 0.8rem;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 1rem;
    margin-bottom: 1.5rem;
}

#addressInput:focus {
    outline: none;
    border-color: #4299e1;
}

.modal-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.modal-button {
    padding: 0.8rem 2rem;
    border-radius: 8px;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.cancel-btn {
    background-color: #e2e8f0;
    color: #4a5568;
    border: none;
}

.confirm-btn {
    background-color: #4299e1;
    color: white;
    border: none;
}

.cancel-btn:hover {
    background-color: #cbd5e0;
}

.confirm-btn:hover {
    background-color: #3182ce;
}

/* PC/SPの表示切り替え用スタイル */
@media screen and (max-width: 768px) {
    .pc {
        display: none;
    }
    .sp {
        display: inline;
    }
}

@media screen and (min-width: 769px) {
    .pc {
        display: inline;
    }
    .sp {
        display: none;
    }
}

/* 地図の「この位置を選択」ボタンのハイライト */
.map-confirm-button.highlight {
    background-color: #4CAF50;
    transform: scale(1.05);
    box-shadow: 0 0 10px rgba(76, 175, 80, 0.5);
    transition: all 0.3s ease;
} 