body {
    margin: 0;
    padding: 0;
    overflow: hidden;
}

/* ヘッダー */
.header {
    height: 40px;
    background-color: #2c3e50;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
    z-index: 1000;
}

.header-title {
    margin: 0;
    font-size: 18px;
    font-weight: bold;
    color: #ffffff;
    font-family: Arial, sans-serif;
}

.header-nav {
    display: flex;
    gap: 15px;
}

.header-link {
    color: #ffffff;
    text-decoration: none;
    font-size: 14px;
    font-family: Arial, sans-serif;
    transition: color 0.2s;
}

.header-link:hover {
    color: #3498db;
}

/* メインコンテナ */
.main-container {
    display: flex;
    height: calc(100vh - 40px);
    overflow: hidden;
}

#map {
    flex: 1;
    height: 100%;
    position: relative;
}

/* 情報パネル */
.info-panel {
    width: 350px;
    background-color: #ffffff;
    box-shadow: -2px 0 4px rgba(0,0,0,0.1);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.info-panel-header {
    background-color: #34495e;
    color: #ffffff;
    padding: 12px 15px;
    font-size: 16px;
    font-weight: bold;
    font-family: Arial, sans-serif;
}

.info-panel-content {
    flex: 1;
    padding: 15px;
    overflow-y: auto;
    font-family: Arial, sans-serif;
}

.info-panel-empty {
    color: #7f8c8d;
    text-align: center;
    margin-top: 50px;
    font-size: 14px;
}

.info-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.info-table tr {
    border-bottom: 1px solid #ecf0f1;
}

.info-table td {
    padding: 8px 4px;
    vertical-align: top;
}

.info-table td:first-child {
    font-weight: bold;
    color: #34495e;
    width: 100px;
}

.info-table td:last-child {
    color: #2c3e50;
}

.legend {
    position: absolute;
    bottom: 30px;
    right: 10px;
    background: white;
    padding: 10px;
    border-radius: 5px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.3);
    font-family: Arial, sans-serif;
    font-size: 14px;
    z-index: 10;
}

.legend h4 {
    margin: 0 0 10px 0;
    font-size: 14px;
}

.legend-item {
    margin: 5px 0;
    display: flex;
    align-items: center;
}

.legend-color {
    width: 20px;
    height: 20px;
    margin-right: 8px;
    border: 1px solid #333;
}

.zoom-level {
    position: absolute;
    top: 10px;
    left: 10px;
    background: white;
    padding: 10px 15px;
    border-radius: 5px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.3);
    font-family: Arial, sans-serif;
    font-size: 16px;
    font-weight: bold;
    z-index: 10;
}

.layer-control {
    position: absolute;
    top: 70px;
    left: 10px;
    background: white;
    padding: 10px;
    border-radius: 5px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.3);
    font-family: Arial, sans-serif;
    font-size: 14px;
    z-index: 10;
}

.layer-control h4 {
    margin: 0 0 10px 0;
    font-size: 14px;
    font-weight: bold;
}

.layer-control label {
    display: block;
    margin: 5px 0;
    cursor: pointer;
}

.layer-control input[type="radio"] {
    margin-right: 5px;
}

.reset-pitch-button {
    position: absolute;
    bottom: 10px;
    left: 10px;
    background: white;
    padding: 8px 12px;
    border-radius: 5px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.3);
    font-family: Arial, sans-serif;
    font-size: 14px;
    cursor: pointer;
    border: none;
    z-index: 10;
    transition: background-color 0.2s;
}

.reset-pitch-button:hover {
    background-color: #f0f0f0;
}

.reset-pitch-button:active {
    background-color: #e0e0e0;
}

/* レスポンシブデザイン - モバイル対応 */
@media screen and (max-width: 768px) {
    /* ヘッダーの調整 */
    .header {
        height: 50px;
        padding: 0 10px;
    }
    
    .header-title {
        font-size: 16px;
    }
    
    .header-link {
        font-size: 12px;
    }
    
    /* メインコンテナを縦並びに変更 */
    .main-container {
        flex-direction: column;
        height: calc(100vh - 50px);
    }
    
    /* 地図を上部に配置 */
    #map {
        flex: 1;
        min-height: 60%;
    }
    
    /* 情報パネルを下部に配置 */
    .info-panel {
        width: 100%;
        max-height: 40%;
        box-shadow: 0 -2px 4px rgba(0,0,0,0.1);
    }
    
    .info-panel-header {
        padding: 10px 12px;
        font-size: 14px;
    }
    
    .info-panel-content {
        padding: 12px;
        font-size: 13px;
    }
    
    .info-table {
        font-size: 13px;
    }
    
    .info-table td:first-child {
        width: 90px;
        font-size: 12px;
    }
    
    /* 地図コントロールの調整 */
    .zoom-level {
        top: 10px;
        left: 10px;
        padding: 8px 12px;
        font-size: 14px;
    }
    
    .layer-control {
        top: 60px;
        left: 10px;
        padding: 8px;
        font-size: 12px;
        max-width: calc(100vw - 80px);
    }
    
    .layer-control h4 {
        font-size: 12px;
        margin: 0 0 8px 0;
    }
    
    .layer-control label {
        font-size: 12px;
        margin: 4px 0;
    }
    
    .legend {
        bottom: 20px;
        right: 10px;
        padding: 8px;
        font-size: 12px;
    }
    
    .legend h4 {
        font-size: 12px;
        margin: 0 0 8px 0;
    }
    
    .legend-item {
        margin: 4px 0;
    }
    
    .legend-color {
        width: 16px;
        height: 16px;
        margin-right: 6px;
    }
    
    .reset-pitch-button {
        bottom: 10px;
        left: 10px;
        padding: 6px 10px;
        font-size: 12px;
    }
}

/* さらに小さい画面（スマートフォン縦向き）の追加調整 */
@media screen and (max-width: 480px) {
    .header {
        height: 45px;
    }
    
    .header-title {
        font-size: 14px;
    }
    
    .header-nav {
        gap: 10px;
    }
    
    .header-link {
        font-size: 11px;
    }
    
    .main-container {
        height: calc(100vh - 45px);
    }
    
    /* 情報パネルの高さをさらに制限 */
    .info-panel {
        max-height: 35%;
    }
    
    /* 凡例とレイヤーコントロールを小さく */
    .legend {
        padding: 6px;
        font-size: 11px;
        bottom: 15px;
        right: 8px;
    }
    
    .legend h4 {
        font-size: 11px;
        margin: 0 0 6px 0;
    }
    
    .legend-color {
        width: 14px;
        height: 14px;
        margin-right: 5px;
    }
    
    .legend-item {
        margin: 3px 0;
    }
    
    .zoom-level {
        padding: 6px 10px;
        font-size: 12px;
    }
    
    .layer-control {
        padding: 6px;
        font-size: 11px;
    }
    
    .layer-control h4 {
        font-size: 11px;
    }
    
    .layer-control label {
        font-size: 11px;
    }
    
    .reset-pitch-button {
        padding: 5px 8px;
        font-size: 11px;
    }
}
